3 /* Auxiliary PDCLib code <_PDCLIB_aux.h>
5 This file is part of the Public Domain C Library (PDCLib).
6 Permission is granted to use, modify, and / or redistribute at will.
9 /* -------------------------------------------------------------------------- */
10 /* You should not have to edit anything in this file; if you DO have to, it */
11 /* would be considered a bug / missing feature: notify the author(s). */
12 /* -------------------------------------------------------------------------- */
14 /* -------------------------------------------------------------------------- */
15 /* Standard Version */
16 /* -------------------------------------------------------------------------- */
18 /* Many a compiler gets this wrong, so you might have to hardcode it instead. */
21 #error Compiler does not define _ _STDC_ _ to 1 (not standard-compliant)!
24 #ifndef __STDC_VERSION__
25 #define _PDCLIB_C_VERSION 90
26 #define _PDCLIB_restrict
27 #define _PDCLIB_inline
28 #elif __STDC_VERSION__ == 199409L
29 #define _PDCLIB_C_VERSION 95
30 #define _PDCLIB_restrict
31 #define _PDCLIB_inline
32 #elif __STDC_VERSION__ == 199901L
33 #define _PDCLIB_C_VERSION 99
34 #define _PDCLIB_restrict restrict
35 #define _PDCLIB_inline inline
37 #error Unsupported _ _STDC_VERSION_ _ (__STDC_VERSION__) (supported: ISO/IEC 9899:1990, 9899/AMD1:1995, and 9899:1999).
40 #ifndef __STDC_HOSTED__
41 #error Compiler does not define _ _STDC_HOSTED_ _ (not standard-compliant)!
42 #elif __STDC_HOSTED__ == 0
43 #define _PDCLIB_HOSTED 0
44 #elif __STDC_HOSTED__ == 1
45 #define _PDCLIB_HOSTED 1
47 #error Compiler does not define _ _STDC_HOSTED_ _ to 0 or 1 (not standard-compliant)!
50 #if _PDCLIB_C_VERSION != 99
51 #error PDCLib might not be fully conforming to either C89 or C95 prior to v2.x.
54 /* -------------------------------------------------------------------------- */
56 /* _PDCLIB_cc( x, y ) concatenates two preprocessor tokens without extending */
57 /* _PDCLIB_concat( x, y ) concatenates two preprocessor tokens with extending */
58 /* -------------------------------------------------------------------------- */
60 #define _PDCLIB_cc( x, y ) x ## y
61 #define _PDCLIB_concat( x, y ) _PDCLIB_cc( x, y )
63 #define _PDCLIB_symbol2value( x ) #x
64 #define _PDCLIB_symbol2string( x ) _PDCLIB_symbol2value( x )