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