add packaging
[platform/upstream/db4.git] / build_wince / clib_port.h
1 /* DO NOT EDIT: automatically built from dist/clib_port.in. */
2 /*
3  * Minimum/maximum values for various types.
4  */
5 #ifndef UINT16_MAX                      /* Maximum 16-bit unsigned. */
6 #define UINT16_MAX      65535
7 #endif
8 #ifndef UINT32_MAX                      /* Maximum 32-bit unsigned. */
9 #define UINT32_MAX      4294967295U
10 #endif
11
12 #ifndef INT_MAX
13 #if SIZEOF_INT == 4
14 #define INT_MAX         2147483647
15 #endif
16 #if SIZEOF_INT == 8
17 #define INT_MAX         9223372036854775807
18 #endif
19 #endif
20
21 #ifndef INT_MIN                         /* minimum (signed) int value */
22 #define INT_MIN         (-INT_MAX-1)
23 #endif
24
25 #ifndef UINT_MAX                        /* maximum (signed) int value */
26 #if SIZEOF_INT == 4
27 #define UINT_MAX        4294967295U
28 #endif
29 #if SIZEOF_INT == 8
30 #define UINT_MAX        18446744073709551615U
31 #endif
32 #endif
33
34 #ifndef LONG_MAX                        /* maximum (signed) long value */
35 #if SIZEOF_LONG == 4
36 #define LONG_MAX        2147483647
37 #endif
38 #if SIZEOF_LONG == 8
39 #define LONG_MAX        9223372036854775807L
40 #endif
41 #endif
42
43 #ifndef LONG_MIN                        /* minimum (signed) long value */
44 #define LONG_MIN        (-LONG_MAX-1)
45 #endif
46
47 #ifndef ULONG_MAX                       /* maximum (unsigned) long value */
48 #if SIZEOF_LONG == 4
49 #define ULONG_MAX       4294967295U
50 #endif
51 #if SIZEOF_LONG == 8
52 #define ULONG_MAX       18446744073709551615UL
53 #endif
54 #endif
55
56 #if defined(HAVE_64BIT_TYPES)
57 /*
58  * Override the system's 64-bit min/max constants.  AIX's 32-bit compiler can
59  * handle 64-bit values, but the system's constants don't include the LL/ULL
60  * suffix, and so can't be compiled using the 32-bit compiler.
61  */
62 #undef  INT64_MAX
63 #undef  INT64_MIN
64 #undef  UINT64_MAX
65
66 #ifdef  DB_WIN32
67 #define INT64_MAX       _I64_MAX
68 #define INT64_MIN       _I64_MIN
69 #define UINT64_MAX      _UI64_MAX
70 #else
71 #define INT64_MAX       9223372036854775807LL
72 #define INT64_MIN       (-INT64_MAX-1)
73 #define UINT64_MAX      18446744073709551615ULL
74 #endif  /* DB_WIN32 */
75
76 #define INT64_FMT       "%I64d"
77 #define UINT64_FMT      "%I64u"
78 #endif  /* HAVE_64BIT_TYPES */
79
80 /*
81  * Exit success/failure macros.
82  */
83 #ifndef HAVE_EXIT_SUCCESS
84 #define EXIT_FAILURE    1
85 #define EXIT_SUCCESS    0
86 #endif
87
88 /*
89  * File modes.
90  */
91 #ifdef DB_WIN32
92 #ifndef S_IREAD                         /* WinCE doesn't have S_IREAD. */
93 #define S_IREAD         0
94 #endif
95 #ifndef S_IWRITE                        /* WinCE doesn't have S_IWRITE. */
96 #define S_IWRITE        0
97 #endif
98 #ifndef S_IRUSR
99 #define S_IRUSR         S_IREAD         /* R for owner */
100 #endif
101 #ifndef S_IWUSR
102 #define S_IWUSR         S_IWRITE        /* W for owner */
103 #endif
104 #ifndef S_IXUSR
105 #define S_IXUSR         0               /* X for owner */
106 #endif
107 #ifndef S_IRGRP
108 #define S_IRGRP         0               /* R for group */
109 #endif
110 #ifndef S_IWGRP
111 #define S_IWGRP         0               /* W for group */
112 #endif
113 #ifndef S_IXGRP
114 #define S_IXGRP         0               /* X for group */
115 #endif
116 #ifndef S_IROTH
117 #define S_IROTH         0               /* R for other */
118 #endif
119 #ifndef S_IWOTH
120 #define S_IWOTH         0               /* W for other */
121 #endif
122 #ifndef S_IXOTH
123 #define S_IXOTH         0               /* X for other */
124 #endif
125 #else /* !DB_WIN32 */
126 #ifndef S_IRUSR
127 #define S_IRUSR         0000400         /* R for owner */
128 #endif
129 #ifndef S_IWUSR
130 #define S_IWUSR         0000200         /* W for owner */
131 #endif
132 #ifndef S_IXUSR
133 #define S_IXUSR         0000100         /* X for owner */
134 #endif
135 #ifndef S_IRGRP
136 #define S_IRGRP         0000040         /* R for group */
137 #endif
138 #ifndef S_IWGRP
139 #define S_IWGRP         0000020         /* W for group */
140 #endif
141 #ifndef S_IXGRP
142 #define S_IXGRP         0000010         /* X for group */
143 #endif
144 #ifndef S_IROTH
145 #define S_IROTH         0000004         /* R for other */
146 #endif
147 #ifndef S_IWOTH
148 #define S_IWOTH         0000002         /* W for other */
149 #endif
150 #ifndef S_IXOTH
151 #define S_IXOTH         0000001         /* X for other */
152 #endif
153 #endif /* !DB_WIN32 */
154
155 /*
156  * Don't step on the namespace.  Other libraries may have their own
157  * implementations of these functions, we don't want to use their
158  * implementations or force them to use ours based on the load order.
159  */
160 #ifndef HAVE_ATOI
161 #define atoi            __db_Catoi
162 #endif
163 #ifndef HAVE_ATOL
164 #define atol            __db_Catol
165 #endif
166 #ifndef HAVE_FCLOSE
167 #define fclose          __db_Cfclose
168 #endif
169 #ifndef HAVE_FGETC
170 #define fgetc           __db_Cfgetc
171 #endif
172 #ifndef HAVE_FGETS
173 #define fgets           __db_Cfgets
174 #endif
175 #ifndef HAVE_FOPEN
176 #define fopen           __db_Cfopen
177 #endif
178 #ifndef HAVE_FWRITE
179 #define fwrite          __db_Cfwrite
180 #endif
181 #ifndef HAVE_GETADDRINFO
182 #define freeaddrinfo(a)         __db_Cfreeaddrinfo(a)
183 #define getaddrinfo(a, b, c, d) __db_Cgetaddrinfo(a, b, c, d)
184 #endif
185 #ifndef HAVE_GETCWD
186 #define getcwd          __db_Cgetcwd
187 #endif
188 #ifndef HAVE_GETOPT
189 #define getopt          __db_Cgetopt
190 #define optarg          __db_Coptarg
191 #define opterr          __db_Copterr
192 #define optind          __db_Coptind
193 #define optopt          __db_Coptopt
194 #define optreset        __db_Coptreset
195 #endif
196 #ifndef HAVE_ISALPHA
197 #define isalpha         __db_Cisalpha
198 #endif
199 #ifndef HAVE_ISDIGIT
200 #define isdigit         __db_Cisdigit
201 #endif
202 #ifndef HAVE_ISPRINT
203 #define isprint         __db_Cisprint
204 #endif
205 #ifndef HAVE_ISSPACE
206 #define isspace         __db_Cisspace
207 #endif
208 #ifndef HAVE_LOCALTIME
209 #define localtime       __db_Clocaltime
210 #endif
211 #ifndef HAVE_MEMCMP
212 #define memcmp          __db_Cmemcmp
213 #endif
214 #ifndef HAVE_MEMCPY
215 #define memcpy          __db_Cmemcpy
216 #endif
217 #ifndef HAVE_MEMMOVE
218 #define memmove         __db_Cmemmove
219 #endif
220 #ifndef HAVE_PRINTF
221 #define printf          __db_Cprintf
222 #define fprintf         __db_Cfprintf
223 #endif
224 #ifndef HAVE_QSORT
225 #define qsort           __db_Cqsort
226 #endif
227 #ifndef HAVE_RAISE
228 #define raise           __db_Craise
229 #endif
230 #ifndef HAVE_RAND
231 #define rand            __db_Crand
232 #define srand           __db_Csrand
233 #endif
234 #ifndef HAVE_SNPRINTF
235 #define snprintf        __db_Csnprintf
236 #endif
237 #ifndef HAVE_STRCASECMP
238 #define strcasecmp      __db_Cstrcasecmp
239 #define strncasecmp     __db_Cstrncasecmp
240 #endif
241 #ifndef HAVE_STRCAT
242 #define strcat          __db_Cstrcat
243 #endif
244 #ifndef HAVE_STRCHR
245 #define strchr          __db_Cstrchr
246 #endif
247 #ifndef HAVE_STRDUP
248 #define strdup          __db_Cstrdup
249 #endif
250 #ifndef HAVE_STRERROR
251 #define strerror        __db_Cstrerror
252 #endif
253 #ifndef HAVE_STRNCAT
254 #define strncat         __db_Cstrncat
255 #endif
256 #ifndef HAVE_STRNCMP
257 #define strncmp         __db_Cstrncmp
258 #endif
259 #ifndef HAVE_STRRCHR
260 #define strrchr         __db_Cstrrchr
261 #endif
262 #ifndef HAVE_STRSEP
263 #define strsep          __db_Cstrsep
264 #endif
265 #ifndef HAVE_STRTOL
266 #define strtol          __db_Cstrtol
267 #endif
268 #ifndef HAVE_STRTOUL
269 #define strtoul         __db_Cstrtoul
270 #endif
271 #ifndef HAVE_TIME
272 #define time            __db_Ctime
273 #endif
274 #ifndef HAVE_VSNPRINTF
275 #define vsnprintf       __db_Cvsnprintf
276 #endif