]> granicus.if.org Git - php/commitdiff
Use correct defines for VC10 support
authorKalle Sommer Nielsen <kalle@php.net>
Thu, 3 Dec 2009 10:17:58 +0000 (10:17 +0000)
committerKalle Sommer Nielsen <kalle@php.net>
Thu, 3 Dec 2009 10:17:58 +0000 (10:17 +0000)
ext/sockets/sockets.c
ext/standard/flock_compat.h
main/php_network.h
main/streams/php_streams_int.h

index ed2a6d098446b8d9762ee7d26f4b2b2ea5682a73..73d01f3742bbba0c8a4e939a3a58100cb07ccb37 100644 (file)
 # include "php_sockets.h"
 # include "win32/sockets.h"
 # define IS_INVALID_SOCKET(a)  (a->bsd_socket == INVALID_SOCKET)
-# ifndef EPROTONOSUPPORT
-#  define EPROTONOSUPPORT      WSAEPROTONOSUPPORT
+# ifdef EPROTONOSUPPORT
+#  undef EPROTONOSUPPORT
 # endif
-# ifndef ECONNRESET
-#  define ECONNRESET           WSAECONNRESET
+# ifdef ECONNRESET
+#  undef ECONNRESET
 # endif
+# define EPROTONOSUPPORT WSAEPROTONOSUPPORT
+# define ECONNRESET WSAECONNRESET
 # ifdef errno
 #  undef errno
 # endif
index da96e1d7b85a762265e04cb56254fef144ca5a0d..aa0ab478e5f70c3220012928e779591c9531d2ab 100644 (file)
@@ -42,9 +42,10 @@ PHPAPI int flock(int fd, int operation);
 #define PHP_LOCK_NB 4
 
 #ifdef PHP_WIN32
-# ifndef EWOULDBLOCK
-#  define EWOULDBLOCK WSAEWOULDBLOCK
+# ifdef EWOULDBLOCK
+#  undef EWOULDBLOCK
 # endif
+# define EWOULDBLOCK WSAEWOULDBLOCK
 # define fsync _commit
 # define ftruncate(a, b) chsize(a, b)
 #endif /* defined(PHP_WIN32) */
index d8e34c402703f83e2ea8a448354259c86336cdba..018d3b37b32fcada64695baecda619ffdb0bb149 100644 (file)
 #endif
 
 #ifdef PHP_WIN32
-# ifndef EWOULDBLOCK
-#  define EWOULDBLOCK  WSAEWOULDBLOCK
+# ifdef EWOULDBLOCK
+#  undef EWOULDBLOCK
 # endif
-# ifndef EINPROGRESS
-#  define EINPROGRESS  WSAEWOULDBLOCK
-#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) */
index c182e8278cbb6da52a3be66f43ed8a5c48cf4ff8..5c54095c0be2eb3b3cc97fee6b90024c35a476d9 100644 (file)
 
 #define CHUNK_SIZE     8192
 
-#if defined(PHP_WIN32) && !defined(EWOULDBLOCK)
-#define EWOULDBLOCK WSAEWOULDBLOCK
+#ifdef PHP_WIN32
+# ifdef EWOULDBLOCK
+#  undef EWOULDBLOCK
+# endif
+# define EWOULDBLOCK WSAEWOULDBLOCK
 #endif
 
 #ifndef S_ISREG