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.
--- /dev/null
+// 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");
+
#include "TSRM.h"
#ifdef TSRM_WIN32
+
+#if HAVE_NEWAPIS_H
+# define COMPILE_NEWAPIS_STUBS
+#endif
+
#include "tsrm_win32.h"
#ifdef ZTS
#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;
+----------------------------------------------------------------------+
*/
-/* $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");
// 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");
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 \