summaryrefslogtreecommitdiff
path: root/reentr.c
diff options
context:
space:
mode:
authorAaron Crane <arc@cpan.org>2017-10-14 10:48:10 +0200
committerAaron Crane <arc@cpan.org>2017-10-21 16:53:08 +0100
commit7ce6ba0fb5b8748b33b04f1e400a9fddded56dba (patch)
tree86f3a81519ac03066a7a189e4630ba0c74114e10 /reentr.c
parent8d69850701e677ebcc44e4da724a7390bcd3ff09 (diff)
downloadperl-7ce6ba0fb5b8748b33b04f1e400a9fddded56dba.tar.gz
regen/reentr.pl: simplify cpp conditionals
Diffstat (limited to 'reentr.c')
-rw-r--r--reentr.c30
1 files changed, 9 insertions, 21 deletions
diff --git a/reentr.c b/reentr.c
index 70b971b5a4..166777e891 100644
--- a/reentr.c
+++ b/reentr.c
@@ -59,16 +59,12 @@ Perl_reentrant_size(pTHX) {
PL_reentrant_buffer->_grent_size = sysconf(_SC_GETGR_R_SIZE_MAX);
if (PL_reentrant_buffer->_grent_size == (size_t) -1)
PL_reentrant_buffer->_grent_size = REENTRANTUSUALSIZE;
-# else
-# if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ)
+# elif defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ)
PL_reentrant_buffer->_grent_size = SIABUFSIZ;
-# else
-# ifdef __sgi
+# elif defined(__sgi)
PL_reentrant_buffer->_grent_size = BUFSIZ;
-# else
+# else
PL_reentrant_buffer->_grent_size = REENTRANTUSUALSIZE;
-# endif
-# endif
# endif
#endif /* HAS_GETGRNAM_R */
#ifdef HAS_GETHOSTBYNAME_R
@@ -94,16 +90,12 @@ Perl_reentrant_size(pTHX) {
PL_reentrant_buffer->_pwent_size = sysconf(_SC_GETPW_R_SIZE_MAX);
if (PL_reentrant_buffer->_pwent_size == (size_t) -1)
PL_reentrant_buffer->_pwent_size = REENTRANTUSUALSIZE;
-# else
-# if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ)
+# elif defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ)
PL_reentrant_buffer->_pwent_size = SIABUFSIZ;
-# else
-# ifdef __sgi
+# elif defined(__sgi)
PL_reentrant_buffer->_pwent_size = BUFSIZ;
-# else
+# else
PL_reentrant_buffer->_pwent_size = REENTRANTUSUALSIZE;
-# endif
-# endif
# endif
#endif /* HAS_GETPWNAM_R */
#ifdef HAS_GETSERVBYNAME_R
@@ -116,16 +108,12 @@ Perl_reentrant_size(pTHX) {
PL_reentrant_buffer->_spent_size = sysconf(_SC_GETPW_R_SIZE_MAX);
if (PL_reentrant_buffer->_spent_size == (size_t) -1)
PL_reentrant_buffer->_spent_size = REENTRANTUSUALSIZE;
-# else
-# if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ)
+# elif defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ)
PL_reentrant_buffer->_spent_size = SIABUFSIZ;
-# else
-# ifdef __sgi
+# elif defined(__sgi)
PL_reentrant_buffer->_spent_size = BUFSIZ;
-# else
+# else
PL_reentrant_buffer->_spent_size = REENTRANTUSUALSIZE;
-# endif
-# endif
# endif
#endif /* HAS_GETSPNAM_R */
#ifdef HAS_READDIR_R