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_TSBI 72
189 #define REENTRANT_PROTO_S_TSBIE 73
190 #define REENTRANT_PROTO_S_TWISBIE 74
191 #define REENTRANT_PROTO_V_D 75
192 #define REENTRANT_PROTO_V_H 76
193 #define REENTRANT_PROTO_V_ID 77
195 /* Defines for indicating which special features are supported. */
197 /* The getgrent getgrgid getgrnam using buffer? */
199 #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)
200 # define GETGRENT_R_HAS_BUFFER
202 # undef GETGRENT_R_HAS_BUFFER
204 #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)
205 # define GETGRGID_R_HAS_BUFFER
207 # undef GETGRGID_R_HAS_BUFFER
209 #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)
210 # define GETGRNAM_R_HAS_BUFFER
212 # undef GETGRNAM_R_HAS_BUFFER
215 /* Any of the getgrent getgrgid getgrnam using buffer? */
217 #if (defined(GETGRENT_R_HAS_BUFFER) || defined(GETGRGID_R_HAS_BUFFER) || defined(GETGRNAM_R_HAS_BUFFER))
218 # define USE_GRENT_BUFFER
220 # undef USE_GRENT_BUFFER
223 /* The getgrent getgrgid getgrnam using ptr? */
225 #if defined(HAS_GETGRENT_R) && (GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIR)
226 # define GETGRENT_R_HAS_PTR
228 # undef GETGRENT_R_HAS_PTR
230 #if defined(HAS_GETGRGID_R) && (GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBWR || GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBIR)
231 # define GETGRGID_R_HAS_PTR
233 # undef GETGRGID_R_HAS_PTR
235 #if defined(HAS_GETGRNAM_R) && (GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR)
236 # define GETGRNAM_R_HAS_PTR
238 # undef GETGRNAM_R_HAS_PTR
241 /* Any of the getgrent getgrgid getgrnam using ptr? */
243 #if (defined(GETGRENT_R_HAS_PTR) || defined(GETGRGID_R_HAS_PTR) || defined(GETGRNAM_R_HAS_PTR))
244 # define USE_GRENT_PTR
246 # undef USE_GRENT_PTR
249 /* The getpwent getpwnam getpwuid using ptr? */
251 #if defined(HAS_GETPWENT_R) && (GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIR)
252 # define GETPWENT_R_HAS_PTR
254 # undef GETPWENT_R_HAS_PTR
256 #if defined(HAS_GETPWNAM_R) && (GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR)
257 # define GETPWNAM_R_HAS_PTR
259 # undef GETPWNAM_R_HAS_PTR
261 #if defined(HAS_GETPWUID_R) && (GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBWR || GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBIR)
262 # define GETPWUID_R_HAS_PTR
264 # undef GETPWUID_R_HAS_PTR
267 /* Any of the getpwent getpwnam getpwuid using ptr? */
269 #if (defined(GETPWENT_R_HAS_PTR) || defined(GETPWNAM_R_HAS_PTR) || defined(GETPWUID_R_HAS_PTR))
270 # define USE_PWENT_PTR
272 # undef USE_PWENT_PTR
275 /* The getspent getspnam using ptr? */
277 #if defined(HAS_GETSPNAM_R) && (GETSPNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR)
278 # define GETSPNAM_R_HAS_PTR
280 # undef GETSPNAM_R_HAS_PTR
283 /* Any of the getspent getspnam using ptr? */
285 #if (defined(GETSPENT_R_HAS_PTR) || defined(GETSPNAM_R_HAS_PTR))
286 # define USE_SPENT_PTR
288 # undef USE_SPENT_PTR
291 /* The getgrent getgrgid getgrnam setgrent endgrent using fptr? */
293 #if defined(HAS_GETGRENT_R) && (GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIH)
294 # define GETGRENT_R_HAS_FPTR
296 # undef GETGRENT_R_HAS_FPTR
298 #if defined(HAS_SETGRENT_R) && (SETGRENT_R_PROTO == REENTRANT_PROTO_I_H || SETGRENT_R_PROTO == REENTRANT_PROTO_V_H)
299 # define SETGRENT_R_HAS_FPTR
301 # undef SETGRENT_R_HAS_FPTR
303 #if defined(HAS_ENDGRENT_R) && (ENDGRENT_R_PROTO == REENTRANT_PROTO_I_H || ENDGRENT_R_PROTO == REENTRANT_PROTO_V_H)
304 # define ENDGRENT_R_HAS_FPTR
306 # undef ENDGRENT_R_HAS_FPTR
309 /* Any of the getgrent getgrgid getgrnam setgrent endgrent using fptr? */
311 #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))
312 # define USE_GRENT_FPTR
314 # undef USE_GRENT_FPTR
317 /* The getpwent getpwnam getpwuid setpwent endpwent using fptr? */
319 #if defined(HAS_GETPWENT_R) && (GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIH)
320 # define GETPWENT_R_HAS_FPTR
322 # undef GETPWENT_R_HAS_FPTR
324 #if defined(HAS_SETPWENT_R) && (SETPWENT_R_PROTO == REENTRANT_PROTO_I_H || SETPWENT_R_PROTO == REENTRANT_PROTO_V_H)
325 # define SETPWENT_R_HAS_FPTR
327 # undef SETPWENT_R_HAS_FPTR
329 #if defined(HAS_ENDPWENT_R) && (ENDPWENT_R_PROTO == REENTRANT_PROTO_I_H || ENDPWENT_R_PROTO == REENTRANT_PROTO_V_H)
330 # define ENDPWENT_R_HAS_FPTR
332 # undef ENDPWENT_R_HAS_FPTR
335 /* Any of the getpwent getpwnam getpwuid setpwent endpwent using fptr? */
337 #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))
338 # define USE_PWENT_FPTR
340 # undef USE_PWENT_FPTR
343 /* The getpwent getpwgid getpwnam using buffer? */
345 #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)
346 # define GETPWENT_R_HAS_BUFFER
348 # undef GETPWENT_R_HAS_BUFFER
350 #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)
351 # define GETPWNAM_R_HAS_BUFFER
353 # undef GETPWNAM_R_HAS_BUFFER
356 /* Any of the getpwent getpwgid getpwnam using buffer? */
358 #if (defined(GETPWENT_R_HAS_BUFFER) || defined(GETPWGID_R_HAS_BUFFER) || defined(GETPWNAM_R_HAS_BUFFER))
359 # define USE_PWENT_BUFFER
361 # undef USE_PWENT_BUFFER
364 /* The gethostent gethostbyaddr gethostbyname using ptr? */
366 #if defined(HAS_GETHOSTENT_R) && (GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBWRE)
367 # define GETHOSTENT_R_HAS_PTR
369 # undef GETHOSTENT_R_HAS_PTR
371 #if defined(HAS_GETHOSTBYADDR_R) && (GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISBWRE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_TsISBWRE)
372 # define GETHOSTBYADDR_R_HAS_PTR
374 # undef GETHOSTBYADDR_R_HAS_PTR
376 #if defined(HAS_GETHOSTBYNAME_R) && (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE)
377 # define GETHOSTBYNAME_R_HAS_PTR
379 # undef GETHOSTBYNAME_R_HAS_PTR
382 /* Any of the gethostent gethostbyaddr gethostbyname using ptr? */
384 #if (defined(GETHOSTENT_R_HAS_PTR) || defined(GETHOSTBYADDR_R_HAS_PTR) || defined(GETHOSTBYNAME_R_HAS_PTR))
385 # define USE_HOSTENT_PTR
387 # undef USE_HOSTENT_PTR
390 /* The getnetent getnetbyaddr getnetbyname using ptr? */
392 #if defined(HAS_GETNETENT_R) && (GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBWRE)
393 # define GETNETENT_R_HAS_PTR
395 # undef GETNETENT_R_HAS_PTR
397 #if defined(HAS_GETNETBYADDR_R) && (GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE || GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_uISBWRE)
398 # define GETNETBYADDR_R_HAS_PTR
400 # undef GETNETBYADDR_R_HAS_PTR
402 #if defined(HAS_GETNETBYNAME_R) && (GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE)
403 # define GETNETBYNAME_R_HAS_PTR
405 # undef GETNETBYNAME_R_HAS_PTR
408 /* Any of the getnetent getnetbyaddr getnetbyname using ptr? */
410 #if (defined(GETNETENT_R_HAS_PTR) || defined(GETNETBYADDR_R_HAS_PTR) || defined(GETNETBYNAME_R_HAS_PTR))
411 # define USE_NETENT_PTR
413 # undef USE_NETENT_PTR
416 /* The getprotoent getprotobyname getprotobynumber using ptr? */
418 #if defined(HAS_GETPROTOENT_R) && (GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBWR)
419 # define GETPROTOENT_R_HAS_PTR
421 # undef GETPROTOENT_R_HAS_PTR
423 #if defined(HAS_GETPROTOBYNAME_R) && (GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR)
424 # define GETPROTOBYNAME_R_HAS_PTR
426 # undef GETPROTOBYNAME_R_HAS_PTR
428 #if defined(HAS_GETPROTOBYNUMBER_R) && (GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR)
429 # define GETPROTOBYNUMBER_R_HAS_PTR
431 # undef GETPROTOBYNUMBER_R_HAS_PTR
434 /* Any of the getprotoent getprotobyname getprotobynumber using ptr? */
436 #if (defined(GETPROTOENT_R_HAS_PTR) || defined(GETPROTOBYNAME_R_HAS_PTR) || defined(GETPROTOBYNUMBER_R_HAS_PTR))
437 # define USE_PROTOENT_PTR
439 # undef USE_PROTOENT_PTR
442 /* The getservent getservbyname getservbyport using ptr? */
444 #if defined(HAS_GETSERVENT_R) && (GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBWR)
445 # define GETSERVENT_R_HAS_PTR
447 # undef GETSERVENT_R_HAS_PTR
449 #if defined(HAS_GETSERVBYNAME_R) && (GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR)
450 # define GETSERVBYNAME_R_HAS_PTR
452 # undef GETSERVBYNAME_R_HAS_PTR
454 #if defined(HAS_GETSERVBYPORT_R) && (GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR)
455 # define GETSERVBYPORT_R_HAS_PTR
457 # undef GETSERVBYPORT_R_HAS_PTR
460 /* Any of the getservent getservbyname getservbyport using ptr? */
462 #if (defined(GETSERVENT_R_HAS_PTR) || defined(GETSERVBYNAME_R_HAS_PTR) || defined(GETSERVBYPORT_R_HAS_PTR))
463 # define USE_SERVENT_PTR
465 # undef USE_SERVENT_PTR
468 /* The gethostent gethostbyaddr gethostbyname using buffer? */
470 #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)
471 # define GETHOSTENT_R_HAS_BUFFER
473 # undef GETHOSTENT_R_HAS_BUFFER
475 #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)
476 # define GETHOSTBYADDR_R_HAS_BUFFER
478 # undef GETHOSTBYADDR_R_HAS_BUFFER
480 #if defined(HAS_GETHOSTBYNAME_R) && (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE || GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE)
481 # define GETHOSTBYNAME_R_HAS_BUFFER
483 # undef GETHOSTBYNAME_R_HAS_BUFFER
486 /* Any of the gethostent gethostbyaddr gethostbyname using buffer? */
488 #if (defined(GETHOSTENT_R_HAS_BUFFER) || defined(GETHOSTBYADDR_R_HAS_BUFFER) || defined(GETHOSTBYNAME_R_HAS_BUFFER))
489 # define USE_HOSTENT_BUFFER
491 # undef USE_HOSTENT_BUFFER
494 /* The getnetent getnetbyaddr getnetbyname using buffer? */
496 #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)
497 # define GETNETENT_R_HAS_BUFFER
499 # undef GETNETENT_R_HAS_BUFFER
501 #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)
502 # define GETNETBYADDR_R_HAS_BUFFER
504 # undef GETNETBYADDR_R_HAS_BUFFER
506 #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)
507 # define GETNETBYNAME_R_HAS_BUFFER
509 # undef GETNETBYNAME_R_HAS_BUFFER
512 /* Any of the getnetent getnetbyaddr getnetbyname using buffer? */
514 #if (defined(GETNETENT_R_HAS_BUFFER) || defined(GETNETBYADDR_R_HAS_BUFFER) || defined(GETNETBYNAME_R_HAS_BUFFER))
515 # define USE_NETENT_BUFFER
517 # undef USE_NETENT_BUFFER
520 /* The getprotoent getprotobyname getprotobynumber using buffer? */
522 #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)
523 # define GETPROTOENT_R_HAS_BUFFER
525 # undef GETPROTOENT_R_HAS_BUFFER
527 #if defined(HAS_GETPROTOBYNAME_R) && (GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI)
528 # define GETPROTOBYNAME_R_HAS_BUFFER
530 # undef GETPROTOBYNAME_R_HAS_BUFFER
532 #if defined(HAS_GETPROTOBYNUMBER_R) && (GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR || GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_S_ISBI)
533 # define GETPROTOBYNUMBER_R_HAS_BUFFER
535 # undef GETPROTOBYNUMBER_R_HAS_BUFFER
538 /* Any of the getprotoent getprotobyname getprotobynumber using buffer? */
540 #if (defined(GETPROTOENT_R_HAS_BUFFER) || defined(GETPROTOBYNAME_R_HAS_BUFFER) || defined(GETPROTOBYNUMBER_R_HAS_BUFFER))
541 # define USE_PROTOENT_BUFFER
543 # undef USE_PROTOENT_BUFFER
546 /* The getservent getservbyname getservbyport using buffer? */
548 #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)
549 # define GETSERVENT_R_HAS_BUFFER
551 # undef GETSERVENT_R_HAS_BUFFER
553 #if defined(HAS_GETSERVBYNAME_R) && (GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR || GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_S_CCSBI)
554 # define GETSERVBYNAME_R_HAS_BUFFER
556 # undef GETSERVBYNAME_R_HAS_BUFFER
558 #if defined(HAS_GETSERVBYPORT_R) && (GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR || GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_S_ICSBI)
559 # define GETSERVBYPORT_R_HAS_BUFFER
561 # undef GETSERVBYPORT_R_HAS_BUFFER
564 /* Any of the getservent getservbyname getservbyport using buffer? */
566 #if (defined(GETSERVENT_R_HAS_BUFFER) || defined(GETSERVBYNAME_R_HAS_BUFFER) || defined(GETSERVBYPORT_R_HAS_BUFFER))
567 # define USE_SERVENT_BUFFER
569 # undef USE_SERVENT_BUFFER
572 /* The gethostent gethostbyaddr gethostbyname using errno? */
574 #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)
575 # define GETHOSTENT_R_HAS_ERRNO
577 # undef GETHOSTENT_R_HAS_ERRNO
579 #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)
580 # define GETHOSTBYADDR_R_HAS_ERRNO
582 # undef GETHOSTBYADDR_R_HAS_ERRNO
584 #if defined(HAS_GETHOSTBYNAME_R) && (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE || GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE)
585 # define GETHOSTBYNAME_R_HAS_ERRNO
587 # undef GETHOSTBYNAME_R_HAS_ERRNO
590 /* Any of the gethostent gethostbyaddr gethostbyname using errno? */
592 #if (defined(GETHOSTENT_R_HAS_ERRNO) || defined(GETHOSTBYADDR_R_HAS_ERRNO) || defined(GETHOSTBYNAME_R_HAS_ERRNO))
593 # define USE_HOSTENT_ERRNO
595 # undef USE_HOSTENT_ERRNO
598 /* The getnetent getnetbyaddr getnetbyname using errno? */
600 #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)
601 # define GETNETENT_R_HAS_ERRNO
603 # undef GETNETENT_R_HAS_ERRNO
605 #if defined(HAS_GETNETBYADDR_R) && (GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE || GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_uISBWRE)
606 # define GETNETBYADDR_R_HAS_ERRNO
608 # undef GETNETBYADDR_R_HAS_ERRNO
610 #if defined(HAS_GETNETBYNAME_R) && (GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE)
611 # define GETNETBYNAME_R_HAS_ERRNO
613 # undef GETNETBYNAME_R_HAS_ERRNO
616 /* Any of the getnetent getnetbyaddr getnetbyname using errno? */
618 #if (defined(GETNETENT_R_HAS_ERRNO) || defined(GETNETBYADDR_R_HAS_ERRNO) || defined(GETNETBYNAME_R_HAS_ERRNO))
619 # define USE_NETENT_ERRNO
621 # undef USE_NETENT_ERRNO
627 char* _asctime_buffer;
628 size_t _asctime_size;
629 #endif /* HAS_ASCTIME_R */
631 #if CRYPT_R_PROTO == REENTRANT_PROTO_B_CCD
634 struct crypt_data *_crypt_struct_buffer;
636 #endif /* HAS_CRYPT_R */
640 #endif /* HAS_CTIME_R */
642 struct drand48_data _drand48_struct;
643 double _drand48_double;
644 #endif /* HAS_DRAND48_R */
645 #ifdef HAS_GETGRNAM_R
646 struct group _grent_struct;
649 # ifdef USE_GRENT_PTR
650 struct group* _grent_ptr;
652 # ifdef USE_GRENT_FPTR
655 #endif /* HAS_GETGRNAM_R */
656 #ifdef HAS_GETHOSTBYNAME_R
657 struct hostent _hostent_struct;
658 # if GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
659 struct hostent_data _hostent_data;
661 char* _hostent_buffer;
662 size_t _hostent_size;
664 # ifdef USE_HOSTENT_PTR
665 struct hostent* _hostent_ptr;
667 # ifdef USE_HOSTENT_ERRNO
670 #endif /* HAS_GETHOSTBYNAME_R */
671 #ifdef HAS_GETLOGIN_R
672 char* _getlogin_buffer;
673 size_t _getlogin_size;
674 #endif /* HAS_GETLOGIN_R */
675 #ifdef HAS_GETNETBYNAME_R
676 struct netent _netent_struct;
677 # if GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
678 struct netent_data _netent_data;
680 char* _netent_buffer;
683 # ifdef USE_NETENT_PTR
684 struct netent* _netent_ptr;
686 # ifdef USE_NETENT_ERRNO
689 #endif /* HAS_GETNETBYNAME_R */
690 #ifdef HAS_GETPROTOBYNAME_R
691 struct protoent _protoent_struct;
692 # if GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
693 struct protoent_data _protoent_data;
695 char* _protoent_buffer;
696 size_t _protoent_size;
698 # ifdef USE_PROTOENT_PTR
699 struct protoent* _protoent_ptr;
701 # ifdef USE_PROTOENT_ERRNO
704 #endif /* HAS_GETPROTOBYNAME_R */
705 #ifdef HAS_GETPWNAM_R
706 struct passwd _pwent_struct;
709 # ifdef USE_PWENT_PTR
710 struct passwd* _pwent_ptr;
712 # ifdef USE_PWENT_FPTR
715 #endif /* HAS_GETPWNAM_R */
716 #ifdef HAS_GETSERVBYNAME_R
717 struct servent _servent_struct;
718 # if GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD
719 struct servent_data _servent_data;
721 char* _servent_buffer;
722 size_t _servent_size;
724 # ifdef USE_SERVENT_PTR
725 struct servent* _servent_ptr;
727 # ifdef USE_SERVENT_ERRNO
730 #endif /* HAS_GETSERVBYNAME_R */
731 #ifdef HAS_GETSPNAM_R
732 struct spwd _spent_struct;
735 # ifdef USE_SPENT_PTR
736 struct spwd* _spent_ptr;
738 # ifdef USE_SPENT_FPTR
741 #endif /* HAS_GETSPNAM_R */
743 struct random_data _random_struct;
744 # if RANDOM_R_PROTO == REENTRANT_PROTO_I_iS
747 # if RANDOM_R_PROTO == REENTRANT_PROTO_I_lS
750 # if RANDOM_R_PROTO == REENTRANT_PROTO_I_St
751 int32_t _random_retval;
753 #endif /* HAS_RANDOM_R */
755 struct dirent* _readdir_struct;
756 size_t _readdir_size;
757 # if READDIR_R_PROTO == REENTRANT_PROTO_I_TSR
758 struct dirent* _readdir_ptr;
760 #endif /* HAS_READDIR_R */
761 #ifdef HAS_READDIR64_R
762 struct dirent64* _readdir64_struct;
763 size_t _readdir64_size;
764 # if READDIR64_R_PROTO == REENTRANT_PROTO_I_TSR
765 struct dirent64* _readdir64_ptr;
767 #endif /* HAS_READDIR64_R */
768 #ifdef HAS_SETLOCALE_R
769 char* _setlocale_buffer;
770 size_t _setlocale_size;
771 #endif /* HAS_SETLOCALE_R */
773 struct random_data _srandom_struct;
774 #endif /* HAS_SRANDOM_R */
775 #ifdef HAS_STRERROR_R
776 char* _strerror_buffer;
777 size_t _strerror_size;
778 #endif /* HAS_STRERROR_R */
780 char* _ttyname_buffer;
781 size_t _ttyname_size;
782 #endif /* HAS_TTYNAME_R */
784 int dummy; /* cannot have empty structs */
790 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
792 # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_B_SB
793 # define asctime(a) asctime_r(a, PL_reentrant_buffer->_asctime_buffer)
795 # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_B_SBI
796 # define asctime(a) asctime_r(a, PL_reentrant_buffer->_asctime_buffer, PL_reentrant_buffer->_asctime_size)
798 # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_I_SB
799 # define asctime(a) (asctime_r(a, PL_reentrant_buffer->_asctime_buffer) == 0 ? PL_reentrant_buffer->_asctime_buffer : 0)
801 # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_I_SBI
802 # define asctime(a) (asctime_r(a, PL_reentrant_buffer->_asctime_buffer, PL_reentrant_buffer->_asctime_size) == 0 ? PL_reentrant_buffer->_asctime_buffer : 0)
805 #endif /* HAS_ASCTIME_R */
808 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
810 # if !defined(crypt) && CRYPT_R_PROTO == REENTRANT_PROTO_B_CCS
811 # define crypt(a, b) crypt_r(a, b, PL_reentrant_buffer->_crypt_struct_buffer)
813 # if !defined(crypt) && CRYPT_R_PROTO == REENTRANT_PROTO_B_CCD
814 # define crypt(a, b) crypt_r(a, b, &PL_reentrant_buffer->_crypt_data)
817 #endif /* HAS_CRYPT_R */
820 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
822 # if !defined(ctermid) && CTERMID_R_PROTO == REENTRANT_PROTO_B_B
823 # define ctermid(a) ctermid_r(a)
826 #endif /* HAS_CTERMID_R */
829 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
831 # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_B_SB
832 # define ctime(a) ctime_r(a, PL_reentrant_buffer->_ctime_buffer)
834 # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_B_SBI
835 # define ctime(a) ctime_r(a, PL_reentrant_buffer->_ctime_buffer, PL_reentrant_buffer->_ctime_size)
837 # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_I_SB
838 # define ctime(a) (ctime_r(a, PL_reentrant_buffer->_ctime_buffer) == 0 ? PL_reentrant_buffer->_ctime_buffer : 0)
840 # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_I_SBI
841 # define ctime(a) (ctime_r(a, PL_reentrant_buffer->_ctime_buffer, PL_reentrant_buffer->_ctime_size) == 0 ? PL_reentrant_buffer->_ctime_buffer : 0)
844 #endif /* HAS_CTIME_R */
847 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
849 # if !defined(drand48) && DRAND48_R_PROTO == REENTRANT_PROTO_I_ST
850 # define drand48() (drand48_r(&PL_reentrant_buffer->_drand48_struct, &PL_reentrant_buffer->_drand48_double) == 0 ? PL_reentrant_buffer->_drand48_double : 0)
853 #endif /* HAS_DRAND48_R */
855 #ifdef HAS_ENDGRENT_R
856 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
858 # if !defined(endgrent) && ENDGRENT_R_PROTO == REENTRANT_PROTO_I_H
859 # define endgrent() (endgrent_r(&PL_reentrant_buffer->_grent_fptr) == 0 ? 1 : 0)
861 # if !defined(endgrent) && ENDGRENT_R_PROTO == REENTRANT_PROTO_V_H
862 # define endgrent() endgrent_r(&PL_reentrant_buffer->_grent_fptr)
865 #endif /* HAS_ENDGRENT_R */
867 #ifdef HAS_ENDHOSTENT_R
868 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
870 # if !defined(endhostent) && ENDHOSTENT_R_PROTO == REENTRANT_PROTO_I_D
871 # define endhostent() (endhostent_r(&PL_reentrant_buffer->_hostent_data) == 0 ? 1 : 0)
873 # if !defined(endhostent) && ENDHOSTENT_R_PROTO == REENTRANT_PROTO_V_D
874 # define endhostent() endhostent_r(&PL_reentrant_buffer->_hostent_data)
877 #endif /* HAS_ENDHOSTENT_R */
879 #ifdef HAS_ENDNETENT_R
880 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
882 # if !defined(endnetent) && ENDNETENT_R_PROTO == REENTRANT_PROTO_I_D
883 # define endnetent() (endnetent_r(&PL_reentrant_buffer->_netent_data) == 0 ? 1 : 0)
885 # if !defined(endnetent) && ENDNETENT_R_PROTO == REENTRANT_PROTO_V_D
886 # define endnetent() endnetent_r(&PL_reentrant_buffer->_netent_data)
889 #endif /* HAS_ENDNETENT_R */
891 #ifdef HAS_ENDPROTOENT_R
892 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
894 # if !defined(endprotoent) && ENDPROTOENT_R_PROTO == REENTRANT_PROTO_I_D
895 # define endprotoent() (endprotoent_r(&PL_reentrant_buffer->_protoent_data) == 0 ? 1 : 0)
897 # if !defined(endprotoent) && ENDPROTOENT_R_PROTO == REENTRANT_PROTO_V_D
898 # define endprotoent() endprotoent_r(&PL_reentrant_buffer->_protoent_data)
901 #endif /* HAS_ENDPROTOENT_R */
903 #ifdef HAS_ENDPWENT_R
904 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
906 # if !defined(endpwent) && ENDPWENT_R_PROTO == REENTRANT_PROTO_I_H
907 # define endpwent() (endpwent_r(&PL_reentrant_buffer->_pwent_fptr) == 0 ? 1 : 0)
909 # if !defined(endpwent) && ENDPWENT_R_PROTO == REENTRANT_PROTO_V_H
910 # define endpwent() endpwent_r(&PL_reentrant_buffer->_pwent_fptr)
913 #endif /* HAS_ENDPWENT_R */
915 #ifdef HAS_ENDSERVENT_R
916 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
918 # if !defined(endservent) && ENDSERVENT_R_PROTO == REENTRANT_PROTO_I_D
919 # define endservent() (endservent_r(&PL_reentrant_buffer->_servent_data) == 0 ? 1 : 0)
921 # if !defined(endservent) && ENDSERVENT_R_PROTO == REENTRANT_PROTO_V_D
922 # define endservent() endservent_r(&PL_reentrant_buffer->_servent_data)
925 #endif /* HAS_ENDSERVENT_R */
927 #ifdef HAS_GETGRENT_R
928 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
930 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBWR
931 # 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))
933 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIR
934 # 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))
936 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_S_SBW
937 # 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))
939 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_S_SBI
940 # 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))
942 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBI
943 # 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))
945 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIH
946 # 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))
949 #endif /* HAS_GETGRENT_R */
951 #ifdef HAS_GETGRGID_R
952 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
954 # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBWR
955 # 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))
957 # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBIR
958 # 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))
960 # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBI
961 # 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))
963 # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_S_TSBI
964 # 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))
967 #endif /* HAS_GETGRGID_R */
969 #ifdef HAS_GETGRNAM_R
970 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
972 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR
973 # 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))
975 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR
976 # 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))
978 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_S_CBI
979 # 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))
981 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBI
982 # 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))
984 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_S_CSBI
985 # 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))
988 #endif /* HAS_GETGRNAM_R */
990 #ifdef HAS_GETHOSTBYADDR_R
991 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
992 # undef gethostbyaddr
993 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISBWRE
994 # 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))
996 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBWIE
997 # 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))
999 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBIE
1000 # 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))
1002 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TWISBIE
1003 # 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))
1005 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CIISBIE
1006 # 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 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CSBIE
1009 # 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))
1011 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TSBIE
1012 # 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))
1014 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISD
1015 # 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))
1017 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CIISD
1018 # 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))
1020 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CII
1021 # 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))
1023 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_TsISBWRE
1024 # 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))
1027 #endif /* HAS_GETHOSTBYADDR_R */
1029 #ifdef HAS_GETHOSTBYNAME_R
1030 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1031 # undef gethostbyname
1032 # if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE
1033 # 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))
1035 # if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE
1036 # 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))
1038 # if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
1039 # 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))
1042 #endif /* HAS_GETHOSTBYNAME_R */
1044 #ifdef HAS_GETHOSTENT_R
1045 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1047 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBWRE
1048 # 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))
1050 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBIE
1051 # 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))
1053 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBIE
1054 # 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))
1056 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBI
1057 # 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))
1059 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBI
1060 # 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))
1062 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SD
1063 # 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))
1066 #endif /* HAS_GETHOSTENT_R */
1068 #ifdef HAS_GETLOGIN_R
1069 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1071 # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_I_BW
1072 # 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))
1074 # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_I_BI
1075 # 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))
1077 # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_B_BW
1078 # define getlogin() getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size)
1080 # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_B_BI
1081 # define getlogin() getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size)
1084 #endif /* HAS_GETLOGIN_R */
1086 #ifdef HAS_GETNETBYADDR_R
1087 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1088 # undef getnetbyaddr
1089 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE
1090 # 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))
1092 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_LISBI
1093 # 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))
1095 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_S_TISBI
1096 # 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))
1098 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_S_LISBI
1099 # 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))
1101 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_TISD
1102 # 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))
1104 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_LISD
1105 # 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))
1107 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_IISD
1108 # 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 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_uISBWRE
1111 # 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))
1114 #endif /* HAS_GETNETBYADDR_R */
1116 #ifdef HAS_GETNETBYNAME_R
1117 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1118 # undef getnetbyname
1119 # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE
1120 # 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))
1122 # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBI
1123 # 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))
1125 # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI
1126 # 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))
1128 # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
1129 # 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))
1132 #endif /* HAS_GETNETBYNAME_R */
1134 #ifdef HAS_GETNETENT_R
1135 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1137 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBWRE
1138 # 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))
1140 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBIE
1141 # 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))
1143 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBIE
1144 # 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))
1146 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBI
1147 # 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))
1149 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBI
1150 # 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))
1152 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SD
1153 # 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))
1156 #endif /* HAS_GETNETENT_R */
1158 #ifdef HAS_GETPROTOBYNAME_R
1159 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1160 # undef getprotobyname
1161 # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR
1162 # 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))
1164 # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI
1165 # 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))
1167 # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
1168 # 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))
1171 #endif /* HAS_GETPROTOBYNAME_R */
1173 #ifdef HAS_GETPROTOBYNUMBER_R
1174 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1175 # undef getprotobynumber
1176 # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR
1177 # 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))
1179 # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_S_ISBI
1180 # 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))
1182 # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISD
1183 # 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))
1186 #endif /* HAS_GETPROTOBYNUMBER_R */
1188 #ifdef HAS_GETPROTOENT_R
1189 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1191 # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBWR
1192 # 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))
1194 # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBI
1195 # 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))
1197 # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_S_SBI
1198 # 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))
1200 # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SD
1201 # 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))
1204 #endif /* HAS_GETPROTOENT_R */
1206 #ifdef HAS_GETPWENT_R
1207 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1209 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBWR
1210 # 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))
1212 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIR
1213 # 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))
1215 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_S_SBW
1216 # 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))
1218 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_S_SBI
1219 # 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))
1221 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBI
1222 # 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))
1224 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIH
1225 # 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))
1228 #endif /* HAS_GETPWENT_R */
1230 #ifdef HAS_GETPWNAM_R
1231 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1233 # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR
1234 # 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))
1236 # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR
1237 # 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))
1239 # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_S_CSBI
1240 # 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))
1242 # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBI
1243 # 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))
1246 #endif /* HAS_GETPWNAM_R */
1248 #ifdef HAS_GETPWUID_R
1249 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1251 # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBWR
1252 # 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))
1254 # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBIR
1255 # 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))
1257 # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBI
1258 # 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))
1260 # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_S_TSBI
1261 # 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))
1264 #endif /* HAS_GETPWUID_R */
1266 #ifdef HAS_GETSERVBYNAME_R
1267 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1268 # undef getservbyname
1269 # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR
1270 # 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))
1272 # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_S_CCSBI
1273 # 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))
1275 # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD
1276 # 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))
1279 #endif /* HAS_GETSERVBYNAME_R */
1281 #ifdef HAS_GETSERVBYPORT_R
1282 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1283 # undef getservbyport
1284 # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR
1285 # 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))
1287 # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_S_ICSBI
1288 # 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))
1290 # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSD
1291 # 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))
1294 #endif /* HAS_GETSERVBYPORT_R */
1296 #ifdef HAS_GETSERVENT_R
1297 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1299 # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBWR
1300 # 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))
1302 # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBI
1303 # 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))
1305 # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_S_SBI
1306 # 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))
1308 # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SD
1309 # 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))
1312 #endif /* HAS_GETSERVENT_R */
1314 #ifdef HAS_GETSPNAM_R
1315 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1317 # if !defined(getspnam) && GETSPNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR
1318 # 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))
1320 # if !defined(getspnam) && GETSPNAM_R_PROTO == REENTRANT_PROTO_S_CSBI
1321 # 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))
1324 #endif /* HAS_GETSPNAM_R */
1327 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1329 # if !defined(random) && RANDOM_R_PROTO == REENTRANT_PROTO_I_iS
1330 # define random() (random_r(&PL_reentrant_buffer->_random_retval, &PL_reentrant_buffer->_random_struct) == 0 ? PL_reentrant_buffer->_random_retval : 0)
1332 # if !defined(random) && RANDOM_R_PROTO == REENTRANT_PROTO_I_lS
1333 # define random() (random_r(&PL_reentrant_buffer->_random_retval, &PL_reentrant_buffer->_random_struct) == 0 ? PL_reentrant_buffer->_random_retval : 0)
1335 # if !defined(random) && RANDOM_R_PROTO == REENTRANT_PROTO_I_St
1336 # define random() (random_r(&PL_reentrant_buffer->_random_struct, &PL_reentrant_buffer->_random_retval) == 0 ? PL_reentrant_buffer->_random_retval : 0)
1339 #endif /* HAS_RANDOM_R */
1341 #ifdef HAS_READDIR_R
1342 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1344 # if !defined(readdir) && READDIR_R_PROTO == REENTRANT_PROTO_I_TSR
1345 # define readdir(a) (readdir_r(a, PL_reentrant_buffer->_readdir_struct, &PL_reentrant_buffer->_readdir_ptr) == 0 ? PL_reentrant_buffer->_readdir_ptr : 0)
1347 # if !defined(readdir) && READDIR_R_PROTO == REENTRANT_PROTO_I_TS
1348 # define readdir(a) (readdir_r(a, PL_reentrant_buffer->_readdir_struct) == 0 ? PL_reentrant_buffer->_readdir_struct : 0)
1351 #endif /* HAS_READDIR_R */
1353 #ifdef HAS_READDIR64_R
1354 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1356 # if !defined(readdir64) && READDIR64_R_PROTO == REENTRANT_PROTO_I_TSR
1357 # define readdir64(a) (readdir64_r(a, PL_reentrant_buffer->_readdir64_struct, &PL_reentrant_buffer->_readdir64_ptr) == 0 ? PL_reentrant_buffer->_readdir64_ptr : 0)
1359 # if !defined(readdir64) && READDIR64_R_PROTO == REENTRANT_PROTO_I_TS
1360 # define readdir64(a) (readdir64_r(a, PL_reentrant_buffer->_readdir64_struct) == 0 ? PL_reentrant_buffer->_readdir64_struct : 0)
1363 #endif /* HAS_READDIR64_R */
1365 #ifdef HAS_SETGRENT_R
1366 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1368 # if !defined(setgrent) && SETGRENT_R_PROTO == REENTRANT_PROTO_I_H
1369 # define setgrent() (setgrent_r(&PL_reentrant_buffer->_grent_fptr) == 0 ? 1 : 0)
1371 # if !defined(setgrent) && SETGRENT_R_PROTO == REENTRANT_PROTO_V_H
1372 # define setgrent() setgrent_r(&PL_reentrant_buffer->_grent_fptr)
1375 #endif /* HAS_SETGRENT_R */
1377 #ifdef HAS_SETHOSTENT_R
1378 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1380 # if !defined(sethostent) && SETHOSTENT_R_PROTO == REENTRANT_PROTO_I_ID
1381 # define sethostent(a) (sethostent_r(a, &PL_reentrant_buffer->_hostent_data) == 0 ? 1 : 0)
1383 # if !defined(sethostent) && SETHOSTENT_R_PROTO == REENTRANT_PROTO_V_ID
1384 # define sethostent(a) sethostent_r(a, &PL_reentrant_buffer->_hostent_data)
1387 #endif /* HAS_SETHOSTENT_R */
1389 #ifdef HAS_SETLOCALE_R
1390 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1392 # if !defined(setlocale) && SETLOCALE_R_PROTO == REENTRANT_PROTO_I_ICBI
1393 # 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)
1396 #endif /* HAS_SETLOCALE_R */
1398 #ifdef HAS_SETNETENT_R
1399 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1401 # if !defined(setnetent) && SETNETENT_R_PROTO == REENTRANT_PROTO_I_ID
1402 # define setnetent(a) (setnetent_r(a, &PL_reentrant_buffer->_netent_data) == 0 ? 1 : 0)
1404 # if !defined(setnetent) && SETNETENT_R_PROTO == REENTRANT_PROTO_V_ID
1405 # define setnetent(a) setnetent_r(a, &PL_reentrant_buffer->_netent_data)
1408 #endif /* HAS_SETNETENT_R */
1410 #ifdef HAS_SETPROTOENT_R
1411 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1413 # if !defined(setprotoent) && SETPROTOENT_R_PROTO == REENTRANT_PROTO_I_ID
1414 # define setprotoent(a) (setprotoent_r(a, &PL_reentrant_buffer->_protoent_data) == 0 ? 1 : 0)
1416 # if !defined(setprotoent) && SETPROTOENT_R_PROTO == REENTRANT_PROTO_V_ID
1417 # define setprotoent(a) setprotoent_r(a, &PL_reentrant_buffer->_protoent_data)
1420 #endif /* HAS_SETPROTOENT_R */
1422 #ifdef HAS_SETPWENT_R
1423 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1425 # if !defined(setpwent) && SETPWENT_R_PROTO == REENTRANT_PROTO_I_H
1426 # define setpwent() (setpwent_r(&PL_reentrant_buffer->_pwent_fptr) == 0 ? 1 : 0)
1428 # if !defined(setpwent) && SETPWENT_R_PROTO == REENTRANT_PROTO_V_H
1429 # define setpwent() setpwent_r(&PL_reentrant_buffer->_pwent_fptr)
1432 #endif /* HAS_SETPWENT_R */
1434 #ifdef HAS_SETSERVENT_R
1435 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1437 # if !defined(setservent) && SETSERVENT_R_PROTO == REENTRANT_PROTO_I_ID
1438 # define setservent(a) (setservent_r(a, &PL_reentrant_buffer->_servent_data) == 0 ? 1 : 0)
1440 # if !defined(setservent) && SETSERVENT_R_PROTO == REENTRANT_PROTO_V_ID
1441 # define setservent(a) setservent_r(a, &PL_reentrant_buffer->_servent_data)
1444 #endif /* HAS_SETSERVENT_R */
1446 #ifdef HAS_SRAND48_R
1447 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1449 # if !defined(srand48) && SRAND48_R_PROTO == REENTRANT_PROTO_I_LS
1450 # define srand48(a) (srand48_r(a, &PL_reentrant_buffer->_drand48_struct) == 0 ? &PL_reentrant_buffer->_drand48_struct : 0)
1453 #endif /* HAS_SRAND48_R */
1455 #ifdef HAS_SRANDOM_R
1456 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1458 # if !defined(srandom) && SRANDOM_R_PROTO == REENTRANT_PROTO_I_TS
1459 # define srandom(a) (srandom_r(a, &PL_reentrant_buffer->_srandom_struct) == 0 ? &PL_reentrant_buffer->_srandom_struct : 0)
1462 #endif /* HAS_SRANDOM_R */
1464 #ifdef HAS_STRERROR_R
1465 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1467 # if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_I_IBW
1468 # define strerror(a) (strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size) == 0 ? PL_reentrant_buffer->_strerror_buffer : 0)
1470 # if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_I_IBI
1471 # define strerror(a) (strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size) == 0 ? PL_reentrant_buffer->_strerror_buffer : 0)
1473 # if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_B_IBW
1474 # define strerror(a) strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size)
1477 #endif /* HAS_STRERROR_R */
1480 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1482 # if !defined(tmpnam) && TMPNAM_R_PROTO == REENTRANT_PROTO_B_B
1483 # define tmpnam(a) tmpnam_r(a)
1486 #endif /* HAS_TMPNAM_R */
1488 #ifdef HAS_TTYNAME_R
1489 # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1)
1491 # if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_I_IBW
1492 # define ttyname(a) (ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size) == 0 ? PL_reentrant_buffer->_ttyname_buffer : 0)
1494 # if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_I_IBI
1495 # define ttyname(a) (ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size) == 0 ? PL_reentrant_buffer->_ttyname_buffer : 0)
1497 # if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_B_IBI
1498 # define ttyname(a) ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size)
1501 #endif /* HAS_TTYNAME_R */
1505 #endif /* USE_REENTRANT_API */