From: Wez Furlong Date: Mon, 22 Dec 2003 15:01:05 +0000 (+0000) Subject: Fix bug #26692; Could not find GetLongPathNameA under NT4. X-Git-Tag: php_ibase_before_split~544 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=42ed91f94c26ed3dee0c3b05c3466bda301f6176;p=php Fix bug #26692; Could not find GetLongPathNameA under NT4. This fix relies on you having the Platform SDK headers. Using the new build system, the NewAPIs.h header will be detected automatically, however, for people building using .dsp files, you will need to add /DHAVE_NEWAPIS_H=1 to the TSRM project if you have those newer headers. --- diff --git a/TSRM/config.w32 b/TSRM/config.w32 new file mode 100644 index 0000000000..525f4390e5 --- /dev/null +++ b/TSRM/config.w32 @@ -0,0 +1,10 @@ +// vim:ft=javascript +// $Id$ + +if (CHECK_HEADER_ADD_INCLUDE("NewAPIs.h", "CFLAGS_PHP", php_usual_include_suspects)) { + // Need to add the flag directly, since TSRM doesn't include the config + // header + ADD_FLAG("CFLAGS_PHP", "/DHAVE_NEWAPIS_H=1"); +} +ADD_SOURCES("TSRM", "TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c tsrm_win32.c"); + diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index 0ceb69b990..d08b4cc3b2 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -29,6 +29,11 @@ #include "TSRM.h" #ifdef TSRM_WIN32 + +#if HAVE_NEWAPIS_H +# define COMPILE_NEWAPIS_STUBS +#endif + #include "tsrm_win32.h" #ifdef ZTS diff --git a/TSRM/tsrm_win32.h b/TSRM/tsrm_win32.h index ffed2d559e..4a4e90c478 100644 --- a/TSRM/tsrm_win32.h +++ b/TSRM/tsrm_win32.h @@ -24,6 +24,11 @@ #include "TSRM.h" #include +#if HAVE_NEWAPIS_H +# define WANT_GETLONGPATHNAME_WRAPPER +# include +#endif + struct ipc_perm { int key; unsigned short uid; diff --git a/win32/build/buildconf.js b/win32/build/buildconf.js index e70ec9d8f6..c91fa86eb7 100644 --- a/win32/build/buildconf.js +++ b/win32/build/buildconf.js @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: buildconf.js,v 1.6 2003-12-19 12:50:11 wez Exp $ */ +/* $Id: buildconf.js,v 1.7 2003-12-22 15:01:05 wez Exp $ */ // This generates a configure script for win32 build WScript.StdOut.WriteLine("Rebuilding configure.js"); @@ -90,6 +90,8 @@ C.Write(file_get_contents("win32/build/confutils.js")); // Pull in code from sapi and extensions modules = file_get_contents("win32/build/config.w32"); +// Pick up confs from TSRM and Zend if present +find_config_w32("."); find_config_w32("sapi"); find_config_w32("ext"); find_config_w32("pecl"); diff --git a/win32/build/config.w32 b/win32/build/config.w32 index b4829d972c..38c6817759 100644 --- a/win32/build/config.w32 +++ b/win32/build/config.w32 @@ -166,7 +166,6 @@ STDOUT.WriteBlankLines(1); STDOUT.WriteLine("Build dir: " + get_define('BUILD_DIR')); STDOUT.WriteLine("PHP Core: " + get_define('PHPDLL') + " and " + get_define('PHPLIB')); -ADD_SOURCES("TSRM", "TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c tsrm_win32.c"); ADD_SOURCES("Zend", "zend_language_parser.c zend_language_scanner.c \ zend_ini_parser.c zend_ini_scanner.c zend_alloc.c zend_compile.c \ zend_constants.c zend_dynamic_array.c zend_execute_API.c zend_highlight.c \