]> granicus.if.org Git - php/commitdiff
MFT: VC10 build support
authorKalle Sommer Nielsen <kalle@php.net>
Thu, 3 Dec 2009 11:50:32 +0000 (11:50 +0000)
committerKalle Sommer Nielsen <kalle@php.net>
Thu, 3 Dec 2009 11:50:32 +0000 (11:50 +0000)
ext/sockets/sockets.c
ext/standard/flock_compat.h
main/php_network.h
main/streams/php_streams_int.h
win32/build/config.w32
win32/php_stdint.h

index 0b635f399c5cb4fcb6dfb9aa4b33c880fd9be760..c47d2894e010cd0d0acb3074d3d454635488c6f2 100644 (file)
 # include "php_sockets.h"
 # include "win32/sockets.h"
 # define IS_INVALID_SOCKET(a)  (a->bsd_socket == INVALID_SOCKET)
+# ifdef EPROTONOSUPPORT
+#  undef EPROTONOSUPPORT
+# endif
+# ifdef ECONNRESET
+#  undef ECONNRESET
+# endif
 # define EPROTONOSUPPORT       WSAEPROTONOSUPPORT
 # define ECONNRESET            WSAECONNRESET
 # ifdef errno
index a0c4054ff6d33d5da96a248b4b61d61f0a032687..29a9c033cd2346db8d79b8cdcd18d653d6a95692 100644 (file)
@@ -42,9 +42,12 @@ PHPAPI int flock(int fd, int operation);
 #define PHP_LOCK_NB 4
 
 #ifdef PHP_WIN32
-#define EWOULDBLOCK WSAEWOULDBLOCK
-#      define fsync _commit
-#      define ftruncate(a, b) chsize(a, b)
+# ifdef EWOULDBLOCK
+#  undef EWOULDBLOCK
+# endif
+# define EWOULDBLOCK WSAEWOULDBLOCK
+# define fsync _commit
+# define ftruncate(a, b) chsize(a, b)
 #endif /* defined(PHP_WIN32) */
 
 #if !HAVE_INET_ATON
index 9f552f352b54e2e54f7ede64b3d1026af3586204..1109bfbd353b389e4201499a877c90175528d236 100644 (file)
 #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
index 9dc4496a3e30f3c239d4d02afdab0b98f228a46b..3edb5efbc84d69450b816bd25fb012573bb51e0c 100644 (file)
 #define CHUNK_SIZE     8192
 
 #ifdef PHP_WIN32
-#define EWOULDBLOCK WSAEWOULDBLOCK
+# ifdef EWOULDBLOCK 
+#  undef EWOULDBLOCK
+# endif
+# define EWOULDBLOCK WSAEWOULDBLOCK
 #endif
 
 #ifndef S_ISREG
index 8861d49b787e59feec61dff07e553155801ec65c..c52ce017374abbc9b84cd0de37661fc69961ef42 100644 (file)
@@ -148,7 +148,7 @@ if (VCVERS >= 1400) {
        }
 }
 
-ARG_WITH('mp', 'Tell VC9 use up to [n,auto,disable] processes for compilation', 'auto');
+ARG_WITH('mp', 'Tell VC9+ use up to [n,auto,disable] processes for compilation', 'auto');
 if (VCVERS >= 1500 && PHP_MP != 'disable') {
                // no from disable-all 
                if(PHP_MP == 'auto' || PHP_MP == 'no') {
index 6eb8ce48f0a496cd9a2ebdf03d44798fe43b31be..5df1df4777eeb809ee052775be8ce99804c052a0 100644 (file)
@@ -238,7 +238,12 @@ typedef uint64_t  uintmax_t;
 #define INTMAX_C   INT64_C
 #define UINTMAX_C  UINT64_C
 
-static __inline int64_t llabs( int64_t i ) { return i >= 0? i: -i; }
+#if _MSC_VER < 1600
+static __inline int64_t llabs(int64_t i)
+{
+       return i >= 0 ? i: -i;
+}
+#endif
 
 #endif // __STDC_CONSTANT_MACROS ]