summaryrefslogtreecommitdiff
path: root/include/sys/cdefs.h
blob: 877746e47edde7a360ee39b1ac6fc46a490c62d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

#ifndef __SYS_CDEFS_H
#define __SYS_CDEFS_H
#include <features.h>

#if defined (__STDC__) && __STDC__

#define	__CONCAT(x,y)	x ## y
#define	__STRING(x)	#x

/* This is not a typedef so `const __ptr_t' does the right thing.  */
#define __ptr_t void *

#else

#define	__CONCAT(x,y)	x/**/y
#define	__STRING(x)	"x"

#define __ptr_t char *

#endif

/* No C++ */
#define __BEGIN_DECLS
#define __END_DECLS

/* GNUish things */
#define __CONSTVALUE
#define __CONSTVALUE2

#ifdef __GNUC__
/* GCC can always grok prototypes.  For C++ programs we add throw()
   to help it optimize the function calls.  But this works only with
   gcc 2.8.x and egcs.  */
#if defined __cplusplus && __GNUC_PREREQ (2,8)
#define __THROW		throw()
#else
#define __THROW
#endif
#else /* GCC */
#define __THROW
#endif

#endif