|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
05 Oct 2000, Version 4.0.3
+- Fixed crash in the POSIX getrlimit() function (alex@zend.com)
- Fixed dirname() under certain conditions (Andi)
- Add --with-imap-ssl to support SSL'ized imap library in RH7 and others
(Rasmus)
#ifdef HAVE_GETRLIMIT
+
+#define UNLIMITED_STRING "unlimited"
+
static int posix_addlimit(int limit, char *name, pval *return_value) {
int result;
struct rlimit rl;
return FAILURE;
}
- if (rl.rlim_cur == RLIM_INFINITY)
- add_assoc_string(return_value,soft,"unlimited", 1);
- else
- add_assoc_long(return_value,soft,rl.rlim_cur);
+ if (rl.rlim_cur == RLIM_INFINITY) {
+ add_assoc_stringl(return_value, soft, UNLIMITED_STRING, sizeof(UNLIMITED_STRING)-1, 1);
+ } else {
+ add_assoc_long(return_value, soft, rl.rlim_cur);
+ }
- if (rl.rlim_max == RLIM_INFINITY)
- add_assoc_string(return_value,hard,"unlimited", 1);
- else
- add_assoc_long(return_value,hard,rl.rlim_max);
+ if (rl.rlim_max == RLIM_INFINITY) {
+ add_assoc_stringl(return_value, hard, UNLIMITED_STRING, sizeof(UNLIMITED_STRING)-1, 1);
+ } else {
+ add_assoc_long(return_value, hard, rl.rlim_max);
+ }
return SUCCESS;
}