C Standard Library Extensions
1.2.4
cext
cxconfig.h
1
/*
2
* cxconfig.h: This is a generated file! Do not edit this file!
3
* All changes will be lost!
4
*/
5
6
#ifndef CXCONFIG_H_
7
#define CXCONFIG_H_
8
9
#include <limits.h>
10
#include <float.h>
11
#include <stdint.h>
12
#include <inttypes.h>
13
14
#include <cxmacros.h>
15
16
17
CX_BEGIN_DECLS
18
19
/*
20
* Limits for numerical data types
21
*/
22
23
#define CX_MINSHORT SHRT_MIN
24
#define CX_MAXSHORT SHRT_MAX
25
#define CX_MAXUSHORT USHRT_MAX
26
27
#define CX_MININT INT_MIN
28
#define CX_MAXINT INT_MAX
29
#define CX_MAXUINT UINT_MAX
30
31
#define CX_MINLONG LONG_MIN
32
#define CX_MAXLONG LONG_MAX
33
#define CX_MAXULONG ULONG_MAX
34
35
#define CX_MINFLOAT FLT_MIN
36
#define CX_MAXFLOAT FLT_MAX
37
38
#define CX_MINDOUBLE DBL_MIN
39
#define CX_MAXDOUBLE DBL_MAX
40
41
42
/*
43
* Number of bits per char
44
*/
45
46
#define CX_CHAR_BIT 8
47
48
/*
49
* Fixed size integer types
50
*/
51
52
/* Macros for formatted output */
53
54
#define CX_PRINTF_FORMAT_INT8 PRIi8
55
#define CX_PRINTF_FORMAT_UINT8 PRIu8
56
57
#define CX_PRINTF_FORMAT_INT16 PRIi16
58
#define CX_PRINTF_FORMAT_UINT16 PRIu16
59
60
#define CX_PRINTF_FORMAT_INT32 PRIi32
61
#define CX_PRINTF_FORMAT_UINT32 PRIu32
62
63
#define CX_PRINTF_FORMAT_INT64 PRIi64
64
#define CX_PRINTF_FORMAT_UINT64 PRIu64
65
66
/* Macros for formatted output */
67
68
#define CX_SCANF_FORMAT_INT8 SCNi8
69
#define CX_SCANF_FORMAT_UINT8 SCNu8
70
71
#define CX_SCANF_FORMAT_INT16 SCNi16
72
#define CX_SCANF_FORMAT_UINT16 SCNu16
73
74
#define CX_SCANF_FORMAT_INT32 SCNi32
75
#define CX_SCANF_FORMAT_UINT32 SCNu32
76
77
#define CX_SCANF_FORMAT_INT64 SCNi64
78
#define CX_SCANF_FORMAT_UINT64 SCNu64
79
80
/* Type definitions */
81
82
typedef
int8_t cxint8;
83
typedef
uint8_t cxuint8;
84
85
typedef
int16_t cxint16;
86
typedef
uint16_t cxuint16;
87
88
typedef
int32_t cxint32;
89
typedef
uint32_t cxuint32;
90
91
typedef
int64_t cxint64;
92
typedef
uint64_t cxuint64;
93
94
#define CX_INT64_CONSTANT(val) (val##L)
95
#define CX_UINT64_CONSTANT(val) (val##UL)
96
97
#define CX_SIZEOF_VOID_P 8
98
#define CX_SIZEOF_SIZE_T 8
99
100
/*
101
* Size type
102
*/
103
104
#define CX_PRINTF_FORMAT_SIZE_TYPE "lu"
105
#define CX_PRINTF_FORMAT_SSIZE_TYPE "li"
106
107
#define CX_SCANF_FORMAT_SIZE_TYPE "lu"
108
#define CX_SCANF_FORMAT_SSIZE_TYPE "li"
109
110
typedef
signed
long
cxssize;
111
typedef
unsigned
long
cxsize;
112
113
#define CX_MINSSIZE CX_MINLONG
114
#define CX_MAXSSIZE CX_MAXLONG
115
#define CX_MAXSIZE CX_MAXULONG
116
117
118
typedef
cxint64 cxoffset;
119
120
#define CX_MINOFFSET CX_MININT64
121
#define CX_MAXOFFSET CX_MAXINT64
122
123
/*
124
* Pointer to integer conversion
125
*/
126
127
#define CX_POINTER_TO_INT(ptr) ((cxint) (cxlong) (ptr))
128
#define CX_POINTER_TO_UINT(ptr) ((cxint) (cxlong) (ptr))
129
130
#define CX_INT_TO_POINTER(val) ((cxptr) (cxlong) (val))
131
#define CX_UINT_TO_POINTER(val) ((cxptr) (cxlong) (val))
132
133
#ifdef __cplusplus
134
# define CX_HAVE_INLINE 1
135
#else
136
137
#endif
138
139
#ifdef __cplusplus
140
# define CX_CAN_INLINE 1
141
#endif
142
143
#define CX_HAVE_GNUC_VISIBILITY 1
144
145
#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
146
# define CX_GNUC_INTERNAL __attribute__((visibility("hidden"
)))
147
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
148
# define CX_GNUC_INTERNAL __hidden
149
#elif defined (__GNUC__) && defined (CX_HAVE_GNUC_VISIBILITY)
150
# define CX_GNUC_INTERNAL __attribute__((visibility("hidden"
)))
151
#else
152
# define CX_GNUC_INTERNAL
/* empty */
153
#endif
154
155
CX_END_DECLS
156
157
#endif
/* CXCONFIG_H_ */
Generated by
1.9.4