Chris@16: // (C) Copyright John Maddock 2001 - 2003. Chris@16: // (C) Copyright Darin Adler 2001. Chris@16: // (C) Copyright Douglas Gregor 2002. Chris@16: // Use, modification and distribution are subject to the Chris@16: // Boost Software License, Version 1.0. (See accompanying file Chris@16: // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: // See http://www.boost.org for most recent version. Chris@16: Chris@16: // generic BSD config options: Chris@16: Chris@16: #if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) Chris@16: #error "This platform is not BSD" Chris@16: #endif Chris@16: Chris@16: #ifdef __FreeBSD__ Chris@16: #define BOOST_PLATFORM "FreeBSD " BOOST_STRINGIZE(__FreeBSD__) Chris@16: #elif defined(__NetBSD__) Chris@16: #define BOOST_PLATFORM "NetBSD " BOOST_STRINGIZE(__NetBSD__) Chris@16: #elif defined(__OpenBSD__) Chris@16: #define BOOST_PLATFORM "OpenBSD " BOOST_STRINGIZE(__OpenBSD__) Chris@16: #elif defined(__DragonFly__) Chris@16: #define BOOST_PLATFORM "DragonFly " BOOST_STRINGIZE(__DragonFly__) Chris@16: #endif Chris@16: Chris@16: // Chris@16: // is this the correct version check? Chris@16: // FreeBSD has but does not Chris@16: // advertise the fact in : Chris@16: // Chris@16: #if (defined(__FreeBSD__) && (__FreeBSD__ >= 3)) || defined(__DragonFly__) Chris@16: # define BOOST_HAS_NL_TYPES_H Chris@16: #endif Chris@16: Chris@16: // Chris@16: // FreeBSD 3.x has pthreads support, but defines _POSIX_THREADS in Chris@16: // and not in Chris@16: // Chris@16: #if (defined(__FreeBSD__) && (__FreeBSD__ <= 3))\ Chris@16: || defined(__OpenBSD__) || defined(__DragonFly__) Chris@16: # define BOOST_HAS_PTHREADS Chris@16: #endif Chris@16: Chris@16: // Chris@16: // No wide character support in the BSD header files: Chris@16: // Chris@16: #if defined(__NetBSD__) Chris@16: #define __NetBSD_GCC__ (__GNUC__ * 1000000 \ Chris@16: + __GNUC_MINOR__ * 1000 \ Chris@16: + __GNUC_PATCHLEVEL__) Chris@16: // XXX - the following is required until c++config.h Chris@16: // defines _GLIBCXX_HAVE_SWPRINTF and friends Chris@16: // or the preprocessor conditionals are removed Chris@16: // from the cwchar header. Chris@16: #define _GLIBCXX_HAVE_SWPRINTF 1 Chris@16: #endif Chris@16: Chris@16: #if !((defined(__FreeBSD__) && (__FreeBSD__ >= 5)) \ Chris@16: || (defined(__NetBSD_GCC__) && (__NetBSD_GCC__ >= 2095003)) || defined(__DragonFly__)) Chris@16: # define BOOST_NO_CWCHAR Chris@16: #endif Chris@16: // Chris@16: // The BSD has macros only, no functions: Chris@16: // Chris@16: #if !defined(__OpenBSD__) || defined(__DragonFly__) Chris@16: # define BOOST_NO_CTYPE_FUNCTIONS Chris@16: #endif Chris@16: Chris@16: // Chris@16: // thread API's not auto detected: Chris@16: // Chris@16: #define BOOST_HAS_SCHED_YIELD Chris@16: #define BOOST_HAS_NANOSLEEP Chris@16: #define BOOST_HAS_GETTIMEOFDAY Chris@16: #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE Chris@16: #define BOOST_HAS_SIGACTION Chris@16: Chris@16: // boilerplate code: Chris@16: #define BOOST_HAS_UNISTD_H Chris@16: #include Chris@16: Chris@16: Chris@16: Chris@16: Chris@16: Chris@16: