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