summaryrefslogtreecommitdiff
path: root/lang/php53
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2008-06-09 12:11:33 +0000
committerAlex Dupre <ale@FreeBSD.org>2008-06-09 12:11:33 +0000
commit388c8b6c6db14a0c865ff274c6193378ccdeb6ab (patch)
tree37364cd030ae3bf30854acb3dcb4eca999090e46 /lang/php53
parentAttach svgfig to the build. (diff)
FreeBSD >= 700050 has POSIX standard putenv().
PR: ports/123911 Submitted by: scf
Notes
Notes: svn path=/head/; revision=214543
Diffstat (limited to 'lang/php53')
-rw-r--r--lang/php53/files/patch-ext_standard_basic_functions.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/lang/php53/files/patch-ext_standard_basic_functions.c b/lang/php53/files/patch-ext_standard_basic_functions.c
index 44f865d2da3f..9ef6dd343cbf 100644
--- a/lang/php53/files/patch-ext_standard_basic_functions.c
+++ b/lang/php53/files/patch-ext_standard_basic_functions.c
@@ -1,5 +1,5 @@
---- ext/standard/basic_functions.c.orig 2008-05-02 08:44:06.000000000 +0200
-+++ ext/standard/basic_functions.c 2008-05-02 08:54:00.000000000 +0200
+--- ext/standard/basic_functions.c.orig 2008-06-09 14:06:40.000000000 +0200
++++ ext/standard/basic_functions.c 2008-06-09 14:08:28.000000000 +0200
@@ -87,6 +87,7 @@
# include <sys/loadavg.h>
#endif
@@ -8,26 +8,21 @@
#ifdef HARTMUT_0
#include <getopt.h>
#endif
-@@ -3861,9 +3862,7 @@
+@@ -3859,7 +3860,7 @@
SetEnvironmentVariable(pe->key, "bugbug");
#endif
putenv(pe->previous_value);
-# if defined(PHP_WIN32)
++# if defined(PHP_WIN32) || __FreeBSD_version < 700050
efree(pe->previous_value);
--# endif
+ # endif
} else {
- # if HAVE_UNSETENV
- unsetenv(pe->key);
-@@ -4463,12 +4462,8 @@
+@@ -4461,7 +4462,7 @@
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 */
-#if defined(PHP_WIN32)
++#if defined(PHP_WIN32) || __FreeBSD_version < 700050
/* must copy previous value because MSVCRT's putenv can free the string without notice */
pe.previous_value = estrdup(*env);
--#else
-- pe.previous_value = *env;
--#endif
- break;
- }
- }
+ #else