- Clean-up original code and add to NEWS.

This commit is contained in:
Andi Gutmans 2000-10-05 18:26:54 +00:00
parent 5ab813e1b6
commit fb2c23645b
2 changed files with 14 additions and 8 deletions

1
NEWS
View file

@ -2,6 +2,7 @@ PHP 4.0 NEWS
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
05 Oct 2000, Version 4.0.3 05 Oct 2000, Version 4.0.3
- Fixed crash in the POSIX getrlimit() function (alex@zend.com)
- Fixed dirname() under certain conditions (Andi) - Fixed dirname() under certain conditions (Andi)
- Add --with-imap-ssl to support SSL'ized imap library in RH7 and others - Add --with-imap-ssl to support SSL'ized imap library in RH7 and others
(Rasmus) (Rasmus)

View file

@ -833,6 +833,9 @@ PHP_FUNCTION(posix_getpwuid)
#ifdef HAVE_GETRLIMIT #ifdef HAVE_GETRLIMIT
#define UNLIMITED_STRING "unlimited"
static int posix_addlimit(int limit, char *name, pval *return_value) { static int posix_addlimit(int limit, char *name, pval *return_value) {
int result; int result;
struct rlimit rl; struct rlimit rl;
@ -848,15 +851,17 @@ static int posix_addlimit(int limit, char *name, pval *return_value) {
return FAILURE; return FAILURE;
} }
if (rl.rlim_cur == RLIM_INFINITY) if (rl.rlim_cur == RLIM_INFINITY) {
add_assoc_string(return_value,soft,"unlimited", 1); add_assoc_stringl(return_value, soft, UNLIMITED_STRING, sizeof(UNLIMITED_STRING)-1, 1);
else } else {
add_assoc_long(return_value, soft, rl.rlim_cur); add_assoc_long(return_value, soft, rl.rlim_cur);
}
if (rl.rlim_max == RLIM_INFINITY) if (rl.rlim_max == RLIM_INFINITY) {
add_assoc_string(return_value,hard,"unlimited", 1); add_assoc_stringl(return_value, hard, UNLIMITED_STRING, sizeof(UNLIMITED_STRING)-1, 1);
else } else {
add_assoc_long(return_value, hard, rl.rlim_max); add_assoc_long(return_value, hard, rl.rlim_max);
}
return SUCCESS; return SUCCESS;
} }