Commit | Line | Data |
10bc17b6 |
1 | /* |
2 | * reentr.h |
3 | * |
4c79ee7a |
4 | * Copyright (c) 1997-2003, Larry Wall |
10bc17b6 |
5 | * |
6 | * You may distribute under the terms of either the GNU General Public |
7 | * License or the Artistic License, as specified in the README file. |
8 | * |
9 | * !!!!!!! DO NOT EDIT THIS FILE !!!!!!! |
10 | * This file is built by reentrl.pl from data in reentr.pl. |
11 | */ |
12 | |
13 | #ifndef REENTR_H |
14 | #define REENTR_H |
15 | |
16 | #ifdef USE_REENTRANT_API |
17 | |
18 | /* Deprecations: some platforms have the said reentrant interfaces |
19 | * but they are declared obsolete and are not to be used. Often this |
20 | * means that the platform has threadsafed the interfaces (hopefully). |
21 | * All this is OS version dependent, so we are of course fooling ourselves. |
22 | * If you know of more deprecations on some platforms, please add your own. */ |
23 | |
24 | #ifdef __hpux |
25 | # undef HAS_CRYPT_R |
26 | # undef HAS_DRAND48_R |
efa45b01 |
27 | # undef HAS_ENDGRENT_R |
28 | # undef HAS_ENDPWENT_R |
10bc17b6 |
29 | # undef HAS_GETGRENT_R |
30 | # undef HAS_GETPWENT_R |
31 | # undef HAS_SETLOCALE_R |
32 | # undef HAS_SRAND48_R |
33 | # undef HAS_STRERROR_R |
34 | # define NETDB_R_OBSOLETE |
35 | #endif |
36 | |
37 | #if defined(__osf__) && defined(__alpha) /* Tru64 aka Digital UNIX */ |
38 | # undef HAS_CRYPT_R |
39 | # undef HAS_STRERROR_R |
40 | # define NETDB_R_OBSOLETE |
41 | #endif |
42 | |
43 | #ifdef NETDB_R_OBSOLETE |
44 | # undef HAS_ENDHOSTENT_R |
45 | # undef HAS_ENDNETENT_R |
46 | # undef HAS_ENDPROTOENT_R |
47 | # undef HAS_ENDSERVENT_R |
48 | # undef HAS_GETHOSTBYADDR_R |
49 | # undef HAS_GETHOSTBYNAME_R |
50 | # undef HAS_GETHOSTENT_R |
51 | # undef HAS_GETNETBYADDR_R |
52 | # undef HAS_GETNETBYNAME_R |
53 | # undef HAS_GETNETENT_R |
54 | # undef HAS_GETPROTOBYNAME_R |
55 | # undef HAS_GETPROTOBYNUMBER_R |
56 | # undef HAS_GETPROTOENT_R |
57 | # undef HAS_GETSERVBYNAME_R |
58 | # undef HAS_GETSERVBYPORT_R |
59 | # undef HAS_GETSERVENT_R |
60 | # undef HAS_SETHOSTENT_R |
61 | # undef HAS_SETNETENT_R |
62 | # undef HAS_SETPROTOENT_R |
63 | # undef HAS_SETSERVENT_R |
64 | #endif |
65 | |
66 | #ifdef I_PWD |
67 | # include <pwd.h> |
68 | #endif |
69 | #ifdef I_GRP |
70 | # include <grp.h> |
71 | #endif |
72 | #ifdef I_NETDB |
73 | # include <netdb.h> |
74 | #endif |
75 | #ifdef I_STDLIB |
76 | # include <stdlib.h> /* drand48_data */ |
77 | #endif |
78 | #ifdef I_CRYPT |
79 | # ifdef I_CRYPT |
80 | # include <crypt.h> |
81 | # endif |
82 | #endif |
83 | #ifdef HAS_GETSPNAM_R |
84 | # ifdef I_SHADOW |
85 | # include <shadow.h> |
86 | # endif |
87 | #endif |
88 | |
89 | #define REENTRANT_PROTO_B_B 1 |
90 | #define REENTRANT_PROTO_B_BI 2 |
91 | #define REENTRANT_PROTO_B_BW 3 |
b430fd04 |
92 | #define REENTRANT_PROTO_B_CCD 4 |
93 | #define REENTRANT_PROTO_B_CCS 5 |
94 | #define REENTRANT_PROTO_B_IBI 6 |
95 | #define REENTRANT_PROTO_B_IBW 7 |
96 | #define REENTRANT_PROTO_B_SB 8 |
97 | #define REENTRANT_PROTO_B_SBI 9 |
98 | #define REENTRANT_PROTO_I_BI 10 |
99 | #define REENTRANT_PROTO_I_BW 11 |
100 | #define REENTRANT_PROTO_I_CCSBWR 12 |
101 | #define REENTRANT_PROTO_I_CCSD 13 |
102 | #define REENTRANT_PROTO_I_CII 14 |
103 | #define REENTRANT_PROTO_I_CIISD 15 |
104 | #define REENTRANT_PROTO_I_CSBI 16 |
105 | #define REENTRANT_PROTO_I_CSBIR 17 |
106 | #define REENTRANT_PROTO_I_CSBWR 18 |
107 | #define REENTRANT_PROTO_I_CSBWRE 19 |
108 | #define REENTRANT_PROTO_I_CSD 20 |
109 | #define REENTRANT_PROTO_I_CWISBWRE 21 |
110 | #define REENTRANT_PROTO_I_CWISD 22 |
31ee0cb7 |
111 | #define REENTRANT_PROTO_I_D 23 |
112 | #define REENTRANT_PROTO_I_H 24 |
113 | #define REENTRANT_PROTO_I_IBI 25 |
114 | #define REENTRANT_PROTO_I_IBW 26 |
115 | #define REENTRANT_PROTO_I_ICBI 27 |
116 | #define REENTRANT_PROTO_I_ICSBWR 28 |
117 | #define REENTRANT_PROTO_I_ICSD 29 |
118 | #define REENTRANT_PROTO_I_ID 30 |
119 | #define REENTRANT_PROTO_I_IISD 31 |
120 | #define REENTRANT_PROTO_I_ISBWR 32 |
121 | #define REENTRANT_PROTO_I_ISD 33 |
122 | #define REENTRANT_PROTO_I_LISBI 34 |
123 | #define REENTRANT_PROTO_I_LISD 35 |
124 | #define REENTRANT_PROTO_I_LS 36 |
b430fd04 |
125 | #define REENTRANT_PROTO_I_SB 37 |
126 | #define REENTRANT_PROTO_I_SBI 38 |
127 | #define REENTRANT_PROTO_I_SBIE 39 |
128 | #define REENTRANT_PROTO_I_SBIH 40 |
129 | #define REENTRANT_PROTO_I_SBIR 41 |
130 | #define REENTRANT_PROTO_I_SBWR 42 |
131 | #define REENTRANT_PROTO_I_SBWRE 43 |
132 | #define REENTRANT_PROTO_I_SD 44 |
133 | #define REENTRANT_PROTO_I_ST 45 |
a845a0d4 |
134 | #define REENTRANT_PROTO_I_St 46 |
135 | #define REENTRANT_PROTO_I_TISD 47 |
136 | #define REENTRANT_PROTO_I_TS 48 |
137 | #define REENTRANT_PROTO_I_TSBI 49 |
138 | #define REENTRANT_PROTO_I_TSBIR 50 |
139 | #define REENTRANT_PROTO_I_TSBWR 51 |
140 | #define REENTRANT_PROTO_I_TSR 52 |
141 | #define REENTRANT_PROTO_I_TsISBWRE 53 |
142 | #define REENTRANT_PROTO_I_UISBWRE 54 |
143 | #define REENTRANT_PROTO_I_iS 55 |
144 | #define REENTRANT_PROTO_I_lS 56 |
145 | #define REENTRANT_PROTO_I_uISBWRE 57 |
146 | #define REENTRANT_PROTO_S_CBI 58 |
147 | #define REENTRANT_PROTO_S_CCSBI 59 |
148 | #define REENTRANT_PROTO_S_CIISBIE 60 |
149 | #define REENTRANT_PROTO_S_CSBI 61 |
150 | #define REENTRANT_PROTO_S_CSBIE 62 |
151 | #define REENTRANT_PROTO_S_CWISBIE 63 |
152 | #define REENTRANT_PROTO_S_CWISBWIE 64 |
153 | #define REENTRANT_PROTO_S_ICSBI 65 |
154 | #define REENTRANT_PROTO_S_ISBI 66 |
155 | #define REENTRANT_PROTO_S_LISBI 67 |
156 | #define REENTRANT_PROTO_S_SBI 68 |
157 | #define REENTRANT_PROTO_S_SBIE 69 |
158 | #define REENTRANT_PROTO_S_SBW 70 |
159 | #define REENTRANT_PROTO_S_TISBI 71 |
160 | #define REENTRANT_PROTO_S_TS 72 |
161 | #define REENTRANT_PROTO_S_TSBI 73 |
162 | #define REENTRANT_PROTO_S_TSBIE 74 |
163 | #define REENTRANT_PROTO_S_TWISBIE 75 |
164 | #define REENTRANT_PROTO_V_D 76 |
165 | #define REENTRANT_PROTO_V_H 77 |
166 | #define REENTRANT_PROTO_V_ID 78 |
10bc17b6 |
167 | |
168 | /* Defines for indicating which special features are supported. */ |
169 | |
edd309b7 |
170 | /* The getgrent getgrgid getgrnam using buffer? */ |
171 | |
172 | #if defined(HAS_GETGRENT_R) && (GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIR || GETGRENT_R_PROTO == REENTRANT_PROTO_S_SBW || GETGRENT_R_PROTO == REENTRANT_PROTO_S_SBI || GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBI || GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIH) |
173 | # define GETGRENT_R_HAS_BUFFER |
174 | #else |
175 | # undef GETGRENT_R_HAS_BUFFER |
176 | #endif |
177 | #if defined(HAS_GETGRGID_R) && (GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBWR || GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBIR || GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBI || GETGRGID_R_PROTO == REENTRANT_PROTO_S_TSBI) |
178 | # define GETGRGID_R_HAS_BUFFER |
179 | #else |
180 | # undef GETGRGID_R_HAS_BUFFER |
181 | #endif |
182 | #if defined(HAS_GETGRNAM_R) && (GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR || GETGRNAM_R_PROTO == REENTRANT_PROTO_S_CBI || GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBI || GETGRNAM_R_PROTO == REENTRANT_PROTO_S_CSBI) |
183 | # define GETGRNAM_R_HAS_BUFFER |
184 | #else |
185 | # undef GETGRNAM_R_HAS_BUFFER |
186 | #endif |
187 | |
188 | /* Any of the getgrent getgrgid getgrnam using buffer? */ |
189 | |
190 | #if (defined(GETGRENT_R_HAS_BUFFER) || defined(GETGRGID_R_HAS_BUFFER) || defined(GETGRNAM_R_HAS_BUFFER)) |
f7937171 |
191 | # define USE_GRENT_BUFFER |
edd309b7 |
192 | #else |
f7937171 |
193 | # undef USE_GRENT_BUFFER |
edd309b7 |
194 | #endif |
195 | |
10bc17b6 |
196 | /* The getgrent getgrgid getgrnam using ptr? */ |
197 | |
09310450 |
198 | #if defined(HAS_GETGRENT_R) && (GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIR) |
10bc17b6 |
199 | # define GETGRENT_R_HAS_PTR |
200 | #else |
201 | # undef GETGRENT_R_HAS_PTR |
202 | #endif |
09310450 |
203 | #if defined(HAS_GETGRGID_R) && (GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBWR || GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBIR) |
10bc17b6 |
204 | # define GETGRGID_R_HAS_PTR |
205 | #else |
206 | # undef GETGRGID_R_HAS_PTR |
207 | #endif |
09310450 |
208 | #if defined(HAS_GETGRNAM_R) && (GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR) |
10bc17b6 |
209 | # define GETGRNAM_R_HAS_PTR |
210 | #else |
211 | # undef GETGRNAM_R_HAS_PTR |
212 | #endif |
213 | |
214 | /* Any of the getgrent getgrgid getgrnam using ptr? */ |
215 | |
216 | #if (defined(GETGRENT_R_HAS_PTR) || defined(GETGRGID_R_HAS_PTR) || defined(GETGRNAM_R_HAS_PTR)) |
f7937171 |
217 | # define USE_GRENT_PTR |
10bc17b6 |
218 | #else |
f7937171 |
219 | # undef USE_GRENT_PTR |
10bc17b6 |
220 | #endif |
221 | |
222 | /* The getpwent getpwnam getpwuid using ptr? */ |
223 | |
09310450 |
224 | #if defined(HAS_GETPWENT_R) && (GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIR) |
10bc17b6 |
225 | # define GETPWENT_R_HAS_PTR |
226 | #else |
227 | # undef GETPWENT_R_HAS_PTR |
228 | #endif |
09310450 |
229 | #if defined(HAS_GETPWNAM_R) && (GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR) |
10bc17b6 |
230 | # define GETPWNAM_R_HAS_PTR |
231 | #else |
232 | # undef GETPWNAM_R_HAS_PTR |
233 | #endif |
09310450 |
234 | #if defined(HAS_GETPWUID_R) && (GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBWR || GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBIR) |
10bc17b6 |
235 | # define GETPWUID_R_HAS_PTR |
236 | #else |
237 | # undef GETPWUID_R_HAS_PTR |
238 | #endif |
239 | |
240 | /* Any of the getpwent getpwnam getpwuid using ptr? */ |
241 | |
242 | #if (defined(GETPWENT_R_HAS_PTR) || defined(GETPWNAM_R_HAS_PTR) || defined(GETPWUID_R_HAS_PTR)) |
f7937171 |
243 | # define USE_PWENT_PTR |
10bc17b6 |
244 | #else |
f7937171 |
245 | # undef USE_PWENT_PTR |
10bc17b6 |
246 | #endif |
247 | |
248 | /* The getspent getspnam using ptr? */ |
249 | |
09310450 |
250 | #if defined(HAS_GETSPNAM_R) && (GETSPNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR) |
10bc17b6 |
251 | # define GETSPNAM_R_HAS_PTR |
252 | #else |
253 | # undef GETSPNAM_R_HAS_PTR |
254 | #endif |
255 | |
256 | /* Any of the getspent getspnam using ptr? */ |
257 | |
258 | #if (defined(GETSPENT_R_HAS_PTR) || defined(GETSPNAM_R_HAS_PTR)) |
f7937171 |
259 | # define USE_SPENT_PTR |
10bc17b6 |
260 | #else |
f7937171 |
261 | # undef USE_SPENT_PTR |
10bc17b6 |
262 | #endif |
263 | |
f7937171 |
264 | /* The getgrent getgrgid getgrnam setgrent endgrent using fptr? */ |
10bc17b6 |
265 | |
09310450 |
266 | #if defined(HAS_GETGRENT_R) && (GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIH) |
10bc17b6 |
267 | # define GETGRENT_R_HAS_FPTR |
268 | #else |
269 | # undef GETGRENT_R_HAS_FPTR |
270 | #endif |
f7937171 |
271 | #if defined(HAS_SETGRENT_R) && (SETGRENT_R_PROTO == REENTRANT_PROTO_I_H || SETGRENT_R_PROTO == REENTRANT_PROTO_V_H) |
272 | # define SETGRENT_R_HAS_FPTR |
273 | #else |
274 | # undef SETGRENT_R_HAS_FPTR |
275 | #endif |
276 | #if defined(HAS_ENDGRENT_R) && (ENDGRENT_R_PROTO == REENTRANT_PROTO_I_H || ENDGRENT_R_PROTO == REENTRANT_PROTO_V_H) |
277 | # define ENDGRENT_R_HAS_FPTR |
278 | #else |
279 | # undef ENDGRENT_R_HAS_FPTR |
280 | #endif |
10bc17b6 |
281 | |
f7937171 |
282 | /* Any of the getgrent getgrgid getgrnam setgrent endgrent using fptr? */ |
10bc17b6 |
283 | |
f7937171 |
284 | #if (defined(GETGRENT_R_HAS_FPTR) || defined(GETGRGID_R_HAS_FPTR) || defined(GETGRNAM_R_HAS_FPTR) || defined(SETGRENT_R_HAS_FPTR) || defined(ENDGRENT_R_HAS_FPTR)) |
285 | # define USE_GRENT_FPTR |
10bc17b6 |
286 | #else |
f7937171 |
287 | # undef USE_GRENT_FPTR |
10bc17b6 |
288 | #endif |
289 | |
f7937171 |
290 | /* The getpwent getpwnam getpwuid setpwent endpwent using fptr? */ |
10bc17b6 |
291 | |
09310450 |
292 | #if defined(HAS_GETPWENT_R) && (GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIH) |
10bc17b6 |
293 | # define GETPWENT_R_HAS_FPTR |
294 | #else |
295 | # undef GETPWENT_R_HAS_FPTR |
296 | #endif |
f7937171 |
297 | #if defined(HAS_SETPWENT_R) && (SETPWENT_R_PROTO == REENTRANT_PROTO_I_H || SETPWENT_R_PROTO == REENTRANT_PROTO_V_H) |
298 | # define SETPWENT_R_HAS_FPTR |
299 | #else |
300 | # undef SETPWENT_R_HAS_FPTR |
301 | #endif |
302 | #if defined(HAS_ENDPWENT_R) && (ENDPWENT_R_PROTO == REENTRANT_PROTO_I_H || ENDPWENT_R_PROTO == REENTRANT_PROTO_V_H) |
303 | # define ENDPWENT_R_HAS_FPTR |
304 | #else |
305 | # undef ENDPWENT_R_HAS_FPTR |
306 | #endif |
10bc17b6 |
307 | |
f7937171 |
308 | /* Any of the getpwent getpwnam getpwuid setpwent endpwent using fptr? */ |
10bc17b6 |
309 | |
f7937171 |
310 | #if (defined(GETPWENT_R_HAS_FPTR) || defined(GETPWNAM_R_HAS_FPTR) || defined(GETPWUID_R_HAS_FPTR) || defined(SETPWENT_R_HAS_FPTR) || defined(ENDPWENT_R_HAS_FPTR)) |
311 | # define USE_PWENT_FPTR |
10bc17b6 |
312 | #else |
f7937171 |
313 | # undef USE_PWENT_FPTR |
10bc17b6 |
314 | #endif |
315 | |
edd309b7 |
316 | /* The getpwent getpwgid getpwnam using buffer? */ |
317 | |
318 | #if defined(HAS_GETPWENT_R) && (GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIR || GETPWENT_R_PROTO == REENTRANT_PROTO_S_SBW || GETPWENT_R_PROTO == REENTRANT_PROTO_S_SBI || GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBI || GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIH) |
319 | # define GETPWENT_R_HAS_BUFFER |
320 | #else |
321 | # undef GETPWENT_R_HAS_BUFFER |
322 | #endif |
323 | #if defined(HAS_GETPWNAM_R) && (GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR || GETPWNAM_R_PROTO == REENTRANT_PROTO_S_CSBI || GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBI) |
324 | # define GETPWNAM_R_HAS_BUFFER |
325 | #else |
326 | # undef GETPWNAM_R_HAS_BUFFER |
327 | #endif |
328 | |
329 | /* Any of the getpwent getpwgid getpwnam using buffer? */ |
330 | |
331 | #if (defined(GETPWENT_R_HAS_BUFFER) || defined(GETPWGID_R_HAS_BUFFER) || defined(GETPWNAM_R_HAS_BUFFER)) |
f7937171 |
332 | # define USE_PWENT_BUFFER |
edd309b7 |
333 | #else |
f7937171 |
334 | # undef USE_PWENT_BUFFER |
edd309b7 |
335 | #endif |
336 | |
10bc17b6 |
337 | /* The gethostent gethostbyaddr gethostbyname using ptr? */ |
338 | |
09310450 |
339 | #if defined(HAS_GETHOSTENT_R) && (GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBWRE) |
10bc17b6 |
340 | # define GETHOSTENT_R_HAS_PTR |
341 | #else |
342 | # undef GETHOSTENT_R_HAS_PTR |
343 | #endif |
a845a0d4 |
344 | #if defined(HAS_GETHOSTBYADDR_R) && (GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISBWRE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_TsISBWRE) |
10bc17b6 |
345 | # define GETHOSTBYADDR_R_HAS_PTR |
346 | #else |
347 | # undef GETHOSTBYADDR_R_HAS_PTR |
348 | #endif |
09310450 |
349 | #if defined(HAS_GETHOSTBYNAME_R) && (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE) |
10bc17b6 |
350 | # define GETHOSTBYNAME_R_HAS_PTR |
351 | #else |
352 | # undef GETHOSTBYNAME_R_HAS_PTR |
353 | #endif |
354 | |
355 | /* Any of the gethostent gethostbyaddr gethostbyname using ptr? */ |
356 | |
357 | #if (defined(GETHOSTENT_R_HAS_PTR) || defined(GETHOSTBYADDR_R_HAS_PTR) || defined(GETHOSTBYNAME_R_HAS_PTR)) |
f7937171 |
358 | # define USE_HOSTENT_PTR |
10bc17b6 |
359 | #else |
f7937171 |
360 | # undef USE_HOSTENT_PTR |
10bc17b6 |
361 | #endif |
362 | |
363 | /* The getnetent getnetbyaddr getnetbyname using ptr? */ |
364 | |
09310450 |
365 | #if defined(HAS_GETNETENT_R) && (GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBWRE) |
10bc17b6 |
366 | # define GETNETENT_R_HAS_PTR |
367 | #else |
368 | # undef GETNETENT_R_HAS_PTR |
369 | #endif |
a845a0d4 |
370 | #if defined(HAS_GETNETBYADDR_R) && (GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE || GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_uISBWRE) |
10bc17b6 |
371 | # define GETNETBYADDR_R_HAS_PTR |
372 | #else |
373 | # undef GETNETBYADDR_R_HAS_PTR |
374 | #endif |
09310450 |
375 | #if defined(HAS_GETNETBYNAME_R) && (GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE) |
10bc17b6 |
376 | # define GETNETBYNAME_R_HAS_PTR |
377 | #else |
378 | # undef GETNETBYNAME_R_HAS_PTR |
379 | #endif |
380 | |
381 | /* Any of the getnetent getnetbyaddr getnetbyname using ptr? */ |
382 | |
383 | #if (defined(GETNETENT_R_HAS_PTR) || defined(GETNETBYADDR_R_HAS_PTR) || defined(GETNETBYNAME_R_HAS_PTR)) |
f7937171 |
384 | # define USE_NETENT_PTR |
10bc17b6 |
385 | #else |
f7937171 |
386 | # undef USE_NETENT_PTR |
10bc17b6 |
387 | #endif |
388 | |
389 | /* The getprotoent getprotobyname getprotobynumber using ptr? */ |
390 | |
09310450 |
391 | #if defined(HAS_GETPROTOENT_R) && (GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBWR) |
10bc17b6 |
392 | # define GETPROTOENT_R_HAS_PTR |
393 | #else |
394 | # undef GETPROTOENT_R_HAS_PTR |
395 | #endif |
09310450 |
396 | #if defined(HAS_GETPROTOBYNAME_R) && (GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR) |
10bc17b6 |
397 | # define GETPROTOBYNAME_R_HAS_PTR |
398 | #else |
399 | # undef GETPROTOBYNAME_R_HAS_PTR |
400 | #endif |
09310450 |
401 | #if defined(HAS_GETPROTOBYNUMBER_R) && (GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR) |
10bc17b6 |
402 | # define GETPROTOBYNUMBER_R_HAS_PTR |
403 | #else |
404 | # undef GETPROTOBYNUMBER_R_HAS_PTR |
405 | #endif |
406 | |
407 | /* Any of the getprotoent getprotobyname getprotobynumber using ptr? */ |
408 | |
409 | #if (defined(GETPROTOENT_R_HAS_PTR) || defined(GETPROTOBYNAME_R_HAS_PTR) || defined(GETPROTOBYNUMBER_R_HAS_PTR)) |
f7937171 |
410 | # define USE_PROTOENT_PTR |
10bc17b6 |
411 | #else |
f7937171 |
412 | # undef USE_PROTOENT_PTR |
10bc17b6 |
413 | #endif |
414 | |
415 | /* The getservent getservbyname getservbyport using ptr? */ |
416 | |
09310450 |
417 | #if defined(HAS_GETSERVENT_R) && (GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBWR) |
10bc17b6 |
418 | # define GETSERVENT_R_HAS_PTR |
419 | #else |
420 | # undef GETSERVENT_R_HAS_PTR |
421 | #endif |
09310450 |
422 | #if defined(HAS_GETSERVBYNAME_R) && (GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR) |
10bc17b6 |
423 | # define GETSERVBYNAME_R_HAS_PTR |
424 | #else |
425 | # undef GETSERVBYNAME_R_HAS_PTR |
426 | #endif |
09310450 |
427 | #if defined(HAS_GETSERVBYPORT_R) && (GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR) |
10bc17b6 |
428 | # define GETSERVBYPORT_R_HAS_PTR |
429 | #else |
430 | # undef GETSERVBYPORT_R_HAS_PTR |
431 | #endif |
432 | |
433 | /* Any of the getservent getservbyname getservbyport using ptr? */ |
434 | |
435 | #if (defined(GETSERVENT_R_HAS_PTR) || defined(GETSERVBYNAME_R_HAS_PTR) || defined(GETSERVBYPORT_R_HAS_PTR)) |
f7937171 |
436 | # define USE_SERVENT_PTR |
10bc17b6 |
437 | #else |
f7937171 |
438 | # undef USE_SERVENT_PTR |
10bc17b6 |
439 | #endif |
440 | |
edd309b7 |
441 | /* The gethostent gethostbyaddr gethostbyname using buffer? */ |
442 | |
443 | #if defined(HAS_GETHOSTENT_R) && (GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBWRE || GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBIE || GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBIE || GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBI || GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBI) |
444 | # define GETHOSTENT_R_HAS_BUFFER |
445 | #else |
446 | # undef GETHOSTENT_R_HAS_BUFFER |
447 | #endif |
a845a0d4 |
448 | #if defined(HAS_GETHOSTBYADDR_R) && (GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISBWRE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBWIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TWISBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CIISBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CSBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TSBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_TsISBWRE) |
edd309b7 |
449 | # define GETHOSTBYADDR_R_HAS_BUFFER |
450 | #else |
451 | # undef GETHOSTBYADDR_R_HAS_BUFFER |
452 | #endif |
453 | #if defined(HAS_GETHOSTBYNAME_R) && (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE || GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE) |
454 | # define GETHOSTBYNAME_R_HAS_BUFFER |
455 | #else |
456 | # undef GETHOSTBYNAME_R_HAS_BUFFER |
457 | #endif |
458 | |
459 | /* Any of the gethostent gethostbyaddr gethostbyname using buffer? */ |
460 | |
461 | #if (defined(GETHOSTENT_R_HAS_BUFFER) || defined(GETHOSTBYADDR_R_HAS_BUFFER) || defined(GETHOSTBYNAME_R_HAS_BUFFER)) |
f7937171 |
462 | # define USE_HOSTENT_BUFFER |
edd309b7 |
463 | #else |
f7937171 |
464 | # undef USE_HOSTENT_BUFFER |
edd309b7 |
465 | #endif |
466 | |
467 | /* The getnetent getnetbyaddr getnetbyname using buffer? */ |
468 | |
469 | #if defined(HAS_GETNETENT_R) && (GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBWRE || GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBIE || GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBIE || GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBI || GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBI) |
470 | # define GETNETENT_R_HAS_BUFFER |
471 | #else |
472 | # undef GETNETENT_R_HAS_BUFFER |
473 | #endif |
a845a0d4 |
474 | #if defined(HAS_GETNETBYADDR_R) && (GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE || GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_LISBI || GETNETBYADDR_R_PROTO == REENTRANT_PROTO_S_TISBI || GETNETBYADDR_R_PROTO == REENTRANT_PROTO_S_LISBI || GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_uISBWRE) |
edd309b7 |
475 | # define GETNETBYADDR_R_HAS_BUFFER |
476 | #else |
477 | # undef GETNETBYADDR_R_HAS_BUFFER |
478 | #endif |
479 | #if defined(HAS_GETNETBYNAME_R) && (GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE || GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBI || GETNETBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI) |
480 | # define GETNETBYNAME_R_HAS_BUFFER |
481 | #else |
482 | # undef GETNETBYNAME_R_HAS_BUFFER |
483 | #endif |
484 | |
485 | /* Any of the getnetent getnetbyaddr getnetbyname using buffer? */ |
486 | |
487 | #if (defined(GETNETENT_R_HAS_BUFFER) || defined(GETNETBYADDR_R_HAS_BUFFER) || defined(GETNETBYNAME_R_HAS_BUFFER)) |
f7937171 |
488 | # define USE_NETENT_BUFFER |
edd309b7 |
489 | #else |
f7937171 |
490 | # undef USE_NETENT_BUFFER |
edd309b7 |
491 | #endif |
492 | |
493 | /* The getprotoent getprotobyname getprotobynumber using buffer? */ |
494 | |
495 | #if defined(HAS_GETPROTOENT_R) && (GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBI || GETPROTOENT_R_PROTO == REENTRANT_PROTO_S_SBI) |
496 | # define GETPROTOENT_R_HAS_BUFFER |
497 | #else |
498 | # undef GETPROTOENT_R_HAS_BUFFER |
499 | #endif |
500 | #if defined(HAS_GETPROTOBYNAME_R) && (GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI) |
501 | # define GETPROTOBYNAME_R_HAS_BUFFER |
502 | #else |
503 | # undef GETPROTOBYNAME_R_HAS_BUFFER |
504 | #endif |
505 | #if defined(HAS_GETPROTOBYNUMBER_R) && (GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR || GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_S_ISBI) |
506 | # define GETPROTOBYNUMBER_R_HAS_BUFFER |
507 | #else |
508 | # undef GETPROTOBYNUMBER_R_HAS_BUFFER |
509 | #endif |
510 | |
511 | /* Any of the getprotoent getprotobyname getprotobynumber using buffer? */ |
512 | |
513 | #if (defined(GETPROTOENT_R_HAS_BUFFER) || defined(GETPROTOBYNAME_R_HAS_BUFFER) || defined(GETPROTOBYNUMBER_R_HAS_BUFFER)) |
f7937171 |
514 | # define USE_PROTOENT_BUFFER |
edd309b7 |
515 | #else |
f7937171 |
516 | # undef USE_PROTOENT_BUFFER |
edd309b7 |
517 | #endif |
518 | |
519 | /* The getservent getservbyname getservbyport using buffer? */ |
520 | |
521 | #if defined(HAS_GETSERVENT_R) && (GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBI || GETSERVENT_R_PROTO == REENTRANT_PROTO_S_SBI) |
522 | # define GETSERVENT_R_HAS_BUFFER |
523 | #else |
524 | # undef GETSERVENT_R_HAS_BUFFER |
525 | #endif |
526 | #if defined(HAS_GETSERVBYNAME_R) && (GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR || GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_S_CCSBI) |
527 | # define GETSERVBYNAME_R_HAS_BUFFER |
528 | #else |
529 | # undef GETSERVBYNAME_R_HAS_BUFFER |
530 | #endif |
531 | #if defined(HAS_GETSERVBYPORT_R) && (GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR || GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_S_ICSBI) |
532 | # define GETSERVBYPORT_R_HAS_BUFFER |
533 | #else |
534 | # undef GETSERVBYPORT_R_HAS_BUFFER |
535 | #endif |
536 | |
537 | /* Any of the getservent getservbyname getservbyport using buffer? */ |
538 | |
539 | #if (defined(GETSERVENT_R_HAS_BUFFER) || defined(GETSERVBYNAME_R_HAS_BUFFER) || defined(GETSERVBYPORT_R_HAS_BUFFER)) |
f7937171 |
540 | # define USE_SERVENT_BUFFER |
edd309b7 |
541 | #else |
f7937171 |
542 | # undef USE_SERVENT_BUFFER |
edd309b7 |
543 | #endif |
544 | |
10bc17b6 |
545 | /* The gethostent gethostbyaddr gethostbyname using errno? */ |
546 | |
09310450 |
547 | #if defined(HAS_GETHOSTENT_R) && (GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBWRE || GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBIE || GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBIE) |
10bc17b6 |
548 | # define GETHOSTENT_R_HAS_ERRNO |
549 | #else |
550 | # undef GETHOSTENT_R_HAS_ERRNO |
551 | #endif |
a845a0d4 |
552 | #if defined(HAS_GETHOSTBYADDR_R) && (GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISBWRE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBWIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TWISBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CIISBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CSBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TSBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_TsISBWRE) |
10bc17b6 |
553 | # define GETHOSTBYADDR_R_HAS_ERRNO |
554 | #else |
555 | # undef GETHOSTBYADDR_R_HAS_ERRNO |
556 | #endif |
09310450 |
557 | #if defined(HAS_GETHOSTBYNAME_R) && (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE || GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE) |
10bc17b6 |
558 | # define GETHOSTBYNAME_R_HAS_ERRNO |
559 | #else |
560 | # undef GETHOSTBYNAME_R_HAS_ERRNO |
561 | #endif |
562 | |
563 | /* Any of the gethostent gethostbyaddr gethostbyname using errno? */ |
564 | |
565 | #if (defined(GETHOSTENT_R_HAS_ERRNO) || defined(GETHOSTBYADDR_R_HAS_ERRNO) || defined(GETHOSTBYNAME_R_HAS_ERRNO)) |
f7937171 |
566 | # define USE_HOSTENT_ERRNO |
10bc17b6 |
567 | #else |
f7937171 |
568 | # undef USE_HOSTENT_ERRNO |
10bc17b6 |
569 | #endif |
570 | |
571 | /* The getnetent getnetbyaddr getnetbyname using errno? */ |
572 | |
09310450 |
573 | #if defined(HAS_GETNETENT_R) && (GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBWRE || GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBIE || GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBIE) |
10bc17b6 |
574 | # define GETNETENT_R_HAS_ERRNO |
575 | #else |
576 | # undef GETNETENT_R_HAS_ERRNO |
577 | #endif |
a845a0d4 |
578 | #if defined(HAS_GETNETBYADDR_R) && (GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE || GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_uISBWRE) |
10bc17b6 |
579 | # define GETNETBYADDR_R_HAS_ERRNO |
580 | #else |
581 | # undef GETNETBYADDR_R_HAS_ERRNO |
582 | #endif |
09310450 |
583 | #if defined(HAS_GETNETBYNAME_R) && (GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE) |
10bc17b6 |
584 | # define GETNETBYNAME_R_HAS_ERRNO |
585 | #else |
586 | # undef GETNETBYNAME_R_HAS_ERRNO |
587 | #endif |
588 | |
589 | /* Any of the getnetent getnetbyaddr getnetbyname using errno? */ |
590 | |
591 | #if (defined(GETNETENT_R_HAS_ERRNO) || defined(GETNETBYADDR_R_HAS_ERRNO) || defined(GETNETBYNAME_R_HAS_ERRNO)) |
f7937171 |
592 | # define USE_NETENT_ERRNO |
10bc17b6 |
593 | #else |
f7937171 |
594 | # undef USE_NETENT_ERRNO |
10bc17b6 |
595 | #endif |
596 | |
597 | |
598 | typedef struct { |
599 | #ifdef HAS_ASCTIME_R |
600 | char* _asctime_buffer; |
601 | size_t _asctime_size; |
602 | #endif /* HAS_ASCTIME_R */ |
603 | #ifdef HAS_CRYPT_R |
b430fd04 |
604 | #if CRYPT_R_PROTO == REENTRANT_PROTO_B_CCD |
605 | CRYPTD* _crypt_data; |
606 | #else |
05404ffe |
607 | struct crypt_data *_crypt_struct_buffer; |
b430fd04 |
608 | #endif |
10bc17b6 |
609 | #endif /* HAS_CRYPT_R */ |
610 | #ifdef HAS_CTIME_R |
611 | char* _ctime_buffer; |
612 | size_t _ctime_size; |
613 | #endif /* HAS_CTIME_R */ |
614 | #ifdef HAS_DRAND48_R |
615 | struct drand48_data _drand48_struct; |
616 | double _drand48_double; |
617 | #endif /* HAS_DRAND48_R */ |
618 | #ifdef HAS_GETGRNAM_R |
f7937171 |
619 | struct group _grent_struct; |
620 | char* _grent_buffer; |
621 | size_t _grent_size; |
622 | # ifdef USE_GRENT_PTR |
623 | struct group* _grent_ptr; |
10bc17b6 |
624 | # endif |
f7937171 |
625 | # ifdef USE_GRENT_FPTR |
626 | FILE* _grent_fptr; |
10bc17b6 |
627 | # endif |
628 | #endif /* HAS_GETGRNAM_R */ |
629 | #ifdef HAS_GETHOSTBYNAME_R |
f7937171 |
630 | struct hostent _hostent_struct; |
10bc17b6 |
631 | # if GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD |
f7937171 |
632 | struct hostent_data _hostent_data; |
10bc17b6 |
633 | # else |
f7937171 |
634 | char* _hostent_buffer; |
635 | size_t _hostent_size; |
10bc17b6 |
636 | # endif |
f7937171 |
637 | # ifdef USE_HOSTENT_PTR |
638 | struct hostent* _hostent_ptr; |
10bc17b6 |
639 | # endif |
f7937171 |
640 | # ifdef USE_HOSTENT_ERRNO |
641 | int _hostent_errno; |
10bc17b6 |
642 | # endif |
643 | #endif /* HAS_GETHOSTBYNAME_R */ |
644 | #ifdef HAS_GETLOGIN_R |
645 | char* _getlogin_buffer; |
646 | size_t _getlogin_size; |
647 | #endif /* HAS_GETLOGIN_R */ |
648 | #ifdef HAS_GETNETBYNAME_R |
f7937171 |
649 | struct netent _netent_struct; |
10bc17b6 |
650 | # if GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD |
f7937171 |
651 | struct netent_data _netent_data; |
10bc17b6 |
652 | # else |
f7937171 |
653 | char* _netent_buffer; |
654 | size_t _netent_size; |
10bc17b6 |
655 | # endif |
f7937171 |
656 | # ifdef USE_NETENT_PTR |
657 | struct netent* _netent_ptr; |
10bc17b6 |
658 | # endif |
f7937171 |
659 | # ifdef USE_NETENT_ERRNO |
660 | int _netent_errno; |
10bc17b6 |
661 | # endif |
662 | #endif /* HAS_GETNETBYNAME_R */ |
663 | #ifdef HAS_GETPROTOBYNAME_R |
f7937171 |
664 | struct protoent _protoent_struct; |
10bc17b6 |
665 | # if GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD |
f7937171 |
666 | struct protoent_data _protoent_data; |
10bc17b6 |
667 | # else |
f7937171 |
668 | char* _protoent_buffer; |
669 | size_t _protoent_size; |
10bc17b6 |
670 | # endif |
f7937171 |
671 | # ifdef USE_PROTOENT_PTR |
672 | struct protoent* _protoent_ptr; |
10bc17b6 |
673 | # endif |
f7937171 |
674 | # ifdef USE_PROTOENT_ERRNO |
675 | int _protoent_errno; |
10bc17b6 |
676 | # endif |
677 | #endif /* HAS_GETPROTOBYNAME_R */ |
678 | #ifdef HAS_GETPWNAM_R |
f7937171 |
679 | struct passwd _pwent_struct; |
680 | char* _pwent_buffer; |
681 | size_t _pwent_size; |
682 | # ifdef USE_PWENT_PTR |
683 | struct passwd* _pwent_ptr; |
10bc17b6 |
684 | # endif |
f7937171 |
685 | # ifdef USE_PWENT_FPTR |
686 | FILE* _pwent_fptr; |
10bc17b6 |
687 | # endif |
688 | #endif /* HAS_GETPWNAM_R */ |
689 | #ifdef HAS_GETSERVBYNAME_R |
f7937171 |
690 | struct servent _servent_struct; |
10bc17b6 |
691 | # if GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD |
f7937171 |
692 | struct servent_data _servent_data; |
10bc17b6 |
693 | # else |
f7937171 |
694 | char* _servent_buffer; |
695 | size_t _servent_size; |
10bc17b6 |
696 | # endif |
f7937171 |
697 | # ifdef USE_SERVENT_PTR |
698 | struct servent* _servent_ptr; |
10bc17b6 |
699 | # endif |
f7937171 |
700 | # ifdef USE_SERVENT_ERRNO |
701 | int _servent_errno; |
10bc17b6 |
702 | # endif |
703 | #endif /* HAS_GETSERVBYNAME_R */ |
704 | #ifdef HAS_GETSPNAM_R |
f7937171 |
705 | struct spwd _spent_struct; |
706 | char* _spent_buffer; |
707 | size_t _spent_size; |
708 | # ifdef USE_SPENT_PTR |
709 | struct spwd* _spent_ptr; |
710 | # endif |
711 | # ifdef USE_SPENT_FPTR |
712 | FILE* _spent_fptr; |
10bc17b6 |
713 | # endif |
714 | #endif /* HAS_GETSPNAM_R */ |
715 | #ifdef HAS_GMTIME_R |
716 | struct tm _gmtime_struct; |
717 | #endif /* HAS_GMTIME_R */ |
718 | #ifdef HAS_LOCALTIME_R |
719 | struct tm _localtime_struct; |
720 | #endif /* HAS_LOCALTIME_R */ |
721 | #ifdef HAS_RANDOM_R |
722 | struct random_data _random_struct; |
a845a0d4 |
723 | # if RANDOM_R_PROTO == REENTRANT_PROTO_iS |
724 | int _random_retval; |
725 | # endif |
726 | # if RANDOM_R_PROTO == REENTRANT_PROTO_lS |
727 | long _random_retval; |
728 | # endif |
729 | # if RANDOM_R_PROTO == REENTRANT_PROTO_tS |
730 | int32_t _random_retval; |
731 | # endif |
10bc17b6 |
732 | #endif /* HAS_RANDOM_R */ |
733 | #ifdef HAS_READDIR_R |
734 | struct dirent* _readdir_struct; |
735 | size_t _readdir_size; |
736 | # if READDIR_R_PROTO == REENTRANT_PROTO_I_TSR |
737 | struct dirent* _readdir_ptr; |
738 | # endif |
739 | #endif /* HAS_READDIR_R */ |
740 | #ifdef HAS_READDIR64_R |
741 | struct dirent64* _readdir64_struct; |
742 | size_t _readdir64_size; |
743 | # if READDIR64_R_PROTO == REENTRANT_PROTO_I_TSR |
744 | struct dirent64* _readdir64_ptr; |
745 | # endif |
746 | #endif /* HAS_READDIR64_R */ |
747 | #ifdef HAS_SETLOCALE_R |
748 | char* _setlocale_buffer; |
749 | size_t _setlocale_size; |
750 | #endif /* HAS_SETLOCALE_R */ |
751 | #ifdef HAS_STRERROR_R |
752 | char* _strerror_buffer; |
753 | size_t _strerror_size; |
754 | #endif /* HAS_STRERROR_R */ |
755 | #ifdef HAS_TTYNAME_R |
756 | char* _ttyname_buffer; |
757 | size_t _ttyname_size; |
758 | #endif /* HAS_TTYNAME_R */ |
759 | |
aa418cf1 |
760 | int dummy; /* cannot have empty structs */ |
10bc17b6 |
761 | } REENTR; |
762 | |
763 | /* The wrappers. */ |
764 | |
765 | #ifdef HAS_ASCTIME_R |
766 | # undef asctime |
767 | # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_B_SB |
768 | # define asctime(a) asctime_r(a, PL_reentrant_buffer->_asctime_buffer) |
769 | # endif |
770 | # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_B_SBI |
771 | # define asctime(a) asctime_r(a, PL_reentrant_buffer->_asctime_buffer, PL_reentrant_buffer->_asctime_size) |
772 | # endif |
773 | # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_I_SB |
774 | # define asctime(a) (((errno = asctime_r(a, PL_reentrant_buffer->_asctime_buffer))) == 0 ? PL_reentrant_buffer->_asctime_buffer : 0) |
775 | # endif |
776 | # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_I_SBI |
777 | # define asctime(a) (((errno = asctime_r(a, PL_reentrant_buffer->_asctime_buffer, PL_reentrant_buffer->_asctime_size))) == 0 ? PL_reentrant_buffer->_asctime_buffer : 0) |
778 | # endif |
779 | #endif /* HAS_ASCTIME_R */ |
780 | |
781 | #ifdef HAS_CRYPT_R |
782 | # undef crypt |
783 | # if !defined(crypt) && CRYPT_R_PROTO == REENTRANT_PROTO_B_CCS |
05404ffe |
784 | # define crypt(a, b) crypt_r(a, b, PL_reentrant_buffer->_crypt_struct_buffer) |
10bc17b6 |
785 | # endif |
b430fd04 |
786 | # if !defined(crypt) && CRYPT_R_PROTO == REENTRANT_PROTO_B_CCD |
787 | # define crypt(a, b) crypt_r(a, b, &PL_reentrant_buffer->_crypt_data) |
788 | # endif |
10bc17b6 |
789 | #endif /* HAS_CRYPT_R */ |
790 | |
791 | #ifdef HAS_CTERMID_R |
792 | # undef ctermid |
793 | # if !defined(ctermid) && CTERMID_R_PROTO == REENTRANT_PROTO_B_B |
794 | # define ctermid(a) ctermid_r(a) |
795 | # endif |
796 | #endif /* HAS_CTERMID_R */ |
797 | |
798 | #ifdef HAS_CTIME_R |
799 | # undef ctime |
800 | # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_B_SB |
801 | # define ctime(a) ctime_r(a, PL_reentrant_buffer->_ctime_buffer) |
802 | # endif |
803 | # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_B_SBI |
804 | # define ctime(a) ctime_r(a, PL_reentrant_buffer->_ctime_buffer, PL_reentrant_buffer->_ctime_size) |
805 | # endif |
806 | # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_I_SB |
807 | # define ctime(a) (((errno = ctime_r(a, PL_reentrant_buffer->_ctime_buffer))) == 0 ? PL_reentrant_buffer->_ctime_buffer : 0) |
808 | # endif |
809 | # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_I_SBI |
810 | # define ctime(a) (((errno = ctime_r(a, PL_reentrant_buffer->_ctime_buffer, PL_reentrant_buffer->_ctime_size))) == 0 ? PL_reentrant_buffer->_ctime_buffer : 0) |
811 | # endif |
812 | #endif /* HAS_CTIME_R */ |
813 | |
814 | #ifdef HAS_DRAND48_R |
815 | # undef drand48 |
816 | # if !defined(drand48) && DRAND48_R_PROTO == REENTRANT_PROTO_I_ST |
817 | # define drand48() (((errno = drand48_r(&PL_reentrant_buffer->_drand48_struct, &PL_reentrant_buffer->_drand48_double))) == 0 ? PL_reentrant_buffer->_drand48_double : 0) |
818 | # endif |
819 | #endif /* HAS_DRAND48_R */ |
820 | |
821 | #ifdef HAS_ENDGRENT_R |
822 | # undef endgrent |
823 | # if !defined(endgrent) && ENDGRENT_R_PROTO == REENTRANT_PROTO_I_H |
f7937171 |
824 | # define endgrent() (((errno = endgrent_r(&PL_reentrant_buffer->_grent_fptr))) == 0 ? 1 : 0) |
10bc17b6 |
825 | # endif |
826 | # if !defined(endgrent) && ENDGRENT_R_PROTO == REENTRANT_PROTO_V_H |
f7937171 |
827 | # define endgrent() endgrent_r(&PL_reentrant_buffer->_grent_fptr) |
10bc17b6 |
828 | # endif |
829 | #endif /* HAS_ENDGRENT_R */ |
830 | |
831 | #ifdef HAS_ENDHOSTENT_R |
832 | # undef endhostent |
31ee0cb7 |
833 | # if !defined(endhostent) && ENDHOSTENT_R_PROTO == REENTRANT_PROTO_I_D |
f7937171 |
834 | # define endhostent() (((errno = endhostent_r(&PL_reentrant_buffer->_hostent_data))) == 0 ? 1 : 0) |
10bc17b6 |
835 | # endif |
31ee0cb7 |
836 | # if !defined(endhostent) && ENDHOSTENT_R_PROTO == REENTRANT_PROTO_V_D |
f7937171 |
837 | # define endhostent() endhostent_r(&PL_reentrant_buffer->_hostent_data) |
10bc17b6 |
838 | # endif |
839 | #endif /* HAS_ENDHOSTENT_R */ |
840 | |
841 | #ifdef HAS_ENDNETENT_R |
842 | # undef endnetent |
31ee0cb7 |
843 | # if !defined(endnetent) && ENDNETENT_R_PROTO == REENTRANT_PROTO_I_D |
f7937171 |
844 | # define endnetent() (((errno = endnetent_r(&PL_reentrant_buffer->_netent_data))) == 0 ? 1 : 0) |
10bc17b6 |
845 | # endif |
31ee0cb7 |
846 | # if !defined(endnetent) && ENDNETENT_R_PROTO == REENTRANT_PROTO_V_D |
f7937171 |
847 | # define endnetent() endnetent_r(&PL_reentrant_buffer->_netent_data) |
10bc17b6 |
848 | # endif |
849 | #endif /* HAS_ENDNETENT_R */ |
850 | |
851 | #ifdef HAS_ENDPROTOENT_R |
852 | # undef endprotoent |
31ee0cb7 |
853 | # if !defined(endprotoent) && ENDPROTOENT_R_PROTO == REENTRANT_PROTO_I_D |
f7937171 |
854 | # define endprotoent() (((errno = endprotoent_r(&PL_reentrant_buffer->_protoent_data))) == 0 ? 1 : 0) |
10bc17b6 |
855 | # endif |
31ee0cb7 |
856 | # if !defined(endprotoent) && ENDPROTOENT_R_PROTO == REENTRANT_PROTO_V_D |
f7937171 |
857 | # define endprotoent() endprotoent_r(&PL_reentrant_buffer->_protoent_data) |
10bc17b6 |
858 | # endif |
859 | #endif /* HAS_ENDPROTOENT_R */ |
860 | |
861 | #ifdef HAS_ENDPWENT_R |
862 | # undef endpwent |
863 | # if !defined(endpwent) && ENDPWENT_R_PROTO == REENTRANT_PROTO_I_H |
f7937171 |
864 | # define endpwent() (((errno = endpwent_r(&PL_reentrant_buffer->_pwent_fptr))) == 0 ? 1 : 0) |
10bc17b6 |
865 | # endif |
866 | # if !defined(endpwent) && ENDPWENT_R_PROTO == REENTRANT_PROTO_V_H |
f7937171 |
867 | # define endpwent() endpwent_r(&PL_reentrant_buffer->_pwent_fptr) |
10bc17b6 |
868 | # endif |
869 | #endif /* HAS_ENDPWENT_R */ |
870 | |
871 | #ifdef HAS_ENDSERVENT_R |
872 | # undef endservent |
31ee0cb7 |
873 | # if !defined(endservent) && ENDSERVENT_R_PROTO == REENTRANT_PROTO_I_D |
f7937171 |
874 | # define endservent() (((errno = endservent_r(&PL_reentrant_buffer->_servent_data))) == 0 ? 1 : 0) |
10bc17b6 |
875 | # endif |
31ee0cb7 |
876 | # if !defined(endservent) && ENDSERVENT_R_PROTO == REENTRANT_PROTO_V_D |
f7937171 |
877 | # define endservent() endservent_r(&PL_reentrant_buffer->_servent_data) |
10bc17b6 |
878 | # endif |
879 | #endif /* HAS_ENDSERVENT_R */ |
880 | |
881 | #ifdef HAS_GETGRENT_R |
882 | # undef getgrent |
883 | # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBWR |
f7937171 |
884 | # define getgrent() (((errno = getgrent_r(&PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size, &PL_reentrant_buffer->_grent_ptr))) == 0 ? PL_reentrant_buffer->_grent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0)) |
10bc17b6 |
885 | # endif |
886 | # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIR |
f7937171 |
887 | # define getgrent() (((errno = getgrent_r(&PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size, &PL_reentrant_buffer->_grent_ptr))) == 0 ? PL_reentrant_buffer->_grent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0)) |
10bc17b6 |
888 | # endif |
889 | # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_S_SBW |
f7937171 |
890 | # define getgrent() (getgrent_r(&PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size) ? &PL_reentrant_buffer->_grent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0)) |
10bc17b6 |
891 | # endif |
892 | # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_S_SBI |
f7937171 |
893 | # define getgrent() (getgrent_r(&PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size) ? &PL_reentrant_buffer->_grent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0)) |
10bc17b6 |
894 | # endif |
895 | # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBI |
f7937171 |
896 | # define getgrent() (((errno = getgrent_r(&PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size))) == 0 ? &PL_reentrant_buffer->_grent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0)) |
10bc17b6 |
897 | # endif |
898 | # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIH |
f7937171 |
899 | # define getgrent() (((errno = getgrent_r(&PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size, &PL_reentrant_buffer->_grent_fptr))) == 0 ? &PL_reentrant_buffer->_grent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0)) |
10bc17b6 |
900 | # endif |
901 | #endif /* HAS_GETGRENT_R */ |
902 | |
903 | #ifdef HAS_GETGRGID_R |
904 | # undef getgrgid |
905 | # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBWR |
f7937171 |
906 | # define getgrgid(a) (((errno = getgrgid_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size, &PL_reentrant_buffer->_grent_ptr))) == 0 ? PL_reentrant_buffer->_grent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrgid", a) : 0)) |
10bc17b6 |
907 | # endif |
908 | # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBIR |
f7937171 |
909 | # define getgrgid(a) (((errno = getgrgid_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size, &PL_reentrant_buffer->_grent_ptr))) == 0 ? PL_reentrant_buffer->_grent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrgid", a) : 0)) |
10bc17b6 |
910 | # endif |
911 | # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBI |
f7937171 |
912 | # define getgrgid(a) (((errno = getgrgid_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size))) == 0 ? &PL_reentrant_buffer->_grent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrgid", a) : 0)) |
10bc17b6 |
913 | # endif |
914 | # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_S_TSBI |
f7937171 |
915 | # define getgrgid(a) (getgrgid_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size) ? &PL_reentrant_buffer->_grent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrgid", a) : 0)) |
10bc17b6 |
916 | # endif |
917 | #endif /* HAS_GETGRGID_R */ |
918 | |
919 | #ifdef HAS_GETGRNAM_R |
920 | # undef getgrnam |
921 | # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR |
f7937171 |
922 | # define getgrnam(a) (((errno = getgrnam_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size, &PL_reentrant_buffer->_grent_ptr))) == 0 ? PL_reentrant_buffer->_grent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrnam", a) : 0)) |
10bc17b6 |
923 | # endif |
924 | # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR |
f7937171 |
925 | # define getgrnam(a) (((errno = getgrnam_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size, &PL_reentrant_buffer->_grent_ptr))) == 0 ? PL_reentrant_buffer->_grent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrnam", a) : 0)) |
10bc17b6 |
926 | # endif |
927 | # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_S_CBI |
f7937171 |
928 | # define getgrnam(a) (getgrnam_r(a, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size) ? PL_reentrant_buffer->_grent_buffer : (errno == ERANGE ? Perl_reentrant_retry("getgrnam", a) : 0)) |
10bc17b6 |
929 | # endif |
930 | # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBI |
f7937171 |
931 | # define getgrnam(a) (((errno = getgrnam_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size))) == 0 ? &PL_reentrant_buffer->_grent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrnam", a) : 0)) |
10bc17b6 |
932 | # endif |
933 | # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_S_CSBI |
f7937171 |
934 | # define getgrnam(a) (getgrnam_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size) ? &PL_reentrant_buffer->_grent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrnam", a) : 0)) |
10bc17b6 |
935 | # endif |
936 | #endif /* HAS_GETGRNAM_R */ |
937 | |
938 | #ifdef HAS_GETHOSTBYADDR_R |
939 | # undef gethostbyaddr |
940 | # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISBWRE |
f7937171 |
941 | # define gethostbyaddr(a, b, c) (((errno = gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_ptr, &PL_reentrant_buffer->_hostent_errno))) == 0 ? PL_reentrant_buffer->_hostent_ptr : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) |
10bc17b6 |
942 | # endif |
943 | # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBWIE |
f7937171 |
944 | # define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) |
10bc17b6 |
945 | # endif |
946 | # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBIE |
f7937171 |
947 | # define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) |
10bc17b6 |
948 | # endif |
949 | # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TWISBIE |
f7937171 |
950 | # define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) |
10bc17b6 |
951 | # endif |
952 | # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CIISBIE |
f7937171 |
953 | # define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) |
10bc17b6 |
954 | # endif |
955 | # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CSBIE |
f7937171 |
956 | # define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? 1 : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) |
10bc17b6 |
957 | # endif |
958 | # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TSBIE |
f7937171 |
959 | # define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? 1 : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) |
10bc17b6 |
960 | # endif |
961 | # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISD |
f7937171 |
962 | # define gethostbyaddr(a, b, c) (((errno = gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, &PL_reentrant_buffer->_hostent_data))) == 0 ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) |
10bc17b6 |
963 | # endif |
964 | # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CIISD |
f7937171 |
965 | # define gethostbyaddr(a, b, c) (((errno = gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, &PL_reentrant_buffer->_hostent_data))) == 0 ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) |
10bc17b6 |
966 | # endif |
967 | # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CII |
edd309b7 |
968 | # define gethostbyaddr(a, b, c) (((errno = gethostbyaddr_r(a, b, c))) == 0 ? 1 : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) |
10bc17b6 |
969 | # endif |
a845a0d4 |
970 | # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_TsISBWRE |
971 | # define gethostbyaddr(a, b, c) (((errno = gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_ptr, &PL_reentrant_buffer->_hostent_errno))) == 0 ? PL_reentrant_buffer->_hostent_ptr : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0)) |
972 | # endif |
10bc17b6 |
973 | #endif /* HAS_GETHOSTBYADDR_R */ |
974 | |
975 | #ifdef HAS_GETHOSTBYNAME_R |
976 | # undef gethostbyname |
977 | # if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE |
f7937171 |
978 | # define gethostbyname(a) (((errno = gethostbyname_r(a, &PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_ptr, &PL_reentrant_buffer->_hostent_errno))) == 0 ? PL_reentrant_buffer->_hostent_ptr : (errno == ERANGE ? Perl_reentrant_retry("gethostbyname", a) : 0)) |
10bc17b6 |
979 | # endif |
980 | # if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE |
f7937171 |
981 | # define gethostbyname(a) (gethostbyname_r(a, &PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyname", a) : 0)) |
10bc17b6 |
982 | # endif |
983 | # if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD |
f7937171 |
984 | # define gethostbyname(a) (((errno = gethostbyname_r(a, &PL_reentrant_buffer->_hostent_struct, &PL_reentrant_buffer->_hostent_data))) == 0 ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyname", a) : 0)) |
10bc17b6 |
985 | # endif |
986 | #endif /* HAS_GETHOSTBYNAME_R */ |
987 | |
988 | #ifdef HAS_GETHOSTENT_R |
989 | # undef gethostent |
990 | # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBWRE |
f7937171 |
991 | # define gethostent() (((errno = gethostent_r(&PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_ptr, &PL_reentrant_buffer->_hostent_errno))) == 0 ? PL_reentrant_buffer->_hostent_ptr : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0)) |
10bc17b6 |
992 | # endif |
993 | # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBIE |
f7937171 |
994 | # define gethostent() (((errno = gethostent_r(&PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno))) == 0 ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0)) |
10bc17b6 |
995 | # endif |
996 | # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBIE |
f7937171 |
997 | # define gethostent() (gethostent_r(&PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0)) |
10bc17b6 |
998 | # endif |
999 | # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBI |
f7937171 |
1000 | # define gethostent() (gethostent_r(&PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size) ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0)) |
10bc17b6 |
1001 | # endif |
1002 | # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBI |
f7937171 |
1003 | # define gethostent() (((errno = gethostent_r(&PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size))) == 0 ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0)) |
10bc17b6 |
1004 | # endif |
1005 | # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SD |
f7937171 |
1006 | # define gethostent() (((errno = gethostent_r(&PL_reentrant_buffer->_hostent_struct, &PL_reentrant_buffer->_hostent_data))) == 0 ? &PL_reentrant_buffer->_hostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0)) |
10bc17b6 |
1007 | # endif |
1008 | #endif /* HAS_GETHOSTENT_R */ |
1009 | |
1010 | #ifdef HAS_GETLOGIN_R |
1011 | # undef getlogin |
1012 | # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_I_BW |
edd309b7 |
1013 | # define getlogin() (((errno = getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size))) == 0 ? PL_reentrant_buffer->_getlogin_buffer : (errno == ERANGE ? Perl_reentrant_retry("getlogin") : 0)) |
10bc17b6 |
1014 | # endif |
1015 | # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_I_BI |
edd309b7 |
1016 | # define getlogin() (((errno = getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size))) == 0 ? PL_reentrant_buffer->_getlogin_buffer : (errno == ERANGE ? Perl_reentrant_retry("getlogin") : 0)) |
10bc17b6 |
1017 | # endif |
1018 | # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_B_BW |
1019 | # define getlogin() getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size) |
1020 | # endif |
1021 | # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_B_BI |
1022 | # define getlogin() getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size) |
1023 | # endif |
1024 | #endif /* HAS_GETLOGIN_R */ |
1025 | |
1026 | #ifdef HAS_GETNETBYADDR_R |
1027 | # undef getnetbyaddr |
1028 | # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE |
f7937171 |
1029 | # define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size, &PL_reentrant_buffer->_netent_ptr, &PL_reentrant_buffer->_netent_errno))) == 0 ? PL_reentrant_buffer->_netent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) |
10bc17b6 |
1030 | # endif |
1031 | # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_LISBI |
f7937171 |
1032 | # define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) |
10bc17b6 |
1033 | # endif |
1034 | # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_S_TISBI |
f7937171 |
1035 | # define getnetbyaddr(a, b) (getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size) ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) |
10bc17b6 |
1036 | # endif |
1037 | # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_S_LISBI |
f7937171 |
1038 | # define getnetbyaddr(a, b) (getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size) ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) |
10bc17b6 |
1039 | # endif |
1040 | # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_TISD |
f7937171 |
1041 | # define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, &PL_reentrant_buffer->_netent_data))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) |
10bc17b6 |
1042 | # endif |
1043 | # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_LISD |
f7937171 |
1044 | # define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, &PL_reentrant_buffer->_netent_data))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) |
10bc17b6 |
1045 | # endif |
1046 | # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_IISD |
f7937171 |
1047 | # define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, &PL_reentrant_buffer->_netent_data))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) |
10bc17b6 |
1048 | # endif |
a845a0d4 |
1049 | # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_uISBWRE |
1050 | # define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size, &PL_reentrant_buffer->_netent_ptr, &PL_reentrant_buffer->_netent_errno))) == 0 ? PL_reentrant_buffer->_netent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0)) |
1051 | # endif |
10bc17b6 |
1052 | #endif /* HAS_GETNETBYADDR_R */ |
1053 | |
1054 | #ifdef HAS_GETNETBYNAME_R |
1055 | # undef getnetbyname |
1056 | # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE |
f7937171 |
1057 | # define getnetbyname(a) (((errno = getnetbyname_r(a, &PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size, &PL_reentrant_buffer->_netent_ptr, &PL_reentrant_buffer->_netent_errno))) == 0 ? PL_reentrant_buffer->_netent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getnetbyname", a) : 0)) |
10bc17b6 |
1058 | # endif |
1059 | # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBI |
f7937171 |
1060 | # define getnetbyname(a) (((errno = getnetbyname_r(a, &PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyname", a) : 0)) |
10bc17b6 |
1061 | # endif |
1062 | # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI |
f7937171 |
1063 | # define getnetbyname(a) (getnetbyname_r(a, &PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size) ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyname", a) : 0)) |
10bc17b6 |
1064 | # endif |
1065 | # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD |
f7937171 |
1066 | # define getnetbyname(a) (((errno = getnetbyname_r(a, &PL_reentrant_buffer->_netent_struct, &PL_reentrant_buffer->_netent_data))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyname", a) : 0)) |
10bc17b6 |
1067 | # endif |
1068 | #endif /* HAS_GETNETBYNAME_R */ |
1069 | |
1070 | #ifdef HAS_GETNETENT_R |
1071 | # undef getnetent |
1072 | # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBWRE |
f7937171 |
1073 | # define getnetent() (((errno = getnetent_r(&PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size, &PL_reentrant_buffer->_netent_ptr, &PL_reentrant_buffer->_netent_errno))) == 0 ? PL_reentrant_buffer->_netent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0)) |
10bc17b6 |
1074 | # endif |
1075 | # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBIE |
f7937171 |
1076 | # define getnetent() (((errno = getnetent_r(&PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size, &PL_reentrant_buffer->_netent_errno))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0)) |
10bc17b6 |
1077 | # endif |
1078 | # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBIE |
f7937171 |
1079 | # define getnetent() (getnetent_r(&PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size, &PL_reentrant_buffer->_netent_errno) ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0)) |
10bc17b6 |
1080 | # endif |
1081 | # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBI |
f7937171 |
1082 | # define getnetent() (getnetent_r(&PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size) ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0)) |
10bc17b6 |
1083 | # endif |
1084 | # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBI |
f7937171 |
1085 | # define getnetent() (((errno = getnetent_r(&PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0)) |
10bc17b6 |
1086 | # endif |
1087 | # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SD |
f7937171 |
1088 | # define getnetent() (((errno = getnetent_r(&PL_reentrant_buffer->_netent_struct, &PL_reentrant_buffer->_netent_data))) == 0 ? &PL_reentrant_buffer->_netent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0)) |
10bc17b6 |
1089 | # endif |
1090 | #endif /* HAS_GETNETENT_R */ |
1091 | |
1092 | #ifdef HAS_GETPROTOBYNAME_R |
1093 | # undef getprotobyname |
1094 | # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR |
f7937171 |
1095 | # define getprotobyname(a) (((errno = getprotobyname_r(a, &PL_reentrant_buffer->_protoent_struct, PL_reentrant_buffer->_protoent_buffer, PL_reentrant_buffer->_protoent_size, &PL_reentrant_buffer->_protoent_ptr))) == 0 ? PL_reentrant_buffer->_protoent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getprotobyname", a) : 0)) |
10bc17b6 |
1096 | # endif |
1097 | # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI |
f7937171 |
1098 | # define getprotobyname(a) (getprotobyname_r(a, &PL_reentrant_buffer->_protoent_struct, PL_reentrant_buffer->_protoent_buffer, PL_reentrant_buffer->_protoent_size) ? &PL_reentrant_buffer->_protoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotobyname", a) : 0)) |
10bc17b6 |
1099 | # endif |
1100 | # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD |
f7937171 |
1101 | # define getprotobyname(a) (((errno = getprotobyname_r(a, &PL_reentrant_buffer->_protoent_struct, &PL_reentrant_buffer->_protoent_data))) == 0 ? &PL_reentrant_buffer->_protoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotobyname", a) : 0)) |
10bc17b6 |
1102 | # endif |
1103 | #endif /* HAS_GETPROTOBYNAME_R */ |
1104 | |
1105 | #ifdef HAS_GETPROTOBYNUMBER_R |
1106 | # undef getprotobynumber |
1107 | # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR |
f7937171 |
1108 | # define getprotobynumber(a) (((errno = getprotobynumber_r(a, &PL_reentrant_buffer->_protoent_struct, PL_reentrant_buffer->_protoent_buffer, PL_reentrant_buffer->_protoent_size, &PL_reentrant_buffer->_protoent_ptr))) == 0 ? PL_reentrant_buffer->_protoent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getprotobynumber", a) : 0)) |
10bc17b6 |
1109 | # endif |
1110 | # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_S_ISBI |
f7937171 |
1111 | # define getprotobynumber(a) (getprotobynumber_r(a, &PL_reentrant_buffer->_protoent_struct, PL_reentrant_buffer->_protoent_buffer, PL_reentrant_buffer->_protoent_size) ? &PL_reentrant_buffer->_protoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotobynumber", a) : 0)) |
10bc17b6 |
1112 | # endif |
1113 | # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISD |
f7937171 |
1114 | # define getprotobynumber(a) (((errno = getprotobynumber_r(a, &PL_reentrant_buffer->_protoent_struct, &PL_reentrant_buffer->_protoent_data))) == 0 ? &PL_reentrant_buffer->_protoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotobynumber", a) : 0)) |
10bc17b6 |
1115 | # endif |
1116 | #endif /* HAS_GETPROTOBYNUMBER_R */ |
1117 | |
1118 | #ifdef HAS_GETPROTOENT_R |
1119 | # undef getprotoent |
1120 | # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBWR |
f7937171 |
1121 | # define getprotoent() (((errno = getprotoent_r(&PL_reentrant_buffer->_protoent_struct, PL_reentrant_buffer->_protoent_buffer, PL_reentrant_buffer->_protoent_size, &PL_reentrant_buffer->_protoent_ptr))) == 0 ? PL_reentrant_buffer->_protoent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getprotoent") : 0)) |
10bc17b6 |
1122 | # endif |
1123 | # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBI |
f7937171 |
1124 | # define getprotoent() (((errno = getprotoent_r(&PL_reentrant_buffer->_protoent_struct, PL_reentrant_buffer->_protoent_buffer, PL_reentrant_buffer->_protoent_size))) == 0 ? &PL_reentrant_buffer->_protoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotoent") : 0)) |
10bc17b6 |
1125 | # endif |
1126 | # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_S_SBI |
f7937171 |
1127 | # define getprotoent() (getprotoent_r(&PL_reentrant_buffer->_protoent_struct, PL_reentrant_buffer->_protoent_buffer, PL_reentrant_buffer->_protoent_size) ? &PL_reentrant_buffer->_protoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotoent") : 0)) |
10bc17b6 |
1128 | # endif |
1129 | # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SD |
f7937171 |
1130 | # define getprotoent() (((errno = getprotoent_r(&PL_reentrant_buffer->_protoent_struct, &PL_reentrant_buffer->_protoent_data))) == 0 ? &PL_reentrant_buffer->_protoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotoent") : 0)) |
10bc17b6 |
1131 | # endif |
1132 | #endif /* HAS_GETPROTOENT_R */ |
1133 | |
1134 | #ifdef HAS_GETPWENT_R |
1135 | # undef getpwent |
1136 | # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBWR |
f7937171 |
1137 | # define getpwent() (((errno = getpwent_r(&PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size, &PL_reentrant_buffer->_pwent_ptr))) == 0 ? PL_reentrant_buffer->_pwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0)) |
10bc17b6 |
1138 | # endif |
1139 | # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIR |
f7937171 |
1140 | # define getpwent() (((errno = getpwent_r(&PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size, &PL_reentrant_buffer->_pwent_ptr))) == 0 ? PL_reentrant_buffer->_pwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0)) |
10bc17b6 |
1141 | # endif |
1142 | # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_S_SBW |
f7937171 |
1143 | # define getpwent() (getpwent_r(&PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size) ? &PL_reentrant_buffer->_pwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0)) |
10bc17b6 |
1144 | # endif |
1145 | # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_S_SBI |
f7937171 |
1146 | # define getpwent() (getpwent_r(&PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size) ? &PL_reentrant_buffer->_pwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0)) |
10bc17b6 |
1147 | # endif |
1148 | # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBI |
f7937171 |
1149 | # define getpwent() (((errno = getpwent_r(&PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size))) == 0 ? &PL_reentrant_buffer->_pwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0)) |
10bc17b6 |
1150 | # endif |
1151 | # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIH |
f7937171 |
1152 | # define getpwent() (((errno = getpwent_r(&PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size, &PL_reentrant_buffer->_pwent_fptr))) == 0 ? &PL_reentrant_buffer->_pwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0)) |
10bc17b6 |
1153 | # endif |
1154 | #endif /* HAS_GETPWENT_R */ |
1155 | |
1156 | #ifdef HAS_GETPWNAM_R |
1157 | # undef getpwnam |
1158 | # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR |
f7937171 |
1159 | # define getpwnam(a) (((errno = getpwnam_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size, &PL_reentrant_buffer->_pwent_ptr))) == 0 ? PL_reentrant_buffer->_pwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwnam", a) : 0)) |
10bc17b6 |
1160 | # endif |
1161 | # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR |
f7937171 |
1162 | # define getpwnam(a) (((errno = getpwnam_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size, &PL_reentrant_buffer->_pwent_ptr))) == 0 ? PL_reentrant_buffer->_pwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwnam", a) : 0)) |
10bc17b6 |
1163 | # endif |
1164 | # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_S_CSBI |
f7937171 |
1165 | # define getpwnam(a) (getpwnam_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size) ? &PL_reentrant_buffer->_pwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwnam", a) : 0)) |
10bc17b6 |
1166 | # endif |
1167 | # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBI |
f7937171 |
1168 | # define getpwnam(a) (((errno = getpwnam_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size))) == 0 ? &PL_reentrant_buffer->_pwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwnam", a) : 0)) |
10bc17b6 |
1169 | # endif |
1170 | #endif /* HAS_GETPWNAM_R */ |
1171 | |
1172 | #ifdef HAS_GETPWUID_R |
1173 | # undef getpwuid |
1174 | # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBWR |
f7937171 |
1175 | # define getpwuid(a) (((errno = getpwuid_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size, &PL_reentrant_buffer->_pwent_ptr))) == 0 ? PL_reentrant_buffer->_pwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwuid", a) : 0)) |
10bc17b6 |
1176 | # endif |
1177 | # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBIR |
f7937171 |
1178 | # define getpwuid(a) (((errno = getpwuid_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size, &PL_reentrant_buffer->_pwent_ptr))) == 0 ? PL_reentrant_buffer->_pwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwuid", a) : 0)) |
10bc17b6 |
1179 | # endif |
1180 | # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBI |
f7937171 |
1181 | # define getpwuid(a) (((errno = getpwuid_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size))) == 0 ? &PL_reentrant_buffer->_pwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwuid", a) : 0)) |
10bc17b6 |
1182 | # endif |
1183 | # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_S_TSBI |
f7937171 |
1184 | # define getpwuid(a) (getpwuid_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size) ? &PL_reentrant_buffer->_pwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwuid", a) : 0)) |
10bc17b6 |
1185 | # endif |
1186 | #endif /* HAS_GETPWUID_R */ |
1187 | |
1188 | #ifdef HAS_GETSERVBYNAME_R |
1189 | # undef getservbyname |
1190 | # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR |
f7937171 |
1191 | # define getservbyname(a, b) (((errno = getservbyname_r(a, b, &PL_reentrant_buffer->_servent_struct, PL_reentrant_buffer->_servent_buffer, PL_reentrant_buffer->_servent_size, &PL_reentrant_buffer->_servent_ptr))) == 0 ? PL_reentrant_buffer->_servent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getservbyname", a, b) : 0)) |
10bc17b6 |
1192 | # endif |
1193 | # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_S_CCSBI |
f7937171 |
1194 | # define getservbyname(a, b) (getservbyname_r(a, b, &PL_reentrant_buffer->_servent_struct, PL_reentrant_buffer->_servent_buffer, PL_reentrant_buffer->_servent_size) ? &PL_reentrant_buffer->_servent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservbyname", a, b) : 0)) |
10bc17b6 |
1195 | # endif |
1196 | # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD |
f7937171 |
1197 | # define getservbyname(a, b) (((errno = getservbyname_r(a, b, &PL_reentrant_buffer->_servent_struct, &PL_reentrant_buffer->_servent_data))) == 0 ? &PL_reentrant_buffer->_servent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservbyname", a, b) : 0)) |
10bc17b6 |
1198 | # endif |
1199 | #endif /* HAS_GETSERVBYNAME_R */ |
1200 | |
1201 | #ifdef HAS_GETSERVBYPORT_R |
1202 | # undef getservbyport |
1203 | # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR |
f7937171 |
1204 | # define getservbyport(a, b) (((errno = getservbyport_r(a, b, &PL_reentrant_buffer->_servent_struct, PL_reentrant_buffer->_servent_buffer, PL_reentrant_buffer->_servent_size, &PL_reentrant_buffer->_servent_ptr))) == 0 ? PL_reentrant_buffer->_servent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getservbyport", a, b) : 0)) |
10bc17b6 |
1205 | # endif |
1206 | # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_S_ICSBI |
f7937171 |
1207 | # define getservbyport(a, b) (getservbyport_r(a, b, &PL_reentrant_buffer->_servent_struct, PL_reentrant_buffer->_servent_buffer, PL_reentrant_buffer->_servent_size) ? &PL_reentrant_buffer->_servent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservbyport", a, b) : 0)) |
10bc17b6 |
1208 | # endif |
1209 | # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSD |
f7937171 |
1210 | # define getservbyport(a, b) (((errno = getservbyport_r(a, b, &PL_reentrant_buffer->_servent_struct, &PL_reentrant_buffer->_servent_data))) == 0 ? &PL_reentrant_buffer->_servent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservbyport", a, b) : 0)) |
10bc17b6 |
1211 | # endif |
1212 | #endif /* HAS_GETSERVBYPORT_R */ |
1213 | |
1214 | #ifdef HAS_GETSERVENT_R |
1215 | # undef getservent |
1216 | # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBWR |
f7937171 |
1217 | # define getservent() (((errno = getservent_r(&PL_reentrant_buffer->_servent_struct, PL_reentrant_buffer->_servent_buffer, PL_reentrant_buffer->_servent_size, &PL_reentrant_buffer->_servent_ptr))) == 0 ? PL_reentrant_buffer->_servent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getservent") : 0)) |
10bc17b6 |
1218 | # endif |
1219 | # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBI |
f7937171 |
1220 | # define getservent() (((errno = getservent_r(&PL_reentrant_buffer->_servent_struct, PL_reentrant_buffer->_servent_buffer, PL_reentrant_buffer->_servent_size))) == 0 ? &PL_reentrant_buffer->_servent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservent") : 0)) |
10bc17b6 |
1221 | # endif |
1222 | # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_S_SBI |
f7937171 |
1223 | # define getservent() (getservent_r(&PL_reentrant_buffer->_servent_struct, PL_reentrant_buffer->_servent_buffer, PL_reentrant_buffer->_servent_size) ? &PL_reentrant_buffer->_servent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservent") : 0)) |
10bc17b6 |
1224 | # endif |
1225 | # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SD |
f7937171 |
1226 | # define getservent() (((errno = getservent_r(&PL_reentrant_buffer->_servent_struct, &PL_reentrant_buffer->_servent_data))) == 0 ? &PL_reentrant_buffer->_servent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservent") : 0)) |
10bc17b6 |
1227 | # endif |
1228 | #endif /* HAS_GETSERVENT_R */ |
1229 | |
1230 | #ifdef HAS_GETSPNAM_R |
1231 | # undef getspnam |
1232 | # if !defined(getspnam) && GETSPNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR |
f7937171 |
1233 | # define getspnam(a) (((errno = getspnam_r(a, &PL_reentrant_buffer->_spent_struct, PL_reentrant_buffer->_spent_buffer, PL_reentrant_buffer->_spent_size, &PL_reentrant_buffer->_spent_ptr))) == 0 ? PL_reentrant_buffer->_spent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getspnam", a) : 0)) |
10bc17b6 |
1234 | # endif |
1235 | # if !defined(getspnam) && GETSPNAM_R_PROTO == REENTRANT_PROTO_S_CSBI |
f7937171 |
1236 | # define getspnam(a) (getspnam_r(a, &PL_reentrant_buffer->_spent_struct, PL_reentrant_buffer->_spent_buffer, PL_reentrant_buffer->_spent_size) ? &PL_reentrant_buffer->_spent_struct : (errno == ERANGE ? Perl_reentrant_retry("getspnam", a) : 0)) |
10bc17b6 |
1237 | # endif |
1238 | #endif /* HAS_GETSPNAM_R */ |
1239 | |
1240 | #ifdef HAS_GMTIME_R |
1241 | # undef gmtime |
1242 | # if !defined(gmtime) && GMTIME_R_PROTO == REENTRANT_PROTO_S_TS |
1243 | # define gmtime(a) (gmtime_r(a, &PL_reentrant_buffer->_gmtime_struct) ? &PL_reentrant_buffer->_gmtime_struct : 0) |
1244 | # endif |
1245 | # if !defined(gmtime) && GMTIME_R_PROTO == REENTRANT_PROTO_I_TS |
1246 | # define gmtime(a) (((errno = gmtime_r(a, &PL_reentrant_buffer->_gmtime_struct))) == 0 ? &PL_reentrant_buffer->_gmtime_struct : 0) |
1247 | # endif |
1248 | #endif /* HAS_GMTIME_R */ |
1249 | |
1250 | #ifdef HAS_LOCALTIME_R |
1251 | # undef localtime |
1252 | # if !defined(localtime) && LOCALTIME_R_PROTO == REENTRANT_PROTO_S_TS |
1253 | # define localtime(a) (localtime_r(a, &PL_reentrant_buffer->_localtime_struct) ? &PL_reentrant_buffer->_localtime_struct : 0) |
1254 | # endif |
1255 | # if !defined(localtime) && LOCALTIME_R_PROTO == REENTRANT_PROTO_I_TS |
1256 | # define localtime(a) (((errno = localtime_r(a, &PL_reentrant_buffer->_localtime_struct))) == 0 ? &PL_reentrant_buffer->_localtime_struct : 0) |
1257 | # endif |
1258 | #endif /* HAS_LOCALTIME_R */ |
1259 | |
1260 | #ifdef HAS_RANDOM_R |
1261 | # undef random |
a845a0d4 |
1262 | # if !defined(random) && RANDOM_R_PROTO == REENTRANT_PROTO_I_iS |
1263 | # define random() (random_r(&PL_reentrant_buffer->_random_retval, &PL_reentrant_buffer->_random_struct) == 0 ? PL_reentrant_buffer->_random_retval : 0) |
1264 | # endif |
1265 | # if !defined(random) && RANDOM_R_PROTO == REENTRANT_PROTO_I_lS |
1266 | # define random() (random_r(&PL_reentrant_buffer->_random_retval, &PL_reentrant_buffer->_random_struct) == 0 ? PL_reentrant_buffer->_random_retval : 0) |
1267 | # endif |
1268 | # if !defined(random) && RANDOM_R_PROTO == REENTRANT_PROTO_I_St |
1269 | # define random() (random_r(&PL_reentrant_buffer->_random_struct, &PL_reentrant_buffer->_random_retval) == 0 ? PL_reentrant_buffer->_random_retval : 0) |
10bc17b6 |
1270 | # endif |
1271 | #endif /* HAS_RANDOM_R */ |
1272 | |
1273 | #ifdef HAS_READDIR_R |
1274 | # undef readdir |
1275 | # if !defined(readdir) && READDIR_R_PROTO == REENTRANT_PROTO_I_TSR |
1276 | # define readdir(a) (((errno = readdir_r(a, PL_reentrant_buffer->_readdir_struct, &PL_reentrant_buffer->_readdir_ptr))) == 0 ? PL_reentrant_buffer->_readdir_ptr : 0) |
1277 | # endif |
1278 | # if !defined(readdir) && READDIR_R_PROTO == REENTRANT_PROTO_I_TS |
1279 | # define readdir(a) (((errno = readdir_r(a, PL_reentrant_buffer->_readdir_struct))) == 0 ? PL_reentrant_buffer->_readdir_struct : 0) |
1280 | # endif |
1281 | #endif /* HAS_READDIR_R */ |
1282 | |
1283 | #ifdef HAS_READDIR64_R |
1284 | # undef readdir64 |
1285 | # if !defined(readdir64) && READDIR64_R_PROTO == REENTRANT_PROTO_I_TSR |
1286 | # define readdir64(a) (((errno = readdir64_r(a, PL_reentrant_buffer->_readdir64_struct, &PL_reentrant_buffer->_readdir64_ptr))) == 0 ? PL_reentrant_buffer->_readdir64_ptr : 0) |
1287 | # endif |
1288 | # if !defined(readdir64) && READDIR64_R_PROTO == REENTRANT_PROTO_I_TS |
1289 | # define readdir64(a) (((errno = readdir64_r(a, PL_reentrant_buffer->_readdir64_struct))) == 0 ? PL_reentrant_buffer->_readdir64_struct : 0) |
1290 | # endif |
1291 | #endif /* HAS_READDIR64_R */ |
1292 | |
1293 | #ifdef HAS_SETGRENT_R |
1294 | # undef setgrent |
1295 | # if !defined(setgrent) && SETGRENT_R_PROTO == REENTRANT_PROTO_I_H |
f7937171 |
1296 | # define setgrent() (((errno = setgrent_r(&PL_reentrant_buffer->_grent_fptr))) == 0 ? 1 : 0) |
10bc17b6 |
1297 | # endif |
1298 | # if !defined(setgrent) && SETGRENT_R_PROTO == REENTRANT_PROTO_V_H |
f7937171 |
1299 | # define setgrent() setgrent_r(&PL_reentrant_buffer->_grent_fptr) |
10bc17b6 |
1300 | # endif |
1301 | #endif /* HAS_SETGRENT_R */ |
1302 | |
1303 | #ifdef HAS_SETHOSTENT_R |
1304 | # undef sethostent |
1305 | # if !defined(sethostent) && SETHOSTENT_R_PROTO == REENTRANT_PROTO_I_ID |
f7937171 |
1306 | # define sethostent(a) (((errno = sethostent_r(a, &PL_reentrant_buffer->_hostent_data))) == 0 ? 1 : 0) |
10bc17b6 |
1307 | # endif |
1308 | # if !defined(sethostent) && SETHOSTENT_R_PROTO == REENTRANT_PROTO_V_ID |
f7937171 |
1309 | # define sethostent(a) sethostent_r(a, &PL_reentrant_buffer->_hostent_data) |
10bc17b6 |
1310 | # endif |
1311 | #endif /* HAS_SETHOSTENT_R */ |
1312 | |
1313 | #ifdef HAS_SETLOCALE_R |
1314 | # undef setlocale |
1315 | # if !defined(setlocale) && SETLOCALE_R_PROTO == REENTRANT_PROTO_I_ICBI |
1316 | # define setlocale(a, b) (((errno = setlocale_r(a, b, PL_reentrant_buffer->_setlocale_buffer, PL_reentrant_buffer->_setlocale_size))) == 0 ? PL_reentrant_buffer->_setlocale_buffer : 0) |
1317 | # endif |
1318 | #endif /* HAS_SETLOCALE_R */ |
1319 | |
1320 | #ifdef HAS_SETNETENT_R |
1321 | # undef setnetent |
1322 | # if !defined(setnetent) && SETNETENT_R_PROTO == REENTRANT_PROTO_I_ID |
f7937171 |
1323 | # define setnetent(a) (((errno = setnetent_r(a, &PL_reentrant_buffer->_netent_data))) == 0 ? 1 : 0) |
10bc17b6 |
1324 | # endif |
1325 | # if !defined(setnetent) && SETNETENT_R_PROTO == REENTRANT_PROTO_V_ID |
f7937171 |
1326 | # define setnetent(a) setnetent_r(a, &PL_reentrant_buffer->_netent_data) |
10bc17b6 |
1327 | # endif |
1328 | #endif /* HAS_SETNETENT_R */ |
1329 | |
1330 | #ifdef HAS_SETPROTOENT_R |
1331 | # undef setprotoent |
1332 | # if !defined(setprotoent) && SETPROTOENT_R_PROTO == REENTRANT_PROTO_I_ID |
f7937171 |
1333 | # define setprotoent(a) (((errno = setprotoent_r(a, &PL_reentrant_buffer->_protoent_data))) == 0 ? 1 : 0) |
10bc17b6 |
1334 | # endif |
1335 | # if !defined(setprotoent) && SETPROTOENT_R_PROTO == REENTRANT_PROTO_V_ID |
f7937171 |
1336 | # define setprotoent(a) setprotoent_r(a, &PL_reentrant_buffer->_protoent_data) |
10bc17b6 |
1337 | # endif |
1338 | #endif /* HAS_SETPROTOENT_R */ |
1339 | |
1340 | #ifdef HAS_SETPWENT_R |
1341 | # undef setpwent |
1342 | # if !defined(setpwent) && SETPWENT_R_PROTO == REENTRANT_PROTO_I_H |
f7937171 |
1343 | # define setpwent() (((errno = setpwent_r(&PL_reentrant_buffer->_pwent_fptr))) == 0 ? 1 : 0) |
10bc17b6 |
1344 | # endif |
1345 | # if !defined(setpwent) && SETPWENT_R_PROTO == REENTRANT_PROTO_V_H |
f7937171 |
1346 | # define setpwent() setpwent_r(&PL_reentrant_buffer->_pwent_fptr) |
10bc17b6 |
1347 | # endif |
1348 | #endif /* HAS_SETPWENT_R */ |
1349 | |
1350 | #ifdef HAS_SETSERVENT_R |
1351 | # undef setservent |
1352 | # if !defined(setservent) && SETSERVENT_R_PROTO == REENTRANT_PROTO_I_ID |
f7937171 |
1353 | # define setservent(a) (((errno = setservent_r(a, &PL_reentrant_buffer->_servent_data))) == 0 ? 1 : 0) |
10bc17b6 |
1354 | # endif |
1355 | # if !defined(setservent) && SETSERVENT_R_PROTO == REENTRANT_PROTO_V_ID |
f7937171 |
1356 | # define setservent(a) setservent_r(a, &PL_reentrant_buffer->_servent_data) |
10bc17b6 |
1357 | # endif |
1358 | #endif /* HAS_SETSERVENT_R */ |
1359 | |
1360 | #ifdef HAS_SRAND48_R |
1361 | # undef srand48 |
1362 | # if !defined(srand48) && SRAND48_R_PROTO == REENTRANT_PROTO_I_LS |
1363 | # define srand48(a) (((errno = srand48_r(a, &PL_reentrant_buffer->_drand48_struct))) == 0 ? &PL_reentrant_buffer->_drand48_struct : 0) |
1364 | # endif |
1365 | #endif /* HAS_SRAND48_R */ |
1366 | |
1367 | #ifdef HAS_SRANDOM_R |
1368 | # undef srandom |
1369 | # if !defined(srandom) && SRANDOM_R_PROTO == REENTRANT_PROTO_I_TS |
1370 | # define srandom(a) (((errno = srandom_r(a, &PL_reentrant_buffer->_srandom_struct))) == 0 ? &PL_reentrant_buffer->_srandom_struct : 0) |
1371 | # endif |
1372 | #endif /* HAS_SRANDOM_R */ |
1373 | |
1374 | #ifdef HAS_STRERROR_R |
1375 | # undef strerror |
1376 | # if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_I_IBW |
1377 | # define strerror(a) (((errno = strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size))) == 0 ? PL_reentrant_buffer->_strerror_buffer : 0) |
1378 | # endif |
1379 | # if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_I_IBI |
1380 | # define strerror(a) (((errno = strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size))) == 0 ? PL_reentrant_buffer->_strerror_buffer : 0) |
1381 | # endif |
1382 | # if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_B_IBW |
1383 | # define strerror(a) strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size) |
1384 | # endif |
1385 | #endif /* HAS_STRERROR_R */ |
1386 | |
1387 | #ifdef HAS_TMPNAM_R |
1388 | # undef tmpnam |
1389 | # if !defined(tmpnam) && TMPNAM_R_PROTO == REENTRANT_PROTO_B_B |
1390 | # define tmpnam(a) tmpnam_r(a) |
1391 | # endif |
1392 | #endif /* HAS_TMPNAM_R */ |
1393 | |
1394 | #ifdef HAS_TTYNAME_R |
1395 | # undef ttyname |
1396 | # if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_I_IBW |
1397 | # define ttyname(a) (((errno = ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size))) == 0 ? PL_reentrant_buffer->_ttyname_buffer : 0) |
1398 | # endif |
1399 | # if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_I_IBI |
1400 | # define ttyname(a) (((errno = ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size))) == 0 ? PL_reentrant_buffer->_ttyname_buffer : 0) |
1401 | # endif |
1402 | # if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_B_IBI |
1403 | # define ttyname(a) ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size) |
1404 | # endif |
1405 | #endif /* HAS_TTYNAME_R */ |
1406 | |
1407 | |
1408 | #endif /* USE_REENTRANT_API */ |
1409 | |
1410 | #endif |
1411 | |