From: Kalle Sommer Nielsen Date: Thu, 3 Dec 2009 10:17:58 +0000 (+0000) Subject: Use correct defines for VC10 support X-Git-Tag: php-5.4.0alpha1~191^2~2309 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=126ab758e12fe55e9634ba013d6d44c620bc0548;p=php Use correct defines for VC10 support --- diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index ed2a6d0984..73d01f3742 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -41,12 +41,14 @@ # 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 diff --git a/ext/standard/flock_compat.h b/ext/standard/flock_compat.h index da96e1d7b8..aa0ab478e5 100644 --- a/ext/standard/flock_compat.h +++ b/ext/standard/flock_compat.h @@ -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) */ diff --git a/main/php_network.h b/main/php_network.h index d8e34c4027..018d3b37b3 100644 --- a/main/php_network.h +++ b/main/php_network.h @@ -34,12 +34,14 @@ #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) */ diff --git a/main/streams/php_streams_int.h b/main/streams/php_streams_int.h index c182e8278c..5c54095c0b 100644 --- a/main/streams/php_streams_int.h +++ b/main/streams/php_streams_int.h @@ -48,8 +48,11 @@ #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