Re: cvs: php-src /main php_ini.c
| From: | Antony Dovgal | Date: | Tue, 08 May 2007 20:41:25 +0000 |
| Subject: | Re: cvs: php-src /main php_ini.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-44238@lists.php.net to get a copy of this message | ||
Hannes, unfortunately strsep() is missing on Solaris, so this patch breaks the build.
On 04/25/2007 02:02 PM, Hannes Magnusson wrote:
diff -u php-src/main/php_ini.c:1.149 php-src/main/php_ini.c:1.150 --- php-src/main/php_ini.c:1.149 Mon Apr 16 09:43:52 2007 +++ php-src/main/php_ini.c Wed Apr 25 10:02:23 2007 @@ -16,7 +16,7 @@-- Wbr, Antony Dovgal+----------------------------------------------------------------------+*/ -/* $Id: php_ini.c,v 1.149 2007/04/16 09:43:52 dmitry Exp $ */ +/* $Id: php_ini.c,v 1.150 2007/04/25 10:02:23 bjori Exp $ */ #include "php.h" #include "ext/standard/info.h" @@ -351,7 +351,26 @@ #else if (sapi_module.executable_location) { binary_location = (char *)emalloc(PATH_MAX); - if (!realpath(sapi_module.executable_location, binary_location)) { + if (!strchr(sapi_module.executable_location, '/')) { + char *path; + int found = 0; + + if ((path = getenv("PATH")) != NULL) { + char *search_dir, search_path[MAXPATHLEN]; + + while ((search_dir = strsep(&path, ":")) != NULL) {