aboutsummaryrefslogtreecommitdiff
path: root/cutl/details/boost/config/platform/macos.hpp
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-06-28 17:17:23 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-06-28 17:17:23 +0200
commitb51965dddbed68f23c5e8c169c23c794313ce5f6 (patch)
tree37bbdf4e5b1cdd34ea0694a5abd1483d1de2b3af /cutl/details/boost/config/platform/macos.hpp
parent5f06e7e30e4f511ce2fb27c5feefa6aeb6f00841 (diff)
Add boost subset as an implementation detail
Diffstat (limited to 'cutl/details/boost/config/platform/macos.hpp')
-rw-r--r--cutl/details/boost/config/platform/macos.hpp86
1 files changed, 86 insertions, 0 deletions
diff --git a/cutl/details/boost/config/platform/macos.hpp b/cutl/details/boost/config/platform/macos.hpp
new file mode 100644
index 0000000..b177f09
--- /dev/null
+++ b/cutl/details/boost/config/platform/macos.hpp
@@ -0,0 +1,86 @@
+// (C) Copyright John Maddock 2001 - 2003.
+// (C) Copyright Darin Adler 2001 - 2002.
+// (C) Copyright Bill Kempf 2002.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for most recent version.
+
+// Mac OS specific config options:
+
+#define BOOST_PLATFORM "Mac OS"
+
+#if __MACH__ && !defined(_MSL_USING_MSL_C)
+
+// Using the Mac OS X system BSD-style C library.
+
+# ifndef BOOST_HAS_UNISTD_H
+# define BOOST_HAS_UNISTD_H
+# endif
+//
+// Begin by including our boilerplate code for POSIX
+// feature detection, this is safe even when using
+// the MSL as Metrowerks supply their own <unistd.h>
+// to replace the platform-native BSD one. G++ users
+// should also always be able to do this on MaxOS X.
+//
+# include <cutl/details/boost/config/posix_features.hpp>
+# ifndef BOOST_HAS_STDINT_H
+# define BOOST_HAS_STDINT_H
+# endif
+
+//
+// BSD runtime has pthreads, sigaction, sched_yield and gettimeofday,
+// of these only pthreads are advertised in <unistd.h>, so set the
+// other options explicitly:
+//
+# define BOOST_HAS_SCHED_YIELD
+# define BOOST_HAS_GETTIMEOFDAY
+# define BOOST_HAS_SIGACTION
+
+# if (__GNUC__ < 3) && !defined( __APPLE_CC__)
+
+// GCC strange "ignore std" mode works better if you pretend everything
+// is in the std namespace, for the most part.
+
+# define BOOST_NO_STDC_NAMESPACE
+# endif
+
+# if (__GNUC__ == 4)
+
+// Both gcc and intel require these.
+# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
+# define BOOST_HAS_NANOSLEEP
+
+# endif
+
+#else
+
+// Using the MSL C library.
+
+// We will eventually support threads in non-Carbon builds, but we do
+// not support this yet.
+# if ( defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON ) || ( defined(TARGET_CARBON) && TARGET_CARBON )
+
+# if !defined(BOOST_HAS_PTHREADS)
+# define BOOST_HAS_MPTASKS
+# elif ( __dest_os == __mac_os_x )
+// We are doing a Carbon/Mach-O/MSL build which has pthreads, but only the
+// gettimeofday and no posix.
+# define BOOST_HAS_GETTIMEOFDAY
+# endif
+
+// The MP task implementation of Boost Threads aims to replace MP-unsafe
+// parts of the MSL, so we turn on threads unconditionally.
+# define BOOST_HAS_THREADS
+
+// The remote call manager depends on this.
+# define BOOST_BIND_ENABLE_PASCAL
+
+# endif
+
+#endif
+
+
+