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 <sysc/packages/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 #else
00051 
00052 // Using the MSL C library.
00053 
00054 // We will eventually support threads in non-Carbon builds, but we do
00055 // not support this yet.
00056 #  if ( defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON ) || ( defined(TARGET_CARBON) && TARGET_CARBON )
00057 
00058 #  if !defined(BOOST_HAS_PTHREADS)
00059 #    define BOOST_HAS_MPTASKS
00060 #  elif ( __dest_os == __mac_os_x )
00061 // We are doing a Carbon/Mach-O/MSL build which has pthreads, but only the
00062 // gettimeofday and no posix.
00063 #  define BOOST_HAS_GETTIMEOFDAY
00064 #  endif
00065 
00066 // The MP task implementation of Boost Threads aims to replace MP-unsafe
00067 // parts of the MSL, so we turn on threads unconditionally.
00068 #    define BOOST_HAS_THREADS
00069 
00070 // The remote call manager depends on this.
00071 #    define BOOST_BIND_ENABLE_PASCAL
00072 
00073 #  endif
00074 
00075 #endif
00076 
00077 
00078 

Generated on Wed Jan 21 15:32:09 2009 for SystemC by  doxygen 1.5.5