1 /* 2 * Copyright (c) 1988 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)cdefs.h 7.5 (Berkeley) 03/04/91 8 */ 9 10 #ifndef _CDEFS_H_ 11 #define _CDEFS_H_ 12 13 #if defined(__cplusplus) 14 #define __BEGIN_DECLS extern "C" { 15 #define __END_DECLS }; 16 #else 17 #define __BEGIN_DECLS 18 #define __END_DECLS 19 #endif 20 21 /* 22 * The __CONCAT macro is a bit tricky -- make sure you don't put 23 * spaces in between its arguments, also you can't use strings in 24 * code that's intended for historical compilers. 25 */ 26 #if defined(__STDC__) || defined(__cplusplus) 27 #define __P(protos) protos /* full-blown ANSI C */ 28 #define __CONCAT(x,y) x ## y 29 #define __STRING(x) #x 30 #else /* traditional style */ 31 #ifdef __GNUC__ 32 #define const __const /* GCC: ANSI C with -traditional */ 33 #define inline __inline 34 #define signed __signed 35 #define volatile __volatile 36 #else 37 #define const /* delete ANSI C keywords */ 38 #define inline 39 #define signed 40 #define volatile 41 #endif 42 #define __P(protos) () /* traditional C preprocessor */ 43 #define __CONCAT(x,y) x/**/y 44 #define __STRING(x) "x" 45 #endif 46 47 #endif /* !_CDEFS_H_ */ 48