From: Sara Golemon Date: Thu, 11 Jan 2007 02:31:50 +0000 (+0000) Subject: #ifdef out the rest of that getpwuid_r() patch, see prior commit X-Git-Tag: RELEASE_1_0_0RC1~307 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5082591ce2d67b370576b49cb776236be5638468;p=php #ifdef out the rest of that getpwuid_r() patch, see prior commit --- 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 }