From: John Maddock (jm_at_[hidden])
Date: 2002-11-27 06:27:27
> > I tried to compile Boost.Test using the Comeau C++ compiler version
> > 188.8.131.52 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
> 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.
#if defined(_POSIX_C_SOURCE) && defined(_POSIX_VERSION) && (_POSIX_VERSION
>= 199506L) && !defined(_WIN32)
which should be about right if I've understood the standard correctly.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk