summaryrefslogtreecommitdiff
path: root/reentr.pl
diff options
context:
space:
mode:
authorSlaven Rezic <slaven@rezic.de>2002-03-29 13:19:58 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-29 13:44:25 +0000
commite34107464fd88e95a0fb5ece3380b1b6f2613ef0 (patch)
treed47bd018cc27bf9e2f4adeb00da686b4f444477b /reentr.pl
parentbe4e88b6b2af8677110eaacd60e6621c85ec165c (diff)
downloadperl-e34107464fd88e95a0fb5ece3380b1b6f2613ef0.tar.gz
reentr.pl: warning fixes, getpwentr_size fix
Message-Id: <200203291119.g2TBJwqB016888@vran.herceg.de> p4raw-id: //depot/perl@15595
Diffstat (limited to 'reentr.pl')
-rw-r--r--reentr.pl17
1 files changed, 14 insertions, 3 deletions
diff --git a/reentr.pl b/reentr.pl
index ef9a7a1113..5c566f1ccf 100644
--- a/reentr.pl
+++ b/reentr.pl
@@ -469,11 +469,13 @@ EOF
EOF
my $sc = $g eq 'getgrent' ?
'_SC_GETGR_R_SIZE_MAX' : '_SC_GETPW_R_SIZE_MAX';
+ my $sz = $g eq 'getgrent' ?
+ '_getgrent_size' : '_getpwent_size';
push @size, <<EOF;
# if defined(HAS_SYSCONF) && defined($sc) && !defined(__GLIBC__)
PL_reentrant_buffer->_${g}_size = sysconf($sc);
- if (PL_reentrant_buffer->_getgrent_size == -1)
- PL_reentrant_buffer->_getgrent_size = REENTRANTUSUALSIZE;
+ if (PL_reentrant_buffer->$sz == -1)
+ PL_reentrant_buffer->$sz = REENTRANTUSUALSIZE;
# else
# if defined(__osf__) && defined(__alpha) && defined(SIABUFSIZ)
PL_reentrant_buffer->_${g}_size = SIABUFSIZ;
@@ -722,9 +724,18 @@ Perl_reentrant_retry(const char *f, ...)
dTHX;
void *retptr = NULL;
#ifdef USE_REENTRANT_API
- void *p0, *p1;
+# if defined(USE_GETHOSTENT_BUFFER) || defined(USE_GETGRENT_BUFFER) || defined(USE_GETNETENT_BUFFER) || defined(USE_GETPWENT_BUFFER) || defined(USE_GETPROTOENT_BUFFER) || defined(USE_GETSERVENT_BUFFER)
+ void *p0;
+# endif
+# if defined(USE_GETSERVENT_BUFFER)
+ void *p1;
+# endif
+# if defined(USE_GETHOSTENT_BUFFER)
size_t asize;
+# endif
+# if defined(USE_GETHOSTENT_BUFFER) || defined(USE_GETNETENT_BUFFER) || defined(USE_GETPROTOENT_BUFFER) || defined(USE_GETSERVENT_BUFFER)
int anint;
+# endif
va_list ap;
va_start(ap, f);