]> granicus.if.org Git - php/commitdiff
Fix bug #26692; Could not find GetLongPathNameA under NT4.
authorWez Furlong <wez@php.net>
Mon, 22 Dec 2003 15:01:05 +0000 (15:01 +0000)
committerWez Furlong <wez@php.net>
Mon, 22 Dec 2003 15:01:05 +0000 (15:01 +0000)
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.

TSRM/config.w32 [new file with mode: 0644]
TSRM/tsrm_win32.c
TSRM/tsrm_win32.h
win32/build/buildconf.js
win32/build/config.w32

diff --git a/TSRM/config.w32 b/TSRM/config.w32
new file mode 100644 (file)
index 0000000..525f439
--- /dev/null
@@ -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");
+
index 0ceb69b990f052073927ba781ab8d25bdaa2db2a..d08b4cc3b253e9a2e969484d66172fba2283c3ce 100644 (file)
 #include "TSRM.h"
 
 #ifdef TSRM_WIN32
+
+#if HAVE_NEWAPIS_H
+# define COMPILE_NEWAPIS_STUBS
+#endif
+
 #include "tsrm_win32.h"
 
 #ifdef ZTS
index ffed2d559e5ea250e7fcc9a397c785995c52c3de..4a4e90c47884827d8cb3afec3633cfec29f9dfac 100644 (file)
 #include "TSRM.h"
 #include <windows.h>
 
+#if HAVE_NEWAPIS_H
+# define WANT_GETLONGPATHNAME_WRAPPER
+# include <NewAPIs.h>
+#endif
+
 struct ipc_perm {
        int                     key;
        unsigned short  uid;
index e70ec9d8f611ddef2aeae5337823fb9536df1777..c91fa86eb72ea96982de08ff6258fd9e4c08efe5 100644 (file)
@@ -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");
index b4829d972c7121445de9b8929b2f3757128ceb65..38c6817759748be107a4140ed2acc51bd9004f3d 100644 (file)
@@ -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 \