1 /* The <ansi.h> header checks whether the compiler claims conformance to ANSI
2 * Standard C. If so, the symbol _ANSI is defined as 1, otherwise it is
3 * defined as 0. Based on the result, a macro
5 * _PROTOTYPE(function, params)
7 * is defined. This macro expands in different ways, generating either
8 * ANSI Standard C prototypes or old-style K&R (Kernighan & Ritchie)
9 * prototypes, as needed. Finally, some programs use _CONST, _VOIDSTAR etc
10 * in such a way that they are portable over both ANSI and K&R compilers.
11 * The appropriate macros are defined here.
17 /* ANSI C requires __STDC__ to be defined as 1 for an ANSI C compiler.
18 * Some half-ANSI compilers define it as 0. Get around this here.
21 #define _ANSI 0 /* 0 if compiler is not ANSI C, 1 if it is */
23 #ifdef __STDC__ /* __STDC__ defined for (near) ANSI compilers*/
24 #if __STDC__ == 1 /* __STDC__ == 1 for conformant compilers */
25 #undef _ANSI /* get rid of above definition */
26 #define _ANSI 1 /* _ANSI = 1 for ANSI C compilers */
30 /* At this point, _ANSI has been set correctly to 0 or 1. Define the
31 * _PROTOTYPE macro to either expand both of its arguments (ANSI prototypes),
32 * only the function name (K&R prototypes).
36 #define _PROTOTYPE(function, params) function params
37 #define _VOIDSTAR void *
40 #define _VOLATILE volatile
45 #define _PROTOTYPE(function, params) function()
46 #define _VOIDSTAR void *