]> pd.if.org Git - pdclib/blob - internals/_PDCLIB_aux.h
Removed the $Name$ tags (not supported by SVN). Added $Id$ to Makefile / text files.
[pdclib] / internals / _PDCLIB_aux.h
1 /* $Id$ */\r
2 \r
3 /* Auxiliary PDCLib code <_PDCLIB_aux.h>\r
4 \r
5    This file is part of the Public Domain C Library (PDCLib).\r
6    Permission is granted to use, modify, and / or redistribute at will.\r
7 */\r
8 \r
9 /* -------------------------------------------------------------------------- */\r
10 /* You should not have to edit anything in this file; if you DO have to, it   */\r
11 /* would be considered a bug / missing feature: notify the author(s).         */\r
12 /* -------------------------------------------------------------------------- */\r
13 \r
14 /* -------------------------------------------------------------------------- */\r
15 /* Standard Version                                                           */\r
16 /* -------------------------------------------------------------------------- */\r
17 \r
18 /* Many a compiler gets this wrong, so you might have to hardcode it instead. */\r
19 \r
20 #if __STDC__ != 1\r
21 #error Compiler does not define _ _STDC_ _ to 1 (not standard-compliant)!\r
22 #endif\r
23 \r
24 #ifndef __STDC_VERSION__\r
25 #define _PDCLIB_C_VERSION 90\r
26 #define _PDCLIB_restrict\r
27 #define _PDCLIB_inline\r
28 #elif __STDC_VERSION__ == 199409L\r
29 #define _PDCLIB_C_VERSION 95\r
30 #define _PDCLIB_restrict\r
31 #define _PDCLIB_inline\r
32 #elif __STDC_VERSION__ == 199901L\r
33 #define _PDCLIB_C_VERSION 99\r
34 #define _PDCLIB_restrict restrict\r
35 #define _PDCLIB_inline inline\r
36 #else\r
37 #error Unsupported _ _STDC_VERSION_ _ (__STDC_VERSION__) (supported: ISO/IEC 9899:1990, 9899/AMD1:1995, and 9899:1999).\r
38 #endif\r
39 \r
40 #ifndef __STDC_HOSTED__\r
41 #error Compiler does not define _ _STDC_HOSTED_ _ (not standard-compliant)!\r
42 #elif __STDC_HOSTED__ == 0\r
43 #define _PDCLIB_HOSTED 0\r
44 #elif __STDC_HOSTED__ == 1\r
45 #define _PDCLIB_HOSTED 1\r
46 #else\r
47 #error Compiler does not define _ _STDC_HOSTED_ _ to 0 or 1 (not standard-compliant)!\r
48 #endif\r
49 \r
50 #if _PDCLIB_C_VERSION != 99\r
51 #error PDCLib might not be fully conforming to either C89 or C95 prior to v2.x.\r
52 #endif\r
53 \r
54 /* -------------------------------------------------------------------------- */\r
55 /* Helper macros:                                                             */\r
56 /* _PDCLIB_cc( x, y ) concatenates two preprocessor tokens without extending  */\r
57 /* _PDCLIB_concat( x, y ) concatenates two preprocessor tokens with extending */\r
58 /* -------------------------------------------------------------------------- */\r
59 \r
60 #define _PDCLIB_cc( x, y )     x ## y\r
61 #define _PDCLIB_concat( x, y ) _PDCLIB_cc( x, y )\r
62 \r
63 #define _PDCLIB_symbol2value( x ) #x\r
64 #define _PDCLIB_symbol2string( x ) _PDCLIB_symbol2value( x )\r
65 #define _PDCLIB_symbol2identity( x ) x\r