macos.hpp
Go to the documentation of this file.
00001 //  (C) Copyright John Maddock 2001 - 2003. 
00002 //  (C) Copyright Darin Adler 2001 - 2002. 
00003 //  (C) Copyright Bill Kempf 2002. 
00004 //  Use, modification and distribution are subject to the 
00005 //  Boost Software License, Version 1.0. (See accompanying file 
00006 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
00007 
00008 //  See http://www.boost.org for most recent version.
00009 
00010 //  Mac OS specific config options:
00011 
00012 #define BOOST_PLATFORM "Mac OS"
00013 
00014 #if __MACH__ && !defined(_MSL_USING_MSL_C)
00015 
00016 // Using the Mac OS X system BSD-style C library.
00017 
00018 #  ifndef BOOST_HAS_UNISTD_H
00019 #    define BOOST_HAS_UNISTD_H
00020 #  endif
00021 //
00022 // Begin by including our boilerplate code for POSIX
00023 // feature detection, this is safe even when using
00024 // the MSL as Metrowerks supply their own <unistd.h>
00025 // to replace the platform-native BSD one. G++ users
00026 // should also always be able to do this on MaxOS X.
00027 //
00028 #  include <boost/config/posix_features.hpp>
00029 #  ifndef BOOST_HAS_STDINT_H
00030 #     define BOOST_HAS_STDINT_H
00031 #  endif
00032 
00033 //
00034 // BSD runtime has pthreads, sigaction, sched_yield and gettimeofday,
00035 // of these only pthreads are advertised in <unistd.h>, so set the 
00036 // other options explicitly:
00037 //
00038 #  define BOOST_HAS_SCHED_YIELD
00039 #  define BOOST_HAS_GETTIMEOFDAY
00040 #  define BOOST_HAS_SIGACTION
00041 
00042 #  if (__GNUC__ < 3) && !defined( __APPLE_CC__)
00043 
00044 // GCC strange "ignore std" mode works better if you pretend everything
00045 // is in the std namespace, for the most part.
00046 
00047 #    define BOOST_NO_STDC_NAMESPACE
00048 #  endif
00049 
00050 #  if (__GNUC__ == 4)
00051 
00052 // Both gcc and intel require these.  
00053 #    define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
00054 #    define BOOST_HAS_NANOSLEEP
00055 
00056 #  endif
00057 
00058 #else
00059 
00060 // Using the MSL C library.
00061 
00062 // We will eventually support threads in non-Carbon builds, but we do
00063 // not support this yet.
00064 #  if ( defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON ) || ( defined(TARGET_CARBON) && TARGET_CARBON )
00065 
00066 #  if !defined(BOOST_HAS_PTHREADS)
00067 #    define BOOST_HAS_MPTASKS
00068 #  elif ( __dest_os == __mac_os_x )
00069 // We are doing a Carbon/Mach-O/MSL build which has pthreads, but only the
00070 // gettimeofday and no posix.
00071 #  define BOOST_HAS_GETTIMEOFDAY
00072 #  endif
00073 
00074 // The MP task implementation of Boost Threads aims to replace MP-unsafe
00075 // parts of the MSL, so we turn on threads unconditionally.
00076 #    define BOOST_HAS_THREADS
00077 
00078 // The remote call manager depends on this.
00079 #    define BOOST_BIND_ENABLE_PASCAL
00080 
00081 #  endif
00082 
00083 #endif
00084 
00085 
00086 


appl
Author(s): petercai
autogenerated on Tue Jan 7 2014 11:02:29