1 // (C) Copyright John Maddock 2001 - 2003.
\r
2 // (C) Copyright Darin Adler 2001.
\r
3 // (C) Copyright Douglas Gregor 2002.
\r
4 // Use, modification and distribution are subject to the
\r
5 // Boost Software License, Version 1.0. (See accompanying file
\r
6 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
\r
8 // See http://www.boost.org for most recent version.
\r
10 // generic BSD config options:
\r
12 #if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__)
\r
13 #error "This platform is not BSD"
\r
17 #define BOOST_PLATFORM "FreeBSD " BOOST_STRINGIZE(__FreeBSD__)
\r
18 #elif defined(__NetBSD__)
\r
19 #define BOOST_PLATFORM "NetBSD " BOOST_STRINGIZE(__NetBSD__)
\r
20 #elif defined(__OpenBSD__)
\r
21 #define BOOST_PLATFORM "OpenBSD " BOOST_STRINGIZE(__OpenBSD__)
\r
22 #elif defined(__DragonFly__)
\r
23 #define BOOST_PLATFORM "DragonFly " BOOST_STRINGIZE(__DragonFly__)
\r
27 // is this the correct version check?
\r
28 // FreeBSD has <nl_types.h> but does not
\r
29 // advertise the fact in <unistd.h>:
\r
31 #if (defined(__FreeBSD__) && (__FreeBSD__ >= 3)) || defined(__DragonFly__)
\r
32 # define BOOST_HAS_NL_TYPES_H
\r
36 // FreeBSD 3.x has pthreads support, but defines _POSIX_THREADS in <pthread.h>
\r
37 // and not in <unistd.h>
\r
39 #if (defined(__FreeBSD__) && (__FreeBSD__ <= 3))\
\r
40 || defined(__OpenBSD__) || defined(__DragonFly__)
\r
41 # define BOOST_HAS_PTHREADS
\r
45 // No wide character support in the BSD header files:
\r
47 #if defined(__NetBSD__)
\r
48 #define __NetBSD_GCC__ (__GNUC__ * 1000000 \
\r
49 + __GNUC_MINOR__ * 1000 \
\r
50 + __GNUC_PATCHLEVEL__)
\r
51 // XXX - the following is required until c++config.h
\r
52 // defines _GLIBCXX_HAVE_SWPRINTF and friends
\r
53 // or the preprocessor conditionals are removed
\r
54 // from the cwchar header.
\r
55 #define _GLIBCXX_HAVE_SWPRINTF 1
\r
58 #if !((defined(__FreeBSD__) && (__FreeBSD__ >= 5)) \
\r
59 || (__NetBSD_GCC__ >= 2095003) || defined(__DragonFly__))
\r
60 # define BOOST_NO_CWCHAR
\r
63 // The BSD <ctype.h> has macros only, no functions:
\r
65 #if !defined(__OpenBSD__) || defined(__DragonFly__)
\r
66 # define BOOST_NO_CTYPE_FUNCTIONS
\r
70 // thread API's not auto detected:
\r
72 #define BOOST_HAS_SCHED_YIELD
\r
73 #define BOOST_HAS_NANOSLEEP
\r
74 #define BOOST_HAS_GETTIMEOFDAY
\r
75 #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
\r
76 #define BOOST_HAS_SIGACTION
\r
78 // boilerplate code:
\r
79 #define BOOST_HAS_UNISTD_H
\r
80 #include <boost/config/posix_features.hpp>
\r