1 // (C) Copyright John Maddock 2001 - 2003.
\r
2 // (C) Copyright Darin Adler 2001 - 2002.
\r
3 // (C) Copyright Bill Kempf 2002.
\r
4 // Use, modification and distribution are subject to the
\r
5 // Boost Software License, Version 1.0. (See accompanying file
\r
6 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
\r
8 // See http://www.boost.org for most recent version.
\r
10 // Mac OS specific config options:
\r
12 #define BOOST_PLATFORM "Mac OS"
\r
14 #if __MACH__ && !defined(_MSL_USING_MSL_C)
\r
16 // Using the Mac OS X system BSD-style C library.
\r
18 # ifndef BOOST_HAS_UNISTD_H
\r
19 # define BOOST_HAS_UNISTD_H
\r
22 // Begin by including our boilerplate code for POSIX
\r
23 // feature detection, this is safe even when using
\r
24 // the MSL as Metrowerks supply their own <unistd.h>
\r
25 // to replace the platform-native BSD one. G++ users
\r
26 // should also always be able to do this on MaxOS X.
\r
28 # include <boost/config/posix_features.hpp>
\r
29 # ifndef BOOST_HAS_STDINT_H
\r
30 # define BOOST_HAS_STDINT_H
\r
34 // BSD runtime has pthreads, sigaction, sched_yield and gettimeofday,
\r
35 // of these only pthreads are advertised in <unistd.h>, so set the
\r
36 // other options explicitly:
\r
38 # define BOOST_HAS_SCHED_YIELD
\r
39 # define BOOST_HAS_GETTIMEOFDAY
\r
40 # define BOOST_HAS_SIGACTION
\r
42 # if (__GNUC__ < 3) && !defined( __APPLE_CC__)
\r
44 // GCC strange "ignore std" mode works better if you pretend everything
\r
45 // is in the std namespace, for the most part.
\r
47 # define BOOST_NO_STDC_NAMESPACE
\r
50 # if (__GNUC__ == 4)
\r
52 // Both gcc and intel require these.
\r
53 # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
\r
54 # define BOOST_HAS_NANOSLEEP
\r
60 // Using the MSL C library.
\r
62 // We will eventually support threads in non-Carbon builds, but we do
\r
63 // not support this yet.
\r
64 # if ( defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON ) || ( defined(TARGET_CARBON) && TARGET_CARBON )
\r
66 # if !defined(BOOST_HAS_PTHREADS)
\r
67 # define BOOST_HAS_MPTASKS
\r
68 # elif ( __dest_os == __mac_os_x )
\r
69 // We are doing a Carbon/Mach-O/MSL build which has pthreads, but only the
\r
70 // gettimeofday and no posix.
\r
71 # define BOOST_HAS_GETTIMEOFDAY
\r
74 // The MP task implementation of Boost Threads aims to replace MP-unsafe
\r
75 // parts of the MSL, so we turn on threads unconditionally.
\r
76 # define BOOST_HAS_THREADS
\r
78 // The remote call manager depends on this.
\r
79 # define BOOST_BIND_ENABLE_PASCAL
\r