summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/php_network.h14
-rw-r--r--main/streams/php_streams_int.h5
2 files changed, 14 insertions, 5 deletions
diff --git a/main/php_network.h b/main/php_network.h
index 9f552f352b..1109bfbd35 100644
--- a/main/php_network.h
+++ b/main/php_network.h
@@ -34,10 +34,16 @@
#endif
#ifdef PHP_WIN32
-#define EWOULDBLOCK WSAEWOULDBLOCK
-#define EINPROGRESS WSAEWOULDBLOCK
-# define fsync _commit
-# define ftruncate(a, b) chsize(a, b)
+# ifdef EWOULDBLOCK
+# undef EWOULDBLOCK
+# endif
+# ifdef EINPROGRESS
+# undef EINPROGRESS
+# endif
+# define EWOULDBLOCK WSAEWOULDBLOCK
+# define EINPROGRESS WSAEWOULDBLOCK
+# define fsync _commit
+# define ftruncate(a, b) chsize(a, b)
#endif /* defined(PHP_WIN32) */
#ifndef EWOULDBLOCK
diff --git a/main/streams/php_streams_int.h b/main/streams/php_streams_int.h
index 9dc4496a3e..3edb5efbc8 100644
--- a/main/streams/php_streams_int.h
+++ b/main/streams/php_streams_int.h
@@ -49,7 +49,10 @@
#define CHUNK_SIZE 8192
#ifdef PHP_WIN32
-#define EWOULDBLOCK WSAEWOULDBLOCK
+# ifdef EWOULDBLOCK
+# undef EWOULDBLOCK
+# endif
+# define EWOULDBLOCK WSAEWOULDBLOCK
#endif
#ifndef S_ISREG