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 BOOST_PREDEF_LIBRARY_C_GNU_H
9#define BOOST_PREDEF_LIBRARY_C_GNU_H
10
11#include <boost/predef/version_number.h>
12#include <boost/predef/make.h>
13
14#include <boost/predef/library/c/_prefix.h>
15
16#if defined(__STDC__)
17#include <stddef.h>
18#elif defined(__cplusplus)
19#include <cstddef>
20#endif
21
22/* tag::reference[]
23= `BOOST_LIB_C_GNU`
24
25http://en.wikipedia.org/wiki/Glibc[GNU glibc] Standard C library.
26Version number available as major, and minor.
27
28[options="header"]
29|===
30| {predef_symbol} | {predef_version}
31
32| `+__GLIBC__+` | {predef_detection}
33| `+__GNU_LIBRARY__+` | {predef_detection}
34
35| `+__GLIBC__+`, `+__GLIBC_MINOR__+` | V.R.0
36| `+__GNU_LIBRARY__+`, `+__GNU_LIBRARY_MINOR__+` | V.R.0
37|===
38*/ // end::reference[]
39
40#define BOOST_LIB_C_GNU BOOST_VERSION_NUMBER_NOT_AVAILABLE
41
42#if defined(__GLIBC__) || defined(__GNU_LIBRARY__)
43# undef BOOST_LIB_C_GNU
44# if defined(__GLIBC__)
45# define BOOST_LIB_C_GNU \
46 BOOST_VERSION_NUMBER(__GLIBC__,__GLIBC_MINOR__,0)
47# else
48# define BOOST_LIB_C_GNU \
49 BOOST_VERSION_NUMBER(__GNU_LIBRARY__,__GNU_LIBRARY_MINOR__,0)
50# endif
51#endif
52
53#if BOOST_LIB_C_GNU
54# define BOOST_LIB_C_GNU_AVAILABLE
55#endif
56
57#define BOOST_LIB_C_GNU_NAME "GNU"
58
59#endif
60
61#include <boost/predef/detail/test.h>
62BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_C_GNU,BOOST_LIB_C_GNU_NAME)
63

source code of include/boost/predef/library/c/gnu.h