/* -*- buffer-read-only: t -*-
* Copyright (C) 2002, 2003, 2005, 2006, 2007 by Larry Wall and others
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
* This file is built by regen/reentr.pl from data in regen/reentr.pl.
* Any changes made here will be lost!
/* If compiling for a threaded perl, we will macro-wrap the system/library
* interfaces (e.g. getpwent()) which have threaded versions
* (e.g. getpwent_r()), which will handle things correctly for
* the Perl interpreter, but otherwise (for XS) the wrapping does
* not take place. See L<perlxs/Thread-aware system interfaces>.
# if defined(PERL_CORE) || defined(PERL_EXT)
# define PERL_REENTR_API 1
# define PERL_REENTR_API 0
/* Deprecations: some platforms have the said reentrant interfaces
* but they are declared obsolete and are not to be used. Often this
* means that the platform has threadsafed the interfaces (hopefully).
* All this is OS version dependent, so we are of course fooling ourselves.
* If you know of more deprecations on some platforms, please add your own
* (by editing reentr.pl, mind!) */
# define NETDB_R_OBSOLETE
#if defined(__osf__) && defined(__alpha) /* Tru64 aka Digital UNIX */
# define NETDB_R_OBSOLETE
* As of OpenBSD 3.7, reentrant functions are now working, they just are
* incompatible with everyone else. To make OpenBSD happy, we have to
* memzero out certain structures before calling the functions.
# define REENTR_MEMZERO(a,b) memzero(a,b)
# define REENTR_MEMZERO(a,b) 0
# undef HAS_ENDPROTOENT_R
# undef HAS_GETHOSTBYADDR_R
# undef HAS_GETHOSTBYNAME_R
# undef HAS_GETNETBYADDR_R
# undef HAS_GETNETBYNAME_R
# undef HAS_GETPROTOBYNAME_R
# undef HAS_GETPROTOBYNUMBER_R
# undef HAS_GETPROTOENT_R
# undef HAS_GETSERVBYNAME_R
# undef HAS_GETSERVBYPORT_R
# undef HAS_SETPROTOENT_R
#define REENTRANT_PROTO_B_B 1
#define REENTRANT_PROTO_B_BI 2
#define REENTRANT_PROTO_B_BW 3
#define REENTRANT_PROTO_B_CCD 4
#define REENTRANT_PROTO_B_CCS 5
#define REENTRANT_PROTO_B_IBI 6
#define REENTRANT_PROTO_B_IBW 7
#define REENTRANT_PROTO_B_SB 8
#define REENTRANT_PROTO_B_SBI 9
#define REENTRANT_PROTO_I_BI 10
#define REENTRANT_PROTO_I_BW 11
#define REENTRANT_PROTO_I_CCSBWR 12
#define REENTRANT_PROTO_I_CCSD 13
#define REENTRANT_PROTO_I_CII 14
#define REENTRANT_PROTO_I_CIISD 15
#define REENTRANT_PROTO_I_CSBI 16
#define REENTRANT_PROTO_I_CSBIR 17
#define REENTRANT_PROTO_I_CSBWR 18
#define REENTRANT_PROTO_I_CSBWRE 19
#define REENTRANT_PROTO_I_CSD 20
#define REENTRANT_PROTO_I_CWISBWRE 21
#define REENTRANT_PROTO_I_CWISD 22
#define REENTRANT_PROTO_I_D 23
#define REENTRANT_PROTO_I_H 24
#define REENTRANT_PROTO_I_IBI 25
#define REENTRANT_PROTO_I_IBW 26
#define REENTRANT_PROTO_I_ICBI 27
#define REENTRANT_PROTO_I_ICSBWR 28
#define REENTRANT_PROTO_I_ICSD 29
#define REENTRANT_PROTO_I_ID 30
#define REENTRANT_PROTO_I_IISD 31
#define REENTRANT_PROTO_I_ISBWR 32
#define REENTRANT_PROTO_I_ISD 33
#define REENTRANT_PROTO_I_LISBI 34
#define REENTRANT_PROTO_I_LISD 35
#define REENTRANT_PROTO_I_SB 36
#define REENTRANT_PROTO_I_SBI 37
#define REENTRANT_PROTO_I_SBIE 38
#define REENTRANT_PROTO_I_SBIH 39
#define REENTRANT_PROTO_I_SBIR 40
#define REENTRANT_PROTO_I_SBWR 41
#define REENTRANT_PROTO_I_SBWRE 42
#define REENTRANT_PROTO_I_SD 43
#define REENTRANT_PROTO_I_TISD 44
#define REENTRANT_PROTO_I_TS 45
#define REENTRANT_PROTO_I_TSBI 46
#define REENTRANT_PROTO_I_TSBIR 47
#define REENTRANT_PROTO_I_TSBWR 48
#define REENTRANT_PROTO_I_TSR 49
#define REENTRANT_PROTO_I_TsISBWRE 50
#define REENTRANT_PROTO_I_UISBWRE 51
#define REENTRANT_PROTO_I_uISBWRE 52
#define REENTRANT_PROTO_S_CBI 53
#define REENTRANT_PROTO_S_CCSBI 54
#define REENTRANT_PROTO_S_CIISBIE 55
#define REENTRANT_PROTO_S_CSBI 56
#define REENTRANT_PROTO_S_CSBIE 57
#define REENTRANT_PROTO_S_CWISBIE 58
#define REENTRANT_PROTO_S_CWISBWIE 59
#define REENTRANT_PROTO_S_ICSBI 60
#define REENTRANT_PROTO_S_ISBI 61
#define REENTRANT_PROTO_S_LISBI 62
#define REENTRANT_PROTO_S_SBI 63
#define REENTRANT_PROTO_S_SBIE 64
#define REENTRANT_PROTO_S_SBW 65
#define REENTRANT_PROTO_S_TISBI 66
#define REENTRANT_PROTO_S_TSBI 67
#define REENTRANT_PROTO_S_TSBIE 68
#define REENTRANT_PROTO_S_TWISBIE 69
#define REENTRANT_PROTO_V_D 70
#define REENTRANT_PROTO_V_H 71
#define REENTRANT_PROTO_V_ID 72
/* Defines for indicating which special features are supported. */
/* The getgrent getgrgid getgrnam using buffer? */
#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)
# define GETGRENT_R_HAS_BUFFER
# undef GETGRENT_R_HAS_BUFFER
#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)
# define GETGRGID_R_HAS_BUFFER
# undef GETGRGID_R_HAS_BUFFER
#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)
# define GETGRNAM_R_HAS_BUFFER
# undef GETGRNAM_R_HAS_BUFFER
/* Any of the getgrent getgrgid getgrnam using buffer? */
#if (defined(GETGRENT_R_HAS_BUFFER) || defined(GETGRGID_R_HAS_BUFFER) || defined(GETGRNAM_R_HAS_BUFFER))
# define USE_GRENT_BUFFER
/* The getgrent getgrgid getgrnam using ptr? */
#if defined(HAS_GETGRENT_R) && (GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIR)
# define GETGRENT_R_HAS_PTR
# undef GETGRENT_R_HAS_PTR
#if defined(HAS_GETGRGID_R) && (GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBWR || GETGRGID_R_PROTO == REENTRANT_PROTO_I_TSBIR)
# define GETGRGID_R_HAS_PTR
# undef GETGRGID_R_HAS_PTR
#if defined(HAS_GETGRNAM_R) && (GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETGRNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR)
# define GETGRNAM_R_HAS_PTR
# undef GETGRNAM_R_HAS_PTR
/* Any of the getgrent getgrgid getgrnam using ptr? */
#if (defined(GETGRENT_R_HAS_PTR) || defined(GETGRGID_R_HAS_PTR) || defined(GETGRNAM_R_HAS_PTR))
/* The getpwent getpwnam getpwuid using ptr? */
#if defined(HAS_GETPWENT_R) && (GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBWR || GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIR)
# define GETPWENT_R_HAS_PTR
# undef GETPWENT_R_HAS_PTR
#if defined(HAS_GETPWNAM_R) && (GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR || GETPWNAM_R_PROTO == REENTRANT_PROTO_I_CSBIR)
# define GETPWNAM_R_HAS_PTR
# undef GETPWNAM_R_HAS_PTR
#if defined(HAS_GETPWUID_R) && (GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBWR || GETPWUID_R_PROTO == REENTRANT_PROTO_I_TSBIR)
# define GETPWUID_R_HAS_PTR
# undef GETPWUID_R_HAS_PTR
/* Any of the getpwent getpwnam getpwuid using ptr? */
#if (defined(GETPWENT_R_HAS_PTR) || defined(GETPWNAM_R_HAS_PTR) || defined(GETPWUID_R_HAS_PTR))
/* The getspent getspnam using ptr? */
#if defined(HAS_GETSPNAM_R) && (GETSPNAM_R_PROTO == REENTRANT_PROTO_I_CSBWR)
# define GETSPNAM_R_HAS_PTR
# undef GETSPNAM_R_HAS_PTR
/* Any of the getspent getspnam using ptr? */
#if (defined(GETSPENT_R_HAS_PTR) || defined(GETSPNAM_R_HAS_PTR))
/* The getgrent getgrgid getgrnam setgrent endgrent using fptr? */
#if defined(HAS_GETGRENT_R) && (GETGRENT_R_PROTO == REENTRANT_PROTO_I_SBIH)
# define GETGRENT_R_HAS_FPTR
# undef GETGRENT_R_HAS_FPTR
#if defined(HAS_SETGRENT_R) && (SETGRENT_R_PROTO == REENTRANT_PROTO_I_H || SETGRENT_R_PROTO == REENTRANT_PROTO_V_H)
# define SETGRENT_R_HAS_FPTR
# undef SETGRENT_R_HAS_FPTR
#if defined(HAS_ENDGRENT_R) && (ENDGRENT_R_PROTO == REENTRANT_PROTO_I_H || ENDGRENT_R_PROTO == REENTRANT_PROTO_V_H)
# define ENDGRENT_R_HAS_FPTR
# undef ENDGRENT_R_HAS_FPTR
/* Any of the getgrent getgrgid getgrnam setgrent endgrent using fptr? */
#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))
/* The getpwent getpwnam getpwuid setpwent endpwent using fptr? */
#if defined(HAS_GETPWENT_R) && (GETPWENT_R_PROTO == REENTRANT_PROTO_I_SBIH)
# define GETPWENT_R_HAS_FPTR
# undef GETPWENT_R_HAS_FPTR
#if defined(HAS_SETPWENT_R) && (SETPWENT_R_PROTO == REENTRANT_PROTO_I_H || SETPWENT_R_PROTO == REENTRANT_PROTO_V_H)
# define SETPWENT_R_HAS_FPTR
# undef SETPWENT_R_HAS_FPTR
#if defined(HAS_ENDPWENT_R) && (ENDPWENT_R_PROTO == REENTRANT_PROTO_I_H || ENDPWENT_R_PROTO == REENTRANT_PROTO_V_H)
# define ENDPWENT_R_HAS_FPTR
# undef ENDPWENT_R_HAS_FPTR
/* Any of the getpwent getpwnam getpwuid setpwent endpwent using fptr? */
#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))
/* The getpwent getpwgid getpwnam using buffer? */
#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)
# define GETPWENT_R_HAS_BUFFER
# undef GETPWENT_R_HAS_BUFFER
#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)
# define GETPWNAM_R_HAS_BUFFER
# undef GETPWNAM_R_HAS_BUFFER
/* Any of the getpwent getpwgid getpwnam using buffer? */
#if (defined(GETPWENT_R_HAS_BUFFER) || defined(GETPWGID_R_HAS_BUFFER) || defined(GETPWNAM_R_HAS_BUFFER))
# define USE_PWENT_BUFFER
/* The gethostent gethostbyaddr gethostbyname using ptr? */
#if defined(HAS_GETHOSTENT_R) && (GETHOSTENT_R_PROTO == REENTRANT_PROTO_I_SBWRE)
# define GETHOSTENT_R_HAS_PTR
# undef GETHOSTENT_R_HAS_PTR
#if defined(HAS_GETHOSTBYADDR_R) && (GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_CWISBWRE || GETHOSTBYADDR_R_PROTO == REENTRANT_PROTO_I_TsISBWRE)
# define GETHOSTBYADDR_R_HAS_PTR
# undef GETHOSTBYADDR_R_HAS_PTR
#if defined(HAS_GETHOSTBYNAME_R) && (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE)
# define GETHOSTBYNAME_R_HAS_PTR
# undef GETHOSTBYNAME_R_HAS_PTR
/* Any of the gethostent gethostbyaddr gethostbyname using ptr? */
#if (defined(GETHOSTENT_R_HAS_PTR) || defined(GETHOSTBYADDR_R_HAS_PTR) || defined(GETHOSTBYNAME_R_HAS_PTR))
/* The getnetent getnetbyaddr getnetbyname using ptr? */
#if defined(HAS_GETNETENT_R) && (GETNETENT_R_PROTO == REENTRANT_PROTO_I_SBWRE)
# define GETNETENT_R_HAS_PTR
# undef GETNETENT_R_HAS_PTR
#if defined(HAS_GETNETBYADDR_R) && (GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_UISBWRE || GETNETBYADDR_R_PROTO == REENTRANT_PROTO_I_uISBWRE)
# define GETNETBYADDR_R_HAS_PTR
# undef GETNETBYADDR_R_HAS_PTR
#if defined(HAS_GETNETBYNAME_R) && (GETNETBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE)
# define GETNETBYNAME_R_HAS_PTR
# undef GETNETBYNAME_R_HAS_PTR
/* Any of the getnetent getnetbyaddr getnetbyname using ptr? */
#if (defined(GETNETENT_R_HAS_PTR) || defined(GETNETBYADDR_R_HAS_PTR) || defined(GETNETBYNAME_R_HAS_PTR))
/* The getprotoent getprotobyname getprotobynumber using ptr? */
#if defined(HAS_GETPROTOENT_R) && (GETPROTOENT_R_PROTO == REENTRANT_PROTO_I_SBWR)
# define GETPROTOENT_R_HAS_PTR
# undef GETPROTOENT_R_HAS_PTR
#if defined(HAS_GETPROTOBYNAME_R) && (GETPROTOBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWR)
# define GETPROTOBYNAME_R_HAS_PTR
# undef GETPROTOBYNAME_R_HAS_PTR
#if defined(HAS_GETPROTOBYNUMBER_R) && (GETPROTOBYNUMBER_R_PROTO == REENTRANT_PROTO_I_ISBWR)
# define GETPROTOBYNUMBER_R_HAS_PTR
# undef GETPROTOBYNUMBER_R_HAS_PTR
/* Any of the getprotoent getprotobyname getprotobynumber using ptr? */
#if (defined(GETPROTOENT_R_HAS_PTR) || defined(GETPROTOBYNAME_R_HAS_PTR) || defined(GETPROTOBYNUMBER_R_HAS_PTR))
# define USE_PROTOENT_PTR
/* The getservent getservbyname getservbyport using ptr? */
#if defined(HAS_GETSERVENT_R) && (GETSERVENT_R_PROTO == REENTRANT_PROTO_I_SBWR)
# define GETSERVENT_R_HAS_PTR
# undef GETSERVENT_R_HAS_PTR
#if defined(HAS_GETSERVBYNAME_R) && (GETSERVBYNAME_R_PROTO == REENTRANT_PROTO_I_CCSBWR)
# define GETSERVBYNAME_R_HAS_PTR
# undef GETSERVBYNAME_R_HAS_PTR
#if defined(HAS_GETSERVBYPORT_R) && (GETSERVBYPORT_R_PROTO == REENTRANT_PROTO_I_ICSBWR)
# define GETSERVBYPORT_R_HAS_PTR
# undef GETSERVBYPORT_R_HAS_PTR
/* Any of the getservent getservbyname getservbyport using ptr? */
#if (defined(GETSERVENT_R_HAS_PTR) || defined(GETSERVBYNAME_R_HAS_PTR) || defined(GETSERVBYPORT_R_HAS_PTR))
/* The gethostent gethostbyaddr gethostbyname using buffer? */
#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)
# define GETHOSTENT_R_HAS_BUFFER
# undef GETHOSTENT_R_HAS_BUFFER
#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)
# define GETHOSTBYADDR_R_HAS_BUFFER
# undef GETHOSTBYADDR_R_HAS_BUFFER
#if defined(HAS_GETHOSTBYNAME_R) && (GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_I_CSBWRE || GETHOSTBYNAME_R_PROTO == REENTRANT_PROTO_S_CSBIE)
# define GETHOSTBYNAME_R_HAS_BUFFER
# undef GETHOSTBYNAME_R_HAS_BUFFER
/* Any of the gethostent gethostbyaddr gethostbyname using buffer? */
#if (defined(GETHOSTENT_R_HAS_BUFFER) || defined(GETHOSTBYADDR_R_HAS_BUFFER) || defined(GETHOSTBYNAME_R_HAS_BUFFER))
# define USE_HOSTENT_BUFFER
# undef USE_HOSTENT_BUFFER
/* The getnetent getnetbyaddr getnetbyname using buffer? */
#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)
# define GETNETENT_R_HAS_BUFFER
# undef GETNETENT_R_HAS_BUFFER
#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)
# define GETNETBYADDR_R_HAS_BUFFER
# undef GETNETBYADDR_R_HAS_BUFFER
#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)
# define GETNETBYNAME_R_HAS_BUFFER
# undef GETNETBYNAME_R_HAS_BUFFER