1 /* -*- buffer-read-only: t -*-
5 * Copyright (C) 2002, 2003, 2005, 2006, 2007 by Larry Wall and others
7 * You may distribute under the terms of either the GNU General Public
8 * License or the Artistic License, as specified in the README file.
10 * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
11 * This file is built by reentr.pl from data in reentr.pl.
17 /* If compiling for a threaded perl, we will macro-wrap the system/library
18 * interfaces (e.g. getpwent()) which have threaded versions
19 * (e.g. getpwent_r()), which will handle things correctly for
20 * the Perl interpreter, but otherwise (for XS) the wrapping does
21 * not take place. See L<perlxs/Thread-aware system interfaces>.
24 #ifndef PERL_REENTR_API
25 # if defined(PERL_CORE) || defined(PERL_EXT)
26 # define PERL_REENTR_API 1
28 # define PERL_REENTR_API 0
32 #ifdef USE_REENTRANT_API
34 /* Deprecations: some platforms have the said reentrant interfaces
35 * but they are declared obsolete and are not to be used. Often this
36 * means that the platform has threadsafed the interfaces (hopefully).
37 * All this is OS version dependent, so we are of course fooling ourselves.
38 * If you know of more deprecations on some platforms, please add your own
39 * (by editing reentr.pl, mind!) */
44 # undef HAS_ENDGRENT_R
45 # undef HAS_ENDPWENT_R
46 # undef HAS_GETGRENT_R
47 # undef HAS_GETPWENT_R
48 # undef HAS_SETLOCALE_R
50 # undef HAS_STRERROR_R
51 # define NETDB_R_OBSOLETE
54 #if defined(__osf__) && defined(__alpha) /* Tru64 aka Digital UNIX */
56 # undef HAS_STRERROR_R
57 # define NETDB_R_OBSOLETE
61 * As of OpenBSD 3.7, reentrant functions are now working, they just are
62 * incompatible with everyone else. To make OpenBSD happy, we have to
63 * memzero out certain structures before calling the functions.
65 #if defined(__OpenBSD__)
66 # define REENTR_MEMZERO(a,b) memzero(a,b)
68 # define REENTR_MEMZERO(a,b) 0
71 #ifdef NETDB_R_OBSOLETE
72 # undef HAS_ENDHOSTENT_R
73 # undef HAS_ENDNETENT_R
74 # undef HAS_ENDPROTOENT_R
75 # undef HAS_ENDSERVENT_R
76 # undef HAS_GETHOSTBYADDR_R
77 # undef HAS_GETHOSTBYNAME_R
78 # undef HAS_GETHOSTENT_R
79 # undef HAS_GETNETBYADDR_R
80 # undef HAS_GETNETBYNAME_R
81 # undef HAS_GETNETENT_R
82 # undef HAS_GETPROTOBYNAME_R
83 # undef HAS_GETPROTOBYNUMBER_R
84 # undef HAS_GETPROTOENT_R
85 # undef HAS_GETSERVBYNAME_R
86 # undef HAS_GETSERVBYPORT_R
87 # undef HAS_GETSERVENT_R
88 # undef HAS_SETHOSTENT_R
89 # undef HAS_SETNETENT_R
90 # undef HAS_SETPROTOENT_R
91 # undef HAS_SETSERVENT_R
104 # include <stdlib.h> /* drand48_data */
111 #ifdef HAS_GETSPNAM_R
117 #define REENTRANT_PROTO_B_B 1
118 #define REENTRANT_PROTO_B_BI 2
119 #define REENTRANT_PROTO_B_BW 3
120 #define REENTRANT_PROTO_B_CCD 4
121 #define REENTRANT_PROTO_B_CCS 5
122 #define REENTRANT_PROTO_B_IBI 6
123 #define REENTRANT_PROTO_B_IBW 7
124 #define REENTRANT_PROTO_B_SB 8
125 #define REENTRANT_PROTO_B_SBI 9
126 #define REENTRANT_PROTO_I_BI 10
127 #define REENTRANT_PROTO_I_BW 11
128 #define REENTRANT_PROTO_I_CCSBWR 12
129 #define REENTRANT_PROTO_I_CCSD 13
130 #define REENTRANT_PROTO_I_CII 14
131 #define REENTRANT_PROTO_I_CIISD 15
132 #define REENTRANT_PROTO_I_CSBI 16
133 #define REENTRANT_PROTO_I_CSBIR 17
134 #define REENTRANT_PROTO_I_CSBWR 18
135 #define REENTRANT_PROTO_I_CSBWRE 19
136 #define REENTRANT_PROTO_I_CSD 20
137 #define REENTRANT_PROTO_I_CWISBWRE 21
138 #define REENTRANT_PROTO_I_CWISD 22
139 #define REENTRANT_PROTO_I_D 23
140 #define REENTRANT_PROTO_I_H 24
141 #define REENTRANT_PROTO_I_IBI 25
142 #define REENTRANT_PROTO_I_IBW 26
143 #define REENTRANT_PROTO_I_ICBI 27
144 #define REENTRANT_PROTO_I_ICSBWR 28
145 #define REENTRANT_PROTO_I_ICSD 29
146 #define REENTRANT_PROTO_I_ID 30
147 #define REENTRANT_PROTO_I_IISD 31
148 #define REENTRANT_PROTO_I_ISBWR 32
149 #define REENTRANT_PROTO_I_ISD 33
150 #define REENTRANT_PROTO_I_LISBI 34
151 #define REENTRANT_PROTO_I_LISD 35
152 #define REENTRANT_PROTO_I_LS 36
153 #define REENTRANT_PROTO_I_SB 37
154 #define REENTRANT_PROTO_I_SBI 38
155 #define REENTRANT_PROTO_I_SBIE 39
156 #define REENTRANT_PROTO_I_SBIH 40
157 #define REENTRANT_PROTO_I_SBIR 41
158 #define REENTRANT_PROTO_I_SBWR 42
159 #define REENTRANT_PROTO_I_SBWRE 43
160 #define REENTRANT_PROTO_I_SD 44
161 #define REENTRANT_PROTO_I_ST 45
162 #define REENTRANT_PROTO_I_St 46
163 #define REENTRANT_PROTO_I_TISD 47
164 #define REENTRANT_PROTO_I_TS 48
165 #define REENTRANT_PROTO_I_TSBI 49
166 #define REENTRANT_PROTO_I_TSBIR 50
167 #define REENTRANT_PROTO_I_TSBWR 51
168 #define REENTRANT_PROTO_I_TSR 52
169 #define REENTRANT_PROTO_I_TsISBWRE 53
170 #define REENTRANT_PROTO_I_UISBWRE 54
171 #define REENTRANT_PROTO_I_iS 55
172 #define REENTRANT_PROTO_I_lS 56
173 #define REENTRANT_PROTO_I_uISBWRE 57
174 #define REENTRANT_PROTO_S_CBI 58
175 #define REENTRANT_PROTO_S_CCSBI 59
176 #define REENTRANT_PROTO_S_CIISBIE 60
177 #define REENTRANT_PROTO_S_CSBI 61
178 #define REENTRANT_PROTO_S_CSBIE 62
179 #define REENTRANT_PROTO_S_CWISBIE 63
180 #define REENTRANT_PROTO_S_CWISBWIE 64
181 #define REENTRANT_PROTO_S_ICSBI 65
182 #define REENTRANT_PROTO_S_ISBI 66
183 #define REENTRANT_PROTO_S_LISBI 67
184 #define REENTRANT_PROTO_S_SBI 68
185 #define REENTRANT_PROTO_S_SBIE 69
186 #define REENTRANT_PROTO_S_SBW 70
187 #define REENTRANT_PROTO_S_TISBI 71
188 #define REENTRANT_PROTO_S_TS 72
189 #define REENTRANT_PROTO_S_TSBI 73
190 #define REENTRANT_PROTO_S_TSBIE 74
191 #define REENTRANT_PROTO_S_TWISBIE 75
192 #define REENTRANT_PROTO_V_D 76
193 #define REENTRANT_PROTO_V_H 77
194 #define REENTRANT_PROTO_V_ID 78
196 /* Defines for indicating which special features are supported. */
198 /* The getgrent getgrgid getgrnam using buffer? */
200 #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)
201 # define GETGRENT_R_HAS_BUFFER
203 # undef GETGRENT_R_HAS_BUFFER
205 #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)
206 # define GETGRGID_R_HAS_BUFFER
208 # undef GETGRGID_R_HAS_BUFFER
210 #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)
211 # define GETGRNAM_R_HAS_BUFFER
213 # undef GETGRNAM_R_HAS_BUFFER
216 /* Any of the getgrent getgrgid getgrnam using buffer? */
218 #if (defined(GETGRENT_R_HAS_BUFFER) || defined(GETGRGID_R_HAS_BUFFER) || defined(GETGRNAM_R_HAS_BUFFER))
219 # define USE_GRENT_BUFFER
221 # undef USE_GRENT_BUFFER
224 /* The getgrent getgrgid getgrnam using ptr? */
226 #if defined(HAS_GETGRENT_R) && (GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIR)
227 # define GETGRENT_R_HAS_PTR
229 # undef GETGRENT_R_HAS_PTR
231 #if defined(HAS_GETGRGID_R) && (GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBWR || GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBIR)
232 # define GETGRGID_R_HAS_PTR
234 # undef GETGRGID_R_HAS_PTR
236 #if defined(HAS_GETGRNAM_R) && (GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR)
237 # define GETGRNAM_R_HAS_PTR
239 # undef GETGRNAM_R_HAS_PTR
242 /* Any of the getgrent getgrgid getgrnam using ptr? */
244 #if (defined(GETGRENT_R_HAS_PTR) || defined(GETGRGID_R_HAS_PTR) || defined(GETGRNAM_R_HAS_PTR))
245 # define USE_GRENT_PTR
247 # undef USE_GRENT_PTR
250 /* The getpwent getpwnam getpwuid using ptr? */
252 #if defined(HAS_GETPWENT_R) && (GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIR)
253 # define GETPWENT_R_HAS_PTR
255 # undef GETPWENT_R_HAS_PTR
257 #if defined(HAS_GETPWNAM_R) && (GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR)
258 # define GETPWNAM_R_HAS_PTR
260 # undef GETPWNAM_R_HAS_PTR
262 #if defined(HAS_GETPWUID_R) && (GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBWR || GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBIR)
263 # define GETPWUID_R_HAS_PTR
265 # undef GETPWUID_R_HAS_PTR
268 /* Any of the getpwent getpwnam getpwuid using ptr? */
270 #if (defined(GETPWENT_R_HAS_PTR) || defined(GETPWNAM_R_HAS_PTR) || defined(GETPWUID_R_HAS_PTR))
271 # define USE_PWENT_PTR
273 # undef USE_PWENT_PTR
276 /* The getspent getspnam using ptr? */
278 #if defined(HAS_GETSPNAM_R) && (GETSPNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR)
279 # define GETSPNAM_R_HAS_PTR
281 # undef GETSPNAM_R_HAS_PTR
284 /* Any of the getspent getspnam using ptr? */
286 #if (defined(GETSPENT_R_HAS_PTR) || defined(GETSPNAM_R_HAS_PTR))
287 # define USE_SPENT_PTR
289 # undef USE_SPENT_PTR
292 /* The getgrent getgrgid getgrnam setgrent endgrent using fptr? */
294 #if defined(HAS_GETGRENT_R) && (GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIH)
295 # define GETGRENT_R_HAS_FPTR
297 # undef GETGRENT_R_HAS_FPTR
299 #if defined(HAS_SETGRENT_R) && (SETGRENT_R_PROTO == REENTRANT_PROTO_I_H || SETGRENT_R_PROTO == REENTRANT_PROTO_V_H)
300 # define SETGRENT_R_HAS_FPTR
302 # undef SETGRENT_R_HAS_FPTR
304 #if defined(HAS_ENDGRENT_R) && (ENDGRENT_R_PROTO == REENTRANT_PROTO_I_H || ENDGRENT_R_PROTO == REENTRANT_PROTO_V_H)
305 # define ENDGRENT_R_HAS_FPTR
307 # undef ENDGRENT_R_HAS_FPTR
310 /* Any of the getgrent getgrgid getgrnam setgrent endgrent using fptr? */
312 #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))
313 # define USE_GRENT_FPTR
315 # undef USE_GRENT_FPTR
318 /* The getpwent getpwnam getpwuid setpwent endpwent using fptr? */
320 #if defined(HAS_GETPWENT_R) && (GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIH)
321 # define GETPWENT_R_HAS_FPTR
323 # undef GETPWENT_R_HAS_FPTR
325 #if defined(HAS_SETPWENT_R) && (SETPWENT_R_PROTO == REENTRANT_PROTO_I_H || SETPWENT_R_PROTO == REENTRANT_PROTO_V_H)
326 # define SETPWENT_R_HAS_FPTR
328 # undef SETPWENT_R_HAS_FPTR
330 #if defined(HAS_ENDPWENT_R) && (ENDPWENT_R_PROTO == REENTRANT_PROTO_I_H || ENDPWENT_R_PROTO == REENTRANT_PROTO_V_H)
331 # define ENDPWENT_R_HAS_FPTR
333 # undef ENDPWENT_R_HAS_FPTR
336 /* Any of the getpwent getpwnam getpwuid setpwent endpwent using fptr? */
338 #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))
339 # define USE_PWENT_FPTR
341 # undef USE_PWENT_FPTR
344 /* The getpwent getpwgid getpwnam using buffer? */
346 #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)
347 # define GETPWENT_R_HAS_BUFFER
349 # undef GETPWENT_R_HAS_BUFFER
351 #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)
352 # define GETPWNAM_R_HAS_BUFFER
354 # undef GETPWNAM_R_HAS_BUFFER
357 /* Any of the getpwent getpwgid getpwnam using buffer? */
359 #if (defined(GETPWENT_R_HAS_BUFFER) || defined(GETPWGID_R_HAS_BUFFER) || defined(GETPWNAM_R_HAS_BUFFER))
360 # define USE_PWENT_BUFFER
362 # undef USE_PWENT_BUFFER
365 /* The gethostent gethostbyaddr gethostbyname using ptr? */
367 #if defined(HAS_GETHOSTENT_R) && (GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBWRE)
368 # define GETHOSTENT_R_HAS_PTR
370 # undef GETHOSTENT_R_HAS_PTR
372 #if defined(HAS_GETHOSTBYADDR_R) && (GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISBWRE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_TsISBWRE)
373 # define GETHOSTBYADDR_R_HAS_PTR
375 # undef GETHOSTBYADDR_R_HAS_PTR
377 #if defined(HAS_GETHOSTBYNAME_R) && (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE)
378 # define GETHOSTBYNAME_R_HAS_PTR
380 # undef GETHOSTBYNAME_R_HAS_PTR
383 /* Any of the gethostent gethostbyaddr gethostbyname using ptr? */
385 #if (defined(GETHOSTENT_R_HAS_PTR) || defined(GETHOSTBYADDR_R_HAS_PTR) || defined(GETHOSTBYNAME_R_HAS_PTR))
386 # define USE_HOSTENT_PTR
388 # undef USE_HOSTENT_PTR
391 /* The getnetent getnetbyaddr getnetbyname using ptr? */
393 #if defined(HAS_GETNETENT_R) && (GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBWRE)
394 # define GETNETENT_R_HAS_PTR
396 # undef GETNETENT_R_HAS_PTR
398 #if defined(HAS_GETNETBYADDR_R) && (GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE || GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_uISBWRE)
399 # define GETNETBYADDR_R_HAS_PTR
401 # undef GETNETBYADDR_R_HAS_PTR
403 #if defined(HAS_GETNETBYNAME_R) && (GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE)
404 # define GETNETBYNAME_R_HAS_PTR
406 # undef GETNETBYNAME_R_HAS_PTR
409 /* Any of the getnetent getnetbyaddr getnetbyname using ptr? */
411 #if (defined(GETNETENT_R_HAS_PTR) || defined(GETNETBYADDR_R_HAS_PTR) || defined(GETNETBYNAME_R_HAS_PTR))
412 # define USE_NETENT_PTR
414 # undef USE_NETENT_PTR
417 /* The getprotoent getprotobyname getprotobynumber using ptr? */
419 #if defined(HAS_GETPROTOENT_R) && (GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBWR)
420 # define GETPROTOENT_R_HAS_PTR
422 # undef GETPROTOENT_R_HAS_PTR
424 #if defined(HAS_GETPROTOBYNAME_R) && (GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR)
425 # define GETPROTOBYNAME_R_HAS_PTR
427 # undef GETPROTOBYNAME_R_HAS_PTR
429 #if defined(HAS_GETPROTOBYNUMBER_R) && (GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR)
430 # define GETPROTOBYNUMBER_R_HAS_PTR
432 # undef GETPROTOBYNUMBER_R_HAS_PTR
435 /* Any of the getprotoent getprotobyname getprotobynumber using ptr? */
437 #if (defined(GETPROTOENT_R_HAS_PTR) || defined(GETPROTOBYNAME_R_HAS_PTR) || defined(GETPROTOBYNUMBER_R_HAS_PTR))
438 # define USE_PROTOENT_PTR
440 # undef USE_PROTOENT_PTR
443 /* The getservent getservbyname getservbyport using ptr? */
445 #if defined(HAS_GETSERVENT_R) && (GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBWR)
446 # define GETSERVENT_R_HAS_PTR
448 # undef GETSERVENT_R_HAS_PTR
450 #if defined(HAS_GETSERVBYNAME_R) && (GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR)
451 # define GETSERVBYNAME_R_HAS_PTR
453 # undef GETSERVBYNAME_R_HAS_PTR
455 #if defined(HAS_GETSERVBYPORT_R) && (GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR)
456 # define GETSERVBYPORT_R_HAS_PTR
458 # undef GETSERVBYPORT_R_HAS_PTR
461 /* Any of the getservent getservbyname getservbyport using ptr? */
463 #if (defined(GETSERVENT_R_HAS_PTR) || defined(GETSERVBYNAME_R_HAS_PTR) || defined(GETSERVBYPORT_R_HAS_PTR))
464 # define USE_SERVENT_PTR
466 # undef USE_SERVENT_PTR
469 /* The gethostent gethostbyaddr gethostbyname using buffer? */
471 #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)
472 # define GETHOSTENT_R_HAS_BUFFER
474 # undef GETHOSTENT_R_HAS_BUFFER
476 #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)
477 # define GETHOSTBYADDR_R_HAS_BUFFER
479 # undef GETHOSTBYADDR_R_HAS_BUFFER
481 #if defined(HAS_GETHOSTBYNAME_R) && (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE || GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE)
482 # define GETHOSTBYNAME_R_HAS_BUFFER
484 # undef GETHOSTBYNAME_R_HAS_BUFFER
487 /* Any of the gethostent gethostbyaddr gethostbyname using buffer? */
489 #if (defined(GETHOSTENT_R_HAS_BUFFER) || defined(GETHOSTBYADDR_R_HAS_BUFFER) || defined(GETHOSTBYNAME_R_HAS_BUFFER))
490 # define USE_HOSTENT_BUFFER
492 # undef USE_HOSTENT_BUFFER
495 /* The getnetent getnetbyaddr getnetbyname using buffer? */
497 #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)
498 # define GETNETENT_R_HAS_BUFFER
500 # undef GETNETENT_R_HAS_BUFFER
502 #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)
503 # define GETNETBYADDR_R_HAS_BUFFER
505 # undef GETNETBYADDR_R_HAS_BUFFER
507 #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)
508 # define GETNETBYNAME_R_HAS_BUFFER
510 # undef GETNETBYNAME_R_HAS_BUFFER
513 /* Any of the getnetent getnetbyaddr getnetbyname using buffer? */
515 #if (defined(GETNETENT_R_HAS_BUFFER) || defined(GETNETBYADDR_R_HAS_BUFFER) || defined(GETNETBYNAME_R_HAS_BUFFER))
516 # define USE_NETENT_BUFFER
518 # undef USE_NETENT_BUFFER
521 /* The getprotoent getprotobyname getprotobynumber using buffer? */
523 #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)
524 # define GETPROTOENT_R_HAS_BUFFER
526 # undef GETPROTOENT_R_HAS_BUFFER
528 #if defined(HAS_GETPROTOBYNAME_R) && (GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI)
529 # define GETPROTOBYNAME_R_HAS_BUFFER
531 # undef GETPROTOBYNAME_R_HAS_BUFFER
533 #if defined(HAS_GETPROTOBYNUMBER_R) && (GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR || GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_S_ISBI)
534 # define GETPROTOBYNUMBER_R_HAS_BUFFER
536 # undef GETPROTOBYNUMBER_R_HAS_BUFFER
539 /* Any of the getprotoent getprotobyname getprotobynumber using buffer? */
541 #if (defined(GETPROTOENT_R_HAS_BUFFER) || defined(GETPROTOBYNAME_R_HAS_BUFFER) || defined(GETPROTOBYNUMBER_R_HAS_BUFFER))
542 # define USE_PROTOENT_BUFFER
544 # undef USE_PROTOENT_BUFFER
547 /* The getservent getservbyname getservbyport using buffer? */
549 #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)
550 # define GETSERVENT_R_HAS_BUFFER
552 # undef GETSERVENT_R_HAS_BUFFER
554 #if defined(HAS_GETSERVBYNAME_R) && (GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR || GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_S_CCSBI)
555 # define GETSERVBYNAME_R_HAS_BUFFER
557 # undef GETSERVBYNAME_R_HAS_BUFFER
559 #if defined(HAS_GETSERVBYPORT_R) && (GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR || GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_S_ICSBI)
560 # define GETSERVBYPORT_R_HAS_BUFFER
562 # undef GETSERVBYPORT_R_HAS_BUFFER
565 /* Any of the getservent getservbyname getservbyport using buffer? */
567 #if (defined(GETSERVENT_R_HAS_BUFFER) || defined(GETSERVBYNAME_R_HAS_BUFFER) || defined(GETSERVBYPORT_R_HAS_BUFFER))
568 # define USE_SERVENT_BUFFER
570 # undef USE_SERVENT_BUFFER
573 /* The gethostent gethostbyaddr gethostbyname using errno? */
575 #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)
576 # define GETHOSTENT_R_HAS_ERRNO
578 # undef GETHOSTENT_R_HAS_ERRNO
580 #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)
581 # define GETHOSTBYADDR_R_HAS_ERRNO
583 # undef GETHOSTBYADDR_R_HAS_ERRNO
585 #if defined(HAS_GETHOSTBYNAME_R) && (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE || GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE)
586 # define GETHOSTBYNAME_R_HAS_ERRNO
588 # undef GETHOSTBYNAME_R_HAS_ERRNO
591 /* Any of the gethostent gethostbyaddr gethostbyname using errno? */
593 #if (defined(GETHOSTENT_R_HAS_ERRNO) || defined(GETHOSTBYADDR_R_HAS_ERRNO) || defined(GETHOSTBYNAME_R_HAS_ERRNO))
594 # define USE_HOSTENT_ERRNO
596 # undef USE_HOSTENT_ERRNO
599 /* The getnetent getnetbyaddr getnetbyname using errno? */
601 #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)
602 # define GETNETENT_R_HAS_ERRNO
604 # undef GETNETENT_R_HAS_ERRNO
606 #if defined(HAS_GETNETBYADDR_R) && (GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE || GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_uISBWRE)
607 # define GETNETBYADDR_R_HAS_ERRNO
609 # undef GETNETBYADDR_R_HAS_ERRNO
611 #if defined(HAS_GETNETBYNAME_R) && (GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE)
612 # define GETNETBYNAME_R_HAS_ERRNO
614 # undef GETNETBYNAME_R_HAS_ERRNO
617 /* Any of the getnetent getnetbyaddr getnetbyname using errno? */
619 #if (defined(GETNETENT_R_HAS_ERRNO) || defined(GETNETBYADDR_R_HAS_ERRNO) || defined(GETNETBYNAME_R_HAS_ERRNO))
620 # define USE_NETENT_ERRNO
622 # undef USE_NETENT_ERRNO
628 char* _asctime_buffer;
629 size_t _asctime_size;
630 #endif /* HAS_ASCTIME_R */
632 #if CRYPT_R_PROTO == REENTRANT_PROTO_B_CCD
635 struct crypt_data *_crypt_struct_buffer;
637 #endif /* HAS_CRYPT_R */
641 #endif /* HAS_CTIME_R */
643 struct drand48_data _drand48_struct;
644 double _drand48_double;
645 #endif /* HAS_DRAND48_R */
646 #ifdef HAS_GETGRNAM_R
647 struct group _grent_struct;
650 # ifdef USE_GRENT_PTR
651 struct group* _grent_ptr;
653 # ifdef USE_GRENT_FPTR
656 #endif /* HAS_GETGRNAM_R */
657 #ifdef HAS_GETHOSTBYNAME_R
658 struct hostent _hostent_struct;
659 # if GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
660 struct hostent_data _hostent_data;
662 char* _hostent_buffer;
663 size_t _hostent_size;
665 # ifdef USE_HOSTENT_PTR
666 struct hostent* _hostent_ptr;
668 # ifdef USE_HOSTENT_ERRNO
671 #endif /* HAS_GETHOSTBYNAME_R */
672 #ifdef HAS_GETLOGIN_R
673 char* _getlogin_buffer;
674 size_t _getlogin_size;
675 #endif /* HAS_GETLOGIN_R */
676 #ifdef HAS_GETNETBYNAME_R
677 struct netent _netent_struct;
678 # if GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
679 struct netent_data _netent_data;
681 char* _netent_buffer;
684 # ifdef USE_NETENT_PTR
685 struct netent* _netent_ptr;
687 # ifdef USE_NETENT_ERRNO
690 #endif /* HAS_GETNETBYNAME_R */
691 #ifdef HAS_GETPROTOBYNAME_R
692 struct protoent _protoent_struct;
693 # if GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
694 struct protoent_data _protoent_data;
696 char* _protoent_buffer;
697 size_t _protoent_size;
699 # ifdef USE_PROTOENT_PTR
700 struct protoent* _protoent_ptr;
702 # ifdef USE_PROTOENT_ERRNO
705 #endif /* HAS_GETPROTOBYNAME_R */
706 #ifdef HAS_GETPWNAM_R
707 struct passwd _pwent_struct;
710 # ifdef USE_PWENT_PTR
711 struct passwd* _pwent_ptr;
713 # ifdef USE_PWENT_FPTR
716 #endif /* HAS_GETPWNAM_R */
717 #ifdef HAS_GETSERVBYNAME_R
718 struct servent _servent_struct;
719 # if GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD
720 struct servent_data _servent_data;
722 char* _servent_buffer;
723 size_t _servent_size;
725 # ifdef USE_SERVENT_PTR
726 struct servent* _servent_ptr;
728 # ifdef USE_SERVENT_ERRNO
731 #endif /* HAS_GETSERVBYNAME_R */
732 #ifdef HAS_GETSPNAM_R
733 struct spwd _spent_struct;
736 # ifdef USE_SPENT_PTR
737 struct spwd* _spent_ptr;
739 # ifdef USE_SPENT_FPTR
742 #endif /* HAS_GETSPNAM_R */
744 struct tm _gmtime_struct;
745 #endif /* HAS_GMTIME_R */
746 #ifdef HAS_LOCALTIME_R
747 struct tm _localtime_struct;
748 #endif /* HAS_LOCALTIME_R */
750 struct random_data _random_struct;
751 # if RANDOM_R_PROTO == REENTRANT_PROTO_I_iS
754 # if RANDOM_R_PROTO == REENTRANT_PROTO_I_lS
757 # if RANDOM_R_PROTO == REENTRANT_PROTO_I_St
758 int32_t _random_retval;
760 #endif /* HAS_RANDOM_R */
762 struct dirent* _readdir_struct;
763 size_t _readdir_size;
764 # if READDIR_R_PROTO == REENTRANT_PROTO_I_TSR
765 struct dirent* _readdir_ptr;
767 #endif /* HAS_READDIR_R */
768 #ifdef HAS_READDIR64_R
769 struct dirent64* _readdir64_struct;
770 size_t _readdir64_size;
771 # if READDIR64_R_PROTO == REENTRANT_PROTO_I_TSR
772 struct dirent64* _readdir64_ptr;
774 #endif /* HAS_READDIR64_R */
775 #ifdef HAS_SETLOCALE_R
776 char* _setlocale_buffer;
777 size_t _setlocale_size;
778 #endif /* HAS_SETLOCALE_R */
780 struct random_data _srandom_struct;
781 #endif /* HAS_SRANDOM_R */
782 #ifdef HAS_STRERROR_R
783 char* _strerror_buffer;
784 size_t _strerror_size;
785 #endif /* HAS_STRERROR_R */
787 char* _ttyname_buffer;
788 size_t _ttyname_size;
789 #endif /* HAS_TTYNAME_R */
791 int dummy; /* cannot have empty structs */
797 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
799 # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_B_SB
800 # define asctime(a) asctime_r(a, PL_reentrant_buffer->_asctime_buffer)
801 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
802 # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_B_SBI
803 # define asctime(a) asctime_r(a, PL_reentrant_buffer->_asctime_buffer, PL_reentrant_buffer->_asctime_size)
804 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
805 # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_I_SB
806 # define asctime(a) (asctime_r(a, PL_reentrant_buffer->_asctime_buffer) == 0 ? PL_reentrant_buffer->_asctime_buffer : 0)
807 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
808 # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_I_SBI
809 # define asctime(a) (asctime_r(a, PL_reentrant_buffer->_asctime_buffer, PL_reentrant_buffer->_asctime_size) == 0 ? PL_reentrant_buffer->_asctime_buffer : 0)
810 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
811 # endif /* HAS_ASCTIME */
812 #endif /* HAS_ASCTIME_R */
815 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
817 # if !defined(crypt) && CRYPT_R_PROTO == REENTRANT_PROTO_B_CCS
818 # define crypt(a, b) crypt_r(a, b, PL_reentrant_buffer->_crypt_struct_buffer)
819 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
820 # if !defined(crypt) && CRYPT_R_PROTO == REENTRANT_PROTO_B_CCD
821 # define crypt(a, b) crypt_r(a, b, &PL_reentrant_buffer->_crypt_data)
822 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
823 # endif /* HAS_CRYPT */
824 #endif /* HAS_CRYPT_R */
827 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
829 # if !defined(ctermid) && CTERMID_R_PROTO == REENTRANT_PROTO_B_B
830 # define ctermid(a) ctermid_r(a)
831 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
832 # endif /* HAS_CTERMID */
833 #endif /* HAS_CTERMID_R */
836 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
838 # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_B_SB
839 # define ctime(a) ctime_r(a, PL_reentrant_buffer->_ctime_buffer)
840 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
841 # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_B_SBI
842 # define ctime(a) ctime_r(a, PL_reentrant_buffer->_ctime_buffer, PL_reentrant_buffer->_ctime_size)
843 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
844 # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_I_SB
845 # define ctime(a) (ctime_r(a, PL_reentrant_buffer->_ctime_buffer) == 0 ? PL_reentrant_buffer->_ctime_buffer : 0)
846 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
847 # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_I_SBI
848 # define ctime(a) (ctime_r(a, PL_reentrant_buffer->_ctime_buffer, PL_reentrant_buffer->_ctime_size) == 0 ? PL_reentrant_buffer->_ctime_buffer : 0)
849 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
850 # endif /* HAS_CTIME */
851 #endif /* HAS_CTIME_R */
854 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
856 # if !defined(drand48) && DRAND48_R_PROTO == REENTRANT_PROTO_I_ST
857 # define drand48() (drand48_r(&PL_reentrant_buffer->_drand48_struct, &PL_reentrant_buffer->_drand48_double) == 0 ? PL_reentrant_buffer->_drand48_double : 0)
858 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
859 # endif /* HAS_DRAND48 */
860 #endif /* HAS_DRAND48_R */
862 #ifdef HAS_ENDGRENT_R
863 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
865 # if !defined(endgrent) && ENDGRENT_R_PROTO == REENTRANT_PROTO_I_H
866 # define endgrent() (endgrent_r(&PL_reentrant_buffer->_grent_fptr) == 0 ? 1 : 0)
867 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
868 # if !defined(endgrent) && ENDGRENT_R_PROTO == REENTRANT_PROTO_V_H
869 # define endgrent() endgrent_r(&PL_reentrant_buffer->_grent_fptr)
870 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
871 # endif /* HAS_ENDGRENT */
872 #endif /* HAS_ENDGRENT_R */
874 #ifdef HAS_ENDHOSTENT_R
875 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
877 # if !defined(endhostent) && ENDHOSTENT_R_PROTO == REENTRANT_PROTO_I_D
878 # define endhostent() (endhostent_r(&PL_reentrant_buffer->_hostent_data) == 0 ? 1 : 0)
879 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
880 # if !defined(endhostent) && ENDHOSTENT_R_PROTO == REENTRANT_PROTO_V_D
881 # define endhostent() endhostent_r(&PL_reentrant_buffer->_hostent_data)
882 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
883 # endif /* HAS_ENDHOSTENT */
884 #endif /* HAS_ENDHOSTENT_R */
886 #ifdef HAS_ENDNETENT_R
887 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
889 # if !defined(endnetent) && ENDNETENT_R_PROTO == REENTRANT_PROTO_I_D
890 # define endnetent() (endnetent_r(&PL_reentrant_buffer->_netent_data) == 0 ? 1 : 0)
891 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
892 # if !defined(endnetent) && ENDNETENT_R_PROTO == REENTRANT_PROTO_V_D
893 # define endnetent() endnetent_r(&PL_reentrant_buffer->_netent_data)
894 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
895 # endif /* HAS_ENDNETENT */
896 #endif /* HAS_ENDNETENT_R */
898 #ifdef HAS_ENDPROTOENT_R
899 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
901 # if !defined(endprotoent) && ENDPROTOENT_R_PROTO == REENTRANT_PROTO_I_D
902 # define endprotoent() (endprotoent_r(&PL_reentrant_buffer->_protoent_data) == 0 ? 1 : 0)
903 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
904 # if !defined(endprotoent) && ENDPROTOENT_R_PROTO == REENTRANT_PROTO_V_D
905 # define endprotoent() endprotoent_r(&PL_reentrant_buffer->_protoent_data)
906 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
907 # endif /* HAS_ENDPROTOENT */
908 #endif /* HAS_ENDPROTOENT_R */
910 #ifdef HAS_ENDPWENT_R
911 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
913 # if !defined(endpwent) && ENDPWENT_R_PROTO == REENTRANT_PROTO_I_H
914 # define endpwent() (endpwent_r(&PL_reentrant_buffer->_pwent_fptr) == 0 ? 1 : 0)
915 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
916 # if !defined(endpwent) && ENDPWENT_R_PROTO == REENTRANT_PROTO_V_H
917 # define endpwent() endpwent_r(&PL_reentrant_buffer->_pwent_fptr)
918 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
919 # endif /* HAS_ENDPWENT */
920 #endif /* HAS_ENDPWENT_R */
922 #ifdef HAS_ENDSERVENT_R
923 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
925 # if !defined(endservent) && ENDSERVENT_R_PROTO == REENTRANT_PROTO_I_D
926 # define endservent() (endservent_r(&PL_reentrant_buffer->_servent_data) == 0 ? 1 : 0)
927 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
928 # if !defined(endservent) && ENDSERVENT_R_PROTO == REENTRANT_PROTO_V_D
929 # define endservent() endservent_r(&PL_reentrant_buffer->_servent_data)
930 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
931 # endif /* HAS_ENDSERVENT */
932 #endif /* HAS_ENDSERVENT_R */
934 #ifdef HAS_GETGRENT_R
935 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
937 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBWR
938 # define getgrent() ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct group *) Perl_reentrant_retry("getgrent") : 0))
939 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
940 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIR
941 # define getgrent() ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct group *) Perl_reentrant_retry("getgrent") : 0))
942 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
943 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_S_SBW
944 # 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) ? (struct group *) Perl_reentrant_retry("getgrent") : 0))
945 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
946 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_S_SBI
947 # 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) ? (struct group *) Perl_reentrant_retry("getgrent") : 0))
948 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
949 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBI
950 # define getgrent() ((PL_reentrant_retint = getgrent_r(&PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size)) == 0 ? &PL_reentrant_buffer->_grent_struct : ((PL_reentrant_retint == ERANGE) ? (struct group *) Perl_reentrant_retry("getgrent") : 0))
951 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
952 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIH
953 # define getgrent() ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct group *) Perl_reentrant_retry("getgrent") : 0))
954 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
955 # endif /* HAS_GETGRENT */
956 #endif /* HAS_GETGRENT_R */
958 #ifdef HAS_GETGRGID_R
959 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
961 # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBWR
962 # define getgrgid(a) ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct group *) Perl_reentrant_retry("getgrgid", a) : 0))
963 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
964 # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBIR
965 # define getgrgid(a) ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct group *) Perl_reentrant_retry("getgrgid", a) : 0))
966 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
967 # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBI
968 # define getgrgid(a) ((PL_reentrant_retint = getgrgid_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size)) == 0 ? &PL_reentrant_buffer->_grent_struct : ((PL_reentrant_retint == ERANGE) ? (struct group *) Perl_reentrant_retry("getgrgid", a) : 0))
969 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
970 # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_S_TSBI
971 # 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) ? (struct group *) Perl_reentrant_retry("getgrgid", a) : 0))
972 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
973 # endif /* HAS_GETGRGID */
974 #endif /* HAS_GETGRGID_R */
976 #ifdef HAS_GETGRNAM_R
977 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
979 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR
980 # define getgrnam(a) ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct group *) Perl_reentrant_retry("getgrnam", a) : 0))
981 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
982 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR
983 # define getgrnam(a) ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct group *) Perl_reentrant_retry("getgrnam", a) : 0))
984 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
985 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_S_CBI
986 # define getgrnam(a) (getgrnam_r(a, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size) ? PL_reentrant_buffer->_grent_buffer : ((errno == ERANGE) ? (struct group *) Perl_reentrant_retry("getgrnam", a) : 0))
987 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
988 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBI
989 # define getgrnam(a) ((PL_reentrant_retint = getgrnam_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size)) == 0 ? &PL_reentrant_buffer->_grent_struct : ((PL_reentrant_retint == ERANGE) ? (struct group *) Perl_reentrant_retry("getgrnam", a) : 0))
990 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
991 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_S_CSBI
992 # 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) ? (struct group *) Perl_reentrant_retry("getgrnam", a) : 0))
993 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
994 # endif /* HAS_GETGRNAM */
995 #endif /* HAS_GETGRNAM_R */
997 #ifdef HAS_GETHOSTBYADDR_R
998 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
999 # undef gethostbyaddr
1000 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISBWRE
1001 # define gethostbyaddr(a, b, c) ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct hostent *) Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
1002 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1003 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBWIE
1004 # 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) ? (struct hostent *) Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
1005 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1006 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBIE
1007 # 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) ? (struct hostent *) Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
1008 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1009 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TWISBIE
1010 # 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) ? (struct hostent *) Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
1011 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1012 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CIISBIE
1013 # 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) ? (struct hostent *) Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
1014 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1015 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CSBIE
1016 # define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? 1 : ((errno == ERANGE) ? (struct hostent *) Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
1017 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1018 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TSBIE
1019 # define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? 1 : ((errno == ERANGE) ? (struct hostent *) Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
1020 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1021 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISD
1022 # define gethostbyaddr(a, b, c) ((PL_reentrant_retint = gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, &PL_reentrant_buffer->_hostent_data)) == 0 ? &PL_reentrant_buffer->_hostent_struct : ((PL_reentrant_retint == ERANGE) ? (struct hostent *) Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
1023 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1024 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CIISD
1025 # define gethostbyaddr(a, b, c) ((PL_reentrant_retint = gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, &PL_reentrant_buffer->_hostent_data)) == 0 ? &PL_reentrant_buffer->_hostent_struct : ((PL_reentrant_retint == ERANGE) ? (struct hostent *) Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
1026 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1027 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CII
1028 # define gethostbyaddr(a, b, c) ((PL_reentrant_retint = gethostbyaddr_r(a, b, c)) == 0 ? 1 : ((PL_reentrant_retint == ERANGE) ? (struct hostent *) Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
1029 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1030 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_TsISBWRE
1031 # define gethostbyaddr(a, b, c) ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct hostent *) Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
1032 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1033 # endif /* HAS_GETHOSTBYADDR */
1034 #endif /* HAS_GETHOSTBYADDR_R */
1036 #ifdef HAS_GETHOSTBYNAME_R
1037 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1038 # undef gethostbyname
1039 # if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE
1040 # define gethostbyname(a) ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct hostent *) Perl_reentrant_retry("gethostbyname", a) : 0))
1041 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1042 # if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE
1043 # 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) ? (struct hostent *) Perl_reentrant_retry("gethostbyname", a) : 0))
1044 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1045 # if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
1046 # define gethostbyname(a) ((PL_reentrant_retint = gethostbyname_r(a, &PL_reentrant_buffer->_hostent_struct, &PL_reentrant_buffer->_hostent_data)) == 0 ? &PL_reentrant_buffer->_hostent_struct : ((PL_reentrant_retint == ERANGE) ? (struct hostent *) Perl_reentrant_retry("gethostbyname", a) : 0))
1047 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1048 # endif /* HAS_GETHOSTBYNAME */
1049 #endif /* HAS_GETHOSTBYNAME_R */
1051 #ifdef HAS_GETHOSTENT_R
1052 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1054 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBWRE
1055 # define gethostent() ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct hostent *) Perl_reentrant_retry("gethostent") : 0))
1056 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1057 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBIE
1058 # define gethostent() ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct hostent *) Perl_reentrant_retry("gethostent") : 0))
1059 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1060 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBIE
1061 # 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) ? (struct hostent *) Perl_reentrant_retry("gethostent") : 0))
1062 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1063 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBI
1064 # 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) ? (struct hostent *) Perl_reentrant_retry("gethostent") : 0))
1065 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1066 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBI
1067 # define gethostent() ((PL_reentrant_retint = gethostent_r(&PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size)) == 0 ? &PL_reentrant_buffer->_hostent_struct : ((PL_reentrant_retint == ERANGE) ? (struct hostent *) Perl_reentrant_retry("gethostent") : 0))
1068 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1069 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SD
1070 # define gethostent() ((PL_reentrant_retint = gethostent_r(&PL_reentrant_buffer->_hostent_struct, &PL_reentrant_buffer->_hostent_data)) == 0 ? &PL_reentrant_buffer->_hostent_struct : ((PL_reentrant_retint == ERANGE) ? (struct hostent *) Perl_reentrant_retry("gethostent") : 0))
1071 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1072 # endif /* HAS_GETHOSTENT */
1073 #endif /* HAS_GETHOSTENT_R */
1075 #ifdef HAS_GETLOGIN_R
1076 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1078 # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_I_BW
1079 # define getlogin() ((PL_reentrant_retint = getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size)) == 0 ? PL_reentrant_buffer->_getlogin_buffer : ((PL_reentrant_retint == ERANGE) ? (char *) Perl_reentrant_retry("getlogin") : 0))
1080 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1081 # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_I_BI
1082 # define getlogin() ((PL_reentrant_retint = getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size)) == 0 ? PL_reentrant_buffer->_getlogin_buffer : ((PL_reentrant_retint == ERANGE) ? (char *) Perl_reentrant_retry("getlogin") : 0))
1083 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1084 # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_B_BW
1085 # define getlogin() getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size)
1086 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1087 # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_B_BI
1088 # define getlogin() getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size)
1089 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1090 # endif /* HAS_GETLOGIN */
1091 #endif /* HAS_GETLOGIN_R */
1093 #ifdef HAS_GETNETBYADDR_R
1094 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1095 # undef getnetbyaddr
1096 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE
1097 # define getnetbyaddr(a, b) ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct netent *) Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
1098 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1099 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_LISBI
1100 # define getnetbyaddr(a, b) ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct netent *) Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
1101 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1102 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_S_TISBI
1103 # 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) ? (struct netent *) Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
1104 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1105 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_S_LISBI
1106 # 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) ? (struct netent *) Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
1107 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1108 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_TISD
1109 # define getnetbyaddr(a, b) ((PL_reentrant_retint = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, &PL_reentrant_buffer->_netent_data)) == 0 ? &PL_reentrant_buffer->_netent_struct : ((PL_reentrant_retint == ERANGE) ? (struct netent *) Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
1110 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1111 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_LISD
1112 # define getnetbyaddr(a, b) ((PL_reentrant_retint = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, &PL_reentrant_buffer->_netent_data)) == 0 ? &PL_reentrant_buffer->_netent_struct : ((PL_reentrant_retint == ERANGE) ? (struct netent *) Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
1113 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1114 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_IISD
1115 # define getnetbyaddr(a, b) ((PL_reentrant_retint = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, &PL_reentrant_buffer->_netent_data)) == 0 ? &PL_reentrant_buffer->_netent_struct : ((PL_reentrant_retint == ERANGE) ? (struct netent *) Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
1116 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1117 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_uISBWRE
1118 # define getnetbyaddr(a, b) ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct netent *) Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
1119 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1120 # endif /* HAS_GETNETBYADDR */
1121 #endif /* HAS_GETNETBYADDR_R */
1123 #ifdef HAS_GETNETBYNAME_R
1124 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1125 # undef getnetbyname
1126 # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE
1127 # define getnetbyname(a) ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct netent *) Perl_reentrant_retry("getnetbyname", a) : 0))
1128 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1129 # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBI
1130 # define getnetbyname(a) ((PL_reentrant_retint = getnetbyname_r(a, &PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size)) == 0 ? &PL_reentrant_buffer->_netent_struct : ((PL_reentrant_retint == ERANGE) ? (struct netent *) Perl_reentrant_retry("getnetbyname", a) : 0))
1131 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1132 # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI
1133 # 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) ? (struct netent *) Perl_reentrant_retry("getnetbyname", a) : 0))
1134 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1135 # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
1136 # define getnetbyname(a) ((PL_reentrant_retint = getnetbyname_r(a, &PL_reentrant_buffer->_netent_struct, &PL_reentrant_buffer->_netent_data)) == 0 ? &PL_reentrant_buffer->_netent_struct : ((PL_reentrant_retint == ERANGE) ? (struct netent *) Perl_reentrant_retry("getnetbyname", a) : 0))
1137 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1138 # endif /* HAS_GETNETBYNAME */
1139 #endif /* HAS_GETNETBYNAME_R */
1141 #ifdef HAS_GETNETENT_R
1142 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1144 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBWRE
1145 # define getnetent() ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct netent *) Perl_reentrant_retry("getnetent") : 0))
1146 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1147 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBIE
1148 # define getnetent() ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct netent *) Perl_reentrant_retry("getnetent") : 0))
1149 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1150 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBIE
1151 # 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) ? (struct netent *) Perl_reentrant_retry("getnetent") : 0))
1152 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1153 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBI
1154 # 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) ? (struct netent *) Perl_reentrant_retry("getnetent") : 0))
1155 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1156 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBI
1157 # define getnetent() ((PL_reentrant_retint = getnetent_r(&PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size)) == 0 ? &PL_reentrant_buffer->_netent_struct : ((PL_reentrant_retint == ERANGE) ? (struct netent *) Perl_reentrant_retry("getnetent") : 0))
1158 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1159 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SD
1160 # define getnetent() ((PL_reentrant_retint = getnetent_r(&PL_reentrant_buffer->_netent_struct, &PL_reentrant_buffer->_netent_data)) == 0 ? &PL_reentrant_buffer->_netent_struct : ((PL_reentrant_retint == ERANGE) ? (struct netent *) Perl_reentrant_retry("getnetent") : 0))
1161 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1162 # endif /* HAS_GETNETENT */
1163 #endif /* HAS_GETNETENT_R */
1165 #ifdef HAS_GETPROTOBYNAME_R
1166 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1167 # undef getprotobyname
1168 # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR
1169 # define getprotobyname(a) ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct protoent *) Perl_reentrant_retry("getprotobyname", a) : 0))
1170 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1171 # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI
1172 # 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) ? (struct protoent *) Perl_reentrant_retry("getprotobyname", a) : 0))
1173 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1174 # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
1175 # define getprotobyname(a) (REENTR_MEMZERO(&PL_reentrant_buffer->_protoent_data, sizeof(PL_reentrant_buffer->_protoent_data)),(PL_reentrant_retint = getprotobyname_r(a, &PL_reentrant_buffer->_protoent_struct, &PL_reentrant_buffer->_protoent_data)) == 0 ? &PL_reentrant_buffer->_protoent_struct : ((PL_reentrant_retint == ERANGE) ? (struct protoent *) Perl_reentrant_retry("getprotobyname", a) : 0))
1176 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1177 # endif /* HAS_GETPROTOBYNAME */
1178 #endif /* HAS_GETPROTOBYNAME_R */
1180 #ifdef HAS_GETPROTOBYNUMBER_R
1181 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1182 # undef getprotobynumber
1183 # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR
1184 # define getprotobynumber(a) ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct protoent *) Perl_reentrant_retry("getprotobynumber", a) : 0))
1185 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1186 # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_S_ISBI
1187 # 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) ? (struct protoent *) Perl_reentrant_retry("getprotobynumber", a) : 0))
1188 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1189 # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISD
1190 # define getprotobynumber(a) (REENTR_MEMZERO(&PL_reentrant_buffer->_protoent_data, sizeof(PL_reentrant_buffer->_protoent_data)),(PL_reentrant_retint = getprotobynumber_r(a, &PL_reentrant_buffer->_protoent_struct, &PL_reentrant_buffer->_protoent_data)) == 0 ? &PL_reentrant_buffer->_protoent_struct : ((PL_reentrant_retint == ERANGE) ? (struct protoent *) Perl_reentrant_retry("getprotobynumber", a) : 0))
1191 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1192 # endif /* HAS_GETPROTOBYNUMBER */
1193 #endif /* HAS_GETPROTOBYNUMBER_R */
1195 #ifdef HAS_GETPROTOENT_R
1196 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1198 # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBWR
1199 # define getprotoent() ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct protoent *) Perl_reentrant_retry("getprotoent") : 0))
1200 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1201 # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBI
1202 # define getprotoent() ((PL_reentrant_retint = getprotoent_r(&PL_reentrant_buffer->_protoent_struct, PL_reentrant_buffer->_protoent_buffer, PL_reentrant_buffer->_protoent_size)) == 0 ? &PL_reentrant_buffer->_protoent_struct : ((PL_reentrant_retint == ERANGE) ? (struct protoent *) Perl_reentrant_retry("getprotoent") : 0))
1203 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1204 # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_S_SBI
1205 # 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) ? (struct protoent *) Perl_reentrant_retry("getprotoent") : 0))
1206 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1207 # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SD
1208 # define getprotoent() (REENTR_MEMZERO(&PL_reentrant_buffer->_protoent_data, sizeof(PL_reentrant_buffer->_protoent_data)),(PL_reentrant_retint = getprotoent_r(&PL_reentrant_buffer->_protoent_struct, &PL_reentrant_buffer->_protoent_data)) == 0 ? &PL_reentrant_buffer->_protoent_struct : ((PL_reentrant_retint == ERANGE) ? (struct protoent *) Perl_reentrant_retry("getprotoent") : 0))
1209 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1210 # endif /* HAS_GETPROTOENT */
1211 #endif /* HAS_GETPROTOENT_R */
1213 #ifdef HAS_GETPWENT_R
1214 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1216 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBWR
1217 # define getpwent() ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct passwd *) Perl_reentrant_retry("getpwent") : 0))
1218 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1219 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIR
1220 # define getpwent() ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct passwd *) Perl_reentrant_retry("getpwent") : 0))
1221 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1222 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_S_SBW
1223 # 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) ? (struct passwd *) Perl_reentrant_retry("getpwent") : 0))
1224 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1225 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_S_SBI
1226 # 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) ? (struct passwd *) Perl_reentrant_retry("getpwent") : 0))
1227 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1228 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBI
1229 # define getpwent() ((PL_reentrant_retint = getpwent_r(&PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size)) == 0 ? &PL_reentrant_buffer->_pwent_struct : ((PL_reentrant_retint == ERANGE) ? (struct passwd *) Perl_reentrant_retry("getpwent") : 0))
1230 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1231 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIH
1232 # define getpwent() ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct passwd *) Perl_reentrant_retry("getpwent") : 0))
1233 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1234 # endif /* HAS_GETPWENT */
1235 #endif /* HAS_GETPWENT_R */
1237 #ifdef HAS_GETPWNAM_R
1238 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1240 # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR
1241 # define getpwnam(a) ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct passwd *) Perl_reentrant_retry("getpwnam", a) : 0))
1242 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1243 # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR
1244 # define getpwnam(a) ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct passwd *) Perl_reentrant_retry("getpwnam", a) : 0))
1245 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1246 # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_S_CSBI
1247 # 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) ? (struct passwd *) Perl_reentrant_retry("getpwnam", a) : 0))
1248 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1249 # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBI
1250 # define getpwnam(a) ((PL_reentrant_retint = getpwnam_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size)) == 0 ? &PL_reentrant_buffer->_pwent_struct : ((PL_reentrant_retint == ERANGE) ? (struct passwd *) Perl_reentrant_retry("getpwnam", a) : 0))
1251 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1252 # endif /* HAS_GETPWNAM */
1253 #endif /* HAS_GETPWNAM_R */
1255 #ifdef HAS_GETPWUID_R
1256 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1258 # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBWR
1259 # define getpwuid(a) ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct passwd *) Perl_reentrant_retry("getpwuid", a) : 0))
1260 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1261 # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBIR
1262 # define getpwuid(a) ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct passwd *) Perl_reentrant_retry("getpwuid", a) : 0))
1263 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1264 # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBI
1265 # define getpwuid(a) ((PL_reentrant_retint = getpwuid_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size)) == 0 ? &PL_reentrant_buffer->_pwent_struct : ((PL_reentrant_retint == ERANGE) ? (struct passwd *) Perl_reentrant_retry("getpwuid", a) : 0))
1266 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1267 # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_S_TSBI
1268 # 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) ? (struct passwd *) Perl_reentrant_retry("getpwuid", a) : 0))
1269 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1270 # endif /* HAS_GETPWUID */
1271 #endif /* HAS_GETPWUID_R */
1273 #ifdef HAS_GETSERVBYNAME_R
1274 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1275 # undef getservbyname
1276 # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR
1277 # define getservbyname(a, b) ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct servent *) Perl_reentrant_retry("getservbyname", a, b) : 0))
1278 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1279 # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_S_CCSBI
1280 # 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) ? (struct servent *) Perl_reentrant_retry("getservbyname", a, b) : 0))
1281 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1282 # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD
1283 # define getservbyname(a, b) (REENTR_MEMZERO(&PL_reentrant_buffer->_servent_data, sizeof(PL_reentrant_buffer->_servent_data)),(PL_reentrant_retint = getservbyname_r(a, b, &PL_reentrant_buffer->_servent_struct, &PL_reentrant_buffer->_servent_data)) == 0 ? &PL_reentrant_buffer->_servent_struct : ((PL_reentrant_retint == ERANGE) ? (struct servent *) Perl_reentrant_retry("getservbyname", a, b) : 0))
1284 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1285 # endif /* HAS_GETSERVBYNAME */
1286 #endif /* HAS_GETSERVBYNAME_R */
1288 #ifdef HAS_GETSERVBYPORT_R
1289 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1290 # undef getservbyport
1291 # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR
1292 # define getservbyport(a, b) ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct servent *) Perl_reentrant_retry("getservbyport", a, b) : 0))
1293 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1294 # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_S_ICSBI
1295 # 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) ? (struct servent *) Perl_reentrant_retry("getservbyport", a, b) : 0))
1296 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1297 # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSD
1298 # define getservbyport(a, b) (REENTR_MEMZERO(&PL_reentrant_buffer->_servent_data, sizeof(PL_reentrant_buffer->_servent_data)),(PL_reentrant_retint = getservbyport_r(a, b, &PL_reentrant_buffer->_servent_struct, &PL_reentrant_buffer->_servent_data)) == 0 ? &PL_reentrant_buffer->_servent_struct : ((PL_reentrant_retint == ERANGE) ? (struct servent *) Perl_reentrant_retry("getservbyport", a, b) : 0))
1299 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1300 # endif /* HAS_GETSERVBYPORT */
1301 #endif /* HAS_GETSERVBYPORT_R */
1303 #ifdef HAS_GETSERVENT_R
1304 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1306 # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBWR
1307 # define getservent() ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct servent *) Perl_reentrant_retry("getservent") : 0))
1308 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1309 # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBI
1310 # define getservent() ((PL_reentrant_retint = getservent_r(&PL_reentrant_buffer->_servent_struct, PL_reentrant_buffer->_servent_buffer, PL_reentrant_buffer->_servent_size)) == 0 ? &PL_reentrant_buffer->_servent_struct : ((PL_reentrant_retint == ERANGE) ? (struct servent *) Perl_reentrant_retry("getservent") : 0))
1311 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1312 # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_S_SBI
1313 # 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) ? (struct servent *) Perl_reentrant_retry("getservent") : 0))
1314 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1315 # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SD
1316 # define getservent() (REENTR_MEMZERO(&PL_reentrant_buffer->_servent_data, sizeof(PL_reentrant_buffer->_servent_data)),(PL_reentrant_retint = getservent_r(&PL_reentrant_buffer->_servent_struct, &PL_reentrant_buffer->_servent_data)) == 0 ? &PL_reentrant_buffer->_servent_struct : ((PL_reentrant_retint == ERANGE) ? (struct servent *) Perl_reentrant_retry("getservent") : 0))
1317 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1318 # endif /* HAS_GETSERVENT */
1319 #endif /* HAS_GETSERVENT_R */
1321 #ifdef HAS_GETSPNAM_R
1322 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1324 # if !defined(getspnam) && GETSPNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR
1325 # define getspnam(a) ((PL_reentrant_retint = 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 : ((PL_reentrant_retint == ERANGE) ? (struct spwd *) Perl_reentrant_retry("getspnam", a) : 0))
1326 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1327 # if !defined(getspnam) && GETSPNAM_R_PROTO == REENTRANT_PROTO_S_CSBI
1328 # 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) ? (struct spwd *) Perl_reentrant_retry("getspnam", a) : 0))
1329 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1330 # endif /* HAS_GETSPNAM */
1331 #endif /* HAS_GETSPNAM_R */
1334 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1336 # if !defined(gmtime) && GMTIME_R_PROTO == REENTRANT_PROTO_S_TS
1337 # define gmtime(a) (gmtime_r(a, &PL_reentrant_buffer->_gmtime_struct) ? &PL_reentrant_buffer->_gmtime_struct : 0)
1338 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1339 # if !defined(gmtime) && GMTIME_R_PROTO == REENTRANT_PROTO_I_TS
1340 # define gmtime(a) (gmtime_r(a, &PL_reentrant_buffer->_gmtime_struct) == 0 ? &PL_reentrant_buffer->_gmtime_struct : 0)
1341 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1342 # endif /* HAS_GMTIME */
1343 #endif /* HAS_GMTIME_R */
1345 #ifdef HAS_LOCALTIME_R
1346 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1348 # if !defined(localtime) && LOCALTIME_R_PROTO == REENTRANT_PROTO_S_TS
1349 # define localtime(a) (L_R_TZSET localtime_r(a, &PL_reentrant_buffer->_localtime_struct) ? &PL_reentrant_buffer->_localtime_struct : 0)
1350 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1351 # if !defined(localtime) && LOCALTIME_R_PROTO == REENTRANT_PROTO_I_TS
1352 # define localtime(a) (L_R_TZSET localtime_r(a, &PL_reentrant_buffer->_localtime_struct) == 0 ? &PL_reentrant_buffer->_localtime_struct : 0)
1353 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1354 # endif /* HAS_LOCALTIME */
1355 #endif /* HAS_LOCALTIME_R */
1358 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1360 # if !defined(random) && RANDOM_R_PROTO == REENTRANT_PROTO_I_iS
1361 # define random() (random_r(&PL_reentrant_buffer->_random_retval, &PL_reentrant_buffer->_random_struct) == 0 ? PL_reentrant_buffer->_random_retval : 0)
1362 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1363 # if !defined(random) && RANDOM_R_PROTO == REENTRANT_PROTO_I_lS
1364 # define random() (random_r(&PL_reentrant_buffer->_random_retval, &PL_reentrant_buffer->_random_struct) == 0 ? PL_reentrant_buffer->_random_retval : 0)
1365 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1366 # if !defined(random) && RANDOM_R_PROTO == REENTRANT_PROTO_I_St
1367 # define random() (random_r(&PL_reentrant_buffer->_random_struct, &PL_reentrant_buffer->_random_retval) == 0 ? PL_reentrant_buffer->_random_retval : 0)
1368 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1369 # endif /* HAS_RANDOM */
1370 #endif /* HAS_RANDOM_R */
1372 #ifdef HAS_READDIR_R
1373 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1375 # if !defined(readdir) && READDIR_R_PROTO == REENTRANT_PROTO_I_TSR
1376 # define readdir(a) (readdir_r(a, PL_reentrant_buffer->_readdir_struct, &PL_reentrant_buffer->_readdir_ptr) == 0 ? PL_reentrant_buffer->_readdir_ptr : 0)
1377 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1378 # if !defined(readdir) && READDIR_R_PROTO == REENTRANT_PROTO_I_TS
1379 # define readdir(a) (readdir_r(a, PL_reentrant_buffer->_readdir_struct) == 0 ? PL_reentrant_buffer->_readdir_struct : 0)
1380 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1381 # endif /* HAS_READDIR */
1382 #endif /* HAS_READDIR_R */
1384 #ifdef HAS_READDIR64_R
1385 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1387 # if !defined(readdir64) && READDIR64_R_PROTO == REENTRANT_PROTO_I_TSR
1388 # define readdir64(a) (readdir64_r(a, PL_reentrant_buffer->_readdir64_struct, &PL_reentrant_buffer->_readdir64_ptr) == 0 ? PL_reentrant_buffer->_readdir64_ptr : 0)
1389 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1390 # if !defined(readdir64) && READDIR64_R_PROTO == REENTRANT_PROTO_I_TS
1391 # define readdir64(a) (readdir64_r(a, PL_reentrant_buffer->_readdir64_struct) == 0 ? PL_reentrant_buffer->_readdir64_struct : 0)
1392 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1393 # endif /* HAS_READDIR64 */
1394 #endif /* HAS_READDIR64_R */
1396 #ifdef HAS_SETGRENT_R
1397 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1399 # if !defined(setgrent) && SETGRENT_R_PROTO == REENTRANT_PROTO_I_H
1400 # define setgrent() (setgrent_r(&PL_reentrant_buffer->_grent_fptr) == 0 ? 1 : 0)
1401 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1402 # if !defined(setgrent) && SETGRENT_R_PROTO == REENTRANT_PROTO_V_H
1403 # define setgrent() setgrent_r(&PL_reentrant_buffer->_grent_fptr)
1404 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1405 # endif /* HAS_SETGRENT */
1406 #endif /* HAS_SETGRENT_R */
1408 #ifdef HAS_SETHOSTENT_R
1409 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1411 # if !defined(sethostent) && SETHOSTENT_R_PROTO == REENTRANT_PROTO_I_ID
1412 # define sethostent(a) (sethostent_r(a, &PL_reentrant_buffer->_hostent_data) == 0 ? 1 : 0)
1413 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1414 # if !defined(sethostent) && SETHOSTENT_R_PROTO == REENTRANT_PROTO_V_ID
1415 # define sethostent(a) sethostent_r(a, &PL_reentrant_buffer->_hostent_data)
1416 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1417 # endif /* HAS_SETHOSTENT */
1418 #endif /* HAS_SETHOSTENT_R */
1420 #ifdef HAS_SETLOCALE_R
1421 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1423 # if !defined(setlocale) && SETLOCALE_R_PROTO == REENTRANT_PROTO_I_ICBI
1424 # define setlocale(a, b) (setlocale_r(a, b, PL_reentrant_buffer->_setlocale_buffer, PL_reentrant_buffer->_setlocale_size) == 0 ? PL_reentrant_buffer->_setlocale_buffer : 0)
1425 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1426 # endif /* HAS_SETLOCALE */
1427 #endif /* HAS_SETLOCALE_R */
1429 #ifdef HAS_SETNETENT_R
1430 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1432 # if !defined(setnetent) && SETNETENT_R_PROTO == REENTRANT_PROTO_I_ID
1433 # define setnetent(a) (setnetent_r(a, &PL_reentrant_buffer->_netent_data) == 0 ? 1 : 0)
1434 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1435 # if !defined(setnetent) && SETNETENT_R_PROTO == REENTRANT_PROTO_V_ID
1436 # define setnetent(a) setnetent_r(a, &PL_reentrant_buffer->_netent_data)
1437 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1438 # endif /* HAS_SETNETENT */
1439 #endif /* HAS_SETNETENT_R */
1441 #ifdef HAS_SETPROTOENT_R
1442 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1444 # if !defined(setprotoent) && SETPROTOENT_R_PROTO == REENTRANT_PROTO_I_ID
1445 # define setprotoent(a) (setprotoent_r(a, &PL_reentrant_buffer->_protoent_data) == 0 ? 1 : 0)
1446 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1447 # if !defined(setprotoent) && SETPROTOENT_R_PROTO == REENTRANT_PROTO_V_ID
1448 # define setprotoent(a) setprotoent_r(a, &PL_reentrant_buffer->_protoent_data)
1449 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1450 # endif /* HAS_SETPROTOENT */
1451 #endif /* HAS_SETPROTOENT_R */
1453 #ifdef HAS_SETPWENT_R
1454 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1456 # if !defined(setpwent) && SETPWENT_R_PROTO == REENTRANT_PROTO_I_H
1457 # define setpwent() (setpwent_r(&PL_reentrant_buffer->_pwent_fptr) == 0 ? 1 : 0)
1458 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1459 # if !defined(setpwent) && SETPWENT_R_PROTO == REENTRANT_PROTO_V_H
1460 # define setpwent() setpwent_r(&PL_reentrant_buffer->_pwent_fptr)
1461 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1462 # endif /* HAS_SETPWENT */
1463 #endif /* HAS_SETPWENT_R */
1465 #ifdef HAS_SETSERVENT_R
1466 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1468 # if !defined(setservent) && SETSERVENT_R_PROTO == REENTRANT_PROTO_I_ID
1469 # define setservent(a) (setservent_r(a, &PL_reentrant_buffer->_servent_data) == 0 ? 1 : 0)
1470 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1471 # if !defined(setservent) && SETSERVENT_R_PROTO == REENTRANT_PROTO_V_ID
1472 # define setservent(a) setservent_r(a, &PL_reentrant_buffer->_servent_data)
1473 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1474 # endif /* HAS_SETSERVENT */
1475 #endif /* HAS_SETSERVENT_R */
1477 #ifdef HAS_SRAND48_R
1478 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1480 # if !defined(srand48) && SRAND48_R_PROTO == REENTRANT_PROTO_I_LS
1481 # define srand48(a) (srand48_r(a, &PL_reentrant_buffer->_drand48_struct) == 0 ? &PL_reentrant_buffer->_drand48_struct : 0)
1482 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1483 # endif /* HAS_SRAND48 */
1484 #endif /* HAS_SRAND48_R */
1486 #ifdef HAS_SRANDOM_R
1487 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1489 # if !defined(srandom) && SRANDOM_R_PROTO == REENTRANT_PROTO_I_TS
1490 # define srandom(a) (srandom_r(a, &PL_reentrant_buffer->_srandom_struct) == 0 ? &PL_reentrant_buffer->_srandom_struct : 0)
1491 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1492 # endif /* HAS_SRANDOM */
1493 #endif /* HAS_SRANDOM_R */
1495 #ifdef HAS_STRERROR_R
1496 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1498 # if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_I_IBW
1499 # define strerror(a) (strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size) == 0 ? PL_reentrant_buffer->_strerror_buffer : 0)
1500 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1501 # if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_I_IBI
1502 # define strerror(a) (strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size) == 0 ? PL_reentrant_buffer->_strerror_buffer : 0)
1503 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1504 # if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_B_IBW
1505 # define strerror(a) strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size)
1506 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1507 # endif /* HAS_STRERROR */
1508 #endif /* HAS_STRERROR_R */
1511 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1513 # if !defined(tmpnam) && TMPNAM_R_PROTO == REENTRANT_PROTO_B_B
1514 # define tmpnam(a) tmpnam_r(a)
1515 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1516 # endif /* HAS_TMPNAM */
1517 #endif /* HAS_TMPNAM_R */
1519 #ifdef HAS_TTYNAME_R
1520 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1522 # if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_I_IBW
1523 # define ttyname(a) (ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size) == 0 ? PL_reentrant_buffer->_ttyname_buffer : 0)
1524 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1525 # if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_I_IBI
1526 # define ttyname(a) (ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size) == 0 ? PL_reentrant_buffer->_ttyname_buffer : 0)
1527 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1528 # if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_B_IBI
1529 # define ttyname(a) ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size)
1530 # endif /* if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) */
1531 # endif /* HAS_TTYNAME */
1532 #endif /* HAS_TTYNAME_R */
1536 #endif /* USE_REENTRANT_API */