From 5082591ce2d67b370576b49cb776236be5638468 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Thu, 11 Jan 2007 02:31:50 +0000 Subject: [PATCH] #ifdef out the rest of that getpwuid_r() patch, see prior commit --- ext/posix/posix.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/posix/posix.c b/ext/posix/posix.c index 3b8ab338c9..cff3cdab25 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -932,7 +932,7 @@ PHP_FUNCTION(posix_getpwnam) struct passwd *pw; char *name; int name_len; -#ifdef HAVE_GETPWNAM_R +#if defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWNAM_R) struct passwd pwbuf; int buflen; char *buf; @@ -965,7 +965,7 @@ PHP_FUNCTION(posix_getpwnam) php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to convert posix passwd struct to array"); RETVAL_FALSE; } -#ifdef HAVE_GETPWNAM_R +#if defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWNAM_R) efree(buf); #endif } @@ -976,7 +976,7 @@ PHP_FUNCTION(posix_getpwnam) PHP_FUNCTION(posix_getpwuid) { long uid; -#ifdef HAVE_GETPWUID_R +#if defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWUID_R) struct passwd _pw; struct passwd *retpwptr = NULL; int pwbuflen; @@ -1012,7 +1012,7 @@ PHP_FUNCTION(posix_getpwuid) php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to convert posix passwd struct to array"); RETVAL_FALSE; } -#ifdef HAVE_GETPWUID_R +#if defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWUID_R) efree(pwbuf); #endif } -- 2.50.1