rpm  5.2.1
About: RPM is a powerful and mature command-line driven package management system capable of installing, uninstalling, verifying, querying, and updating Unix software packages ("no longer Linux-centric"). Hint: The RPM homepage may offer newer releases (but in rpm format).
  Fossies Dox: rpm-5.2.1.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

clib_port.h
Go to the documentation of this file.
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 #endif /* HAVE_64BIT_TYPES */
77 
78 /*
79  * Exit success/failure macros.
80  */
81 #ifndef HAVE_EXIT_SUCCESS
82 #define EXIT_FAILURE 1
83 #define EXIT_SUCCESS 0
84 #endif
85 
86 /*
87  * File modes.
88  */
89 #ifdef DB_WIN32
90 #ifndef S_IREAD /* WinCE doesn't have S_IREAD. */
91 #define S_IREAD 0
92 #endif
93 #ifndef S_IWRITE /* WinCE doesn't have S_IWRITE. */
94 #define S_IWRITE 0
95 #endif
96 #ifndef S_IRUSR
97 #define S_IRUSR S_IREAD /* R for owner */
98 #endif
99 #ifndef S_IWUSR
100 #define S_IWUSR S_IWRITE /* W for owner */
101 #endif
102 #ifndef S_IXUSR
103 #define S_IXUSR 0 /* X for owner */
104 #endif
105 #ifndef S_IRGRP
106 #define S_IRGRP 0 /* R for group */
107 #endif
108 #ifndef S_IWGRP
109 #define S_IWGRP 0 /* W for group */
110 #endif
111 #ifndef S_IXGRP
112 #define S_IXGRP 0 /* X for group */
113 #endif
114 #ifndef S_IROTH
115 #define S_IROTH 0 /* R for other */
116 #endif
117 #ifndef S_IWOTH
118 #define S_IWOTH 0 /* W for other */
119 #endif
120 #ifndef S_IXOTH
121 #define S_IXOTH 0 /* X for other */
122 #endif
123 #else /* !DB_WIN32 */
124 #ifndef S_IRUSR
125 #define S_IRUSR 0000400 /* R for owner */
126 #endif
127 #ifndef S_IWUSR
128 #define S_IWUSR 0000200 /* W for owner */
129 #endif
130 #ifndef S_IXUSR
131 #define S_IXUSR 0000100 /* X for owner */
132 #endif
133 #ifndef S_IRGRP
134 #define S_IRGRP 0000040 /* R for group */
135 #endif
136 #ifndef S_IWGRP
137 #define S_IWGRP 0000020 /* W for group */
138 #endif
139 #ifndef S_IXGRP
140 #define S_IXGRP 0000010 /* X for group */
141 #endif
142 #ifndef S_IROTH
143 #define S_IROTH 0000004 /* R for other */
144 #endif
145 #ifndef S_IWOTH
146 #define S_IWOTH 0000002 /* W for other */
147 #endif
148 #ifndef S_IXOTH
149 #define S_IXOTH 0000001 /* X for other */
150 #endif
151 #endif /* !DB_WIN32 */
152 
153 /*
154  * Don't step on the namespace. Other libraries may have their own
155  * implementations of these functions, we don't want to use their
156  * implementations or force them to use ours based on the load order.
157  */
158 #ifndef HAVE_ATOI
159 #define atoi __db_Catoi
160 #endif
161 #ifndef HAVE_ATOL
162 #define atol __db_Catol
163 #endif
164 #ifndef HAVE_FCLOSE
165 #define fclose __db_Cfclose
166 #endif
167 #ifndef HAVE_FGETC
168 #define fgetc __db_Cfgetc
169 #endif
170 #ifndef HAVE_FGETS
171 #define fgets __db_Cfgets
172 #endif
173 #ifndef HAVE_FOPEN
174 #define fopen __db_Cfopen
175 #endif
176 #ifndef HAVE_FWRITE
177 #define fwrite __db_Cfwrite
178 #endif
179 #ifndef HAVE_GETADDRINFO
180 #define freeaddrinfo(a) __db_Cfreeaddrinfo(a)
181 #define getaddrinfo(a, b, c, d) __db_Cgetaddrinfo(a, b, c, d)
182 #endif
183 #ifndef HAVE_GETCWD
184 #define getcwd __db_Cgetcwd
185 #endif
186 #ifndef HAVE_GETOPT
187 #define getopt __db_Cgetopt
188 #define optarg __db_Coptarg
189 #define opterr __db_Copterr
190 #define optind __db_Coptind
191 #define optopt __db_Coptopt
192 #define optreset __db_Coptreset
193 #endif
194 #ifndef HAVE_ISALPHA
195 #define isalpha __db_Cisalpha
196 #endif
197 #ifndef HAVE_ISDIGIT
198 #define isdigit __db_Cisdigit
199 #endif
200 #ifndef HAVE_ISPRINT
201 #define isprint __db_Cisprint
202 #endif
203 #ifndef HAVE_ISSPACE
204 #define isspace __db_Cisspace
205 #endif
206 #ifndef HAVE_LOCALTIME
207 #define localtime __db_Clocaltime
208 #endif
209 #ifndef HAVE_MEMCMP
210 #define memcmp __db_Cmemcmp
211 #endif
212 #ifndef HAVE_MEMCPY
213 #define memcpy __db_Cmemcpy
214 #endif
215 #ifndef HAVE_MEMMOVE
216 #define memmove __db_Cmemmove
217 #endif
218 #ifndef HAVE_PRINTF
219 #define printf __db_Cprintf
220 #define fprintf __db_Cfprintf
221 #endif
222 #ifndef HAVE_QSORT
223 #define qsort __db_Cqsort
224 #endif
225 #ifndef HAVE_RAISE
226 #define raise __db_Craise
227 #endif
228 #ifndef HAVE_RAND
229 #define rand __db_Crand
230 #define srand __db_Csrand
231 #endif
232 #ifndef HAVE_SNPRINTF
233 #define snprintf __db_Csnprintf
234 #endif
235 #ifndef HAVE_STRCASECMP
236 #define strcasecmp __db_Cstrcasecmp
237 #define strncasecmp __db_Cstrncasecmp
238 #endif
239 #ifndef HAVE_STRCAT
240 #define strcat __db_Cstrcat
241 #endif
242 #ifndef HAVE_STRCHR
243 #define strchr __db_Cstrchr
244 #endif
245 #ifndef HAVE_STRDUP
246 #define strdup __db_Cstrdup
247 #endif
248 #ifndef HAVE_STRERROR
249 #define strerror __db_Cstrerror
250 #endif
251 #ifndef HAVE_STRNCAT
252 #define strncat __db_Cstrncat
253 #endif
254 #ifndef HAVE_STRNCMP
255 #define strncmp __db_Cstrncmp
256 #endif
257 #ifndef HAVE_STRRCHR
258 #define strrchr __db_Cstrrchr
259 #endif
260 #ifndef HAVE_STRSEP
261 #define strsep __db_Cstrsep
262 #endif
263 #ifndef HAVE_STRTOL
264 #define strtol __db_Cstrtol
265 #endif
266 #ifndef HAVE_STRTOUL
267 #define strtoul __db_Cstrtoul
268 #endif
269 #ifndef HAVE_TIME
270 #define time __db_Ctime
271 #endif
272 #ifndef HAVE_VSNPRINTF
273 #define vsnprintf __db_Cvsnprintf
274 #endif