bsd.hpp
Go to the documentation of this file.
00001 //  (C) Copyright John Maddock 2001 - 2003. 
00002 //  (C) Copyright Darin Adler 2001. 
00003 //  (C) Copyright Douglas Gregor 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 //  generic BSD config options:
00011 
00012 #if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__)
00013 #error "This platform is not BSD"
00014 #endif
00015 
00016 #ifdef __FreeBSD__
00017 #define BOOST_PLATFORM "FreeBSD " BOOST_STRINGIZE(__FreeBSD__)
00018 #elif defined(__NetBSD__)
00019 #define BOOST_PLATFORM "NetBSD " BOOST_STRINGIZE(__NetBSD__)
00020 #elif defined(__OpenBSD__)
00021 #define BOOST_PLATFORM "OpenBSD " BOOST_STRINGIZE(__OpenBSD__)
00022 #elif defined(__DragonFly__)
00023 #define BOOST_PLATFORM "DragonFly " BOOST_STRINGIZE(__DragonFly__)
00024 #endif
00025 
00026 //
00027 // is this the correct version check?
00028 // FreeBSD has <nl_types.h> but does not
00029 // advertise the fact in <unistd.h>:
00030 //
00031 #if (defined(__FreeBSD__) && (__FreeBSD__ >= 3)) || defined(__DragonFly__)
00032 #  define BOOST_HAS_NL_TYPES_H
00033 #endif
00034 
00035 //
00036 // FreeBSD 3.x has pthreads support, but defines _POSIX_THREADS in <pthread.h>
00037 // and not in <unistd.h>
00038 //
00039 #if (defined(__FreeBSD__) && (__FreeBSD__ <= 3))\
00040    || defined(__OpenBSD__) || defined(__DragonFly__) 
00041 #  define BOOST_HAS_PTHREADS
00042 #endif
00043 
00044 //
00045 // No wide character support in the BSD header files:
00046 //
00047 #if defined(__NetBSD__)
00048 #define __NetBSD_GCC__ (__GNUC__         * 1000000 \
00049                        + __GNUC_MINOR__ *    1000 \
00050                        + __GNUC_PATCHLEVEL__)
00051 // XXX - the following is required until c++config.h
00052 //       defines _GLIBCXX_HAVE_SWPRINTF and friends
00053 //       or the preprocessor conditionals are removed
00054 //       from the cwchar header.
00055 #define _GLIBCXX_HAVE_SWPRINTF 1
00056 #endif
00057 
00058 #if !((defined(__FreeBSD__) && (__FreeBSD__ >= 5)) \
00059       || (__NetBSD_GCC__ >= 2095003) || defined(__DragonFly__))
00060 #  define BOOST_NO_CWCHAR
00061 #endif
00062 //
00063 // The BSD <ctype.h> has macros only, no functions:
00064 //
00065 #if !defined(__OpenBSD__) || defined(__DragonFly__)
00066 #  define BOOST_NO_CTYPE_FUNCTIONS
00067 #endif
00068 
00069 //
00070 // thread API's not auto detected:
00071 //
00072 #define BOOST_HAS_SCHED_YIELD
00073 #define BOOST_HAS_NANOSLEEP
00074 #define BOOST_HAS_GETTIMEOFDAY
00075 #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
00076 #define BOOST_HAS_SIGACTION
00077 
00078 // boilerplate code:
00079 #define BOOST_HAS_UNISTD_H
00080 #include <boost/config/posix_features.hpp>
00081 
00082 
00083 
00084 
00085 
00086 


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