4 * Copyright (C) 2002, 2003, by Larry Wall and others
6 * You may distribute under the terms of either the GNU General Public
7 * License or the Artistic License, as specified in the README file.
9 * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
10 * This file is built by reentrl.pl from data in reentr.pl.
16 #ifdef USE_REENTRANT_API
18 /* Deprecations: some platforms have the said reentrant interfaces
19 * but they are declared obsolete and are not to be used. Often this
20 * means that the platform has threadsafed the interfaces (hopefully).
21 * All this is OS version dependent, so we are of course fooling ourselves.
22 * If you know of more deprecations on some platforms, please add your own. */
27 # undef HAS_ENDGRENT_R
28 # undef HAS_ENDPWENT_R
29 # undef HAS_GETGRENT_R
30 # undef HAS_GETPWENT_R
31 # undef HAS_SETLOCALE_R
33 # undef HAS_STRERROR_R
34 # define NETDB_R_OBSOLETE
37 #if defined(__osf__) && defined(__alpha) /* Tru64 aka Digital UNIX */
39 # undef HAS_STRERROR_R
40 # define NETDB_R_OBSOLETE
43 #ifdef NETDB_R_OBSOLETE
44 # undef HAS_ENDHOSTENT_R
45 # undef HAS_ENDNETENT_R
46 # undef HAS_ENDPROTOENT_R
47 # undef HAS_ENDSERVENT_R
48 # undef HAS_GETHOSTBYADDR_R
49 # undef HAS_GETHOSTBYNAME_R
50 # undef HAS_GETHOSTENT_R
51 # undef HAS_GETNETBYADDR_R
52 # undef HAS_GETNETBYNAME_R
53 # undef HAS_GETNETENT_R
54 # undef HAS_GETPROTOBYNAME_R
55 # undef HAS_GETPROTOBYNUMBER_R
56 # undef HAS_GETPROTOENT_R
57 # undef HAS_GETSERVBYNAME_R
58 # undef HAS_GETSERVBYPORT_R
59 # undef HAS_GETSERVENT_R
60 # undef HAS_SETHOSTENT_R
61 # undef HAS_SETNETENT_R
62 # undef HAS_SETPROTOENT_R
63 # undef HAS_SETSERVENT_R
76 # include <stdlib.h> /* drand48_data */
89 #define REENTRANT_PROTO_B_B 1
90 #define REENTRANT_PROTO_B_BI 2
91 #define REENTRANT_PROTO_B_BW 3
92 #define REENTRANT_PROTO_B_CCD 4
93 #define REENTRANT_PROTO_B_CCS 5
94 #define REENTRANT_PROTO_B_IBI 6
95 #define REENTRANT_PROTO_B_IBW 7
96 #define REENTRANT_PROTO_B_SB 8
97 #define REENTRANT_PROTO_B_SBI 9
98 #define REENTRANT_PROTO_I_BI 10
99 #define REENTRANT_PROTO_I_BW 11
100 #define REENTRANT_PROTO_I_CCSBWR 12
101 #define REENTRANT_PROTO_I_CCSD 13
102 #define REENTRANT_PROTO_I_CII 14
103 #define REENTRANT_PROTO_I_CIISD 15
104 #define REENTRANT_PROTO_I_CSBI 16
105 #define REENTRANT_PROTO_I_CSBIR 17
106 #define REENTRANT_PROTO_I_CSBWR 18
107 #define REENTRANT_PROTO_I_CSBWRE 19
108 #define REENTRANT_PROTO_I_CSD 20
109 #define REENTRANT_PROTO_I_CWISBWRE 21
110 #define REENTRANT_PROTO_I_CWISD 22
111 #define REENTRANT_PROTO_I_D 23
112 #define REENTRANT_PROTO_I_H 24
113 #define REENTRANT_PROTO_I_IBI 25
114 #define REENTRANT_PROTO_I_IBW 26
115 #define REENTRANT_PROTO_I_ICBI 27
116 #define REENTRANT_PROTO_I_ICSBWR 28
117 #define REENTRANT_PROTO_I_ICSD 29
118 #define REENTRANT_PROTO_I_ID 30
119 #define REENTRANT_PROTO_I_IISD 31
120 #define REENTRANT_PROTO_I_ISBWR 32
121 #define REENTRANT_PROTO_I_ISD 33
122 #define REENTRANT_PROTO_I_LISBI 34
123 #define REENTRANT_PROTO_I_LISD 35
124 #define REENTRANT_PROTO_I_LS 36
125 #define REENTRANT_PROTO_I_SB 37
126 #define REENTRANT_PROTO_I_SBI 38
127 #define REENTRANT_PROTO_I_SBIE 39
128 #define REENTRANT_PROTO_I_SBIH 40
129 #define REENTRANT_PROTO_I_SBIR 41
130 #define REENTRANT_PROTO_I_SBWR 42
131 #define REENTRANT_PROTO_I_SBWRE 43
132 #define REENTRANT_PROTO_I_SD 44
133 #define REENTRANT_PROTO_I_ST 45
134 #define REENTRANT_PROTO_I_St 46
135 #define REENTRANT_PROTO_I_TISD 47
136 #define REENTRANT_PROTO_I_TS 48
137 #define REENTRANT_PROTO_I_TSBI 49
138 #define REENTRANT_PROTO_I_TSBIR 50
139 #define REENTRANT_PROTO_I_TSBWR 51
140 #define REENTRANT_PROTO_I_TSR 52
141 #define REENTRANT_PROTO_I_TsISBWRE 53
142 #define REENTRANT_PROTO_I_UISBWRE 54
143 #define REENTRANT_PROTO_I_iS 55
144 #define REENTRANT_PROTO_I_lS 56
145 #define REENTRANT_PROTO_I_uISBWRE 57
146 #define REENTRANT_PROTO_S_CBI 58
147 #define REENTRANT_PROTO_S_CCSBI 59
148 #define REENTRANT_PROTO_S_CIISBIE 60
149 #define REENTRANT_PROTO_S_CSBI 61
150 #define REENTRANT_PROTO_S_CSBIE 62
151 #define REENTRANT_PROTO_S_CWISBIE 63
152 #define REENTRANT_PROTO_S_CWISBWIE 64
153 #define REENTRANT_PROTO_S_ICSBI 65
154 #define REENTRANT_PROTO_S_ISBI 66
155 #define REENTRANT_PROTO_S_LISBI 67
156 #define REENTRANT_PROTO_S_SBI 68
157 #define REENTRANT_PROTO_S_SBIE 69
158 #define REENTRANT_PROTO_S_SBW 70
159 #define REENTRANT_PROTO_S_TISBI 71
160 #define REENTRANT_PROTO_S_TS 72
161 #define REENTRANT_PROTO_S_TSBI 73
162 #define REENTRANT_PROTO_S_TSBIE 74
163 #define REENTRANT_PROTO_S_TWISBIE 75
164 #define REENTRANT_PROTO_V_D 76
165 #define REENTRANT_PROTO_V_H 77
166 #define REENTRANT_PROTO_V_ID 78
168 /* Defines for indicating which special features are supported. */
170 /* The getgrent getgrgid getgrnam using buffer? */
172 #if defined(HAS_GETGRENT_R) && (GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIR || GETGRENT_R_PROTO == REENTRANT_PROTO_S_SBW || GETGRENT_R_PROTO == REENTRANT_PROTO_S_SBI || GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBI || GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIH)
173 # define GETGRENT_R_HAS_BUFFER
175 # undef GETGRENT_R_HAS_BUFFER
177 #if defined(HAS_GETGRGID_R) && (GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBWR || GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBIR || GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBI || GETGRGID_R_PROTO == REENTRANT_PROTO_S_TSBI)
178 # define GETGRGID_R_HAS_BUFFER
180 # undef GETGRGID_R_HAS_BUFFER
182 #if defined(HAS_GETGRNAM_R) && (GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR || GETGRNAM_R_PROTO == REENTRANT_PROTO_S_CBI || GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBI || GETGRNAM_R_PROTO == REENTRANT_PROTO_S_CSBI)
183 # define GETGRNAM_R_HAS_BUFFER
185 # undef GETGRNAM_R_HAS_BUFFER
188 /* Any of the getgrent getgrgid getgrnam using buffer? */
190 #if (defined(GETGRENT_R_HAS_BUFFER) || defined(GETGRGID_R_HAS_BUFFER) || defined(GETGRNAM_R_HAS_BUFFER))
191 # define USE_GRENT_BUFFER
193 # undef USE_GRENT_BUFFER
196 /* The getgrent getgrgid getgrnam using ptr? */
198 #if defined(HAS_GETGRENT_R) && (GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIR)
199 # define GETGRENT_R_HAS_PTR
201 # undef GETGRENT_R_HAS_PTR
203 #if defined(HAS_GETGRGID_R) && (GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBWR || GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBIR)
204 # define GETGRGID_R_HAS_PTR
206 # undef GETGRGID_R_HAS_PTR
208 #if defined(HAS_GETGRNAM_R) && (GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR)
209 # define GETGRNAM_R_HAS_PTR
211 # undef GETGRNAM_R_HAS_PTR
214 /* Any of the getgrent getgrgid getgrnam using ptr? */
216 #if (defined(GETGRENT_R_HAS_PTR) || defined(GETGRGID_R_HAS_PTR) || defined(GETGRNAM_R_HAS_PTR))
217 # define USE_GRENT_PTR
219 # undef USE_GRENT_PTR
222 /* The getpwent getpwnam getpwuid using ptr? */
224 #if defined(HAS_GETPWENT_R) && (GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIR)
225 # define GETPWENT_R_HAS_PTR
227 # undef GETPWENT_R_HAS_PTR
229 #if defined(HAS_GETPWNAM_R) && (GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR)
230 # define GETPWNAM_R_HAS_PTR
232 # undef GETPWNAM_R_HAS_PTR
234 #if defined(HAS_GETPWUID_R) && (GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBWR || GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBIR)
235 # define GETPWUID_R_HAS_PTR
237 # undef GETPWUID_R_HAS_PTR
240 /* Any of the getpwent getpwnam getpwuid using ptr? */
242 #if (defined(GETPWENT_R_HAS_PTR) || defined(GETPWNAM_R_HAS_PTR) || defined(GETPWUID_R_HAS_PTR))
243 # define USE_PWENT_PTR
245 # undef USE_PWENT_PTR
248 /* The getspent getspnam using ptr? */
250 #if defined(HAS_GETSPNAM_R) && (GETSPNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR)
251 # define GETSPNAM_R_HAS_PTR
253 # undef GETSPNAM_R_HAS_PTR
256 /* Any of the getspent getspnam using ptr? */
258 #if (defined(GETSPENT_R_HAS_PTR) || defined(GETSPNAM_R_HAS_PTR))
259 # define USE_SPENT_PTR
261 # undef USE_SPENT_PTR
264 /* The getgrent getgrgid getgrnam setgrent endgrent using fptr? */
266 #if defined(HAS_GETGRENT_R) && (GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIH)
267 # define GETGRENT_R_HAS_FPTR
269 # undef GETGRENT_R_HAS_FPTR
271 #if defined(HAS_SETGRENT_R) && (SETGRENT_R_PROTO == REENTRANT_PROTO_I_H || SETGRENT_R_PROTO == REENTRANT_PROTO_V_H)
272 # define SETGRENT_R_HAS_FPTR
274 # undef SETGRENT_R_HAS_FPTR
276 #if defined(HAS_ENDGRENT_R) && (ENDGRENT_R_PROTO == REENTRANT_PROTO_I_H || ENDGRENT_R_PROTO == REENTRANT_PROTO_V_H)
277 # define ENDGRENT_R_HAS_FPTR
279 # undef ENDGRENT_R_HAS_FPTR
282 /* Any of the getgrent getgrgid getgrnam setgrent endgrent using fptr? */
284 #if (defined(GETGRENT_R_HAS_FPTR) || defined(GETGRGID_R_HAS_FPTR) || defined(GETGRNAM_R_HAS_FPTR) || defined(SETGRENT_R_HAS_FPTR) || defined(ENDGRENT_R_HAS_FPTR))
285 # define USE_GRENT_FPTR
287 # undef USE_GRENT_FPTR
290 /* The getpwent getpwnam getpwuid setpwent endpwent using fptr? */
292 #if defined(HAS_GETPWENT_R) && (GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIH)
293 # define GETPWENT_R_HAS_FPTR
295 # undef GETPWENT_R_HAS_FPTR
297 #if defined(HAS_SETPWENT_R) && (SETPWENT_R_PROTO == REENTRANT_PROTO_I_H || SETPWENT_R_PROTO == REENTRANT_PROTO_V_H)
298 # define SETPWENT_R_HAS_FPTR
300 # undef SETPWENT_R_HAS_FPTR
302 #if defined(HAS_ENDPWENT_R) && (ENDPWENT_R_PROTO == REENTRANT_PROTO_I_H || ENDPWENT_R_PROTO == REENTRANT_PROTO_V_H)
303 # define ENDPWENT_R_HAS_FPTR
305 # undef ENDPWENT_R_HAS_FPTR
308 /* Any of the getpwent getpwnam getpwuid setpwent endpwent using fptr? */
310 #if (defined(GETPWENT_R_HAS_FPTR) || defined(GETPWNAM_R_HAS_FPTR) || defined(GETPWUID_R_HAS_FPTR) || defined(SETPWENT_R_HAS_FPTR) || defined(ENDPWENT_R_HAS_FPTR))
311 # define USE_PWENT_FPTR
313 # undef USE_PWENT_FPTR
316 /* The getpwent getpwgid getpwnam using buffer? */
318 #if defined(HAS_GETPWENT_R) && (GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIR || GETPWENT_R_PROTO == REENTRANT_PROTO_S_SBW || GETPWENT_R_PROTO == REENTRANT_PROTO_S_SBI || GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBI || GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIH)
319 # define GETPWENT_R_HAS_BUFFER
321 # undef GETPWENT_R_HAS_BUFFER
323 #if defined(HAS_GETPWNAM_R) && (GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR || GETPWNAM_R_PROTO == REENTRANT_PROTO_S_CSBI || GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBI)
324 # define GETPWNAM_R_HAS_BUFFER
326 # undef GETPWNAM_R_HAS_BUFFER
329 /* Any of the getpwent getpwgid getpwnam using buffer? */
331 #if (defined(GETPWENT_R_HAS_BUFFER) || defined(GETPWGID_R_HAS_BUFFER) || defined(GETPWNAM_R_HAS_BUFFER))
332 # define USE_PWENT_BUFFER
334 # undef USE_PWENT_BUFFER
337 /* The gethostent gethostbyaddr gethostbyname using ptr? */
339 #if defined(HAS_GETHOSTENT_R) && (GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBWRE)
340 # define GETHOSTENT_R_HAS_PTR
342 # undef GETHOSTENT_R_HAS_PTR
344 #if defined(HAS_GETHOSTBYADDR_R) && (GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISBWRE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_TsISBWRE)
345 # define GETHOSTBYADDR_R_HAS_PTR
347 # undef GETHOSTBYADDR_R_HAS_PTR
349 #if defined(HAS_GETHOSTBYNAME_R) && (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE)
350 # define GETHOSTBYNAME_R_HAS_PTR
352 # undef GETHOSTBYNAME_R_HAS_PTR
355 /* Any of the gethostent gethostbyaddr gethostbyname using ptr? */
357 #if (defined(GETHOSTENT_R_HAS_PTR) || defined(GETHOSTBYADDR_R_HAS_PTR) || defined(GETHOSTBYNAME_R_HAS_PTR))
358 # define USE_HOSTENT_PTR
360 # undef USE_HOSTENT_PTR
363 /* The getnetent getnetbyaddr getnetbyname using ptr? */
365 #if defined(HAS_GETNETENT_R) && (GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBWRE)
366 # define GETNETENT_R_HAS_PTR
368 # undef GETNETENT_R_HAS_PTR
370 #if defined(HAS_GETNETBYADDR_R) && (GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE || GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_uISBWRE)
371 # define GETNETBYADDR_R_HAS_PTR
373 # undef GETNETBYADDR_R_HAS_PTR
375 #if defined(HAS_GETNETBYNAME_R) && (GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE)
376 # define GETNETBYNAME_R_HAS_PTR
378 # undef GETNETBYNAME_R_HAS_PTR
381 /* Any of the getnetent getnetbyaddr getnetbyname using ptr? */
383 #if (defined(GETNETENT_R_HAS_PTR) || defined(GETNETBYADDR_R_HAS_PTR) || defined(GETNETBYNAME_R_HAS_PTR))
384 # define USE_NETENT_PTR
386 # undef USE_NETENT_PTR
389 /* The getprotoent getprotobyname getprotobynumber using ptr? */
391 #if defined(HAS_GETPROTOENT_R) && (GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBWR)
392 # define GETPROTOENT_R_HAS_PTR
394 # undef GETPROTOENT_R_HAS_PTR
396 #if defined(HAS_GETPROTOBYNAME_R) && (GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR)
397 # define GETPROTOBYNAME_R_HAS_PTR
399 # undef GETPROTOBYNAME_R_HAS_PTR
401 #if defined(HAS_GETPROTOBYNUMBER_R) && (GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR)
402 # define GETPROTOBYNUMBER_R_HAS_PTR
404 # undef GETPROTOBYNUMBER_R_HAS_PTR
407 /* Any of the getprotoent getprotobyname getprotobynumber using ptr? */
409 #if (defined(GETPROTOENT_R_HAS_PTR) || defined(GETPROTOBYNAME_R_HAS_PTR) || defined(GETPROTOBYNUMBER_R_HAS_PTR))
410 # define USE_PROTOENT_PTR
412 # undef USE_PROTOENT_PTR
415 /* The getservent getservbyname getservbyport using ptr? */
417 #if defined(HAS_GETSERVENT_R) && (GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBWR)
418 # define GETSERVENT_R_HAS_PTR
420 # undef GETSERVENT_R_HAS_PTR
422 #if defined(HAS_GETSERVBYNAME_R) && (GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR)
423 # define GETSERVBYNAME_R_HAS_PTR
425 # undef GETSERVBYNAME_R_HAS_PTR
427 #if defined(HAS_GETSERVBYPORT_R) && (GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR)
428 # define GETSERVBYPORT_R_HAS_PTR
430 # undef GETSERVBYPORT_R_HAS_PTR
433 /* Any of the getservent getservbyname getservbyport using ptr? */
435 #if (defined(GETSERVENT_R_HAS_PTR) || defined(GETSERVBYNAME_R_HAS_PTR) || defined(GETSERVBYPORT_R_HAS_PTR))
436 # define USE_SERVENT_PTR
438 # undef USE_SERVENT_PTR
441 /* The gethostent gethostbyaddr gethostbyname using buffer? */
443 #if defined(HAS_GETHOSTENT_R) && (GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBWRE || GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBIE || GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBIE || GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBI || GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBI)
444 # define GETHOSTENT_R_HAS_BUFFER
446 # undef GETHOSTENT_R_HAS_BUFFER
448 #if defined(HAS_GETHOSTBYADDR_R) && (GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISBWRE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBWIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TWISBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CIISBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CSBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TSBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_TsISBWRE)
449 # define GETHOSTBYADDR_R_HAS_BUFFER
451 # undef GETHOSTBYADDR_R_HAS_BUFFER
453 #if defined(HAS_GETHOSTBYNAME_R) && (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE || GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE)
454 # define GETHOSTBYNAME_R_HAS_BUFFER
456 # undef GETHOSTBYNAME_R_HAS_BUFFER
459 /* Any of the gethostent gethostbyaddr gethostbyname using buffer? */
461 #if (defined(GETHOSTENT_R_HAS_BUFFER) || defined(GETHOSTBYADDR_R_HAS_BUFFER) || defined(GETHOSTBYNAME_R_HAS_BUFFER))
462 # define USE_HOSTENT_BUFFER
464 # undef USE_HOSTENT_BUFFER
467 /* The getnetent getnetbyaddr getnetbyname using buffer? */
469 #if defined(HAS_GETNETENT_R) && (GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBWRE || GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBIE || GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBIE || GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBI || GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBI)
470 # define GETNETENT_R_HAS_BUFFER
472 # undef GETNETENT_R_HAS_BUFFER
474 #if defined(HAS_GETNETBYADDR_R) && (GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE || GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_LISBI || GETNETBYADDR_R_PROTO == REENTRANT_PROTO_S_TISBI || GETNETBYADDR_R_PROTO == REENTRANT_PROTO_S_LISBI || GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_uISBWRE)
475 # define GETNETBYADDR_R_HAS_BUFFER
477 # undef GETNETBYADDR_R_HAS_BUFFER
479 #if defined(HAS_GETNETBYNAME_R) && (GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE || GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBI || GETNETBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI)
480 # define GETNETBYNAME_R_HAS_BUFFER
482 # undef GETNETBYNAME_R_HAS_BUFFER
485 /* Any of the getnetent getnetbyaddr getnetbyname using buffer? */
487 #if (defined(GETNETENT_R_HAS_BUFFER) || defined(GETNETBYADDR_R_HAS_BUFFER) || defined(GETNETBYNAME_R_HAS_BUFFER))
488 # define USE_NETENT_BUFFER
490 # undef USE_NETENT_BUFFER
493 /* The getprotoent getprotobyname getprotobynumber using buffer? */
495 #if defined(HAS_GETPROTOENT_R) && (GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBI || GETPROTOENT_R_PROTO == REENTRANT_PROTO_S_SBI)
496 # define GETPROTOENT_R_HAS_BUFFER
498 # undef GETPROTOENT_R_HAS_BUFFER
500 #if defined(HAS_GETPROTOBYNAME_R) && (GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI)
501 # define GETPROTOBYNAME_R_HAS_BUFFER
503 # undef GETPROTOBYNAME_R_HAS_BUFFER
505 #if defined(HAS_GETPROTOBYNUMBER_R) && (GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR || GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_S_ISBI)
506 # define GETPROTOBYNUMBER_R_HAS_BUFFER
508 # undef GETPROTOBYNUMBER_R_HAS_BUFFER
511 /* Any of the getprotoent getprotobyname getprotobynumber using buffer? */
513 #if (defined(GETPROTOENT_R_HAS_BUFFER) || defined(GETPROTOBYNAME_R_HAS_BUFFER) || defined(GETPROTOBYNUMBER_R_HAS_BUFFER))
514 # define USE_PROTOENT_BUFFER
516 # undef USE_PROTOENT_BUFFER
519 /* The getservent getservbyname getservbyport using buffer? */
521 #if defined(HAS_GETSERVENT_R) && (GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBI || GETSERVENT_R_PROTO == REENTRANT_PROTO_S_SBI)
522 # define GETSERVENT_R_HAS_BUFFER
524 # undef GETSERVENT_R_HAS_BUFFER
526 #if defined(HAS_GETSERVBYNAME_R) && (GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR || GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_S_CCSBI)
527 # define GETSERVBYNAME_R_HAS_BUFFER
529 # undef GETSERVBYNAME_R_HAS_BUFFER
531 #if defined(HAS_GETSERVBYPORT_R) && (GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR || GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_S_ICSBI)
532 # define GETSERVBYPORT_R_HAS_BUFFER
534 # undef GETSERVBYPORT_R_HAS_BUFFER
537 /* Any of the getservent getservbyname getservbyport using buffer? */
539 #if (defined(GETSERVENT_R_HAS_BUFFER) || defined(GETSERVBYNAME_R_HAS_BUFFER) || defined(GETSERVBYPORT_R_HAS_BUFFER))
540 # define USE_SERVENT_BUFFER
542 # undef USE_SERVENT_BUFFER
545 /* The gethostent gethostbyaddr gethostbyname using errno? */
547 #if defined(HAS_GETHOSTENT_R) && (GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBWRE || GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBIE || GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBIE)
548 # define GETHOSTENT_R_HAS_ERRNO
550 # undef GETHOSTENT_R_HAS_ERRNO
552 #if defined(HAS_GETHOSTBYADDR_R) && (GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISBWRE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBWIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TWISBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CIISBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CSBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TSBIE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_TsISBWRE)
553 # define GETHOSTBYADDR_R_HAS_ERRNO
555 # undef GETHOSTBYADDR_R_HAS_ERRNO
557 #if defined(HAS_GETHOSTBYNAME_R) && (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE || GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE)
558 # define GETHOSTBYNAME_R_HAS_ERRNO
560 # undef GETHOSTBYNAME_R_HAS_ERRNO
563 /* Any of the gethostent gethostbyaddr gethostbyname using errno? */
565 #if (defined(GETHOSTENT_R_HAS_ERRNO) || defined(GETHOSTBYADDR_R_HAS_ERRNO) || defined(GETHOSTBYNAME_R_HAS_ERRNO))
566 # define USE_HOSTENT_ERRNO
568 # undef USE_HOSTENT_ERRNO
571 /* The getnetent getnetbyaddr getnetbyname using errno? */
573 #if defined(HAS_GETNETENT_R) && (GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBWRE || GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBIE || GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBIE)
574 # define GETNETENT_R_HAS_ERRNO
576 # undef GETNETENT_R_HAS_ERRNO
578 #if defined(HAS_GETNETBYADDR_R) && (GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE || GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_uISBWRE)
579 # define GETNETBYADDR_R_HAS_ERRNO
581 # undef GETNETBYADDR_R_HAS_ERRNO
583 #if defined(HAS_GETNETBYNAME_R) && (GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE)
584 # define GETNETBYNAME_R_HAS_ERRNO
586 # undef GETNETBYNAME_R_HAS_ERRNO
589 /* Any of the getnetent getnetbyaddr getnetbyname using errno? */
591 #if (defined(GETNETENT_R_HAS_ERRNO) || defined(GETNETBYADDR_R_HAS_ERRNO) || defined(GETNETBYNAME_R_HAS_ERRNO))
592 # define USE_NETENT_ERRNO
594 # undef USE_NETENT_ERRNO
600 char* _asctime_buffer;
601 size_t _asctime_size;
602 #endif /* HAS_ASCTIME_R */
604 #if CRYPT_R_PROTO == REENTRANT_PROTO_B_CCD
607 struct crypt_data *_crypt_struct_buffer;
609 #endif /* HAS_CRYPT_R */
613 #endif /* HAS_CTIME_R */
615 struct drand48_data _drand48_struct;
616 double _drand48_double;
617 #endif /* HAS_DRAND48_R */
618 #ifdef HAS_GETGRNAM_R
619 struct group _grent_struct;
622 # ifdef USE_GRENT_PTR
623 struct group* _grent_ptr;
625 # ifdef USE_GRENT_FPTR
628 #endif /* HAS_GETGRNAM_R */
629 #ifdef HAS_GETHOSTBYNAME_R
630 struct hostent _hostent_struct;
631 # if GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
632 struct hostent_data _hostent_data;
634 char* _hostent_buffer;
635 size_t _hostent_size;
637 # ifdef USE_HOSTENT_PTR
638 struct hostent* _hostent_ptr;
640 # ifdef USE_HOSTENT_ERRNO
643 #endif /* HAS_GETHOSTBYNAME_R */
644 #ifdef HAS_GETLOGIN_R
645 char* _getlogin_buffer;
646 size_t _getlogin_size;
647 #endif /* HAS_GETLOGIN_R */
648 #ifdef HAS_GETNETBYNAME_R
649 struct netent _netent_struct;
650 # if GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
651 struct netent_data _netent_data;
653 char* _netent_buffer;
656 # ifdef USE_NETENT_PTR
657 struct netent* _netent_ptr;
659 # ifdef USE_NETENT_ERRNO
662 #endif /* HAS_GETNETBYNAME_R */
663 #ifdef HAS_GETPROTOBYNAME_R
664 struct protoent _protoent_struct;
665 # if GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
666 struct protoent_data _protoent_data;
668 char* _protoent_buffer;
669 size_t _protoent_size;
671 # ifdef USE_PROTOENT_PTR
672 struct protoent* _protoent_ptr;
674 # ifdef USE_PROTOENT_ERRNO
677 #endif /* HAS_GETPROTOBYNAME_R */
678 #ifdef HAS_GETPWNAM_R
679 struct passwd _pwent_struct;
682 # ifdef USE_PWENT_PTR
683 struct passwd* _pwent_ptr;
685 # ifdef USE_PWENT_FPTR
688 #endif /* HAS_GETPWNAM_R */
689 #ifdef HAS_GETSERVBYNAME_R
690 struct servent _servent_struct;
691 # if GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD
692 struct servent_data _servent_data;
694 char* _servent_buffer;
695 size_t _servent_size;
697 # ifdef USE_SERVENT_PTR
698 struct servent* _servent_ptr;
700 # ifdef USE_SERVENT_ERRNO
703 #endif /* HAS_GETSERVBYNAME_R */
704 #ifdef HAS_GETSPNAM_R
705 struct spwd _spent_struct;
708 # ifdef USE_SPENT_PTR
709 struct spwd* _spent_ptr;
711 # ifdef USE_SPENT_FPTR
714 #endif /* HAS_GETSPNAM_R */
716 struct tm _gmtime_struct;
717 #endif /* HAS_GMTIME_R */
718 #ifdef HAS_LOCALTIME_R
719 struct tm _localtime_struct;
720 #endif /* HAS_LOCALTIME_R */
722 struct random_data _random_struct;
723 # if RANDOM_R_PROTO == REENTRANT_PROTO_I_iS
726 # if RANDOM_R_PROTO == REENTRANT_PROTO_I_lS
729 # if RANDOM_R_PROTO == REENTRANT_PROTO_I_St
730 int32_t _random_retval;
732 #endif /* HAS_RANDOM_R */
734 struct dirent* _readdir_struct;
735 size_t _readdir_size;
736 # if READDIR_R_PROTO == REENTRANT_PROTO_I_TSR
737 struct dirent* _readdir_ptr;
739 #endif /* HAS_READDIR_R */
740 #ifdef HAS_READDIR64_R
741 struct dirent64* _readdir64_struct;
742 size_t _readdir64_size;
743 # if READDIR64_R_PROTO == REENTRANT_PROTO_I_TSR
744 struct dirent64* _readdir64_ptr;
746 #endif /* HAS_READDIR64_R */
747 #ifdef HAS_SETLOCALE_R
748 char* _setlocale_buffer;
749 size_t _setlocale_size;
750 #endif /* HAS_SETLOCALE_R */
752 struct random_data _srandom_struct;
753 #endif /* HAS_SRANDOM_R */
754 #ifdef HAS_STRERROR_R
755 char* _strerror_buffer;
756 size_t _strerror_size;
757 #endif /* HAS_STRERROR_R */
759 char* _ttyname_buffer;
760 size_t _ttyname_size;
761 #endif /* HAS_TTYNAME_R */
763 int dummy; /* cannot have empty structs */
770 # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_B_SB
771 # define asctime(a) asctime_r(a, PL_reentrant_buffer->_asctime_buffer)
773 # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_B_SBI
774 # define asctime(a) asctime_r(a, PL_reentrant_buffer->_asctime_buffer, PL_reentrant_buffer->_asctime_size)
776 # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_I_SB
777 # define asctime(a) (asctime_r(a, PL_reentrant_buffer->_asctime_buffer) == 0 ? PL_reentrant_buffer->_asctime_buffer : 0)
779 # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_I_SBI
780 # define asctime(a) (asctime_r(a, PL_reentrant_buffer->_asctime_buffer, PL_reentrant_buffer->_asctime_size) == 0 ? PL_reentrant_buffer->_asctime_buffer : 0)
782 #endif /* HAS_ASCTIME_R */
786 # if !defined(crypt) && CRYPT_R_PROTO == REENTRANT_PROTO_B_CCS
787 # define crypt(a, b) crypt_r(a, b, PL_reentrant_buffer->_crypt_struct_buffer)
789 # if !defined(crypt) && CRYPT_R_PROTO == REENTRANT_PROTO_B_CCD
790 # define crypt(a, b) crypt_r(a, b, &PL_reentrant_buffer->_crypt_data)
792 #endif /* HAS_CRYPT_R */
796 # if !defined(ctermid) && CTERMID_R_PROTO == REENTRANT_PROTO_B_B
797 # define ctermid(a) ctermid_r(a)
799 #endif /* HAS_CTERMID_R */
803 # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_B_SB
804 # define ctime(a) ctime_r(a, PL_reentrant_buffer->_ctime_buffer)
806 # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_B_SBI
807 # define ctime(a) ctime_r(a, PL_reentrant_buffer->_ctime_buffer, PL_reentrant_buffer->_ctime_size)
809 # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_I_SB
810 # define ctime(a) (ctime_r(a, PL_reentrant_buffer->_ctime_buffer) == 0 ? PL_reentrant_buffer->_ctime_buffer : 0)
812 # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_I_SBI
813 # define ctime(a) (ctime_r(a, PL_reentrant_buffer->_ctime_buffer, PL_reentrant_buffer->_ctime_size) == 0 ? PL_reentrant_buffer->_ctime_buffer : 0)
815 #endif /* HAS_CTIME_R */
819 # if !defined(drand48) && DRAND48_R_PROTO == REENTRANT_PROTO_I_ST
820 # define drand48() (drand48_r(&PL_reentrant_buffer->_drand48_struct, &PL_reentrant_buffer->_drand48_double) == 0 ? PL_reentrant_buffer->_drand48_double : 0)
822 #endif /* HAS_DRAND48_R */
824 #ifdef HAS_ENDGRENT_R
826 # if !defined(endgrent) && ENDGRENT_R_PROTO == REENTRANT_PROTO_I_H
827 # define endgrent() (endgrent_r(&PL_reentrant_buffer->_grent_fptr) == 0 ? 1 : 0)
829 # if !defined(endgrent) && ENDGRENT_R_PROTO == REENTRANT_PROTO_V_H
830 # define endgrent() endgrent_r(&PL_reentrant_buffer->_grent_fptr)
832 #endif /* HAS_ENDGRENT_R */
834 #ifdef HAS_ENDHOSTENT_R
836 # if !defined(endhostent) && ENDHOSTENT_R_PROTO == REENTRANT_PROTO_I_D
837 # define endhostent() (endhostent_r(&PL_reentrant_buffer->_hostent_data) == 0 ? 1 : 0)
839 # if !defined(endhostent) && ENDHOSTENT_R_PROTO == REENTRANT_PROTO_V_D
840 # define endhostent() endhostent_r(&PL_reentrant_buffer->_hostent_data)
842 #endif /* HAS_ENDHOSTENT_R */
844 #ifdef HAS_ENDNETENT_R
846 # if !defined(endnetent) && ENDNETENT_R_PROTO == REENTRANT_PROTO_I_D
847 # define endnetent() (endnetent_r(&PL_reentrant_buffer->_netent_data) == 0 ? 1 : 0)
849 # if !defined(endnetent) && ENDNETENT_R_PROTO == REENTRANT_PROTO_V_D
850 # define endnetent() endnetent_r(&PL_reentrant_buffer->_netent_data)
852 #endif /* HAS_ENDNETENT_R */
854 #ifdef HAS_ENDPROTOENT_R
856 # if !defined(endprotoent) && ENDPROTOENT_R_PROTO == REENTRANT_PROTO_I_D
857 # define endprotoent() (endprotoent_r(&PL_reentrant_buffer->_protoent_data) == 0 ? 1 : 0)
859 # if !defined(endprotoent) && ENDPROTOENT_R_PROTO == REENTRANT_PROTO_V_D
860 # define endprotoent() endprotoent_r(&PL_reentrant_buffer->_protoent_data)
862 #endif /* HAS_ENDPROTOENT_R */
864 #ifdef HAS_ENDPWENT_R
866 # if !defined(endpwent) && ENDPWENT_R_PROTO == REENTRANT_PROTO_I_H
867 # define endpwent() (endpwent_r(&PL_reentrant_buffer->_pwent_fptr) == 0 ? 1 : 0)
869 # if !defined(endpwent) && ENDPWENT_R_PROTO == REENTRANT_PROTO_V_H
870 # define endpwent() endpwent_r(&PL_reentrant_buffer->_pwent_fptr)
872 #endif /* HAS_ENDPWENT_R */
874 #ifdef HAS_ENDSERVENT_R
876 # if !defined(endservent) && ENDSERVENT_R_PROTO == REENTRANT_PROTO_I_D
877 # define endservent() (endservent_r(&PL_reentrant_buffer->_servent_data) == 0 ? 1 : 0)
879 # if !defined(endservent) && ENDSERVENT_R_PROTO == REENTRANT_PROTO_V_D
880 # define endservent() endservent_r(&PL_reentrant_buffer->_servent_data)
882 #endif /* HAS_ENDSERVENT_R */
884 #ifdef HAS_GETGRENT_R
886 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBWR
887 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getgrent") : 0))
889 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIR
890 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getgrent") : 0))
892 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_S_SBW
893 # define getgrent() (getgrent_r(&PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size) ? &PL_reentrant_buffer->_grent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("getgrent") : 0))
895 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_S_SBI
896 # define getgrent() (getgrent_r(&PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size) ? &PL_reentrant_buffer->_grent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("getgrent") : 0))
898 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBI
899 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getgrent") : 0))
901 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIH
902 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getgrent") : 0))
904 #endif /* HAS_GETGRENT_R */
906 #ifdef HAS_GETGRGID_R
908 # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBWR
909 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getgrgid", a) : 0))
911 # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBIR
912 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getgrgid", a) : 0))
914 # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBI
915 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getgrgid", a) : 0))
917 # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_S_TSBI
918 # define getgrgid(a) (getgrgid_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size) ? &PL_reentrant_buffer->_grent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("getgrgid", a) : 0))
920 #endif /* HAS_GETGRGID_R */
922 #ifdef HAS_GETGRNAM_R
924 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR
925 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getgrnam", a) : 0))
927 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR
928 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getgrnam", a) : 0))
930 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_S_CBI
931 # define getgrnam(a) (getgrnam_r(a, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size) ? PL_reentrant_buffer->_grent_buffer : ((errno == ERANGE) ? Perl_reentrant_retry("getgrnam", a) : 0))
933 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBI
934 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getgrnam", a) : 0))
936 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_S_CSBI
937 # define getgrnam(a) (getgrnam_r(a, &PL_reentrant_buffer->_grent_struct, PL_reentrant_buffer->_grent_buffer, PL_reentrant_buffer->_grent_size) ? &PL_reentrant_buffer->_grent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("getgrnam", a) : 0))
939 #endif /* HAS_GETGRNAM_R */
941 #ifdef HAS_GETHOSTBYADDR_R
942 # undef gethostbyaddr
943 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISBWRE
944 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
946 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBWIE
947 # define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? &PL_reentrant_buffer->_hostent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
949 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBIE
950 # define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? &PL_reentrant_buffer->_hostent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
952 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TWISBIE
953 # define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? &PL_reentrant_buffer->_hostent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
955 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CIISBIE
956 # define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? &PL_reentrant_buffer->_hostent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
958 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CSBIE
959 # define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? 1 : ((errno == ERANGE) ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
961 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TSBIE
962 # define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? 1 : ((errno == ERANGE) ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
964 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISD
965 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
967 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CIISD
968 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
970 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CII
971 # define gethostbyaddr(a, b, c) ((PL_reentrant_retint = gethostbyaddr_r(a, b, c)) == 0 ? 1 : (((PL_reentrant_retint == ERANGE) || (errno == ERANGE)) ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
973 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_TsISBWRE
974 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
976 #endif /* HAS_GETHOSTBYADDR_R */
978 #ifdef HAS_GETHOSTBYNAME_R
979 # undef gethostbyname
980 # if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE
981 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("gethostbyname", a) : 0))
983 # if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE
984 # define gethostbyname(a) (gethostbyname_r(a, &PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? &PL_reentrant_buffer->_hostent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("gethostbyname", a) : 0))
986 # if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
987 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("gethostbyname", a) : 0))
989 #endif /* HAS_GETHOSTBYNAME_R */
991 #ifdef HAS_GETHOSTENT_R
993 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBWRE
994 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("gethostent") : 0))
996 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBIE
997 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("gethostent") : 0))
999 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBIE
1000 # define gethostent() (gethostent_r(&PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size, &PL_reentrant_buffer->_hostent_errno) ? &PL_reentrant_buffer->_hostent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("gethostent") : 0))
1002 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBI
1003 # define gethostent() (gethostent_r(&PL_reentrant_buffer->_hostent_struct, PL_reentrant_buffer->_hostent_buffer, PL_reentrant_buffer->_hostent_size) ? &PL_reentrant_buffer->_hostent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("gethostent") : 0))
1005 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBI
1006 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("gethostent") : 0))
1008 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SD
1009 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("gethostent") : 0))
1011 #endif /* HAS_GETHOSTENT_R */
1013 #ifdef HAS_GETLOGIN_R
1015 # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_I_BW
1016 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getlogin") : 0))
1018 # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_I_BI
1019 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getlogin") : 0))
1021 # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_B_BW
1022 # define getlogin() getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size)
1024 # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_B_BI
1025 # define getlogin() getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size)
1027 #endif /* HAS_GETLOGIN_R */
1029 #ifdef HAS_GETNETBYADDR_R
1030 # undef getnetbyaddr
1031 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE
1032 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
1034 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_LISBI
1035 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
1037 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_S_TISBI
1038 # define getnetbyaddr(a, b) (getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size) ? &PL_reentrant_buffer->_netent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
1040 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_S_LISBI
1041 # define getnetbyaddr(a, b) (getnetbyaddr_r(a, b, &PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size) ? &PL_reentrant_buffer->_netent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
1043 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_TISD
1044 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
1046 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_LISD
1047 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
1049 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_IISD
1050 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
1052 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_uISBWRE
1053 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
1055 #endif /* HAS_GETNETBYADDR_R */
1057 #ifdef HAS_GETNETBYNAME_R
1058 # undef getnetbyname
1059 # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE
1060 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getnetbyname", a) : 0))
1062 # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBI
1063 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getnetbyname", a) : 0))
1065 # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI
1066 # define getnetbyname(a) (getnetbyname_r(a, &PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size) ? &PL_reentrant_buffer->_netent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("getnetbyname", a) : 0))
1068 # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
1069 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getnetbyname", a) : 0))
1071 #endif /* HAS_GETNETBYNAME_R */
1073 #ifdef HAS_GETNETENT_R
1075 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBWRE
1076 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getnetent") : 0))
1078 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBIE
1079 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getnetent") : 0))
1081 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBIE
1082 # define getnetent() (getnetent_r(&PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size, &PL_reentrant_buffer->_netent_errno) ? &PL_reentrant_buffer->_netent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("getnetent") : 0))
1084 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBI
1085 # define getnetent() (getnetent_r(&PL_reentrant_buffer->_netent_struct, PL_reentrant_buffer->_netent_buffer, PL_reentrant_buffer->_netent_size) ? &PL_reentrant_buffer->_netent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("getnetent") : 0))
1087 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBI
1088 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getnetent") : 0))
1090 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SD
1091 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getnetent") : 0))
1093 #endif /* HAS_GETNETENT_R */
1095 #ifdef HAS_GETPROTOBYNAME_R
1096 # undef getprotobyname
1097 # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR
1098 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getprotobyname", a) : 0))
1100 # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI
1101 # define getprotobyname(a) (getprotobyname_r(a, &PL_reentrant_buffer->_protoent_struct, PL_reentrant_buffer->_protoent_buffer, PL_reentrant_buffer->_protoent_size) ? &PL_reentrant_buffer->_protoent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("getprotobyname", a) : 0))
1103 # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
1104 # define getprotobyname(a) ((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) || (errno == ERANGE)) ? Perl_reentrant_retry("getprotobyname", a) : 0))
1106 #endif /* HAS_GETPROTOBYNAME_R */
1108 #ifdef HAS_GETPROTOBYNUMBER_R
1109 # undef getprotobynumber
1110 # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR
1111 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getprotobynumber", a) : 0))
1113 # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_S_ISBI
1114 # define getprotobynumber(a) (getprotobynumber_r(a, &PL_reentrant_buffer->_protoent_struct, PL_reentrant_buffer->_protoent_buffer, PL_reentrant_buffer->_protoent_size) ? &PL_reentrant_buffer->_protoent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("getprotobynumber", a) : 0))
1116 # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISD
1117 # define getprotobynumber(a) ((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) || (errno == ERANGE)) ? Perl_reentrant_retry("getprotobynumber", a) : 0))
1119 #endif /* HAS_GETPROTOBYNUMBER_R */
1121 #ifdef HAS_GETPROTOENT_R
1123 # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBWR
1124 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getprotoent") : 0))
1126 # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBI
1127 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getprotoent") : 0))
1129 # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_S_SBI
1130 # define getprotoent() (getprotoent_r(&PL_reentrant_buffer->_protoent_struct, PL_reentrant_buffer->_protoent_buffer, PL_reentrant_buffer->_protoent_size) ? &PL_reentrant_buffer->_protoent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("getprotoent") : 0))
1132 # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SD
1133 # define getprotoent() ((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) || (errno == ERANGE)) ? Perl_reentrant_retry("getprotoent") : 0))
1135 #endif /* HAS_GETPROTOENT_R */
1137 #ifdef HAS_GETPWENT_R
1139 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBWR
1140 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getpwent") : 0))
1142 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIR
1143 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getpwent") : 0))
1145 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_S_SBW
1146 # define getpwent() (getpwent_r(&PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size) ? &PL_reentrant_buffer->_pwent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("getpwent") : 0))
1148 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_S_SBI
1149 # define getpwent() (getpwent_r(&PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size) ? &PL_reentrant_buffer->_pwent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("getpwent") : 0))
1151 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBI
1152 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getpwent") : 0))
1154 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIH
1155 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getpwent") : 0))
1157 #endif /* HAS_GETPWENT_R */
1159 #ifdef HAS_GETPWNAM_R
1161 # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR
1162 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getpwnam", a) : 0))
1164 # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR
1165 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getpwnam", a) : 0))
1167 # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_S_CSBI
1168 # define getpwnam(a) (getpwnam_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size) ? &PL_reentrant_buffer->_pwent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("getpwnam", a) : 0))
1170 # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBI
1171 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getpwnam", a) : 0))
1173 #endif /* HAS_GETPWNAM_R */
1175 #ifdef HAS_GETPWUID_R
1177 # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBWR
1178 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getpwuid", a) : 0))
1180 # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBIR
1181 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getpwuid", a) : 0))
1183 # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBI
1184 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getpwuid", a) : 0))
1186 # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_S_TSBI
1187 # define getpwuid(a) (getpwuid_r(a, &PL_reentrant_buffer->_pwent_struct, PL_reentrant_buffer->_pwent_buffer, PL_reentrant_buffer->_pwent_size) ? &PL_reentrant_buffer->_pwent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("getpwuid", a) : 0))
1189 #endif /* HAS_GETPWUID_R */
1191 #ifdef HAS_GETSERVBYNAME_R
1192 # undef getservbyname
1193 # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR
1194 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getservbyname", a, b) : 0))
1196 # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_S_CCSBI
1197 # define getservbyname(a, b) (getservbyname_r(a, b, &PL_reentrant_buffer->_servent_struct, PL_reentrant_buffer->_servent_buffer, PL_reentrant_buffer->_servent_size) ? &PL_reentrant_buffer->_servent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("getservbyname", a, b) : 0))
1199 # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD
1200 # define getservbyname(a, b) ((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) || (errno == ERANGE)) ? Perl_reentrant_retry("getservbyname", a, b) : 0))
1202 #endif /* HAS_GETSERVBYNAME_R */
1204 #ifdef HAS_GETSERVBYPORT_R
1205 # undef getservbyport
1206 # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR
1207 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getservbyport", a, b) : 0))
1209 # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_S_ICSBI
1210 # define getservbyport(a, b) (getservbyport_r(a, b, &PL_reentrant_buffer->_servent_struct, PL_reentrant_buffer->_servent_buffer, PL_reentrant_buffer->_servent_size) ? &PL_reentrant_buffer->_servent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("getservbyport", a, b) : 0))
1212 # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSD
1213 # define getservbyport(a, b) ((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) || (errno == ERANGE)) ? Perl_reentrant_retry("getservbyport", a, b) : 0))
1215 #endif /* HAS_GETSERVBYPORT_R */
1217 #ifdef HAS_GETSERVENT_R
1219 # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBWR
1220 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getservent") : 0))
1222 # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBI
1223 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getservent") : 0))
1225 # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_S_SBI
1226 # define getservent() (getservent_r(&PL_reentrant_buffer->_servent_struct, PL_reentrant_buffer->_servent_buffer, PL_reentrant_buffer->_servent_size) ? &PL_reentrant_buffer->_servent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("getservent") : 0))
1228 # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SD
1229 # define getservent() ((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) || (errno == ERANGE)) ? Perl_reentrant_retry("getservent") : 0))
1231 #endif /* HAS_GETSERVENT_R */
1233 #ifdef HAS_GETSPNAM_R
1235 # if !defined(getspnam) && GETSPNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR
1236 # 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) || (errno == ERANGE)) ? Perl_reentrant_retry("getspnam", a) : 0))
1238 # if !defined(getspnam) && GETSPNAM_R_PROTO == REENTRANT_PROTO_S_CSBI
1239 # define getspnam(a) (getspnam_r(a, &PL_reentrant_buffer->_spent_struct, PL_reentrant_buffer->_spent_buffer, PL_reentrant_buffer->_spent_size) ? &PL_reentrant_buffer->_spent_struct : ((errno == ERANGE) ? Perl_reentrant_retry("getspnam", a) : 0))
1241 #endif /* HAS_GETSPNAM_R */
1245 # if !defined(gmtime) && GMTIME_R_PROTO == REENTRANT_PROTO_S_TS
1246 # define gmtime(a) (gmtime_r(a, &PL_reentrant_buffer->_gmtime_struct) ? &PL_reentrant_buffer->_gmtime_struct : 0)
1248 # if !defined(gmtime) && GMTIME_R_PROTO == REENTRANT_PROTO_I_TS
1249 # define gmtime(a) (gmtime_r(a, &PL_reentrant_buffer->_gmtime_struct) == 0 ? &PL_reentrant_buffer->_gmtime_struct : 0)
1251 #endif /* HAS_GMTIME_R */
1253 #ifdef HAS_LOCALTIME_R
1255 # if !defined(localtime) && LOCALTIME_R_PROTO == REENTRANT_PROTO_S_TS
1256 # define localtime(a) (localtime_r(a, &PL_reentrant_buffer->_localtime_struct) ? &PL_reentrant_buffer->_localtime_struct : 0)
1258 # if !defined(localtime) && LOCALTIME_R_PROTO == REENTRANT_PROTO_I_TS
1259 # define localtime(a) (localtime_r(a, &PL_reentrant_buffer->_localtime_struct) == 0 ? &PL_reentrant_buffer->_localtime_struct : 0)
1261 #endif /* HAS_LOCALTIME_R */
1265 # if !defined(random) && RANDOM_R_PROTO == REENTRANT_PROTO_I_iS
1266 # define random() (random_r(&PL_reentrant_buffer->_random_retval, &PL_reentrant_buffer->_random_struct) == 0 ? PL_reentrant_buffer->_random_retval : 0)
1268 # if !defined(random) && RANDOM_R_PROTO == REENTRANT_PROTO_I_lS
1269 # define random() (random_r(&PL_reentrant_buffer->_random_retval, &PL_reentrant_buffer->_random_struct) == 0 ? PL_reentrant_buffer->_random_retval : 0)
1271 # if !defined(random) && RANDOM_R_PROTO == REENTRANT_PROTO_I_St
1272 # define random() (random_r(&PL_reentrant_buffer->_random_struct, &PL_reentrant_buffer->_random_retval) == 0 ? PL_reentrant_buffer->_random_retval : 0)
1274 #endif /* HAS_RANDOM_R */
1276 #ifdef HAS_READDIR_R
1278 # if !defined(readdir) && READDIR_R_PROTO == REENTRANT_PROTO_I_TSR
1279 # define readdir(a) (readdir_r(a, PL_reentrant_buffer->_readdir_struct, &PL_reentrant_buffer->_readdir_ptr) == 0 ? PL_reentrant_buffer->_readdir_ptr : 0)
1281 # if !defined(readdir) && READDIR_R_PROTO == REENTRANT_PROTO_I_TS
1282 # define readdir(a) (readdir_r(a, PL_reentrant_buffer->_readdir_struct) == 0 ? PL_reentrant_buffer->_readdir_struct : 0)
1284 #endif /* HAS_READDIR_R */
1286 #ifdef HAS_READDIR64_R
1288 # if !defined(readdir64) && READDIR64_R_PROTO == REENTRANT_PROTO_I_TSR
1289 # define readdir64(a) (readdir64_r(a, PL_reentrant_buffer->_readdir64_struct, &PL_reentrant_buffer->_readdir64_ptr) == 0 ? PL_reentrant_buffer->_readdir64_ptr : 0)
1291 # if !defined(readdir64) && READDIR64_R_PROTO == REENTRANT_PROTO_I_TS
1292 # define readdir64(a) (readdir64_r(a, PL_reentrant_buffer->_readdir64_struct) == 0 ? PL_reentrant_buffer->_readdir64_struct : 0)
1294 #endif /* HAS_READDIR64_R */
1296 #ifdef HAS_SETGRENT_R
1298 # if !defined(setgrent) && SETGRENT_R_PROTO == REENTRANT_PROTO_I_H
1299 # define setgrent() (setgrent_r(&PL_reentrant_buffer->_grent_fptr) == 0 ? 1 : 0)
1301 # if !defined(setgrent) && SETGRENT_R_PROTO == REENTRANT_PROTO_V_H
1302 # define setgrent() setgrent_r(&PL_reentrant_buffer->_grent_fptr)
1304 #endif /* HAS_SETGRENT_R */
1306 #ifdef HAS_SETHOSTENT_R
1308 # if !defined(sethostent) && SETHOSTENT_R_PROTO == REENTRANT_PROTO_I_ID
1309 # define sethostent(a) (sethostent_r(a, &PL_reentrant_buffer->_hostent_data) == 0 ? 1 : 0)
1311 # if !defined(sethostent) && SETHOSTENT_R_PROTO == REENTRANT_PROTO_V_ID
1312 # define sethostent(a) sethostent_r(a, &PL_reentrant_buffer->_hostent_data)
1314 #endif /* HAS_SETHOSTENT_R */
1316 #ifdef HAS_SETLOCALE_R
1318 # if !defined(setlocale) && SETLOCALE_R_PROTO == REENTRANT_PROTO_I_ICBI
1319 # 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)
1321 #endif /* HAS_SETLOCALE_R */
1323 #ifdef HAS_SETNETENT_R
1325 # if !defined(setnetent) && SETNETENT_R_PROTO == REENTRANT_PROTO_I_ID
1326 # define setnetent(a) (setnetent_r(a, &PL_reentrant_buffer->_netent_data) == 0 ? 1 : 0)
1328 # if !defined(setnetent) && SETNETENT_R_PROTO == REENTRANT_PROTO_V_ID
1329 # define setnetent(a) setnetent_r(a, &PL_reentrant_buffer->_netent_data)
1331 #endif /* HAS_SETNETENT_R */
1333 #ifdef HAS_SETPROTOENT_R
1335 # if !defined(setprotoent) && SETPROTOENT_R_PROTO == REENTRANT_PROTO_I_ID
1336 # define setprotoent(a) (setprotoent_r(a, &PL_reentrant_buffer->_protoent_data) == 0 ? 1 : 0)
1338 # if !defined(setprotoent) && SETPROTOENT_R_PROTO == REENTRANT_PROTO_V_ID
1339 # define setprotoent(a) setprotoent_r(a, &PL_reentrant_buffer->_protoent_data)
1341 #endif /* HAS_SETPROTOENT_R */
1343 #ifdef HAS_SETPWENT_R
1345 # if !defined(setpwent) && SETPWENT_R_PROTO == REENTRANT_PROTO_I_H
1346 # define setpwent() (setpwent_r(&PL_reentrant_buffer->_pwent_fptr) == 0 ? 1 : 0)
1348 # if !defined(setpwent) && SETPWENT_R_PROTO == REENTRANT_PROTO_V_H
1349 # define setpwent() setpwent_r(&PL_reentrant_buffer->_pwent_fptr)
1351 #endif /* HAS_SETPWENT_R */
1353 #ifdef HAS_SETSERVENT_R
1355 # if !defined(setservent) && SETSERVENT_R_PROTO == REENTRANT_PROTO_I_ID
1356 # define setservent(a) (setservent_r(a, &PL_reentrant_buffer->_servent_data) == 0 ? 1 : 0)
1358 # if !defined(setservent) && SETSERVENT_R_PROTO == REENTRANT_PROTO_V_ID
1359 # define setservent(a) setservent_r(a, &PL_reentrant_buffer->_servent_data)
1361 #endif /* HAS_SETSERVENT_R */
1363 #ifdef HAS_SRAND48_R
1365 # if !defined(srand48) && SRAND48_R_PROTO == REENTRANT_PROTO_I_LS
1366 # define srand48(a) (srand48_r(a, &PL_reentrant_buffer->_drand48_struct) == 0 ? &PL_reentrant_buffer->_drand48_struct : 0)
1368 #endif /* HAS_SRAND48_R */
1370 #ifdef HAS_SRANDOM_R
1372 # if !defined(srandom) && SRANDOM_R_PROTO == REENTRANT_PROTO_I_TS
1373 # define srandom(a) (srandom_r(a, &PL_reentrant_buffer->_srandom_struct) == 0 ? &PL_reentrant_buffer->_srandom_struct : 0)
1375 #endif /* HAS_SRANDOM_R */
1377 #ifdef HAS_STRERROR_R
1379 # if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_I_IBW
1380 # define strerror(a) (strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size) == 0 ? PL_reentrant_buffer->_strerror_buffer : 0)
1382 # if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_I_IBI
1383 # define strerror(a) (strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size) == 0 ? PL_reentrant_buffer->_strerror_buffer : 0)
1385 # if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_B_IBW
1386 # define strerror(a) strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size)
1388 #endif /* HAS_STRERROR_R */
1392 # if !defined(tmpnam) && TMPNAM_R_PROTO == REENTRANT_PROTO_B_B
1393 # define tmpnam(a) tmpnam_r(a)
1395 #endif /* HAS_TMPNAM_R */
1397 #ifdef HAS_TTYNAME_R
1399 # if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_I_IBW
1400 # define ttyname(a) (ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size) == 0 ? PL_reentrant_buffer->_ttyname_buffer : 0)
1402 # if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_I_IBI
1403 # define ttyname(a) (ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size) == 0 ? PL_reentrant_buffer->_ttyname_buffer : 0)
1405 # if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_B_IBI
1406 # define ttyname(a) ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size)
1408 #endif /* HAS_TTYNAME_R */
1412 #endif /* USE_REENTRANT_API */