com php-src: Fix paths issue when fetching .phpdbginit under Windows: sapi/phpdbg/phpdbg_prompt.c win32/build/config.w3 2.h.in

From: Date: Wed, 24 Jun 2015 22:36:01 +0000
Subject: com php-src: Fix paths issue when fetching .phpdbginit under Windows: sapi/phpdbg/phpdbg_prompt.c win32/build/config.w3 2.h.in
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-87520@lists.php.net to get a copy of this message
Commit: f42cdf83b00182dc26ad11d3917a6275288b5b4b Author: Bob Weinand <bobwei9@hotmail.com> Thu, 25 Jun 2015 00:35:52 +0200 Parents: 190478e9da8e199b6d8812c86554ed8f1b3d7900 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f42cdf83b00182dc26ad11d3917a6275288b5b4b Log: Fix paths issue when fetching .phpdbginit under Windows Changed paths: M sapi/phpdbg/phpdbg_prompt.c M win32/build/config.w32.h.in Diff: diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index 146532f..3b1ec1f 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -346,9 +346,12 @@ void phpdbg_init(char *init_file, size_t init_file_len, zend_bool use_default) / { if (!init_file && use_default) { char *scan_dir = getenv("PHP_INI_SCAN_DIR"); + char *sys_ini; int i; - phpdbg_try_file_init(PHPDBG_STRL(PHP_CONFIG_FILE_PATH "/" PHPDBG_INIT_FILENAME), 0); + asprintf(&sys_ini, "%s/" PHPDBG_INIT_FILENAME, PHP_CONFIG_FILE_PATH); + phpdbg_try_file_init(sys_ini, strlen(sys_ini), 0); + free(sys_ini); if (!scan_dir) { scan_dir = PHP_CONFIG_FILE_SCAN_DIR; diff --git a/win32/build/config.w32.h.in b/win32/build/config.w32.h.in index 3276fea..b2ee6f1 100644 --- a/win32/build/config.w32.h.in +++ b/win32/build/config.w32.h.in @@ -10,7 +10,7 @@ #define NTDDI_VERSION 0x06000100 /* Default PHP / PEAR directories */ -#define PHP_CONFIG_FILE_PATH (getenv("SystemRoot"))?getenv("SystemRoot"):"" +#define PHP_CONFIG_FILE_PATH (getenv("SystemRoot")?getenv("SystemRoot"):"") #define CONFIGURATION_FILE_PATH "php.ini" #define PEAR_INSTALLDIR "@PREFIX@\\pear" #define PHP_BINDIR "@PREFIX@"

« previous php.cvs (#87520) next »