Boost logo

Boost :

From: Martin Bonner (martin.bonner_at_[hidden])
Date: 2006-12-18 04:13:18


From: Oliver.Kowalke_at_[hidden]

> ??? wrote:
>> No, that doesn't work; you need to know the OS version for
>> deployment to know what's available at runtime.
>
> Autoconfig could help in this place - could this be integrated in the
> boost build process?

I don't think Autoconfig /does/ help. What ??? said (I have forgotten
their name, and you didn't attribute the quote), is that people build on
Solaris 10 (which has strerror_r) and then expect to be able to run on
Solaris 2 (which doesn't).

It seems to me that the only possible solution to that, is a define
which forces the use of strerror. We don't want to use strerror unless
we have to (because of thread safety), and the person building the code
is the only person who can know whether they need the capability to
deploy on Solaris 2.

Hmm. Maybe boost should use strerror_r always, and then tell people how
to write their own version if the OS doesn't provide it. (Grab a lock,
call strerror, copy result to passed in buffer, release lock -
absolutely safe against multithreaded calls to strerror_r, and there's a
good chance that other calls to strerror will work)

-- 
Martin Bonner
Pi Shurlok, Milton Hall, Ely Rd, Cambridge, CB24 6WZ, ENGLAND
+44 (0) 1223 203894

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk