1 /* -*- buffer-read-only: t -*-
5 * Copyright (C) 2002, 2003, 2005 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 #ifdef USE_REENTRANT_API
19 /* Deprecations: some platforms have the said reentrant interfaces
20 * but they are declared obsolete and are not to be used. Often this
21 * means that the platform has threadsafed the interfaces (hopefully).
22 * All this is OS version dependent, so we are of course fooling ourselves.
23 * If you know of more deprecations on some platforms, please add your own. */
28 # undef HAS_ENDGRENT_R
29 # undef HAS_ENDPWENT_R
30 # undef HAS_GETGRENT_R
31 # undef HAS_GETPWENT_R
32 # undef HAS_SETLOCALE_R
34 # undef HAS_STRERROR_R
35 # define NETDB_R_OBSOLETE
38 #if defined(__osf__) && defined(__alpha) /* Tru64 aka Digital UNIX */
40 # undef HAS_STRERROR_R
41 # define NETDB_R_OBSOLETE
45 * As of OpenBSD 3.7, reentrant functions are now working, they just are
46 * incompatible with everyone else. To make OpenBSD happy, we have to
47 * memzero out certain structures before calling the functions.
49 #if defined(__OpenBSD__)
50 # define REENTR_MEMZERO(a,b) memzero(a,b),
52 # define REENTR_MEMZERO(a,b)
55 #ifdef NETDB_R_OBSOLETE
56 # undef HAS_ENDHOSTENT_R
57 # undef HAS_ENDNETENT_R
58 # undef HAS_ENDPROTOENT_R
59 # undef HAS_ENDSERVENT_R
60 # undef HAS_GETHOSTBYADDR_R
61 # undef HAS_GETHOSTBYNAME_R
62 # undef HAS_GETHOSTENT_R
63 # undef HAS_GETNETBYADDR_R
64 # undef HAS_GETNETBYNAME_R
65 # undef HAS_GETNETENT_R
66 # undef HAS_GETPROTOBYNAME_R
67 # undef HAS_GETPROTOBYNUMBER_R
68 # undef HAS_GETPROTOENT_R
69 # undef HAS_GETSERVBYNAME_R
70 # undef HAS_GETSERVBYPORT_R
71 # undef HAS_GETSERVENT_R
72 # undef HAS_SETHOSTENT_R
73 # undef HAS_SETNETENT_R
74 # undef HAS_SETPROTOENT_R
75 # undef HAS_SETSERVENT_R
88 # include <stdlib.h> /* drand48_data */
101 #define REENTRANT_PROTO_B_B 1
102 #define REENTRANT_PROTO_B_BI 2
103 #define REENTRANT_PROTO_B_BW 3
104 #define REENTRANT_PROTO_B_CCD 4
105 #define REENTRANT_PROTO_B_CCS 5
106 #define REENTRANT_PROTO_B_IBI 6
107 #define REENTRANT_PROTO_B_IBW 7
108 #define REENTRANT_PROTO_B_SB 8
109 #define REENTRANT_PROTO_B_SBI 9
110 #define REENTRANT_PROTO_I_BI 10
111 #define REENTRANT_PROTO_I_BW 11
112 #define REENTRANT_PROTO_I_CCSBWR 12
113 #define REENTRANT_PROTO_I_CCSD 13
114 #define REENTRANT_PROTO_I_CII 14
115 #define REENTRANT_PROTO_I_CIISD 15
116 #define REENTRANT_PROTO_I_CSBI 16
117 #define REENTRANT_PROTO_I_CSBIR 17
118 #define REENTRANT_PROTO_I_CSBWR 18
119 #define REENTRANT_PROTO_I_CSBWRE 19
120 #define REENTRANT_PROTO_I_CSD 20
121 #define REENTRANT_PROTO_I_CWISBWRE 21
122 #define REENTRANT_PROTO_I_CWISD 22
123 #define REENTRANT_PROTO_I_D 23
124 #define REENTRANT_PROTO_I_H 24
125 #define REENTRANT_PROTO_I_IBI 25
126 #define REENTRANT_PROTO_I_IBW 26
127 #define REENTRANT_PROTO_I_ICBI 27
128 #define REENTRANT_PROTO_I_ICSBWR 28
129 #define REENTRANT_PROTO_I_ICSD 29
130 #define REENTRANT_PROTO_I_ID 30
131 #define REENTRANT_PROTO_I_IISD 31
132 #define REENTRANT_PROTO_I_ISBWR 32
133 #define REENTRANT_PROTO_I_ISD 33
134 #define REENTRANT_PROTO_I_LISBI 34
135 #define REENTRANT_PROTO_I_LISD 35
136 #define REENTRANT_PROTO_I_LS 36
137 #define REENTRANT_PROTO_I_SB 37
138 #define REENTRANT_PROTO_I_SBI 38
139 #define REENTRANT_PROTO_I_SBIE 39
140 #define REENTRANT_PROTO_I_SBIH 40
141 #define REENTRANT_PROTO_I_SBIR 41
142 #define REENTRANT_PROTO_I_SBWR 42
143 #define REENTRANT_PROTO_I_SBWRE 43
144 #define REENTRANT_PROTO_I_SD 44
145 #define REENTRANT_PROTO_I_ST 45
146 #define REENTRANT_PROTO_I_St 46
147 #define REENTRANT_PROTO_I_TISD 47
148 #define REENTRANT_PROTO_I_TS 48
149 #define REENTRANT_PROTO_I_TSBI 49
150 #define REENTRANT_PROTO_I_TSBIR 50
151 #define REENTRANT_PROTO_I_TSBWR 51
152 #define REENTRANT_PROTO_I_TSR 52
153 #define REENTRANT_PROTO_I_TsISBWRE 53
154 #define REENTRANT_PROTO_I_UISBWRE 54
155 #define REENTRANT_PROTO_I_iS 55
156 #define REENTRANT_PROTO_I_lS 56
157 #define REENTRANT_PROTO_I_uISBWRE 57
158 #define REENTRANT_PROTO_S_CBI 58
159 #define REENTRANT_PROTO_S_CCSBI 59
160 #define REENTRANT_PROTO_S_CIISBIE 60
161 #define REENTRANT_PROTO_S_CSBI 61
162 #define REENTRANT_PROTO_S_CSBIE 62
163 #define REENTRANT_PROTO_S_CWISBIE 63
164 #define REENTRANT_PROTO_S_CWISBWIE 64
165 #define REENTRANT_PROTO_S_ICSBI 65
166 #define REENTRANT_PROTO_S_ISBI 66
167 #define REENTRANT_PROTO_S_LISBI 67
168 #define REENTRANT_PROTO_S_SBI 68
169 #define REENTRANT_PROTO_S_SBIE 69
170 #define REENTRANT_PROTO_S_SBW 70
171 #define REENTRANT_PROTO_S_TISBI 71
172 #define REENTRANT_PROTO_S_TS 72
173 #define REENTRANT_PROTO_S_TSBI 73
174 #define REENTRANT_PROTO_S_TSBIE 74
175 #define REENTRANT_PROTO_S_TWISBIE 75
176 #define REENTRANT_PROTO_V_D 76
177 #define REENTRANT_PROTO_V_H 77
178 #define REENTRANT_PROTO_V_ID 78
180 /* Defines for indicating which special features are supported. */
182 /* The getgrent getgrgid getgrnam using buffer? */
184 #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)
185 # define GETGRENT_R_HAS_BUFFER
187 # undef GETGRENT_R_HAS_BUFFER
189 #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)
190 # define GETGRGID_R_HAS_BUFFER
192 # undef GETGRGID_R_HAS_BUFFER
194 #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)
195 # define GETGRNAM_R_HAS_BUFFER
197 # undef GETGRNAM_R_HAS_BUFFER
200 /* Any of the getgrent getgrgid getgrnam using buffer? */
202 #if (defined(GETGRENT_R_HAS_BUFFER) || defined(GETGRGID_R_HAS_BUFFER) || defined(GETGRNAM_R_HAS_BUFFER))
203 # define USE_GRENT_BUFFER
205 # undef USE_GRENT_BUFFER
208 /* The getgrent getgrgid getgrnam using ptr? */
210 #if defined(HAS_GETGRENT_R) && (GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIR)
211 # define GETGRENT_R_HAS_PTR
213 # undef GETGRENT_R_HAS_PTR
215 #if defined(HAS_GETGRGID_R) && (GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBWR || GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBIR)
216 # define GETGRGID_R_HAS_PTR
218 # undef GETGRGID_R_HAS_PTR
220 #if defined(HAS_GETGRNAM_R) && (GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR)
221 # define GETGRNAM_R_HAS_PTR
223 # undef GETGRNAM_R_HAS_PTR
226 /* Any of the getgrent getgrgid getgrnam using ptr? */
228 #if (defined(GETGRENT_R_HAS_PTR) || defined(GETGRGID_R_HAS_PTR) || defined(GETGRNAM_R_HAS_PTR))
229 # define USE_GRENT_PTR
231 # undef USE_GRENT_PTR
234 /* The getpwent getpwnam getpwuid using ptr? */
236 #if defined(HAS_GETPWENT_R) && (GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIR)
237 # define GETPWENT_R_HAS_PTR
239 # undef GETPWENT_R_HAS_PTR
241 #if defined(HAS_GETPWNAM_R) && (GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR)
242 # define GETPWNAM_R_HAS_PTR
244 # undef GETPWNAM_R_HAS_PTR
246 #if defined(HAS_GETPWUID_R) && (GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBWR || GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBIR)
247 # define GETPWUID_R_HAS_PTR
249 # undef GETPWUID_R_HAS_PTR
252 /* Any of the getpwent getpwnam getpwuid using ptr? */
254 #if (defined(GETPWENT_R_HAS_PTR) || defined(GETPWNAM_R_HAS_PTR) || defined(GETPWUID_R_HAS_PTR))
255 # define USE_PWENT_PTR
257 # undef USE_PWENT_PTR
260 /* The getspent getspnam using ptr? */
262 #if defined(HAS_GETSPNAM_R) && (GETSPNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR)
263 # define GETSPNAM_R_HAS_PTR
265 # undef GETSPNAM_R_HAS_PTR
268 /* Any of the getspent getspnam using ptr? */
270 #if (defined(GETSPENT_R_HAS_PTR) || defined(GETSPNAM_R_HAS_PTR))
271 # define USE_SPENT_PTR
273 # undef USE_SPENT_PTR
276 /* The getgrent getgrgid getgrnam setgrent endgrent using fptr? */
278 #if defined(HAS_GETGRENT_R) && (GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIH)
279 # define GETGRENT_R_HAS_FPTR
281 # undef GETGRENT_R_HAS_FPTR
283 #if defined(HAS_SETGRENT_R) && (SETGRENT_R_PROTO == REENTRANT_PROTO_I_H || SETGRENT_R_PROTO == REENTRANT_PROTO_V_H)
284 # define SETGRENT_R_HAS_FPTR
286 # undef SETGRENT_R_HAS_FPTR
288 #if defined(HAS_ENDGRENT_R) && (ENDGRENT_R_PROTO == REENTRANT_PROTO_I_H || ENDGRENT_R_PROTO == REENTRANT_PROTO_V_H)
289 # define ENDGRENT_R_HAS_FPTR
291 # undef ENDGRENT_R_HAS_FPTR
294 /* Any of the getgrent getgrgid getgrnam setgrent endgrent using fptr? */
296 #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))
297 # define USE_GRENT_FPTR
299 # undef USE_GRENT_FPTR
302 /* The getpwent getpwnam getpwuid setpwent endpwent using fptr? */
304 #if defined(HAS_GETPWENT_R) && (GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIH)
305 # define GETPWENT_R_HAS_FPTR
307 # undef GETPWENT_R_HAS_FPTR
309 #if defined(HAS_SETPWENT_R) && (SETPWENT_R_PROTO == REENTRANT_PROTO_I_H || SETPWENT_R_PROTO == REENTRANT_PROTO_V_H)
310 # define SETPWENT_R_HAS_FPTR
312 # undef SETPWENT_R_HAS_FPTR
314 #if defined(HAS_ENDPWENT_R) && (ENDPWENT_R_PROTO == REENTRANT_PROTO_I_H || ENDPWENT_R_PROTO == REENTRANT_PROTO_V_H)
315 # define ENDPWENT_R_HAS_FPTR
317 # undef ENDPWENT_R_HAS_FPTR
320 /* Any of the getpwent getpwnam getpwuid setpwent endpwent using fptr? */
322 #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))
323 # define USE_PWENT_FPTR
325 # undef USE_PWENT_FPTR
328 /* The getpwent getpwgid getpwnam using buffer? */
330 #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)
331 # define GETPWENT_R_HAS_BUFFER
333 # undef GETPWENT_R_HAS_BUFFER
335 #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)
336 # define GETPWNAM_R_HAS_BUFFER
338 # undef GETPWNAM_R_HAS_BUFFER
341 /* Any of the getpwent getpwgid getpwnam using buffer? */
343 #if (defined(GETPWENT_R_HAS_BUFFER) || defined(GETPWGID_R_HAS_BUFFER) || defined(GETPWNAM_R_HAS_BUFFER))
344 # define USE_PWENT_BUFFER
346 # undef USE_PWENT_BUFFER
349 /* The gethostent gethostbyaddr gethostbyname using ptr? */
351 #if defined(HAS_GETHOSTENT_R) && (GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBWRE)
352 # define GETHOSTENT_R_HAS_PTR
354 # undef GETHOSTENT_R_HAS_PTR
356 #if defined(HAS_GETHOSTBYADDR_R) && (GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISBWRE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_TsISBWRE)
357 # define GETHOSTBYADDR_R_HAS_PTR
359 # undef GETHOSTBYADDR_R_HAS_PTR
361 #if defined(HAS_GETHOSTBYNAME_R) && (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE)
362 # define GETHOSTBYNAME_R_HAS_PTR
364 # undef GETHOSTBYNAME_R_HAS_PTR
367 /* Any of the gethostent gethostbyaddr gethostbyname using ptr? */
369 #if (defined(GETHOSTENT_R_HAS_PTR) || defined(GETHOSTBYADDR_R_HAS_PTR) || defined(GETHOSTBYNAME_R_HAS_PTR))
370 # define USE_HOSTENT_PTR
372 # undef USE_HOSTENT_PTR
375 /* The getnetent getnetbyaddr getnetbyname using ptr? */
377 #if defined(HAS_GETNETENT_R) && (GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBWRE)
378 # define GETNETENT_R_HAS_PTR
380 # undef GETNETENT_R_HAS_PTR
382 #if defined(HAS_GETNETBYADDR_R) && (GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE || GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_uISBWRE)
383 # define GETNETBYADDR_R_HAS_PTR
385 # undef GETNETBYADDR_R_HAS_PTR
387 #if defined(HAS_GETNETBYNAME_R) && (GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE)
388 # define GETNETBYNAME_R_HAS_PTR
390 # undef GETNETBYNAME_R_HAS_PTR
393 /* Any of the getnetent getnetbyaddr getnetbyname using ptr? */
395 #if (defined(GETNETENT_R_HAS_PTR) || defined(GETNETBYADDR_R_HAS_PTR) || defined(GETNETBYNAME_R_HAS_PTR))
396 # define USE_NETENT_PTR
398 # undef USE_NETENT_PTR
401 /* The getprotoent getprotobyname getprotobynumber using ptr? */
403 #if defined(HAS_GETPROTOENT_R) && (GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBWR)
404 # define GETPROTOENT_R_HAS_PTR
406 # undef GETPROTOENT_R_HAS_PTR
408 #if defined(HAS_GETPROTOBYNAME_R) && (GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR)
409 # define GETPROTOBYNAME_R_HAS_PTR
411 # undef GETPROTOBYNAME_R_HAS_PTR
413 #if defined(HAS_GETPROTOBYNUMBER_R) && (GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR)
414 # define GETPROTOBYNUMBER_R_HAS_PTR
416 # undef GETPROTOBYNUMBER_R_HAS_PTR
419 /* Any of the getprotoent getprotobyname getprotobynumber using ptr? */
421 #if (defined(GETPROTOENT_R_HAS_PTR) || defined(GETPROTOBYNAME_R_HAS_PTR) || defined(GETPROTOBYNUMBER_R_HAS_PTR))
422 # define USE_PROTOENT_PTR
424 # undef USE_PROTOENT_PTR
427 /* The getservent getservbyname getservbyport using ptr? */
429 #if defined(HAS_GETSERVENT_R) && (GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBWR)
430 # define GETSERVENT_R_HAS_PTR
432 # undef GETSERVENT_R_HAS_PTR
434 #if defined(HAS_GETSERVBYNAME_R) && (GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR)
435 # define GETSERVBYNAME_R_HAS_PTR
437 # undef GETSERVBYNAME_R_HAS_PTR
439 #if defined(HAS_GETSERVBYPORT_R) && (GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR)
440 # define GETSERVBYPORT_R_HAS_PTR
442 # undef GETSERVBYPORT_R_HAS_PTR
445 /* Any of the getservent getservbyname getservbyport using ptr? */
447 #if (defined(GETSERVENT_R_HAS_PTR) || defined(GETSERVBYNAME_R_HAS_PTR) || defined(GETSERVBYPORT_R_HAS_PTR))
448 # define USE_SERVENT_PTR
450 # undef USE_SERVENT_PTR
453 /* The gethostent gethostbyaddr gethostbyname using buffer? */
455 #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)
456 # define GETHOSTENT_R_HAS_BUFFER
458 # undef GETHOSTENT_R_HAS_BUFFER
460 #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)
461 # define GETHOSTBYADDR_R_HAS_BUFFER
463 # undef GETHOSTBYADDR_R_HAS_BUFFER
465 #if defined(HAS_GETHOSTBYNAME_R) && (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE || GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE)
466 # define GETHOSTBYNAME_R_HAS_BUFFER
468 # undef GETHOSTBYNAME_R_HAS_BUFFER
471 /* Any of the gethostent gethostbyaddr gethostbyname using buffer? */
473 #if (defined(GETHOSTENT_R_HAS_BUFFER) || defined(GETHOSTBYADDR_R_HAS_BUFFER) || defined(GETHOSTBYNAME_R_HAS_BUFFER))
474 # define USE_HOSTENT_BUFFER
476 # undef USE_HOSTENT_BUFFER
479 /* The getnetent getnetbyaddr getnetbyname using buffer? */
481 #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)
482 # define GETNETENT_R_HAS_BUFFER
484 # undef GETNETENT_R_HAS_BUFFER
486 #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)
487 # define GETNETBYADDR_R_HAS_BUFFER
489 # undef GETNETBYADDR_R_HAS_BUFFER
491 #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)
492 # define GETNETBYNAME_R_HAS_BUFFER
494 # undef GETNETBYNAME_R_HAS_BUFFER
497 /* Any of the getnetent getnetbyaddr getnetbyname using buffer? */
499 #if (defined(GETNETENT_R_HAS_BUFFER) || defined(GETNETBYADDR_R_HAS_BUFFER) || defined(GETNETBYNAME_R_HAS_BUFFER))
500 # define USE_NETENT_BUFFER
502 # undef USE_NETENT_BUFFER
505 /* The getprotoent getprotobyname getprotobynumber using buffer? */
507 #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)
508 # define GETPROTOENT_R_HAS_BUFFER
510 # undef GETPROTOENT_R_HAS_BUFFER
512 #if defined(HAS_GETPROTOBYNAME_R) && (GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI)
513 # define GETPROTOBYNAME_R_HAS_BUFFER
515 # undef GETPROTOBYNAME_R_HAS_BUFFER
517 #if defined(HAS_GETPROTOBYNUMBER_R) && (GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR || GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_S_ISBI)
518 # define GETPROTOBYNUMBER_R_HAS_BUFFER
520 # undef GETPROTOBYNUMBER_R_HAS_BUFFER
523 /* Any of the getprotoent getprotobyname getprotobynumber using buffer? */
525 #if (defined(GETPROTOENT_R_HAS_BUFFER) || defined(GETPROTOBYNAME_R_HAS_BUFFER) || defined(GETPROTOBYNUMBER_R_HAS_BUFFER))
526 # define USE_PROTOENT_BUFFER
528 # undef USE_PROTOENT_BUFFER
531 /* The getservent getservbyname getservbyport using buffer? */
533 #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)
534 # define GETSERVENT_R_HAS_BUFFER
536 # undef GETSERVENT_R_HAS_BUFFER
538 #if defined(HAS_GETSERVBYNAME_R) && (GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR || GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_S_CCSBI)
539 # define GETSERVBYNAME_R_HAS_BUFFER
541 # undef GETSERVBYNAME_R_HAS_BUFFER
543 #if defined(HAS_GETSERVBYPORT_R) && (GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR || GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_S_ICSBI)
544 # define GETSERVBYPORT_R_HAS_BUFFER
546 # undef GETSERVBYPORT_R_HAS_BUFFER
549 /* Any of the getservent getservbyname getservbyport using buffer? */
551 #if (defined(GETSERVENT_R_HAS_BUFFER) || defined(GETSERVBYNAME_R_HAS_BUFFER) || defined(GETSERVBYPORT_R_HAS_BUFFER))
552 # define USE_SERVENT_BUFFER
554 # undef USE_SERVENT_BUFFER
557 /* The gethostent gethostbyaddr gethostbyname using errno? */
559 #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)
560 # define GETHOSTENT_R_HAS_ERRNO
562 # undef GETHOSTENT_R_HAS_ERRNO
564 #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)
565 # define GETHOSTBYADDR_R_HAS_ERRNO
567 # undef GETHOSTBYADDR_R_HAS_ERRNO
569 #if defined(HAS_GETHOSTBYNAME_R) && (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE || GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE)
570 # define GETHOSTBYNAME_R_HAS_ERRNO
572 # undef GETHOSTBYNAME_R_HAS_ERRNO
575 /* Any of the gethostent gethostbyaddr gethostbyname using errno? */
577 #if (defined(GETHOSTENT_R_HAS_ERRNO) || defined(GETHOSTBYADDR_R_HAS_ERRNO) || defined(GETHOSTBYNAME_R_HAS_ERRNO))
578 # define USE_HOSTENT_ERRNO
580 # undef USE_HOSTENT_ERRNO
583 /* The getnetent getnetbyaddr getnetbyname using errno? */
585 #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)
586 # define GETNETENT_R_HAS_ERRNO
588 # undef GETNETENT_R_HAS_ERRNO
590 #if defined(HAS_GETNETBYADDR_R) && (GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE || GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_uISBWRE)
591 # define GETNETBYADDR_R_HAS_ERRNO
593 # undef GETNETBYADDR_R_HAS_ERRNO
595 #if defined(HAS_GETNETBYNAME_R) && (GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE)
596 # define GETNETBYNAME_R_HAS_ERRNO
598 # undef GETNETBYNAME_R_HAS_ERRNO
601 /* Any of the getnetent getnetbyaddr getnetbyname using errno? */
603 #if (defined(GETNETENT_R_HAS_ERRNO) || defined(GETNETBYADDR_R_HAS_ERRNO) || defined(GETNETBYNAME_R_HAS_ERRNO))
604 # define USE_NETENT_ERRNO
606 # undef USE_NETENT_ERRNO
612 char* _asctime_buffer;
613 size_t _asctime_size;
614 #endif /* HAS_ASCTIME_R */
616 #if CRYPT_R_PROTO == REENTRANT_PROTO_B_CCD
619 struct crypt_data *_crypt_struct_buffer;
621 #endif /* HAS_CRYPT_R */
625 #endif /* HAS_CTIME_R */
627 struct drand48_data _drand48_struct;
628 double _drand48_double;
629 #endif /* HAS_DRAND48_R */
630 #ifdef HAS_GETGRNAM_R
631 struct group _grent_struct;
634 # ifdef USE_GRENT_PTR
635 struct group* _grent_ptr;
637 # ifdef USE_GRENT_FPTR
640 #endif /* HAS_GETGRNAM_R */
641 #ifdef HAS_GETHOSTBYNAME_R
642 struct hostent _hostent_struct;
643 # if GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
644 struct hostent_data _hostent_data;
646 char* _hostent_buffer;
647 size_t _hostent_size;
649 # ifdef USE_HOSTENT_PTR
650 struct hostent* _hostent_ptr;
652 # ifdef USE_HOSTENT_ERRNO
655 #endif /* HAS_GETHOSTBYNAME_R */
656 #ifdef HAS_GETLOGIN_R
657 char* _getlogin_buffer;
658 size_t _getlogin_size;
659 #endif /* HAS_GETLOGIN_R */
660 #ifdef HAS_GETNETBYNAME_R
661 struct netent _netent_struct;
662 # if GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
663 struct netent_data _netent_data;
665 char* _netent_buffer;
668 # ifdef USE_NETENT_PTR
669 struct netent* _netent_ptr;
671 # ifdef USE_NETENT_ERRNO
674 #endif /* HAS_GETNETBYNAME_R */
675 #ifdef HAS_GETPROTOBYNAME_R
676 struct protoent _protoent_struct;
677 # if GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
678 struct protoent_data _protoent_data;
680 char* _protoent_buffer;
681 size_t _protoent_size;
683 # ifdef USE_PROTOENT_PTR
684 struct protoent* _protoent_ptr;
686 # ifdef USE_PROTOENT_ERRNO
689 #endif /* HAS_GETPROTOBYNAME_R */
690 #ifdef HAS_GETPWNAM_R
691 struct passwd _pwent_struct;
694 # ifdef USE_PWENT_PTR
695 struct passwd* _pwent_ptr;
697 # ifdef USE_PWENT_FPTR
700 #endif /* HAS_GETPWNAM_R */
701 #ifdef HAS_GETSERVBYNAME_R
702 struct servent _servent_struct;
703 # if GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD
704 struct servent_data _servent_data;
706 char* _servent_buffer;
707 size_t _servent_size;
709 # ifdef USE_SERVENT_PTR
710 struct servent* _servent_ptr;
712 # ifdef USE_SERVENT_ERRNO
715 #endif /* HAS_GETSERVBYNAME_R */
716 #ifdef HAS_GETSPNAM_R
717 struct spwd _spent_struct;
720 # ifdef USE_SPENT_PTR
721 struct spwd* _spent_ptr;
723 # ifdef USE_SPENT_FPTR
726 #endif /* HAS_GETSPNAM_R */
728 struct tm _gmtime_struct;
729 #endif /* HAS_GMTIME_R */
730 #ifdef HAS_LOCALTIME_R
731 struct tm _localtime_struct;
732 #endif /* HAS_LOCALTIME_R */
734 struct random_data _random_struct;
735 # if RANDOM_R_PROTO == REENTRANT_PROTO_I_iS
738 # if RANDOM_R_PROTO == REENTRANT_PROTO_I_lS
741 # if RANDOM_R_PROTO == REENTRANT_PROTO_I_St
742 int32_t _random_retval;
744 #endif /* HAS_RANDOM_R */
746 struct dirent* _readdir_struct;
747 size_t _readdir_size;
748 # if READDIR_R_PROTO == REENTRANT_PROTO_I_TSR
749 struct dirent* _readdir_ptr;
751 #endif /* HAS_READDIR_R */
752 #ifdef HAS_READDIR64_R
753 struct dirent64* _readdir64_struct;
754 size_t _readdir64_size;
755 # if READDIR64_R_PROTO == REENTRANT_PROTO_I_TSR
756 struct dirent64* _readdir64_ptr;
758 #endif /* HAS_READDIR64_R */
759 #ifdef HAS_SETLOCALE_R
760 char* _setlocale_buffer;
761 size_t _setlocale_size;
762 #endif /* HAS_SETLOCALE_R */
764 struct random_data _srandom_struct;
765 #endif /* HAS_SRANDOM_R */
766 #ifdef HAS_STRERROR_R
767 char* _strerror_buffer;
768 size_t _strerror_size;
769 #endif /* HAS_STRERROR_R */
771 char* _ttyname_buffer;
772 size_t _ttyname_size;
773 #endif /* HAS_TTYNAME_R */
775 int dummy; /* cannot have empty structs */
782 # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_B_SB
783 # define asctime(a) asctime_r(a, PL_reentrant_buffer->_asctime_buffer)
785 # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_B_SBI
786 # define asctime(a) asctime_r(a, PL_reentrant_buffer->_asctime_buffer, PL_reentrant_buffer->_asctime_size)
788 # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_I_SB
789 # define asctime(a) (asctime_r(a, PL_reentrant_buffer->_asctime_buffer) == 0 ? PL_reentrant_buffer->_asctime_buffer : 0)
791 # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_I_SBI
792 # define asctime(a) (asctime_r(a, PL_reentrant_buffer->_asctime_buffer, PL_reentrant_buffer->_asctime_size) == 0 ? PL_reentrant_buffer->_asctime_buffer : 0)
794 #endif /* HAS_ASCTIME_R */
798 # if !defined(crypt) && CRYPT_R_PROTO == REENTRANT_PROTO_B_CCS
799 # define crypt(a, b) crypt_r(a, b, PL_reentrant_buffer->_crypt_struct_buffer)
801 # if !defined(crypt) && CRYPT_R_PROTO == REENTRANT_PROTO_B_CCD
802 # define crypt(a, b) crypt_r(a, b, &PL_reentrant_buffer->_crypt_data)
804 #endif /* HAS_CRYPT_R */
808 # if !defined(ctermid) && CTERMID_R_PROTO == REENTRANT_PROTO_B_B
809 # define ctermid(a) ctermid_r(a)
811 #endif /* HAS_CTERMID_R */
815 # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_B_SB
816 # define ctime(a) ctime_r(a, PL_reentrant_buffer->_ctime_buffer)
818 # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_B_SBI
819 # define ctime(a) ctime_r(a, PL_reentrant_buffer->_ctime_buffer, PL_reentrant_buffer->_ctime_size)
821 # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_I_SB
822 # define ctime(a) (ctime_r(a, PL_reentrant_buffer->_ctime_buffer) == 0 ? PL_reentrant_buffer->_ctime_buffer : 0)
824 # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_I_SBI
825 # define ctime(a) (ctime_r(a, PL_reentrant_buffer->_ctime_buffer, PL_reentrant_buffer->_ctime_size) == 0 ? PL_reentrant_buffer->_ctime_buffer : 0)
827 #endif /* HAS_CTIME_R */
831 # if !defined(drand48) && DRAND48_R_PROTO == REENTRANT_PROTO_I_ST
832 # define drand48() (drand48_r(&PL_reentrant_buffer->_drand48_struct, &PL_reentrant_buffer->_drand48_double) == 0 ? PL_reentrant_buffer->_drand48_double : 0)
834 #endif /* HAS_DRAND48_R */
836 #ifdef HAS_ENDGRENT_R
838 # if !defined(endgrent) && ENDGRENT_R_PROTO == REENTRANT_PROTO_I_H
839 # define endgrent() (endgrent_r(&PL_reentrant_buffer->_grent_fptr) == 0 ? 1 : 0)
841 # if !defined(endgrent) && ENDGRENT_R_PROTO == REENTRANT_PROTO_V_H
842 # define endgrent() endgrent_r(&PL_reentrant_buffer->_grent_fptr)
844 #endif /* HAS_ENDGRENT_R */
846 #ifdef HAS_ENDHOSTENT_R
848 # if !defined(endhostent) && ENDHOSTENT_R_PROTO == REENTRANT_PROTO_I_D
849 # define endhostent() (endhostent_r(&PL_reentrant_buffer->_hostent_data) == 0 ? 1 : 0)
851 # if !defined(endhostent) && ENDHOSTENT_R_PROTO == REENTRANT_PROTO_V_D
852 # define endhostent() endhostent_r(&PL_reentrant_buffer->_hostent_data)
854 #endif /* HAS_ENDHOSTENT_R */
856 #ifdef HAS_ENDNETENT_R
858 # if !defined(endnetent) && ENDNETENT_R_PROTO == REENTRANT_PROTO_I_D
859 # define endnetent() (endnetent_r(&PL_reentrant_buffer->_netent_data) == 0 ? 1 : 0)
861 # if !defined(endnetent) && ENDNETENT_R_PROTO == REENTRANT_PROTO_V_D
862 # define endnetent() endnetent_r(&PL_reentrant_buffer->_netent_data)
864 #endif /* HAS_ENDNETENT_R */
866 #ifdef HAS_ENDPROTOENT_R
868 # if !defined(endprotoent) && ENDPROTOENT_R_PROTO == REENTRANT_PROTO_I_D
869 # define endprotoent() (endprotoent_r(&PL_reentrant_buffer->_protoent_data) == 0 ? 1 : 0)
871 # if !defined(endprotoent) && ENDPROTOENT_R_PROTO == REENTRANT_PROTO_V_D
872 # define endprotoent() endprotoent_r(&PL_reentrant_buffer->_protoent_data)
874 #endif /* HAS_ENDPROTOENT_R */
876 #ifdef HAS_ENDPWENT_R
878 # if !defined(endpwent) && ENDPWENT_R_PROTO == REENTRANT_PROTO_I_H
879 # define endpwent() (endpwent_r(&PL_reentrant_buffer->_pwent_fptr) == 0 ? 1 : 0)
881 # if !defined(endpwent) && ENDPWENT_R_PROTO == REENTRANT_PROTO_V_H
882 # define endpwent() endpwent_r(&PL_reentrant_buffer->_pwent_fptr)
884 #endif /* HAS_ENDPWENT_R */
886 #ifdef HAS_ENDSERVENT_R
888 # if !defined(endservent) && ENDSERVENT_R_PROTO == REENTRANT_PROTO_I_D
889 # define endservent() (endservent_r(&PL_reentrant_buffer->_servent_data) == 0 ? 1 : 0)
891 # if !defined(endservent) && ENDSERVENT_R_PROTO == REENTRANT_PROTO_V_D
892 # define endservent() endservent_r(&PL_reentrant_buffer->_servent_data)
894 #endif /* HAS_ENDSERVENT_R */
896 #ifdef HAS_GETGRENT_R
898 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBWR
899 # 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))
901 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIR
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_ptr)) == 0 ? PL_reentrant_buffer->_grent_ptr : ((PL_reentrant_retint == ERANGE) ? (struct group *) Perl_reentrant_retry("getgrent") : 0))
904 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_S_SBW
905 # 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))
907 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_S_SBI
908 # 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))
910 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBI
911 # 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))
913 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIH
914 # 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))
916 #endif /* HAS_GETGRENT_R */
918 #ifdef HAS_GETGRGID_R
920 # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBWR
921 # 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))
923 # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBIR
924 # 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))
926 # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBI
927 # 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))
929 # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_S_TSBI
930 # 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))
932 #endif /* HAS_GETGRGID_R */
934 #ifdef HAS_GETGRNAM_R
936 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR
937 # 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))
939 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR
940 # 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))
942 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_S_CBI
943 # 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))
945 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBI
946 # 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))
948 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_S_CSBI
949 # 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))
951 #endif /* HAS_GETGRNAM_R */
953 #ifdef HAS_GETHOSTBYADDR_R
954 # undef gethostbyaddr
955 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISBWRE
956 # 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))
958 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBWIE
959 # 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))
961 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBIE
962 # 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))
964 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TWISBIE
965 # 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))
967 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CIISBIE
968 # 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))
970 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CSBIE
971 # 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))
973 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TSBIE
974 # 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))
976 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISD
977 # 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))
979 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CIISD
980 # 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))
982 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CII
983 # 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))
985 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_TsISBWRE
986 # 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))
988 #endif /* HAS_GETHOSTBYADDR_R */
990 #ifdef HAS_GETHOSTBYNAME_R
991 # undef gethostbyname
992 # if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE
993 # 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))
995 # if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE
996 # 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))
998 # if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
999 # 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))
1001 #endif /* HAS_GETHOSTBYNAME_R */
1003 #ifdef HAS_GETHOSTENT_R
1005 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBWRE
1006 # 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))
1008 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBIE
1009 # 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))
1011 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBIE
1012 # 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))
1014 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBI
1015 # 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))
1017 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBI
1018 # 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))
1020 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SD
1021 # 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))
1023 #endif /* HAS_GETHOSTENT_R */
1025 #ifdef HAS_GETLOGIN_R
1027 # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_I_BW
1028 # 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))
1030 # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_I_BI
1031 # 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))
1033 # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_B_BW
1034 # define getlogin() getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size)
1036 # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_B_BI
1037 # define getlogin() getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size)
1039 #endif /* HAS_GETLOGIN_R */
1041 #ifdef HAS_GETNETBYADDR_R
1042 # undef getnetbyaddr
1043 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE
1044 # 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))
1046 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_LISBI
1047 # 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))
1049 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_S_TISBI
1050 # 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))
1052 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_S_LISBI
1053 # 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))
1055 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_TISD
1056 # 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))
1058 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_LISD
1059 # 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))
1061 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_IISD
1062 # 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))
1064 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_uISBWRE
1065 # 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))
1067 #endif /* HAS_GETNETBYADDR_R */
1069 #ifdef HAS_GETNETBYNAME_R
1070 # undef getnetbyname
1071 # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE
1072 # 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))
1074 # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBI
1075 # 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))
1077 # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI
1078 # 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))
1080 # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
1081 # 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))
1083 #endif /* HAS_GETNETBYNAME_R */
1085 #ifdef HAS_GETNETENT_R
1087 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBWRE
1088 # 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))
1090 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBIE
1091 # 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))
1093 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBIE
1094 # 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))
1096 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBI
1097 # 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))
1099 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBI
1100 # 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))
1102 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SD
1103 # 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))
1105 #endif /* HAS_GETNETENT_R */
1107 #ifdef HAS_GETPROTOBYNAME_R
1108 # undef getprotobyname
1109 # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR
1110 # 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))
1112 # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI
1113 # 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))
1115 # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
1116 # 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))
1118 #endif /* HAS_GETPROTOBYNAME_R */
1120 #ifdef HAS_GETPROTOBYNUMBER_R
1121 # undef getprotobynumber
1122 # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR
1123 # 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))
1125 # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_S_ISBI
1126 # 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))
1128 # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISD
1129 # 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))
1131 #endif /* HAS_GETPROTOBYNUMBER_R */
1133 #ifdef HAS_GETPROTOENT_R
1135 # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBWR
1136 # 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))
1138 # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBI
1139 # 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))
1141 # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_S_SBI
1142 # 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))
1144 # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SD
1145 # 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))
1147 #endif /* HAS_GETPROTOENT_R */
1149 #ifdef HAS_GETPWENT_R
1151 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBWR
1152 # 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))
1154 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIR
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_ptr)) == 0 ? PL_reentrant_buffer->_pwent_ptr : ((PL_reentrant_retint == ERANGE) ? (struct passwd *) Perl_reentrant_retry("getpwent") : 0))
1157 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_S_SBW
1158 # 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))
1160 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_S_SBI
1161 # 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))
1163 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBI
1164 # 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))
1166 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIH
1167 # 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))
1169 #endif /* HAS_GETPWENT_R */
1171 #ifdef HAS_GETPWNAM_R
1173 # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR
1174 # 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))
1176 # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR
1177 # 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))
1179 # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_S_CSBI
1180 # 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))
1182 # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBI
1183 # 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))
1185 #endif /* HAS_GETPWNAM_R */
1187 #ifdef HAS_GETPWUID_R
1189 # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBWR
1190 # 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))
1192 # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBIR
1193 # 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))
1195 # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBI
1196 # 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))
1198 # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_S_TSBI
1199 # 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))
1201 #endif /* HAS_GETPWUID_R */
1203 #ifdef HAS_GETSERVBYNAME_R
1204 # undef getservbyname
1205 # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR
1206 # 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))
1208 # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_S_CCSBI
1209 # 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))
1211 # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD
1212 # 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))
1214 #endif /* HAS_GETSERVBYNAME_R */
1216 #ifdef HAS_GETSERVBYPORT_R
1217 # undef getservbyport
1218 # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR
1219 # 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))
1221 # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_S_ICSBI
1222 # 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))
1224 # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSD
1225 # 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))
1227 #endif /* HAS_GETSERVBYPORT_R */
1229 #ifdef HAS_GETSERVENT_R
1231 # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBWR
1232 # 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))
1234 # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBI
1235 # 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))
1237 # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_S_SBI
1238 # 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))
1240 # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SD
1241 # 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))
1243 #endif /* HAS_GETSERVENT_R */
1245 #ifdef HAS_GETSPNAM_R
1247 # if !defined(getspnam) && GETSPNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR
1248 # 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))
1250 # if !defined(getspnam) && GETSPNAM_R_PROTO == REENTRANT_PROTO_S_CSBI
1251 # 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))
1253 #endif /* HAS_GETSPNAM_R */
1257 # if !defined(gmtime) && GMTIME_R_PROTO == REENTRANT_PROTO_S_TS
1258 # define gmtime(a) (gmtime_r(a, &PL_reentrant_buffer->_gmtime_struct) ? &PL_reentrant_buffer->_gmtime_struct : 0)
1260 # if !defined(gmtime) && GMTIME_R_PROTO == REENTRANT_PROTO_I_TS
1261 # define gmtime(a) (gmtime_r(a, &PL_reentrant_buffer->_gmtime_struct) == 0 ? &PL_reentrant_buffer->_gmtime_struct : 0)
1263 #endif /* HAS_GMTIME_R */
1265 #ifdef HAS_LOCALTIME_R
1267 # if !defined(localtime) && LOCALTIME_R_PROTO == REENTRANT_PROTO_S_TS
1268 # define localtime(a) (localtime_r(a, &PL_reentrant_buffer->_localtime_struct) ? &PL_reentrant_buffer->_localtime_struct : 0)
1270 # if !defined(localtime) && LOCALTIME_R_PROTO == REENTRANT_PROTO_I_TS
1271 # define localtime(a) (localtime_r(a, &PL_reentrant_buffer->_localtime_struct) == 0 ? &PL_reentrant_buffer->_localtime_struct : 0)
1273 #endif /* HAS_LOCALTIME_R */
1277 # if !defined(random) && RANDOM_R_PROTO == REENTRANT_PROTO_I_iS
1278 # define random() (random_r(&PL_reentrant_buffer->_random_retval, &PL_reentrant_buffer->_random_struct) == 0 ? PL_reentrant_buffer->_random_retval : 0)
1280 # if !defined(random) && RANDOM_R_PROTO == REENTRANT_PROTO_I_lS
1281 # define random() (random_r(&PL_reentrant_buffer->_random_retval, &PL_reentrant_buffer->_random_struct) == 0 ? PL_reentrant_buffer->_random_retval : 0)
1283 # if !defined(random) && RANDOM_R_PROTO == REENTRANT_PROTO_I_St
1284 # define random() (random_r(&PL_reentrant_buffer->_random_struct, &PL_reentrant_buffer->_random_retval) == 0 ? PL_reentrant_buffer->_random_retval : 0)
1286 #endif /* HAS_RANDOM_R */
1288 #ifdef HAS_READDIR_R
1290 # if !defined(readdir) && READDIR_R_PROTO == REENTRANT_PROTO_I_TSR
1291 # define readdir(a) (readdir_r(a, PL_reentrant_buffer->_readdir_struct, &PL_reentrant_buffer->_readdir_ptr) == 0 ? PL_reentrant_buffer->_readdir_ptr : 0)
1293 # if !defined(readdir) && READDIR_R_PROTO == REENTRANT_PROTO_I_TS
1294 # define readdir(a) (readdir_r(a, PL_reentrant_buffer->_readdir_struct) == 0 ? PL_reentrant_buffer->_readdir_struct : 0)
1296 #endif /* HAS_READDIR_R */
1298 #ifdef HAS_READDIR64_R
1300 # if !defined(readdir64) && READDIR64_R_PROTO == REENTRANT_PROTO_I_TSR
1301 # define readdir64(a) (readdir64_r(a, PL_reentrant_buffer->_readdir64_struct, &PL_reentrant_buffer->_readdir64_ptr) == 0 ? PL_reentrant_buffer->_readdir64_ptr : 0)
1303 # if !defined(readdir64) && READDIR64_R_PROTO == REENTRANT_PROTO_I_TS
1304 # define readdir64(a) (readdir64_r(a, PL_reentrant_buffer->_readdir64_struct) == 0 ? PL_reentrant_buffer->_readdir64_struct : 0)
1306 #endif /* HAS_READDIR64_R */
1308 #ifdef HAS_SETGRENT_R
1310 # if !defined(setgrent) && SETGRENT_R_PROTO == REENTRANT_PROTO_I_H
1311 # define setgrent() (setgrent_r(&PL_reentrant_buffer->_grent_fptr) == 0 ? 1 : 0)
1313 # if !defined(setgrent) && SETGRENT_R_PROTO == REENTRANT_PROTO_V_H
1314 # define setgrent() setgrent_r(&PL_reentrant_buffer->_grent_fptr)
1316 #endif /* HAS_SETGRENT_R */
1318 #ifdef HAS_SETHOSTENT_R
1320 # if !defined(sethostent) && SETHOSTENT_R_PROTO == REENTRANT_PROTO_I_ID
1321 # define sethostent(a) (sethostent_r(a, &PL_reentrant_buffer->_hostent_data) == 0 ? 1 : 0)
1323 # if !defined(sethostent) && SETHOSTENT_R_PROTO == REENTRANT_PROTO_V_ID
1324 # define sethostent(a) sethostent_r(a, &PL_reentrant_buffer->_hostent_data)
1326 #endif /* HAS_SETHOSTENT_R */
1328 #ifdef HAS_SETLOCALE_R
1330 # if !defined(setlocale) && SETLOCALE_R_PROTO == REENTRANT_PROTO_I_ICBI
1331 # 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)
1333 #endif /* HAS_SETLOCALE_R */
1335 #ifdef HAS_SETNETENT_R
1337 # if !defined(setnetent) && SETNETENT_R_PROTO == REENTRANT_PROTO_I_ID
1338 # define setnetent(a) (setnetent_r(a, &PL_reentrant_buffer->_netent_data) == 0 ? 1 : 0)
1340 # if !defined(setnetent) && SETNETENT_R_PROTO == REENTRANT_PROTO_V_ID
1341 # define setnetent(a) setnetent_r(a, &PL_reentrant_buffer->_netent_data)
1343 #endif /* HAS_SETNETENT_R */
1345 #ifdef HAS_SETPROTOENT_R
1347 # if !defined(setprotoent) && SETPROTOENT_R_PROTO == REENTRANT_PROTO_I_ID
1348 # define setprotoent(a) (setprotoent_r(a, &PL_reentrant_buffer->_protoent_data) == 0 ? 1 : 0)
1350 # if !defined(setprotoent) && SETPROTOENT_R_PROTO == REENTRANT_PROTO_V_ID
1351 # define setprotoent(a) setprotoent_r(a, &PL_reentrant_buffer->_protoent_data)
1353 #endif /* HAS_SETPROTOENT_R */
1355 #ifdef HAS_SETPWENT_R
1357 # if !defined(setpwent) && SETPWENT_R_PROTO == REENTRANT_PROTO_I_H
1358 # define setpwent() (setpwent_r(&PL_reentrant_buffer->_pwent_fptr) == 0 ? 1 : 0)
1360 # if !defined(setpwent) && SETPWENT_R_PROTO == REENTRANT_PROTO_V_H
1361 # define setpwent() setpwent_r(&PL_reentrant_buffer->_pwent_fptr)
1363 #endif /* HAS_SETPWENT_R */
1365 #ifdef HAS_SETSERVENT_R
1367 # if !defined(setservent) && SETSERVENT_R_PROTO == REENTRANT_PROTO_I_ID
1368 # define setservent(a) (setservent_r(a, &PL_reentrant_buffer->_servent_data) == 0 ? 1 : 0)
1370 # if !defined(setservent) && SETSERVENT_R_PROTO == REENTRANT_PROTO_V_ID
1371 # define setservent(a) setservent_r(a, &PL_reentrant_buffer->_servent_data)
1373 #endif /* HAS_SETSERVENT_R */
1375 #ifdef HAS_SRAND48_R
1377 # if !defined(srand48) && SRAND48_R_PROTO == REENTRANT_PROTO_I_LS
1378 # define srand48(a) (srand48_r(a, &PL_reentrant_buffer->_drand48_struct) == 0 ? &PL_reentrant_buffer->_drand48_struct : 0)
1380 #endif /* HAS_SRAND48_R */
1382 #ifdef HAS_SRANDOM_R
1384 # if !defined(srandom) && SRANDOM_R_PROTO == REENTRANT_PROTO_I_TS
1385 # define srandom(a) (srandom_r(a, &PL_reentrant_buffer->_srandom_struct) == 0 ? &PL_reentrant_buffer->_srandom_struct : 0)
1387 #endif /* HAS_SRANDOM_R */
1389 #ifdef HAS_STRERROR_R
1391 # if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_I_IBW
1392 # define strerror(a) (strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size) == 0 ? PL_reentrant_buffer->_strerror_buffer : 0)
1394 # if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_I_IBI
1395 # define strerror(a) (strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size) == 0 ? PL_reentrant_buffer->_strerror_buffer : 0)
1397 # if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_B_IBW
1398 # define strerror(a) strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size)
1400 #endif /* HAS_STRERROR_R */
1404 # if !defined(tmpnam) && TMPNAM_R_PROTO == REENTRANT_PROTO_B_B
1405 # define tmpnam(a) tmpnam_r(a)
1407 #endif /* HAS_TMPNAM_R */
1409 #ifdef HAS_TTYNAME_R
1411 # if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_I_IBW
1412 # define ttyname(a) (ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size) == 0 ? PL_reentrant_buffer->_ttyname_buffer : 0)
1414 # if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_I_IBI
1415 # define ttyname(a) (ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size) == 0 ? PL_reentrant_buffer->_ttyname_buffer : 0)
1417 # if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_B_IBI
1418 # define ttyname(a) ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size)
1420 #endif /* HAS_TTYNAME_R */
1424 #endif /* USE_REENTRANT_API */