com php-src: ifdef win only api: ext/standard/basic_functions .c

From: Date: Sun, 29 Mar 2015 11:18:25 +0000
Subject: com php-src: ifdef win only api: ext/standard/basic_functions .c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-85921@lists.php.net to get a copy of this message
Commit: 2accf544cbd4bbe9df5f8990fbb80a98f6879086 Author: Anatol Belski <ab@php.net> Sun, 29 Mar 2015 13:18:25 +0200 Parents: 19bc9a8dd83bdedf641b0552f370a909f434d916 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2accf544cbd4bbe9df5f8990fbb80a98f6879086 Log: ifdef win only api Changed paths: M ext/standard/basic_functions.c Diff: diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index ae83ec7..7bf51eb 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -3383,11 +3383,13 @@ static void php_putenv_destructor(zval *zv) /* {{{ */ putenv_entry *pe = Z_PTR_P(zv); if (pe->previous_value) { +# if defined(PHP_WIN32) /* MSVCRT has a bug in putenv() when setting a variable that * is already set; if the SetEnvironmentVariable() API call * fails, the Crt will double free() a string. * We try to avoid this by setting our own value first */ SetEnvironmentVariable(pe->key, "bugbug"); +# endif putenv(pe->previous_value); # if defined(PHP_WIN32) efree(pe->previous_value);

« previous php.cvs (#85921) next »