messagepack implementation for embedded systems (mbed / arduino)

Dependents:   hello_message_pack

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers gnu.h Source File

gnu.h

00001 /*
00002 Copyright Rene Rivera 2008-2013
00003 Distributed under the Boost Software License, Version 1.0.
00004 (See accompanying file LICENSE_1_0.txt or copy at
00005 http://www.boost.org/LICENSE_1_0.txt)
00006 */
00007 
00008 #ifndef MSGPACK_PREDEF_LIBRARY_C_GNU_H
00009 #define MSGPACK_PREDEF_LIBRARY_C_GNU_H
00010 
00011 #include <msgpack/predef/version_number.h>
00012 #include <msgpack/predef/make.h>
00013 
00014 #include <msgpack/predef/library/c/_prefix.h>
00015 
00016 #if defined(__STDC__)
00017 #include <stddef.h>
00018 #elif defined(__cplusplus)
00019 #include <cstddef>
00020 #endif
00021 
00022 /*`
00023 [heading `MSGPACK_LIB_C_GNU`]
00024 
00025 [@http://en.wikipedia.org/wiki/Glibc GNU glibc] Standard C library.
00026 Version number available as major, and minor.
00027 
00028 [table
00029     [[__predef_symbol__] [__predef_version__]]
00030 
00031     [[`__GLIBC__`] [__predef_detection__]]
00032     [[`__GNU_LIBRARY__`] [__predef_detection__]]
00033 
00034     [[`__GLIBC__`, `__GLIBC_MINOR__`] [V.R.0]]
00035     [[`__GNU_LIBRARY__`, `__GNU_LIBRARY_MINOR__`] [V.R.0]]
00036     ]
00037  */
00038 
00039 #define MSGPACK_LIB_C_GNU MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
00040 
00041 #if defined(__GLIBC__) || defined(__GNU_LIBRARY__)
00042 #   undef MSGPACK_LIB_C_GNU
00043 #   if defined(__GLIBC__)
00044 #       define MSGPACK_LIB_C_GNU \
00045             MSGPACK_VERSION_NUMBER(__GLIBC__,__GLIBC_MINOR__,0)
00046 #   else
00047 #       define MSGPACK_LIB_C_GNU \
00048             MSGPACK_VERSION_NUMBER(__GNU_LIBRARY__,__GNU_LIBRARY_MINOR__,0)
00049 #   endif
00050 #endif
00051 
00052 #if MSGPACK_LIB_C_GNU
00053 #   define MSGPACK_LIB_C_GNU_AVAILABLE
00054 #endif
00055 
00056 #define MSGPACK_LIB_C_GNU_NAME "GNU"
00057 
00058 #include <msgpack/predef/detail/test.h>
00059 MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_LIB_C_GNU,MSGPACK_LIB_C_GNU_NAME)
00060 
00061 
00062 #endif