4 * Copyright (c) 1997-2002, Larry Wall
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_H 23
112 #define REENTRANT_PROTO_I_IBI 24
113 #define REENTRANT_PROTO_I_IBW 25
114 #define REENTRANT_PROTO_I_ICBI 26
115 #define REENTRANT_PROTO_I_ICSBWR 27
116 #define REENTRANT_PROTO_I_ICSD 28
117 #define REENTRANT_PROTO_I_ID 29
118 #define REENTRANT_PROTO_I_IISD 30
119 #define REENTRANT_PROTO_I_ISBWR 31
120 #define REENTRANT_PROTO_I_ISD 32
121 #define REENTRANT_PROTO_I_LISBI 33
122 #define REENTRANT_PROTO_I_LISD 34
123 #define REENTRANT_PROTO_I_LS 35
124 #define REENTRANT_PROTO_I_S 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_TISD 46
135 #define REENTRANT_PROTO_I_TS 47
136 #define REENTRANT_PROTO_I_TSBI 48
137 #define REENTRANT_PROTO_I_TSBIR 49
138 #define REENTRANT_PROTO_I_TSBWR 50
139 #define REENTRANT_PROTO_I_TSR 51
140 #define REENTRANT_PROTO_I_UISBWRE 52
141 #define REENTRANT_PROTO_S_CBI 53
142 #define REENTRANT_PROTO_S_CCSBI 54
143 #define REENTRANT_PROTO_S_CIISBIE 55
144 #define REENTRANT_PROTO_S_CSBI 56
145 #define REENTRANT_PROTO_S_CSBIE 57
146 #define REENTRANT_PROTO_S_CWISBIE 58
147 #define REENTRANT_PROTO_S_CWISBWIE 59
148 #define REENTRANT_PROTO_S_ICSBI 60
149 #define REENTRANT_PROTO_S_ISBI 61
150 #define REENTRANT_PROTO_S_LISBI 62
151 #define REENTRANT_PROTO_S_SBI 63
152 #define REENTRANT_PROTO_S_SBIE 64
153 #define REENTRANT_PROTO_S_SBW 65
154 #define REENTRANT_PROTO_S_TISBI 66
155 #define REENTRANT_PROTO_S_TS 67
156 #define REENTRANT_PROTO_S_TSBI 68
157 #define REENTRANT_PROTO_S_TSBIE 69
158 #define REENTRANT_PROTO_S_TWISBIE 70
159 #define REENTRANT_PROTO_V_H 71
160 #define REENTRANT_PROTO_V_ID 72
161 #define REENTRANT_PROTO_V_S 73
163 /* Defines for indicating which special features are supported. */
165 /* The getgrent getgrgid getgrnam using buffer? */
167 #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)
168 # define GETGRENT_R_HAS_BUFFER
170 # undef GETGRENT_R_HAS_BUFFER
172 #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)
173 # define GETGRGID_R_HAS_BUFFER
175 # undef GETGRGID_R_HAS_BUFFER
177 #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)
178 # define GETGRNAM_R_HAS_BUFFER
180 # undef GETGRNAM_R_HAS_BUFFER
183 /* Any of the getgrent getgrgid getgrnam using buffer? */
185 #if (defined(GETGRENT_R_HAS_BUFFER) || defined(GETGRGID_R_HAS_BUFFER) || defined(GETGRNAM_R_HAS_BUFFER))
186 # define USE_GETGRENT_BUFFER
188 # undef USE_GETGRENT_BUFFER
191 /* The getgrent getgrgid getgrnam using ptr? */
193 #if defined(HAS_GETGRENT_R) && (GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIR)
194 # define GETGRENT_R_HAS_PTR
196 # undef GETGRENT_R_HAS_PTR
198 #if defined(HAS_GETGRGID_R) && (GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBWR || GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBIR)
199 # define GETGRGID_R_HAS_PTR
201 # undef GETGRGID_R_HAS_PTR
203 #if defined(HAS_GETGRNAM_R) && (GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR)
204 # define GETGRNAM_R_HAS_PTR
206 # undef GETGRNAM_R_HAS_PTR
209 /* Any of the getgrent getgrgid getgrnam using ptr? */
211 #if (defined(GETGRENT_R_HAS_PTR) || defined(GETGRGID_R_HAS_PTR) || defined(GETGRNAM_R_HAS_PTR))
212 # define USE_GETGRENT_PTR
214 # undef USE_GETGRENT_PTR
217 /* The getpwent getpwnam getpwuid using ptr? */
219 #if defined(HAS_GETPWENT_R) && (GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIR)
220 # define GETPWENT_R_HAS_PTR
222 # undef GETPWENT_R_HAS_PTR
224 #if defined(HAS_GETPWNAM_R) && (GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR)
225 # define GETPWNAM_R_HAS_PTR
227 # undef GETPWNAM_R_HAS_PTR
229 #if defined(HAS_GETPWUID_R) && (GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBWR || GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBIR)
230 # define GETPWUID_R_HAS_PTR
232 # undef GETPWUID_R_HAS_PTR
235 /* Any of the getpwent getpwnam getpwuid using ptr? */
237 #if (defined(GETPWENT_R_HAS_PTR) || defined(GETPWNAM_R_HAS_PTR) || defined(GETPWUID_R_HAS_PTR))
238 # define USE_GETPWENT_PTR
240 # undef USE_GETPWENT_PTR
243 /* The getspent getspnam using ptr? */
245 #if defined(HAS_GETSPNAM_R) && (GETSPNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR)
246 # define GETSPNAM_R_HAS_PTR
248 # undef GETSPNAM_R_HAS_PTR
251 /* Any of the getspent getspnam using ptr? */
253 #if (defined(GETSPENT_R_HAS_PTR) || defined(GETSPNAM_R_HAS_PTR))
254 # define USE_GETSPENT_PTR
256 # undef USE_GETSPENT_PTR
259 /* The getgrent getgrgid getgrnam using fptr? */
261 #if defined(HAS_GETGRENT_R) && (GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIH)
262 # define GETGRENT_R_HAS_FPTR
264 # undef GETGRENT_R_HAS_FPTR
267 /* Any of the getgrent getgrgid getgrnam using fptr? */
269 #if (defined(GETGRENT_R_HAS_FPTR) || defined(GETGRGID_R_HAS_FPTR) || defined(GETGRNAM_R_HAS_FPTR))
270 # define USE_GETGRENT_FPTR
272 # undef USE_GETGRENT_FPTR
275 /* The getpwent getpwnam getpwuid using fptr? */
277 #if defined(HAS_GETPWENT_R) && (GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIH)
278 # define GETPWENT_R_HAS_FPTR
280 # undef GETPWENT_R_HAS_FPTR
283 /* Any of the getpwent getpwnam getpwuid using fptr? */
285 #if (defined(GETPWENT_R_HAS_FPTR) || defined(GETPWNAM_R_HAS_FPTR) || defined(GETPWUID_R_HAS_FPTR))
286 # define USE_GETPWENT_FPTR
288 # undef USE_GETPWENT_FPTR
291 /* The getpwent getpwgid getpwnam using buffer? */
293 #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)
294 # define GETPWENT_R_HAS_BUFFER
296 # undef GETPWENT_R_HAS_BUFFER
298 #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)
299 # define GETPWNAM_R_HAS_BUFFER
301 # undef GETPWNAM_R_HAS_BUFFER
304 /* Any of the getpwent getpwgid getpwnam using buffer? */
306 #if (defined(GETPWENT_R_HAS_BUFFER) || defined(GETPWGID_R_HAS_BUFFER) || defined(GETPWNAM_R_HAS_BUFFER))
307 # define USE_GETPWENT_BUFFER
309 # undef USE_GETPWENT_BUFFER
312 /* The gethostent gethostbyaddr gethostbyname using ptr? */
314 #if defined(HAS_GETHOSTENT_R) && (GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBWRE)
315 # define GETHOSTENT_R_HAS_PTR
317 # undef GETHOSTENT_R_HAS_PTR
319 #if defined(HAS_GETHOSTBYADDR_R) && (GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISBWRE)
320 # define GETHOSTBYADDR_R_HAS_PTR
322 # undef GETHOSTBYADDR_R_HAS_PTR
324 #if defined(HAS_GETHOSTBYNAME_R) && (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE)
325 # define GETHOSTBYNAME_R_HAS_PTR
327 # undef GETHOSTBYNAME_R_HAS_PTR
330 /* Any of the gethostent gethostbyaddr gethostbyname using ptr? */
332 #if (defined(GETHOSTENT_R_HAS_PTR) || defined(GETHOSTBYADDR_R_HAS_PTR) || defined(GETHOSTBYNAME_R_HAS_PTR))
333 # define USE_GETHOSTENT_PTR
335 # undef USE_GETHOSTENT_PTR
338 /* The getnetent getnetbyaddr getnetbyname using ptr? */
340 #if defined(HAS_GETNETENT_R) && (GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBWRE)
341 # define GETNETENT_R_HAS_PTR
343 # undef GETNETENT_R_HAS_PTR
345 #if defined(HAS_GETNETBYADDR_R) && (GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE)
346 # define GETNETBYADDR_R_HAS_PTR
348 # undef GETNETBYADDR_R_HAS_PTR
350 #if defined(HAS_GETNETBYNAME_R) && (GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE)
351 # define GETNETBYNAME_R_HAS_PTR
353 # undef GETNETBYNAME_R_HAS_PTR
356 /* Any of the getnetent getnetbyaddr getnetbyname using ptr? */
358 #if (defined(GETNETENT_R_HAS_PTR) || defined(GETNETBYADDR_R_HAS_PTR) || defined(GETNETBYNAME_R_HAS_PTR))
359 # define USE_GETNETENT_PTR
361 # undef USE_GETNETENT_PTR
364 /* The getprotoent getprotobyname getprotobynumber using ptr? */
366 #if defined(HAS_GETPROTOENT_R) && (GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBWR)
367 # define GETPROTOENT_R_HAS_PTR
369 # undef GETPROTOENT_R_HAS_PTR
371 #if defined(HAS_GETPROTOBYNAME_R) && (GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR)
372 # define GETPROTOBYNAME_R_HAS_PTR
374 # undef GETPROTOBYNAME_R_HAS_PTR
376 #if defined(HAS_GETPROTOBYNUMBER_R) && (GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR)
377 # define GETPROTOBYNUMBER_R_HAS_PTR
379 # undef GETPROTOBYNUMBER_R_HAS_PTR
382 /* Any of the getprotoent getprotobyname getprotobynumber using ptr? */
384 #if (defined(GETPROTOENT_R_HAS_PTR) || defined(GETPROTOBYNAME_R_HAS_PTR) || defined(GETPROTOBYNUMBER_R_HAS_PTR))
385 # define USE_GETPROTOENT_PTR
387 # undef USE_GETPROTOENT_PTR
390 /* The getservent getservbyname getservbyport using ptr? */
392 #if defined(HAS_GETSERVENT_R) && (GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBWR)
393 # define GETSERVENT_R_HAS_PTR
395 # undef GETSERVENT_R_HAS_PTR
397 #if defined(HAS_GETSERVBYNAME_R) && (GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR)
398 # define GETSERVBYNAME_R_HAS_PTR
400 # undef GETSERVBYNAME_R_HAS_PTR
402 #if defined(HAS_GETSERVBYPORT_R) && (GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR)
403 # define GETSERVBYPORT_R_HAS_PTR
405 # undef GETSERVBYPORT_R_HAS_PTR
408 /* Any of the getservent getservbyname getservbyport using ptr? */
410 #if (defined(GETSERVENT_R_HAS_PTR) || defined(GETSERVBYNAME_R_HAS_PTR) || defined(GETSERVBYPORT_R_HAS_PTR))
411 # define USE_GETSERVENT_PTR
413 # undef USE_GETSERVENT_PTR
416 /* The gethostent gethostbyaddr gethostbyname using buffer? */
418 #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)
419 # define GETHOSTENT_R_HAS_BUFFER
421 # undef GETHOSTENT_R_HAS_BUFFER
423 #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)
424 # define GETHOSTBYADDR_R_HAS_BUFFER
426 # undef GETHOSTBYADDR_R_HAS_BUFFER
428 #if defined(HAS_GETHOSTBYNAME_R) && (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE || GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE)
429 # define GETHOSTBYNAME_R_HAS_BUFFER
431 # undef GETHOSTBYNAME_R_HAS_BUFFER
434 /* Any of the gethostent gethostbyaddr gethostbyname using buffer? */
436 #if (defined(GETHOSTENT_R_HAS_BUFFER) || defined(GETHOSTBYADDR_R_HAS_BUFFER) || defined(GETHOSTBYNAME_R_HAS_BUFFER))
437 # define USE_GETHOSTENT_BUFFER
439 # undef USE_GETHOSTENT_BUFFER
442 /* The getnetent getnetbyaddr getnetbyname using buffer? */
444 #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)
445 # define GETNETENT_R_HAS_BUFFER
447 # undef GETNETENT_R_HAS_BUFFER
449 #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)
450 # define GETNETBYADDR_R_HAS_BUFFER
452 # undef GETNETBYADDR_R_HAS_BUFFER
454 #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)
455 # define GETNETBYNAME_R_HAS_BUFFER
457 # undef GETNETBYNAME_R_HAS_BUFFER
460 /* Any of the getnetent getnetbyaddr getnetbyname using buffer? */
462 #if (defined(GETNETENT_R_HAS_BUFFER) || defined(GETNETBYADDR_R_HAS_BUFFER) || defined(GETNETBYNAME_R_HAS_BUFFER))
463 # define USE_GETNETENT_BUFFER
465 # undef USE_GETNETENT_BUFFER
468 /* The getprotoent getprotobyname getprotobynumber using buffer? */
470 #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)
471 # define GETPROTOENT_R_HAS_BUFFER
473 # undef GETPROTOENT_R_HAS_BUFFER
475 #if defined(HAS_GETPROTOBYNAME_R) && (GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI)
476 # define GETPROTOBYNAME_R_HAS_BUFFER
478 # undef GETPROTOBYNAME_R_HAS_BUFFER
480 #if defined(HAS_GETPROTOBYNUMBER_R) && (GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR || GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_S_ISBI)
481 # define GETPROTOBYNUMBER_R_HAS_BUFFER
483 # undef GETPROTOBYNUMBER_R_HAS_BUFFER
486 /* Any of the getprotoent getprotobyname getprotobynumber using buffer? */
488 #if (defined(GETPROTOENT_R_HAS_BUFFER) || defined(GETPROTOBYNAME_R_HAS_BUFFER) || defined(GETPROTOBYNUMBER_R_HAS_BUFFER))
489 # define USE_GETPROTOENT_BUFFER
491 # undef USE_GETPROTOENT_BUFFER
494 /* The getservent getservbyname getservbyport using buffer? */
496 #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)
497 # define GETSERVENT_R_HAS_BUFFER
499 # undef GETSERVENT_R_HAS_BUFFER
501 #if defined(HAS_GETSERVBYNAME_R) && (GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR || GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_S_CCSBI)
502 # define GETSERVBYNAME_R_HAS_BUFFER
504 # undef GETSERVBYNAME_R_HAS_BUFFER
506 #if defined(HAS_GETSERVBYPORT_R) && (GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR || GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_S_ICSBI)
507 # define GETSERVBYPORT_R_HAS_BUFFER
509 # undef GETSERVBYPORT_R_HAS_BUFFER
512 /* Any of the getservent getservbyname getservbyport using buffer? */
514 #if (defined(GETSERVENT_R_HAS_BUFFER) || defined(GETSERVBYNAME_R_HAS_BUFFER) || defined(GETSERVBYPORT_R_HAS_BUFFER))
515 # define USE_GETSERVENT_BUFFER
517 # undef USE_GETSERVENT_BUFFER
520 /* The gethostent gethostbyaddr gethostbyname using errno? */
522 #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)
523 # define GETHOSTENT_R_HAS_ERRNO
525 # undef GETHOSTENT_R_HAS_ERRNO
527 #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)
528 # define GETHOSTBYADDR_R_HAS_ERRNO
530 # undef GETHOSTBYADDR_R_HAS_ERRNO
532 #if defined(HAS_GETHOSTBYNAME_R) && (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE || GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE)
533 # define GETHOSTBYNAME_R_HAS_ERRNO
535 # undef GETHOSTBYNAME_R_HAS_ERRNO
538 /* Any of the gethostent gethostbyaddr gethostbyname using errno? */
540 #if (defined(GETHOSTENT_R_HAS_ERRNO) || defined(GETHOSTBYADDR_R_HAS_ERRNO) || defined(GETHOSTBYNAME_R_HAS_ERRNO))
541 # define USE_GETHOSTENT_ERRNO
543 # undef USE_GETHOSTENT_ERRNO
546 /* The getnetent getnetbyaddr getnetbyname using errno? */
548 #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)
549 # define GETNETENT_R_HAS_ERRNO
551 # undef GETNETENT_R_HAS_ERRNO
553 #if defined(HAS_GETNETBYADDR_R) && (GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE)
554 # define GETNETBYADDR_R_HAS_ERRNO
556 # undef GETNETBYADDR_R_HAS_ERRNO
558 #if defined(HAS_GETNETBYNAME_R) && (GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE)
559 # define GETNETBYNAME_R_HAS_ERRNO
561 # undef GETNETBYNAME_R_HAS_ERRNO
564 /* Any of the getnetent getnetbyaddr getnetbyname using errno? */
566 #if (defined(GETNETENT_R_HAS_ERRNO) || defined(GETNETBYADDR_R_HAS_ERRNO) || defined(GETNETBYNAME_R_HAS_ERRNO))
567 # define USE_GETNETENT_ERRNO
569 # undef USE_GETNETENT_ERRNO
575 char* _asctime_buffer;
576 size_t _asctime_size;
577 #endif /* HAS_ASCTIME_R */
579 #if CRYPT_R_PROTO == REENTRANT_PROTO_B_CCD
582 struct crypt_data _crypt_struct;
584 #endif /* HAS_CRYPT_R */
588 #endif /* HAS_CTIME_R */
590 struct drand48_data _drand48_struct;
591 double _drand48_double;
592 #endif /* HAS_DRAND48_R */
593 #ifdef HAS_GETGRNAM_R
594 struct group _getgrent_struct;
595 char* _getgrent_buffer;
596 size_t _getgrent_size;
597 # ifdef USE_GETGRENT_PTR
598 struct group* _getgrent_ptr;
600 # ifdef USE_GETGRENT_FPTR
601 FILE* _getgrent_fptr;
603 #endif /* HAS_GETGRNAM_R */
604 #ifdef HAS_GETHOSTBYNAME_R
605 struct hostent _gethostent_struct;
606 # if GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
607 struct hostent_data* _gethostent_data;
609 char* _gethostent_buffer;
610 size_t _gethostent_size;
612 # ifdef USE_GETHOSTENT_PTR
613 struct hostent* _gethostent_ptr;
615 # ifdef USE_GETHOSTENT_ERRNO
616 int _gethostent_errno;
618 #endif /* HAS_GETHOSTBYNAME_R */
619 #ifdef HAS_GETLOGIN_R
620 char* _getlogin_buffer;
621 size_t _getlogin_size;
622 #endif /* HAS_GETLOGIN_R */
623 #ifdef HAS_GETNETBYNAME_R
624 struct netent _getnetent_struct;
625 # if GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
626 struct netent_data* _getnetent_data;
628 char* _getnetent_buffer;
629 size_t _getnetent_size;
631 # ifdef USE_GETNETENT_PTR
632 struct netent* _getnetent_ptr;
634 # ifdef USE_GETNETENT_ERRNO
635 int _getnetent_errno;
637 #endif /* HAS_GETNETBYNAME_R */
638 #ifdef HAS_GETPROTOBYNAME_R
639 struct protoent _getprotoent_struct;
640 # if GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
641 struct protoent_data* _getprotoent_data;
643 char* _getprotoent_buffer;
644 size_t _getprotoent_size;
646 # ifdef USE_GETPROTOENT_PTR
647 struct protoent* _getprotoent_ptr;
649 # ifdef USE_GETPROTOENT_ERRNO
650 int _getprotoent_errno;
652 #endif /* HAS_GETPROTOBYNAME_R */
653 #ifdef HAS_GETPWNAM_R
654 struct passwd _getpwent_struct;
655 char* _getpwent_buffer;
656 size_t _getpwent_size;
657 # ifdef USE_GETPWENT_PTR
658 struct passwd* _getpwent_ptr;
660 # ifdef USE_GETPWENT_FPTR
661 FILE* _getpwent_fptr;
663 #endif /* HAS_GETPWNAM_R */
664 #ifdef HAS_GETSERVBYNAME_R
665 struct servent _getservent_struct;
666 # if GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD
667 struct servent_data* _getservent_data;
669 char* _getservent_buffer;
670 size_t _getservent_size;
672 # ifdef USE_GETSERVENT_PTR
673 struct servent* _getservent_ptr;
675 # ifdef USE_GETSERVENT_ERRNO
676 int _getservent_errno;
678 #endif /* HAS_GETSERVBYNAME_R */
679 #ifdef HAS_GETSPNAM_R
680 struct spwd _getspent_struct;
681 char* _getspent_buffer;
682 size_t _getspent_size;
683 # ifdef USE_GETSPENT_PTR
684 struct spwd* _getspent_ptr;
686 #endif /* HAS_GETSPNAM_R */
688 struct tm _gmtime_struct;
689 #endif /* HAS_GMTIME_R */
690 #ifdef HAS_LOCALTIME_R
691 struct tm _localtime_struct;
692 #endif /* HAS_LOCALTIME_R */
694 struct random_data _random_struct;
695 #endif /* HAS_RANDOM_R */
697 struct dirent* _readdir_struct;
698 size_t _readdir_size;
699 # if READDIR_R_PROTO == REENTRANT_PROTO_I_TSR
700 struct dirent* _readdir_ptr;
702 #endif /* HAS_READDIR_R */
703 #ifdef HAS_READDIR64_R
704 struct dirent64* _readdir64_struct;
705 size_t _readdir64_size;
706 # if READDIR64_R_PROTO == REENTRANT_PROTO_I_TSR
707 struct dirent64* _readdir64_ptr;
709 #endif /* HAS_READDIR64_R */
710 #ifdef HAS_SETLOCALE_R
711 char* _setlocale_buffer;
712 size_t _setlocale_size;
713 #endif /* HAS_SETLOCALE_R */
714 #ifdef HAS_STRERROR_R
715 char* _strerror_buffer;
716 size_t _strerror_size;
717 #endif /* HAS_STRERROR_R */
719 char* _ttyname_buffer;
720 size_t _ttyname_size;
721 #endif /* HAS_TTYNAME_R */
729 # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_B_SB
730 # define asctime(a) asctime_r(a, PL_reentrant_buffer->_asctime_buffer)
732 # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_B_SBI
733 # define asctime(a) asctime_r(a, PL_reentrant_buffer->_asctime_buffer, PL_reentrant_buffer->_asctime_size)
735 # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_I_SB
736 # define asctime(a) (((errno = asctime_r(a, PL_reentrant_buffer->_asctime_buffer))) == 0 ? PL_reentrant_buffer->_asctime_buffer : 0)
738 # if !defined(asctime) && ASCTIME_R_PROTO == REENTRANT_PROTO_I_SBI
739 # define asctime(a) (((errno = asctime_r(a, PL_reentrant_buffer->_asctime_buffer, PL_reentrant_buffer->_asctime_size))) == 0 ? PL_reentrant_buffer->_asctime_buffer : 0)
741 #endif /* HAS_ASCTIME_R */
745 # if !defined(crypt) && CRYPT_R_PROTO == REENTRANT_PROTO_B_CCS
746 # define crypt(a, b) crypt_r(a, b, &PL_reentrant_buffer->_crypt_struct)
748 # if !defined(crypt) && CRYPT_R_PROTO == REENTRANT_PROTO_B_CCD
749 # define crypt(a, b) crypt_r(a, b, &PL_reentrant_buffer->_crypt_data)
751 #endif /* HAS_CRYPT_R */
755 # if !defined(ctermid) && CTERMID_R_PROTO == REENTRANT_PROTO_B_B
756 # define ctermid(a) ctermid_r(a)
758 #endif /* HAS_CTERMID_R */
762 # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_B_SB
763 # define ctime(a) ctime_r(a, PL_reentrant_buffer->_ctime_buffer)
765 # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_B_SBI
766 # define ctime(a) ctime_r(a, PL_reentrant_buffer->_ctime_buffer, PL_reentrant_buffer->_ctime_size)
768 # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_I_SB
769 # define ctime(a) (((errno = ctime_r(a, PL_reentrant_buffer->_ctime_buffer))) == 0 ? PL_reentrant_buffer->_ctime_buffer : 0)
771 # if !defined(ctime) && CTIME_R_PROTO == REENTRANT_PROTO_I_SBI
772 # define ctime(a) (((errno = ctime_r(a, PL_reentrant_buffer->_ctime_buffer, PL_reentrant_buffer->_ctime_size))) == 0 ? PL_reentrant_buffer->_ctime_buffer : 0)
774 #endif /* HAS_CTIME_R */
778 # if !defined(drand48) && DRAND48_R_PROTO == REENTRANT_PROTO_I_ST
779 # define drand48() (((errno = drand48_r(&PL_reentrant_buffer->_drand48_struct, &PL_reentrant_buffer->_drand48_double))) == 0 ? PL_reentrant_buffer->_drand48_double : 0)
781 #endif /* HAS_DRAND48_R */
783 #ifdef HAS_ENDGRENT_R
785 # if !defined(endgrent) && ENDGRENT_R_PROTO == REENTRANT_PROTO_I_H
786 # define endgrent() (((errno = endgrent_r(&PL_reentrant_buffer->_getgrent_fptr))) == 0 ? 1 : 0)
788 # if !defined(endgrent) && ENDGRENT_R_PROTO == REENTRANT_PROTO_V_H
789 # define endgrent() endgrent_r(&PL_reentrant_buffer->_getgrent_fptr)
791 #endif /* HAS_ENDGRENT_R */
793 #ifdef HAS_ENDHOSTENT_R
795 # if !defined(endhostent) && ENDHOSTENT_R_PROTO == REENTRANT_PROTO_I_S
796 # define endhostent() (((errno = endhostent_r(&PL_reentrant_buffer->_gethostent_struct))) == 0 ? &PL_reentrant_buffer->_gethostent_struct : 0)
798 # if !defined(endhostent) && ENDHOSTENT_R_PROTO == REENTRANT_PROTO_V_S
799 # define endhostent() endhostent_r(&PL_reentrant_buffer->_gethostent_struct)
801 #endif /* HAS_ENDHOSTENT_R */
803 #ifdef HAS_ENDNETENT_R
805 # if !defined(endnetent) && ENDNETENT_R_PROTO == REENTRANT_PROTO_I_S
806 # define endnetent() (((errno = endnetent_r(&PL_reentrant_buffer->_getnetent_struct))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : 0)
808 # if !defined(endnetent) && ENDNETENT_R_PROTO == REENTRANT_PROTO_V_S
809 # define endnetent() endnetent_r(&PL_reentrant_buffer->_getnetent_struct)
811 #endif /* HAS_ENDNETENT_R */
813 #ifdef HAS_ENDPROTOENT_R
815 # if !defined(endprotoent) && ENDPROTOENT_R_PROTO == REENTRANT_PROTO_I_S
816 # define endprotoent() (((errno = endprotoent_r(&PL_reentrant_buffer->_getprotoent_struct))) == 0 ? &PL_reentrant_buffer->_getprotoent_struct : 0)
818 # if !defined(endprotoent) && ENDPROTOENT_R_PROTO == REENTRANT_PROTO_V_S
819 # define endprotoent() endprotoent_r(&PL_reentrant_buffer->_getprotoent_struct)
821 #endif /* HAS_ENDPROTOENT_R */
823 #ifdef HAS_ENDPWENT_R
825 # if !defined(endpwent) && ENDPWENT_R_PROTO == REENTRANT_PROTO_I_H
826 # define endpwent() (((errno = endpwent_r(&PL_reentrant_buffer->_getpwent_fptr))) == 0 ? 1 : 0)
828 # if !defined(endpwent) && ENDPWENT_R_PROTO == REENTRANT_PROTO_V_H
829 # define endpwent() endpwent_r(&PL_reentrant_buffer->_getpwent_fptr)
831 #endif /* HAS_ENDPWENT_R */
833 #ifdef HAS_ENDSERVENT_R
835 # if !defined(endservent) && ENDSERVENT_R_PROTO == REENTRANT_PROTO_I_S
836 # define endservent() (((errno = endservent_r(&PL_reentrant_buffer->_getservent_struct))) == 0 ? &PL_reentrant_buffer->_getservent_struct : 0)
838 # if !defined(endservent) && ENDSERVENT_R_PROTO == REENTRANT_PROTO_V_S
839 # define endservent() endservent_r(&PL_reentrant_buffer->_getservent_struct)
841 #endif /* HAS_ENDSERVENT_R */
843 #ifdef HAS_GETGRENT_R
845 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBWR
846 # define getgrent() (((errno = getgrent_r(&PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, &PL_reentrant_buffer->_getgrent_ptr))) == 0 ? PL_reentrant_buffer->_getgrent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0))
848 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIR
849 # define getgrent() (((errno = getgrent_r(&PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, &PL_reentrant_buffer->_getgrent_ptr))) == 0 ? PL_reentrant_buffer->_getgrent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0))
851 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_S_SBW
852 # define getgrent() (getgrent_r(&PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size) ? &PL_reentrant_buffer->_getgrent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0))
854 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_S_SBI
855 # define getgrent() (getgrent_r(&PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size) ? &PL_reentrant_buffer->_getgrent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0))
857 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBI
858 # define getgrent() (((errno = getgrent_r(&PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size))) == 0 ? &PL_reentrant_buffer->_getgrent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0))
860 # if !defined(getgrent) && GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIH
861 # define getgrent() (((errno = getgrent_r(&PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, &PL_reentrant_buffer->_getgrent_fptr))) == 0 ? &PL_reentrant_buffer->_getgrent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrent") : 0))
863 #endif /* HAS_GETGRENT_R */
865 #ifdef HAS_GETGRGID_R
867 # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBWR
868 # define getgrgid(a) (((errno = getgrgid_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, &PL_reentrant_buffer->_getgrent_ptr))) == 0 ? PL_reentrant_buffer->_getgrent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrgid", a) : 0))
870 # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBIR
871 # define getgrgid(a) (((errno = getgrgid_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, &PL_reentrant_buffer->_getgrent_ptr))) == 0 ? PL_reentrant_buffer->_getgrent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrgid", a) : 0))
873 # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBI
874 # define getgrgid(a) (((errno = getgrgid_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size))) == 0 ? &PL_reentrant_buffer->_getgrent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrgid", a) : 0))
876 # if !defined(getgrgid) && GETGRGID_R_PROTO == REENTRANT_PROTO_S_TSBI
877 # define getgrgid(a) (getgrgid_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size) ? &PL_reentrant_buffer->_getgrent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrgid", a) : 0))
879 #endif /* HAS_GETGRGID_R */
881 #ifdef HAS_GETGRNAM_R
883 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR
884 # define getgrnam(a) (((errno = getgrnam_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, &PL_reentrant_buffer->_getgrent_ptr))) == 0 ? PL_reentrant_buffer->_getgrent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrnam", a) : 0))
886 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR
887 # define getgrnam(a) (((errno = getgrnam_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size, &PL_reentrant_buffer->_getgrent_ptr))) == 0 ? PL_reentrant_buffer->_getgrent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getgrnam", a) : 0))
889 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_S_CBI
890 # define getgrnam(a) (getgrnam_r(a, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size) ? PL_reentrant_buffer->_getgrent_buffer : (errno == ERANGE ? Perl_reentrant_retry("getgrnam", a) : 0))
892 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBI
893 # define getgrnam(a) (((errno = getgrnam_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size))) == 0 ? &PL_reentrant_buffer->_getgrent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrnam", a) : 0))
895 # if !defined(getgrnam) && GETGRNAM_R_PROTO == REENTRANT_PROTO_S_CSBI
896 # define getgrnam(a) (getgrnam_r(a, &PL_reentrant_buffer->_getgrent_struct, PL_reentrant_buffer->_getgrent_buffer, PL_reentrant_buffer->_getgrent_size) ? &PL_reentrant_buffer->_getgrent_struct : (errno == ERANGE ? Perl_reentrant_retry("getgrnam", a) : 0))
898 #endif /* HAS_GETGRNAM_R */
900 #ifdef HAS_GETHOSTBYADDR_R
901 # undef gethostbyaddr
902 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISBWRE
903 # define gethostbyaddr(a, b, c) (((errno = gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_ptr, &PL_reentrant_buffer->_gethostent_errno))) == 0 ? PL_reentrant_buffer->_gethostent_ptr : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
905 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBWIE
906 # define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
908 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CWISBIE
909 # define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
911 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TWISBIE
912 # define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
914 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CIISBIE
915 # define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
917 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_CSBIE
918 # define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? 1 : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
920 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_S_TSBIE
921 # define gethostbyaddr(a, b, c) (gethostbyaddr_r(a, b, c, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? 1 : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
923 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISD
924 # define gethostbyaddr(a, b, c) (((errno = gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_gethostent_struct, &PL_reentrant_buffer->_gethostent_data))) == 0 ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
926 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CIISD
927 # define gethostbyaddr(a, b, c) (((errno = gethostbyaddr_r(a, b, c, &PL_reentrant_buffer->_gethostent_struct, &PL_reentrant_buffer->_gethostent_data))) == 0 ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
929 # if !defined(gethostbyaddr) && GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CII
930 # define gethostbyaddr(a, b, c) (((errno = gethostbyaddr_r(a, b, c))) == 0 ? 1 : (errno == ERANGE ? Perl_reentrant_retry("gethostbyaddr", a, b, c) : 0))
932 #endif /* HAS_GETHOSTBYADDR_R */
934 #ifdef HAS_GETHOSTBYNAME_R
935 # undef gethostbyname
936 # if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE
937 # define gethostbyname(a) (((errno = gethostbyname_r(a, &PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_ptr, &PL_reentrant_buffer->_gethostent_errno))) == 0 ? PL_reentrant_buffer->_gethostent_ptr : (errno == ERANGE ? Perl_reentrant_retry("gethostbyname", a) : 0))
939 # if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE
940 # define gethostbyname(a) (gethostbyname_r(a, &PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyname", a) : 0))
942 # if !defined(gethostbyname) && GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
943 # define gethostbyname(a) (((errno = gethostbyname_r(a, &PL_reentrant_buffer->_gethostent_struct, &PL_reentrant_buffer->_gethostent_data))) == 0 ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostbyname", a) : 0))
945 #endif /* HAS_GETHOSTBYNAME_R */
947 #ifdef HAS_GETHOSTENT_R
949 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBWRE
950 # define gethostent() (((errno = gethostent_r(&PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_ptr, &PL_reentrant_buffer->_gethostent_errno))) == 0 ? PL_reentrant_buffer->_gethostent_ptr : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0))
952 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBIE
953 # define gethostent() (((errno = gethostent_r(&PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno))) == 0 ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0))
955 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBIE
956 # define gethostent() (gethostent_r(&PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size, &PL_reentrant_buffer->_gethostent_errno) ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0))
958 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_S_SBI
959 # define gethostent() (gethostent_r(&PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size) ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0))
961 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBI
962 # define gethostent() (((errno = gethostent_r(&PL_reentrant_buffer->_gethostent_struct, PL_reentrant_buffer->_gethostent_buffer, PL_reentrant_buffer->_gethostent_size))) == 0 ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0))
964 # if !defined(gethostent) && GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SD
965 # define gethostent() (((errno = gethostent_r(&PL_reentrant_buffer->_gethostent_struct, &PL_reentrant_buffer->_gethostent_data))) == 0 ? &PL_reentrant_buffer->_gethostent_struct : (errno == ERANGE ? Perl_reentrant_retry("gethostent") : 0))
967 #endif /* HAS_GETHOSTENT_R */
969 #ifdef HAS_GETLOGIN_R
971 # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_I_BW
972 # define getlogin() (((errno = getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size))) == 0 ? PL_reentrant_buffer->_getlogin_buffer : (errno == ERANGE ? Perl_reentrant_retry("getlogin") : 0))
974 # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_I_BI
975 # define getlogin() (((errno = getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size))) == 0 ? PL_reentrant_buffer->_getlogin_buffer : (errno == ERANGE ? Perl_reentrant_retry("getlogin") : 0))
977 # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_B_BW
978 # define getlogin() getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size)
980 # if !defined(getlogin) && GETLOGIN_R_PROTO == REENTRANT_PROTO_B_BI
981 # define getlogin() getlogin_r(PL_reentrant_buffer->_getlogin_buffer, PL_reentrant_buffer->_getlogin_size)
983 #endif /* HAS_GETLOGIN_R */
985 #ifdef HAS_GETNETBYADDR_R
987 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE
988 # define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size, &PL_reentrant_buffer->_getnetent_ptr, &PL_reentrant_buffer->_getnetent_errno))) == 0 ? PL_reentrant_buffer->_getnetent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
990 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_LISBI
991 # define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
993 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_S_TISBI
994 # define getnetbyaddr(a, b) (getnetbyaddr_r(a, b, &PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size) ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
996 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_S_LISBI
997 # define getnetbyaddr(a, b) (getnetbyaddr_r(a, b, &PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size) ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
999 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_TISD
1000 # define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_getnetent_struct, &PL_reentrant_buffer->_getnetent_data))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
1002 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_LISD
1003 # define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_getnetent_struct, &PL_reentrant_buffer->_getnetent_data))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
1005 # if !defined(getnetbyaddr) && GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_IISD
1006 # define getnetbyaddr(a, b) (((errno = getnetbyaddr_r(a, b, &PL_reentrant_buffer->_getnetent_struct, &PL_reentrant_buffer->_getnetent_data))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyaddr", a, b) : 0))
1008 #endif /* HAS_GETNETBYADDR_R */
1010 #ifdef HAS_GETNETBYNAME_R
1011 # undef getnetbyname
1012 # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE
1013 # define getnetbyname(a) (((errno = getnetbyname_r(a, &PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size, &PL_reentrant_buffer->_getnetent_ptr, &PL_reentrant_buffer->_getnetent_errno))) == 0 ? PL_reentrant_buffer->_getnetent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getnetbyname", a) : 0))
1015 # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBI
1016 # define getnetbyname(a) (((errno = getnetbyname_r(a, &PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyname", a) : 0))
1018 # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI
1019 # define getnetbyname(a) (getnetbyname_r(a, &PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size) ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyname", a) : 0))
1021 # if !defined(getnetbyname) && GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
1022 # define getnetbyname(a) (((errno = getnetbyname_r(a, &PL_reentrant_buffer->_getnetent_struct, &PL_reentrant_buffer->_getnetent_data))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetbyname", a) : 0))
1024 #endif /* HAS_GETNETBYNAME_R */
1026 #ifdef HAS_GETNETENT_R
1028 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBWRE
1029 # define getnetent() (((errno = getnetent_r(&PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size, &PL_reentrant_buffer->_getnetent_ptr, &PL_reentrant_buffer->_getnetent_errno))) == 0 ? PL_reentrant_buffer->_getnetent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0))
1031 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBIE
1032 # define getnetent() (((errno = getnetent_r(&PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size, &PL_reentrant_buffer->_getnetent_errno))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0))
1034 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBIE
1035 # define getnetent() (getnetent_r(&PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size, &PL_reentrant_buffer->_getnetent_errno) ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0))
1037 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_S_SBI
1038 # define getnetent() (getnetent_r(&PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size) ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0))
1040 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBI
1041 # define getnetent() (((errno = getnetent_r(&PL_reentrant_buffer->_getnetent_struct, PL_reentrant_buffer->_getnetent_buffer, PL_reentrant_buffer->_getnetent_size))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0))
1043 # if !defined(getnetent) && GETNETENT_R_PROTO == REENTRANT_PROTO_I_SD
1044 # define getnetent() (((errno = getnetent_r(&PL_reentrant_buffer->_getnetent_struct, &PL_reentrant_buffer->_getnetent_data))) == 0 ? &PL_reentrant_buffer->_getnetent_struct : (errno == ERANGE ? Perl_reentrant_retry("getnetent") : 0))
1046 #endif /* HAS_GETNETENT_R */
1048 #ifdef HAS_GETPROTOBYNAME_R
1049 # undef getprotobyname
1050 # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR
1051 # define getprotobyname(a) (((errno = getprotobyname_r(a, &PL_reentrant_buffer->_getprotoent_struct, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size, &PL_reentrant_buffer->_getprotoent_ptr))) == 0 ? PL_reentrant_buffer->_getprotoent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getprotobyname", a) : 0))
1053 # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBI
1054 # define getprotobyname(a) (getprotobyname_r(a, &PL_reentrant_buffer->_getprotoent_struct, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size) ? &PL_reentrant_buffer->_getprotoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotobyname", a) : 0))
1056 # if !defined(getprotobyname) && GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSD
1057 # define getprotobyname(a) (((errno = getprotobyname_r(a, &PL_reentrant_buffer->_getprotoent_struct, &PL_reentrant_buffer->_getprotoent_data))) == 0 ? &PL_reentrant_buffer->_getprotoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotobyname", a) : 0))
1059 #endif /* HAS_GETPROTOBYNAME_R */
1061 #ifdef HAS_GETPROTOBYNUMBER_R
1062 # undef getprotobynumber
1063 # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR
1064 # define getprotobynumber(a) (((errno = getprotobynumber_r(a, &PL_reentrant_buffer->_getprotoent_struct, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size, &PL_reentrant_buffer->_getprotoent_ptr))) == 0 ? PL_reentrant_buffer->_getprotoent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getprotobynumber", a) : 0))
1066 # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_S_ISBI
1067 # define getprotobynumber(a) (getprotobynumber_r(a, &PL_reentrant_buffer->_getprotoent_struct, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size) ? &PL_reentrant_buffer->_getprotoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotobynumber", a) : 0))
1069 # if !defined(getprotobynumber) && GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISD
1070 # define getprotobynumber(a) (((errno = getprotobynumber_r(a, &PL_reentrant_buffer->_getprotoent_struct, &PL_reentrant_buffer->_getprotoent_data))) == 0 ? &PL_reentrant_buffer->_getprotoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotobynumber", a) : 0))
1072 #endif /* HAS_GETPROTOBYNUMBER_R */
1074 #ifdef HAS_GETPROTOENT_R
1076 # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBWR
1077 # define getprotoent() (((errno = getprotoent_r(&PL_reentrant_buffer->_getprotoent_struct, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size, &PL_reentrant_buffer->_getprotoent_ptr))) == 0 ? PL_reentrant_buffer->_getprotoent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getprotoent") : 0))
1079 # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBI
1080 # define getprotoent() (((errno = getprotoent_r(&PL_reentrant_buffer->_getprotoent_struct, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size))) == 0 ? &PL_reentrant_buffer->_getprotoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotoent") : 0))
1082 # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_S_SBI
1083 # define getprotoent() (getprotoent_r(&PL_reentrant_buffer->_getprotoent_struct, PL_reentrant_buffer->_getprotoent_buffer, PL_reentrant_buffer->_getprotoent_size) ? &PL_reentrant_buffer->_getprotoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotoent") : 0))
1085 # if !defined(getprotoent) && GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SD
1086 # define getprotoent() (((errno = getprotoent_r(&PL_reentrant_buffer->_getprotoent_struct, &PL_reentrant_buffer->_getprotoent_data))) == 0 ? &PL_reentrant_buffer->_getprotoent_struct : (errno == ERANGE ? Perl_reentrant_retry("getprotoent") : 0))
1088 #endif /* HAS_GETPROTOENT_R */
1090 #ifdef HAS_GETPWENT_R
1092 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBWR
1093 # define getpwent() (((errno = getpwent_r(&PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, &PL_reentrant_buffer->_getpwent_ptr))) == 0 ? PL_reentrant_buffer->_getpwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0))
1095 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIR
1096 # define getpwent() (((errno = getpwent_r(&PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, &PL_reentrant_buffer->_getpwent_ptr))) == 0 ? PL_reentrant_buffer->_getpwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0))
1098 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_S_SBW
1099 # define getpwent() (getpwent_r(&PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size) ? &PL_reentrant_buffer->_getpwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0))
1101 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_S_SBI
1102 # define getpwent() (getpwent_r(&PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size) ? &PL_reentrant_buffer->_getpwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0))
1104 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBI
1105 # define getpwent() (((errno = getpwent_r(&PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size))) == 0 ? &PL_reentrant_buffer->_getpwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0))
1107 # if !defined(getpwent) && GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIH
1108 # define getpwent() (((errno = getpwent_r(&PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, &PL_reentrant_buffer->_getpwent_fptr))) == 0 ? &PL_reentrant_buffer->_getpwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwent") : 0))
1110 #endif /* HAS_GETPWENT_R */
1112 #ifdef HAS_GETPWNAM_R
1114 # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR
1115 # define getpwnam(a) (((errno = getpwnam_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, &PL_reentrant_buffer->_getpwent_ptr))) == 0 ? PL_reentrant_buffer->_getpwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwnam", a) : 0))
1117 # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR
1118 # define getpwnam(a) (((errno = getpwnam_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, &PL_reentrant_buffer->_getpwent_ptr))) == 0 ? PL_reentrant_buffer->_getpwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwnam", a) : 0))
1120 # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_S_CSBI
1121 # define getpwnam(a) (getpwnam_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size) ? &PL_reentrant_buffer->_getpwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwnam", a) : 0))
1123 # if !defined(getpwnam) && GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBI
1124 # define getpwnam(a) (((errno = getpwnam_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size))) == 0 ? &PL_reentrant_buffer->_getpwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwnam", a) : 0))
1126 #endif /* HAS_GETPWNAM_R */
1128 #ifdef HAS_GETPWUID_R
1130 # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBWR
1131 # define getpwuid(a) (((errno = getpwuid_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, &PL_reentrant_buffer->_getpwent_ptr))) == 0 ? PL_reentrant_buffer->_getpwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwuid", a) : 0))
1133 # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBIR
1134 # define getpwuid(a) (((errno = getpwuid_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size, &PL_reentrant_buffer->_getpwent_ptr))) == 0 ? PL_reentrant_buffer->_getpwent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getpwuid", a) : 0))
1136 # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBI
1137 # define getpwuid(a) (((errno = getpwuid_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size))) == 0 ? &PL_reentrant_buffer->_getpwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwuid", a) : 0))
1139 # if !defined(getpwuid) && GETPWUID_R_PROTO == REENTRANT_PROTO_S_TSBI
1140 # define getpwuid(a) (getpwuid_r(a, &PL_reentrant_buffer->_getpwent_struct, PL_reentrant_buffer->_getpwent_buffer, PL_reentrant_buffer->_getpwent_size) ? &PL_reentrant_buffer->_getpwent_struct : (errno == ERANGE ? Perl_reentrant_retry("getpwuid", a) : 0))
1142 #endif /* HAS_GETPWUID_R */
1144 #ifdef HAS_GETSERVBYNAME_R
1145 # undef getservbyname
1146 # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR
1147 # define getservbyname(a, b) (((errno = getservbyname_r(a, b, &PL_reentrant_buffer->_getservent_struct, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size, &PL_reentrant_buffer->_getservent_ptr))) == 0 ? PL_reentrant_buffer->_getservent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getservbyname", a, b) : 0))
1149 # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_S_CCSBI
1150 # define getservbyname(a, b) (getservbyname_r(a, b, &PL_reentrant_buffer->_getservent_struct, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size) ? &PL_reentrant_buffer->_getservent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservbyname", a, b) : 0))
1152 # if !defined(getservbyname) && GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSD
1153 # define getservbyname(a, b) (((errno = getservbyname_r(a, b, &PL_reentrant_buffer->_getservent_struct, &PL_reentrant_buffer->_getservent_data))) == 0 ? &PL_reentrant_buffer->_getservent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservbyname", a, b) : 0))
1155 #endif /* HAS_GETSERVBYNAME_R */
1157 #ifdef HAS_GETSERVBYPORT_R
1158 # undef getservbyport
1159 # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR
1160 # define getservbyport(a, b) (((errno = getservbyport_r(a, b, &PL_reentrant_buffer->_getservent_struct, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size, &PL_reentrant_buffer->_getservent_ptr))) == 0 ? PL_reentrant_buffer->_getservent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getservbyport", a, b) : 0))
1162 # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_S_ICSBI
1163 # define getservbyport(a, b) (getservbyport_r(a, b, &PL_reentrant_buffer->_getservent_struct, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size) ? &PL_reentrant_buffer->_getservent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservbyport", a, b) : 0))
1165 # if !defined(getservbyport) && GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSD
1166 # define getservbyport(a, b) (((errno = getservbyport_r(a, b, &PL_reentrant_buffer->_getservent_struct, &PL_reentrant_buffer->_getservent_data))) == 0 ? &PL_reentrant_buffer->_getservent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservbyport", a, b) : 0))
1168 #endif /* HAS_GETSERVBYPORT_R */
1170 #ifdef HAS_GETSERVENT_R
1172 # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBWR
1173 # define getservent() (((errno = getservent_r(&PL_reentrant_buffer->_getservent_struct, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size, &PL_reentrant_buffer->_getservent_ptr))) == 0 ? PL_reentrant_buffer->_getservent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getservent") : 0))
1175 # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBI
1176 # define getservent() (((errno = getservent_r(&PL_reentrant_buffer->_getservent_struct, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size))) == 0 ? &PL_reentrant_buffer->_getservent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservent") : 0))
1178 # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_S_SBI
1179 # define getservent() (getservent_r(&PL_reentrant_buffer->_getservent_struct, PL_reentrant_buffer->_getservent_buffer, PL_reentrant_buffer->_getservent_size) ? &PL_reentrant_buffer->_getservent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservent") : 0))
1181 # if !defined(getservent) && GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SD
1182 # define getservent() (((errno = getservent_r(&PL_reentrant_buffer->_getservent_struct, &PL_reentrant_buffer->_getservent_data))) == 0 ? &PL_reentrant_buffer->_getservent_struct : (errno == ERANGE ? Perl_reentrant_retry("getservent") : 0))
1184 #endif /* HAS_GETSERVENT_R */
1186 #ifdef HAS_GETSPNAM_R
1188 # if !defined(getspnam) && GETSPNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR
1189 # define getspnam(a) (((errno = getspnam_r(a, &PL_reentrant_buffer->_getspent_struct, PL_reentrant_buffer->_getspent_buffer, PL_reentrant_buffer->_getspent_size, &PL_reentrant_buffer->_getspent_ptr))) == 0 ? PL_reentrant_buffer->_getspent_ptr : (errno == ERANGE ? Perl_reentrant_retry("getspnam", a) : 0))
1191 # if !defined(getspnam) && GETSPNAM_R_PROTO == REENTRANT_PROTO_S_CSBI
1192 # define getspnam(a) (getspnam_r(a, &PL_reentrant_buffer->_getspent_struct, PL_reentrant_buffer->_getspent_buffer, PL_reentrant_buffer->_getspent_size) ? &PL_reentrant_buffer->_getspent_struct : (errno == ERANGE ? Perl_reentrant_retry("getspnam", a) : 0))
1194 #endif /* HAS_GETSPNAM_R */
1198 # if !defined(gmtime) && GMTIME_R_PROTO == REENTRANT_PROTO_S_TS
1199 # define gmtime(a) (gmtime_r(a, &PL_reentrant_buffer->_gmtime_struct) ? &PL_reentrant_buffer->_gmtime_struct : 0)
1201 # if !defined(gmtime) && GMTIME_R_PROTO == REENTRANT_PROTO_I_TS
1202 # define gmtime(a) (((errno = gmtime_r(a, &PL_reentrant_buffer->_gmtime_struct))) == 0 ? &PL_reentrant_buffer->_gmtime_struct : 0)
1204 #endif /* HAS_GMTIME_R */
1206 #ifdef HAS_LOCALTIME_R
1208 # if !defined(localtime) && LOCALTIME_R_PROTO == REENTRANT_PROTO_S_TS
1209 # define localtime(a) (localtime_r(a, &PL_reentrant_buffer->_localtime_struct) ? &PL_reentrant_buffer->_localtime_struct : 0)
1211 # if !defined(localtime) && LOCALTIME_R_PROTO == REENTRANT_PROTO_I_TS
1212 # define localtime(a) (((errno = localtime_r(a, &PL_reentrant_buffer->_localtime_struct))) == 0 ? &PL_reentrant_buffer->_localtime_struct : 0)
1214 #endif /* HAS_LOCALTIME_R */
1218 # if !defined(random) && RANDOM_R_PROTO == REENTRANT_PROTO_I_TS
1219 # define random() (((errno = random_r(T, &PL_reentrant_buffer->_random_struct))) == 0 ? &PL_reentrant_buffer->_random_struct : 0)
1221 #endif /* HAS_RANDOM_R */
1223 #ifdef HAS_READDIR_R
1225 # if !defined(readdir) && READDIR_R_PROTO == REENTRANT_PROTO_I_TSR
1226 # define readdir(a) (((errno = readdir_r(a, PL_reentrant_buffer->_readdir_struct, &PL_reentrant_buffer->_readdir_ptr))) == 0 ? PL_reentrant_buffer->_readdir_ptr : 0)
1228 # if !defined(readdir) && READDIR_R_PROTO == REENTRANT_PROTO_I_TS
1229 # define readdir(a) (((errno = readdir_r(a, PL_reentrant_buffer->_readdir_struct))) == 0 ? PL_reentrant_buffer->_readdir_struct : 0)
1231 #endif /* HAS_READDIR_R */
1233 #ifdef HAS_READDIR64_R
1235 # if !defined(readdir64) && READDIR64_R_PROTO == REENTRANT_PROTO_I_TSR
1236 # define readdir64(a) (((errno = readdir64_r(a, PL_reentrant_buffer->_readdir64_struct, &PL_reentrant_buffer->_readdir64_ptr))) == 0 ? PL_reentrant_buffer->_readdir64_ptr : 0)
1238 # if !defined(readdir64) && READDIR64_R_PROTO == REENTRANT_PROTO_I_TS
1239 # define readdir64(a) (((errno = readdir64_r(a, PL_reentrant_buffer->_readdir64_struct))) == 0 ? PL_reentrant_buffer->_readdir64_struct : 0)
1241 #endif /* HAS_READDIR64_R */
1243 #ifdef HAS_SETGRENT_R
1245 # if !defined(setgrent) && SETGRENT_R_PROTO == REENTRANT_PROTO_I_H
1246 # define setgrent() (((errno = setgrent_r(&PL_reentrant_buffer->_getgrent_fptr))) == 0 ? 1 : 0)
1248 # if !defined(setgrent) && SETGRENT_R_PROTO == REENTRANT_PROTO_V_H
1249 # define setgrent() setgrent_r(&PL_reentrant_buffer->_getgrent_fptr)
1251 #endif /* HAS_SETGRENT_R */
1253 #ifdef HAS_SETHOSTENT_R
1255 # if !defined(sethostent) && SETHOSTENT_R_PROTO == REENTRANT_PROTO_I_ID
1256 # define sethostent(a) (((errno = sethostent_r(a, &PL_reentrant_buffer->_gethostent_data))) == 0 ? 1 : 0)
1258 # if !defined(sethostent) && SETHOSTENT_R_PROTO == REENTRANT_PROTO_V_ID
1259 # define sethostent(a) sethostent_r(a, &PL_reentrant_buffer->_gethostent_data)
1261 #endif /* HAS_SETHOSTENT_R */
1263 #ifdef HAS_SETLOCALE_R
1265 # if !defined(setlocale) && SETLOCALE_R_PROTO == REENTRANT_PROTO_I_ICBI
1266 # define setlocale(a, b) (((errno = setlocale_r(a, b, PL_reentrant_buffer->_setlocale_buffer, PL_reentrant_buffer->_setlocale_size))) == 0 ? PL_reentrant_buffer->_setlocale_buffer : 0)
1268 #endif /* HAS_SETLOCALE_R */
1270 #ifdef HAS_SETNETENT_R
1272 # if !defined(setnetent) && SETNETENT_R_PROTO == REENTRANT_PROTO_I_ID
1273 # define setnetent(a) (((errno = setnetent_r(a, &PL_reentrant_buffer->_getnetent_data))) == 0 ? 1 : 0)
1275 # if !defined(setnetent) && SETNETENT_R_PROTO == REENTRANT_PROTO_V_ID
1276 # define setnetent(a) setnetent_r(a, &PL_reentrant_buffer->_getnetent_data)
1278 #endif /* HAS_SETNETENT_R */
1280 #ifdef HAS_SETPROTOENT_R
1282 # if !defined(setprotoent) && SETPROTOENT_R_PROTO == REENTRANT_PROTO_I_ID
1283 # define setprotoent(a) (((errno = setprotoent_r(a, &PL_reentrant_buffer->_getprotoent_data))) == 0 ? 1 : 0)
1285 # if !defined(setprotoent) && SETPROTOENT_R_PROTO == REENTRANT_PROTO_V_ID
1286 # define setprotoent(a) setprotoent_r(a, &PL_reentrant_buffer->_getprotoent_data)
1288 #endif /* HAS_SETPROTOENT_R */
1290 #ifdef HAS_SETPWENT_R
1292 # if !defined(setpwent) && SETPWENT_R_PROTO == REENTRANT_PROTO_I_H
1293 # define setpwent() (((errno = setpwent_r(&PL_reentrant_buffer->_getpwent_fptr))) == 0 ? 1 : 0)
1295 # if !defined(setpwent) && SETPWENT_R_PROTO == REENTRANT_PROTO_V_H
1296 # define setpwent() setpwent_r(&PL_reentrant_buffer->_getpwent_fptr)
1298 #endif /* HAS_SETPWENT_R */
1300 #ifdef HAS_SETSERVENT_R
1302 # if !defined(setservent) && SETSERVENT_R_PROTO == REENTRANT_PROTO_I_ID
1303 # define setservent(a) (((errno = setservent_r(a, &PL_reentrant_buffer->_getservent_data))) == 0 ? 1 : 0)
1305 # if !defined(setservent) && SETSERVENT_R_PROTO == REENTRANT_PROTO_V_ID
1306 # define setservent(a) setservent_r(a, &PL_reentrant_buffer->_getservent_data)
1308 #endif /* HAS_SETSERVENT_R */
1310 #ifdef HAS_SRAND48_R
1312 # if !defined(srand48) && SRAND48_R_PROTO == REENTRANT_PROTO_I_LS
1313 # define srand48(a) (((errno = srand48_r(a, &PL_reentrant_buffer->_drand48_struct))) == 0 ? &PL_reentrant_buffer->_drand48_struct : 0)
1315 #endif /* HAS_SRAND48_R */
1317 #ifdef HAS_SRANDOM_R
1319 # if !defined(srandom) && SRANDOM_R_PROTO == REENTRANT_PROTO_I_TS
1320 # define srandom(a) (((errno = srandom_r(a, &PL_reentrant_buffer->_srandom_struct))) == 0 ? &PL_reentrant_buffer->_srandom_struct : 0)
1322 #endif /* HAS_SRANDOM_R */
1324 #ifdef HAS_STRERROR_R
1326 # if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_I_IBW
1327 # define strerror(a) (((errno = strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size))) == 0 ? PL_reentrant_buffer->_strerror_buffer : 0)
1329 # if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_I_IBI
1330 # define strerror(a) (((errno = strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size))) == 0 ? PL_reentrant_buffer->_strerror_buffer : 0)
1332 # if !defined(strerror) && STRERROR_R_PROTO == REENTRANT_PROTO_B_IBW
1333 # define strerror(a) strerror_r(a, PL_reentrant_buffer->_strerror_buffer, PL_reentrant_buffer->_strerror_size)
1335 #endif /* HAS_STRERROR_R */
1339 # if !defined(tmpnam) && TMPNAM_R_PROTO == REENTRANT_PROTO_B_B
1340 # define tmpnam(a) tmpnam_r(a)
1342 #endif /* HAS_TMPNAM_R */
1344 #ifdef HAS_TTYNAME_R
1346 # if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_I_IBW
1347 # define ttyname(a) (((errno = ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size))) == 0 ? PL_reentrant_buffer->_ttyname_buffer : 0)
1349 # if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_I_IBI
1350 # define ttyname(a) (((errno = ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size))) == 0 ? PL_reentrant_buffer->_ttyname_buffer : 0)
1352 # if !defined(ttyname) && TTYNAME_R_PROTO == REENTRANT_PROTO_B_IBI
1353 # define ttyname(a) ttyname_r(a, PL_reentrant_buffer->_ttyname_buffer, PL_reentrant_buffer->_ttyname_size)
1355 #endif /* HAS_TTYNAME_R */
1358 #endif /* USE_REENTRANT_API */