VectorNav C Library
compiler.h
1 #ifndef _VN_UTIL_COMPILER_H
2 #define _VN_UTIL_COMPILER_H
3 
4 /* This header provides some simple checks for various features supported by the
5 * current compiler. */
6 
7 /* Determine the level of standard C support. */
8 #if __STDC__
9  #if defined (__STDC_VERSION__)
10  #if (__STDC_VERSION__ >= 199901L)
11  #define C99
12  #endif
13  #endif
14 #endif
15 
16 /* Determine if the compiler has stdbool.h. */
17 #if defined(C99) || _MSC_VER >= 1800
18  #define VN_HAVE_STDBOOL_H 1
19 #else
20  #define VN_HAVE_STDBOOL_H 0
21 #endif
22 
23 /* Determine if the secure CRT is available. */
24 #if defined(_MSC_VER)
25  #define VN_HAVE_SECURE_CRT 1
26 #else
27  #define VN_HAVE_SECURE_CRT 0
28 #endif
29 
30 #endif
31 
32 /* Determine if the generic type math library (tgmath.h) is available. */
33 #if defined(C99)
34  #define VN_HAVE_GENERIC_TYPE_MATH 1
35 #else
36  #define VN_HAVE_GENERIC_TYPE_MATH 0
37 #endif