Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2001-08-02 06:30:01


Darin,

This looks like a bug in <unistd.h> on the mac. POSIX v6 says:

13996 Constants for Options and Option Groups |
13997 The following symbolic constants, if defined in <unistd.h>, shall
have a value of -1, 0, or greater,
13998 unless otherwise specified below. If these are undefined, the
fpathconf (), pathconf (), orsysconf() |
13999 functions can be used to determine whether the option is provided for
a particular invocation of |
14000 the application.
14001 If a symbolic constant is defined with the value -1, the option is
not supported. Headers, data
14002 types, and function interfaces required only for the option need not
be supplied. An application
14003 that attempts to use anything associated only with the option is
considered to be requiring an
14004 extension.
14005 If a symbolic constant is defined with a value greater than zero, the
option shall always be
14006 supported when the application is executed. All headers, data types,
and functions shall be
14007 present and shall operate as specified.
14008 If a symbolic constant is defined with the value zero, all headers,
data types, and functions shall |
14009 be present. The application can check at runtime to see whether the
option is supported by |
14010 calling fpathconf (),pathconf (),orsysconf( ) with the indicated name
parameter. |

and:

14131 THR _POSIX_THREADS
14132 The implementation supports the Threads option. If this symbol has a
value other than -1 |
14133 or 0, it shall have the value 200xxxL. |

Now the problem with

#define _POSIX_THREADS

is that it doesn't fit into any of the above: which I guess means check at
runtime to see if it's working. In this case I don't think the
autodetection should work, and we should add BOOST_HAS_PTHREADS directly to
the mac.hpp file instead?

- John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/


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