Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-11-29 20:00:24


"John Maddock" <jm_at_[hidden]> writes:

>> > I tried to compile Boost.Test using the Comeau C++ compiler version
>> > 4.3.0.1 under Linux, and I found several problems that I would like to
>> > report. For one, the build process needs the pre-processor define
>>
>> > _POSIX_SOURCE
>>
>> > defined when compiling the execution_monitor.cpp module, because
>> > otherwise the <setjmp.h> header (Shouldn't you be using <csetjmp>
>> > anyway?) does not define the datatype "sigjmp_buf".
>>
>> I need help from Comeau and/or "Unix" users.
>>
>> 1. Would it be OK if I switch to csetjmp? Does it correctly supported by
> all
>> unix compilers?
>> 2. Which platforms/compilers require this flag to be set?
>> 3. Where would be the best place to set it: in a code or in a Jamfile?
>
> IMO it's the wrong fix: currently you have:
>
> // for testing on Win32, GCC thinks it is a unix platform
> // TODO: figure out how to tell it is really unix
> #elif defined(__unix) && !defined(__GNUC__)
>
> There are several things wrong with this:
>
> __unix need not be defined on POSIX conforming systems
> __unix may be defined on systems that don't support sigaction etc.
> almost all version of __GNUC__ do have sigaction support including cygwin.

And don't forget about MinGW. I don't know about its status
w.r.t. sigaction.

-- 
                       David Abrahams
   dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

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