summaryrefslogtreecommitdiff
path: root/TSRM
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2003-12-22 15:01:05 (GMT)
committerWez Furlong <wez@php.net>2003-12-22 15:01:05 (GMT)
commit42ed91f94c26ed3dee0c3b05c3466bda301f6176 (patch)
treea1705ca3ffb4e9d63f307ed3c09336e9e6d2db71 /TSRM
parent3b450ec431f4b9e1a5b9a61f3fa5ff0f51955adc (diff)
downloadphp-42ed91f94c26ed3dee0c3b05c3466bda301f6176.tar.gz
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.
Diffstat (limited to 'TSRM')
-rw-r--r--TSRM/config.w3210
-rw-r--r--TSRM/tsrm_win32.c5
-rw-r--r--TSRM/tsrm_win32.h5
3 files changed, 20 insertions, 0 deletions
diff --git a/TSRM/config.w32 b/TSRM/config.w32
new file mode 100644
index 0000000..525f439
--- /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 0ceb69b..d08b4cc 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 ffed2d5..4a4e90c 100644
--- a/TSRM/tsrm_win32.h
+++ b/TSRM/tsrm_win32.h
@@ -24,6 +24,11 @@
#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;