1 /* DO NOT EDIT: automatically built from dist/clib_port.in. */
3 * Minimum/maximum values for various types.
5 #ifndef UINT16_MAX /* Maximum 16-bit unsigned. */
6 #define UINT16_MAX 65535
8 #ifndef UINT32_MAX /* Maximum 32-bit unsigned. */
9 #define UINT32_MAX 4294967295U
14 #define INT_MAX 2147483647
17 #define INT_MAX 9223372036854775807
21 #ifndef INT_MIN /* minimum (signed) int value */
22 #define INT_MIN (-INT_MAX-1)
25 #ifndef UINT_MAX /* maximum (signed) int value */
27 #define UINT_MAX 4294967295U
30 #define UINT_MAX 18446744073709551615U
34 #ifndef LONG_MAX /* maximum (signed) long value */
36 #define LONG_MAX 2147483647
39 #define LONG_MAX 9223372036854775807L
43 #ifndef LONG_MIN /* minimum (signed) long value */
44 #define LONG_MIN (-LONG_MAX-1)
47 #ifndef ULONG_MAX /* maximum (unsigned) long value */
49 #define ULONG_MAX 4294967295U
52 #define ULONG_MAX 18446744073709551615UL
56 #if defined(HAVE_64BIT_TYPES)
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.
67 #define INT64_MAX _I64_MAX
68 #define INT64_MIN _I64_MIN
69 #define UINT64_MAX _UI64_MAX
71 #define INT64_MAX 9223372036854775807LL
72 #define INT64_MIN (-INT64_MAX-1)
73 #define UINT64_MAX 18446744073709551615ULL
76 #define INT64_FMT "%I64d"
77 #define UINT64_FMT "%I64u"
78 #endif /* HAVE_64BIT_TYPES */
81 * Exit success/failure macros.
83 #ifndef HAVE_EXIT_SUCCESS
84 #define EXIT_FAILURE 1
85 #define EXIT_SUCCESS 0
92 #ifndef S_IREAD /* WinCE doesn't have S_IREAD. */
95 #ifndef S_IWRITE /* WinCE doesn't have S_IWRITE. */
99 #define S_IRUSR S_IREAD /* R for owner */
102 #define S_IWUSR S_IWRITE /* W for owner */
105 #define S_IXUSR 0 /* X for owner */
108 #define S_IRGRP 0 /* R for group */
111 #define S_IWGRP 0 /* W for group */
114 #define S_IXGRP 0 /* X for group */
117 #define S_IROTH 0 /* R for other */
120 #define S_IWOTH 0 /* W for other */
123 #define S_IXOTH 0 /* X for other */
125 #else /* !DB_WIN32 */
127 #define S_IRUSR 0000400 /* R for owner */
130 #define S_IWUSR 0000200 /* W for owner */
133 #define S_IXUSR 0000100 /* X for owner */
136 #define S_IRGRP 0000040 /* R for group */
139 #define S_IWGRP 0000020 /* W for group */
142 #define S_IXGRP 0000010 /* X for group */
145 #define S_IROTH 0000004 /* R for other */
148 #define S_IWOTH 0000002 /* W for other */
151 #define S_IXOTH 0000001 /* X for other */
153 #endif /* !DB_WIN32 */
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.
161 #define atoi __db_Catoi
164 #define atol __db_Catol
167 #define fclose __db_Cfclose
170 #define fgetc __db_Cfgetc
173 #define fgets __db_Cfgets
176 #define fopen __db_Cfopen
179 #define fwrite __db_Cfwrite
181 #ifndef HAVE_GETADDRINFO
182 #define freeaddrinfo(a) __db_Cfreeaddrinfo(a)
183 #define getaddrinfo(a, b, c, d) __db_Cgetaddrinfo(a, b, c, d)
186 #define getcwd __db_Cgetcwd
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
197 #define isalpha __db_Cisalpha
200 #define isdigit __db_Cisdigit
203 #define isprint __db_Cisprint
206 #define isspace __db_Cisspace
208 #ifndef HAVE_LOCALTIME
209 #define localtime __db_Clocaltime
212 #define memcmp __db_Cmemcmp
215 #define memcpy __db_Cmemcpy
218 #define memmove __db_Cmemmove
221 #define printf __db_Cprintf
222 #define fprintf __db_Cfprintf
225 #define qsort __db_Cqsort
228 #define raise __db_Craise
231 #define rand __db_Crand
232 #define srand __db_Csrand
234 #ifndef HAVE_SNPRINTF
235 #define snprintf __db_Csnprintf
237 #ifndef HAVE_STRCASECMP
238 #define strcasecmp __db_Cstrcasecmp
239 #define strncasecmp __db_Cstrncasecmp
242 #define strcat __db_Cstrcat
245 #define strchr __db_Cstrchr
248 #define strdup __db_Cstrdup
250 #ifndef HAVE_STRERROR
251 #define strerror __db_Cstrerror
254 #define strncat __db_Cstrncat
257 #define strncmp __db_Cstrncmp
260 #define strrchr __db_Cstrrchr
263 #define strsep __db_Cstrsep
266 #define strtol __db_Cstrtol
269 #define strtoul __db_Cstrtoul
272 #define time __db_Ctime
274 #ifndef HAVE_VSNPRINTF
275 #define vsnprintf __db_Cvsnprintf