Import upstream sources.
[cparse] / platform.h
1 #ifndef PLATFORM_H
2 #define PLATFORM_H
3
4 /* XXX platform-specific configuration should be figured out here. For
5 * now we assume we're targetting the host platform. */
6
7 #define P_CHAR_MIN CHAR_MIN
8 #define P_UCHAR_MAX UCHAR_MAX
9 #define P_SHRT_MAX SHRT_MAX
10 #define P_USHRT_MAX USHRT_MAX
11 #define P_INT_MAX INT_MAX
12 #define P_UINT_MAX UINT_MAX
13 #define P_LONG_MAX LONG_MAX
14 #define P_ULONG_MAX ULONG_MAX
15 #define P_LLONG_MAX LLONG_MAX
16 #define P_ULLONG_MAX ULLONG_MAX
17 #define P_FLT_MAX FLT_MAX
18 #define P_FLT_MANT_DIG FLT_MANT_DIG
19 #define P_DBL_MAX DBL_MAX
20 #define P_DBL_MANT_DIG DBL_MANT_DIG
21 #define P_LDBL_MAX LDBL_MAX
22 #define P_LDBL_MANT_DIG LDBL_MANT_DIG
23 #define P_WCHAR_T (TS_INT|TS_LONG) /* XXX hack suitable only for i386 linux */
24
25 #if HAVE__BOOL
26 # define P_BOOL_SIZE (sizeof (_Bool))
27 #else
28 # define P_BOOL_SIZE 1
29 #endif
30 #define P_SHORT_SIZE (sizeof (short))
31 #define P_INT_SIZE (sizeof (int))
32 #define P_LONG_SIZE (sizeof (long))
33 #define P_LLONG_SIZE (sizeof (long long))
34
35 #define P_PTR_SIZE (sizeof (void *))
36
37 #define RESTRICT_KW "__restrict"
38
39 #endif /* PLATFORM_H */
40
41 /*
42 Local Variables:
43 c-basic-offset:2
44 comment-column:40
45 fill-column:79
46 End:
47 */