1 /*
2 Copyright Rene Rivera 2008-2015
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at
5 http://www.boost.org/LICENSE_1_0.txt)
6 */
7 
8 #ifndef BOOST_PREDEF_OS_UNIX_H
9 #define BOOST_PREDEF_OS_UNIX_H
10 
11 #include <boost/predef/version_number.h>
12 #include <boost/predef/make.h>
13 
14 /* tag::reference[]
15 = `BOOST_OS_UNIX`
16 
17 http://en.wikipedia.org/wiki/Unix[Unix Environment] operating system.
18 
19 [options="header"]
20 |===
21 | {predef_symbol} | {predef_version}
22 
23 | `unix` | {predef_detection}
24 | `+__unix+` | {predef_detection}
25 | `+_XOPEN_SOURCE+` | {predef_detection}
26 | `+_POSIX_SOURCE+` | {predef_detection}
27 |===
28 */ // end::reference[]
29 
30 #define BOOST_OS_UNIX BOOST_VERSION_NUMBER_NOT_AVAILABLE
31 
32 #if defined(unix) || defined(__unix) || \
33     defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE)
34 #   undef BOOST_OS_UNIX
35 #   define BOOST_OS_UNIX BOOST_VERSION_NUMBER_AVAILABLE
36 #endif
37 
38 #if BOOST_OS_UNIX
39 #   define BOOST_OS_UNIX_AVAILABLE
40 #endif
41 
42 #define BOOST_OS_UNIX_NAME "Unix Environment"
43 
44 /* tag::reference[]
45 = `BOOST_OS_SVR4`
46 
47 http://en.wikipedia.org/wiki/UNIX_System_V[SVR4 Environment] operating system.
48 
49 [options="header"]
50 |===
51 | {predef_symbol} | {predef_version}
52 
53 | `+__sysv__+` | {predef_detection}
54 | `+__SVR4+` | {predef_detection}
55 | `+__svr4__+` | {predef_detection}
56 | `+_SYSTYPE_SVR4+` | {predef_detection}
57 |===
58 */ // end::reference[]
59 
60 #define BOOST_OS_SVR4 BOOST_VERSION_NUMBER_NOT_AVAILABLE
61 
62 #if defined(__sysv__) || defined(__SVR4) || \
63     defined(__svr4__) || defined(_SYSTYPE_SVR4)
64 #   undef BOOST_OS_SVR4
65 #   define BOOST_OS_SVR4 BOOST_VERSION_NUMBER_AVAILABLE
66 #endif
67 
68 #if BOOST_OS_SVR4
69 #   define BOOST_OS_SVR4_AVAILABLE
70 #endif
71 
72 #define BOOST_OS_SVR4_NAME "SVR4 Environment"
73 
74 #endif
75 
76 #include <boost/predef/detail/test.h>
77 BOOST_PREDEF_DECLARE_TEST(BOOST_OS_UNIX,BOOST_OS_UNIX_NAME)
78 BOOST_PREDEF_DECLARE_TEST(BOOST_OS_SVR4,BOOST_OS_SVR4_NAME)
79