Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2006-12-18 07:52:16


Christopher Kohlhoff wrote:
> On Mon, 18 Dec 2006 10:51:52 -0000, "Martin Bonner"
> <martin.bonner_at_[hidden]> said:
>> From: Oliver.Kowalke_at_[hidden]
>>
>>> With autoconfig the build process can check if strerror_r is avaliable
>>> and provide strerror as fall back.
>> Autoconfig can check if strerror_r is available ON THE BUILD MACHINE.
>> It CANNOT tell whether it will be available on the target machines.
>
> Unless I'm missing something, isn't this discussion only about Solaris?
> The Solaris man pages (I checked 7 and 10) say that strerror is MT-safe,
> so wouldn't it be simpler to always use that function when building for
> that platform?
>
> Solaris 7: http://docs.sun.com/app/docs/doc/805-3175/6j31empgq?a=view
> Solaris 10: http://docs.sun.com/app/docs/doc/816-5168/6mbb3hrti?a=view

According to other posts the same is also true of HP-UX.

So I've changed the code to always use strerror on Sun and HP-UX.

For Linux, I've changed the code to:

(defined(__linux) && (!defined(__USE_XOPEN2K) ||
defined(BOOST_SYSTEM_USE_STRERROR)))

My Linux testing machine is in pieces at the moment, so I could not test
before committing, and I don't have access to a Sun or HP-UX machine in
any case. So be warned the fix may have typos or other problems.

Thanks for digging into this,

--Beman


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