MessagePack for C
Loading...
Searching...
No Matches
bsd.h
Go to the documentation of this file.
1/*
2Copyright Rene Rivera 2008-2015
3Distributed under the Boost Software License, Version 1.0.
4(See accompanying file LICENSE_1_0.txt or copy at
5http://www.boost.org/LICENSE_1_0.txt)
6*/
7
8#ifndef MSGPACK_PREDEF_OS_BSD_H
9#define MSGPACK_PREDEF_OS_BSD_H
10
11/* Special case: OSX will define BSD predefs if the sys/param.h
12 * header is included. We can guard against that, but only if we
13 * detect OSX first. Hence we will force include OSX detection
14 * before doing any BSD detection.
15 */
17
19#include <msgpack/predef/make.h>
20
21/*`
22[heading `MSGPACK_OS_BSD`]
23
24[@http://en.wikipedia.org/wiki/Berkeley_Software_Distribution BSD] operating system.
25
26BSD has various branch operating systems possible and each detected
27individually. This detects the following variations and sets a specific
28version number macro to match:
29
30* `MSGPACK_OS_BSD_DRAGONFLY` [@http://en.wikipedia.org/wiki/DragonFly_BSD DragonFly BSD]
31* `MSGPACK_OS_BSD_FREE` [@http://en.wikipedia.org/wiki/Freebsd FreeBSD]
32* `MSGPACK_OS_BSD_BSDI` [@http://en.wikipedia.org/wiki/BSD/OS BSDi BSD/OS]
33* `MSGPACK_OS_BSD_NET` [@http://en.wikipedia.org/wiki/Netbsd NetBSD]
34* `MSGPACK_OS_BSD_OPEN` [@http://en.wikipedia.org/wiki/Openbsd OpenBSD]
35
36[note The general `MSGPACK_OS_BSD` is set in all cases to indicate some form
37of BSD. If the above variants is detected the corresponding macro is also set.]
38
39[table
40 [[__predef_symbol__] [__predef_version__]]
41
42 [[`BSD`] [__predef_detection__]]
43 [[`_SYSTYPE_BSD`] [__predef_detection__]]
44
45 [[`BSD4_2`] [4.2.0]]
46 [[`BSD4_3`] [4.3.0]]
47 [[`BSD4_4`] [4.4.0]]
48 [[`BSD`] [V.R.0]]
49 ]
50 */
51
57
58#ifndef MSGPACK_OS_BSD
59#define MSGPACK_OS_BSD MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
60#endif
61
62#if !defined(MSGPACK_PREDEF_DETAIL_OS_DETECTED) && ( \
63 defined(BSD) || \
64 defined(_SYSTYPE_BSD) \
65 )
66# undef MSGPACK_OS_BSD
67# include <sys/param.h>
68# if !defined(MSGPACK_OS_BSD) && defined(BSD4_4)
69# define MSGPACK_OS_BSD MSGPACK_VERSION_NUMBER(4,4,0)
70# endif
71# if !defined(MSGPACK_OS_BSD) && defined(BSD4_3)
72# define MSGPACK_OS_BSD MSGPACK_VERSION_NUMBER(4,3,0)
73# endif
74# if !defined(MSGPACK_OS_BSD) && defined(BSD4_2)
75# define MSGPACK_OS_BSD MSGPACK_VERSION_NUMBER(4,2,0)
76# endif
77# if !defined(MSGPACK_OS_BSD) && defined(BSD)
78# define MSGPACK_OS_BSD MSGPACK_PREDEF_MAKE_10_VVRR(BSD)
79# endif
80# if !defined(MSGPACK_OS_BSD)
81# define MSGPACK_OS_BSD MSGPACK_VERSION_NUMBER_AVAILABLE
82# endif
83#endif
84
85#if MSGPACK_OS_BSD
86# define MSGPACK_OS_BSD_AVAILABLE
88#endif
89
90#define MSGPACK_OS_BSD_NAME "BSD"
91
92#else
93
99
100#endif
101
#define MSGPACK_OS_BSD
Definition bsd.h:59
#define MSGPACK_OS_BSD_NAME
Definition bsd.h:90
#define MSGPACK_PREDEF_DECLARE_TEST(x, s)
Definition test.h:13