diff options
| author | Felipe Pena <felipe@php.net> | 2008-05-18 21:50:58 +0000 |
|---|---|---|
| committer | Felipe Pena <felipe@php.net> | 2008-05-18 21:50:58 +0000 |
| commit | 0f3bde23fd7a7d6c3e241de8340e25ac4f750257 (patch) | |
| tree | bc8f38df07edbc64776bef59403f77038b3acc8a /ext | |
| parent | 9d3385ff0866befe98a75d5fc0e17f3f78487b43 (diff) | |
| download | php-git-0f3bde23fd7a7d6c3e241de8340e25ac4f750257.tar.gz | |
- MFB: Making compatible with 64bit platform
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/standard/array.c | 2 | ||||
| -rw-r--r-- | ext/standard/basic_functions.c | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c index 664ee6ccdc..089e10b417 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -2250,7 +2250,7 @@ PHP_FUNCTION(array_slice) /* ..and the length */ if (length < 0) { length = num_in - offset + length; - } else if (((unsigned) offset + (unsigned) length) > (unsigned) num_in) { + } else if (((unsigned long) offset + (unsigned long) length) > (unsigned) num_in) { length = num_in - offset; } diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index cec0b1f636..1ea91afdc7 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -3859,9 +3859,17 @@ static void php_putenv_destructor(putenv_entry *pe) SetEnvironmentVariable(pe->key, "bugbug"); #endif putenv(pe->previous_value); +<<<<<<< basic_functions.c +#if defined(PHP_WIN32) || (defined (__FreeBSD__) && (__FreeBSD__ < 7)) +======= # if defined(PHP_WIN32) +>>>>>>> 1.725.2.31.2.71 efree(pe->previous_value); +<<<<<<< basic_functions.c +#endif +======= # endif +>>>>>>> 1.725.2.31.2.71 } else { # if HAVE_UNSETENV unsetenv(pe->key); @@ -4461,8 +4469,13 @@ PHP_FUNCTION(putenv) pe.previous_value = NULL; for (env = environ; env != NULL && *env != NULL; env++) { if (!strncmp(*env, pe.key, pe.key_len) && (*env)[pe.key_len] == '=') { /* found it */ +<<<<<<< basic_functions.c +#if defined(PHP_WIN32) || (defined (__FreeBSD__) && (__FreeBSD__ < 7)) + /* must copy previous value because putenv can free the string without notice */ +======= #if defined(PHP_WIN32) /* must copy previous value because MSVCRT's putenv can free the string without notice */ +>>>>>>> 1.725.2.31.2.71 pe.previous_value = estrdup(*env); #else pe.previous_value = *env; |
