[PHP-CVS] svn: /php/php-src/trunk/ ext/sockets/sockets.c ext/standard/flock_compat.h main/php_network.h main/streams/php_streams_int.h

2009-12-03 Thread Kalle Sommer Nielsen
kalleThu, 03 Dec 2009 10:17:58 +

Revision: http://svn.php.net/viewvc?view=revision&revision=291636

Log:
Use correct defines for VC10 support

Changed paths:
U   php/php-src/trunk/ext/sockets/sockets.c
U   php/php-src/trunk/ext/standard/flock_compat.h
U   php/php-src/trunk/main/php_network.h
U   php/php-src/trunk/main/streams/php_streams_int.h

Modified: php/php-src/trunk/ext/sockets/sockets.c
===
--- php/php-src/trunk/ext/sockets/sockets.c 2009-12-03 10:10:54 UTC (rev 
291635)
+++ php/php-src/trunk/ext/sockets/sockets.c 2009-12-03 10:17:58 UTC (rev 
291636)
@@ -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

Modified: php/php-src/trunk/ext/standard/flock_compat.h
===
--- php/php-src/trunk/ext/standard/flock_compat.h   2009-12-03 10:10:54 UTC 
(rev 291635)
+++ php/php-src/trunk/ext/standard/flock_compat.h   2009-12-03 10:17:58 UTC 
(rev 291636)
@@ -42,9 +42,10 @@
 #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) */

Modified: php/php-src/trunk/main/php_network.h
===
--- php/php-src/trunk/main/php_network.h2009-12-03 10:10:54 UTC (rev 
291635)
+++ php/php-src/trunk/main/php_network.h2009-12-03 10:17:58 UTC (rev 
291636)
@@ -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) */

Modified: php/php-src/trunk/main/streams/php_streams_int.h
===
--- php/php-src/trunk/main/streams/php_streams_int.h2009-12-03 10:10:54 UTC 
(rev 291635)
+++ php/php-src/trunk/main/streams/php_streams_int.h2009-12-03 10:17:58 UTC 
(rev 291636)
@@ -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

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ ext/sockets/sockets.c ext/standard/flock_compat.h main/php_network.h main/streams/php_streams_int.h win32/build/config.w32 win32/build/confutils.js win32/php_stdint.

2009-09-07 Thread Kalle Sommer Nielsen
kalleTue, 08 Sep 2009 01:50:40 +

Revision: http://svn.php.net/viewvc?view=revision&revision=288149

Log:
Experimental build support for VC10
 - Contains newly introduced compiler warning fixes
 - configure now picks up VC10

Changed paths:
U   php/php-src/trunk/ext/sockets/sockets.c
U   php/php-src/trunk/ext/standard/flock_compat.h
U   php/php-src/trunk/main/php_network.h
U   php/php-src/trunk/main/streams/php_streams_int.h
U   php/php-src/trunk/win32/build/config.w32
U   php/php-src/trunk/win32/build/confutils.js
U   php/php-src/trunk/win32/php_stdint.h

Modified: php/php-src/trunk/ext/sockets/sockets.c
===
--- php/php-src/trunk/ext/sockets/sockets.c 2009-09-08 01:45:25 UTC (rev 
288148)
+++ php/php-src/trunk/ext/sockets/sockets.c 2009-09-08 01:50:40 UTC (rev 
288149)
@@ -41,8 +41,12 @@
 # include "php_sockets.h"
 # include "win32/sockets.h"
 # define IS_INVALID_SOCKET(a)  (a->bsd_socket == INVALID_SOCKET)
-# define EPROTONOSUPPORT   WSAEPROTONOSUPPORT
-# define ECONNRESETWSAECONNRESET
+# ifndef EPROTONOSUPPORT
+#  define EPROTONOSUPPORT  WSAEPROTONOSUPPORT
+# endif
+# ifndef ECONNRESET
+#  define ECONNRESET   WSAECONNRESET
+# endif
 # ifdef errno
 #  undef errno
 # endif

Modified: php/php-src/trunk/ext/standard/flock_compat.h
===
--- php/php-src/trunk/ext/standard/flock_compat.h   2009-09-08 01:45:25 UTC 
(rev 288148)
+++ php/php-src/trunk/ext/standard/flock_compat.h   2009-09-08 01:50:40 UTC 
(rev 288149)
@@ -42,9 +42,11 @@
 #define PHP_LOCK_NB 4

 #ifdef PHP_WIN32
-#define EWOULDBLOCK WSAEWOULDBLOCK
-#  define fsync _commit
-#  define ftruncate(a, b) chsize(a, b)
+# ifndef EWOULDBLOCK
+#  define EWOULDBLOCK WSAEWOULDBLOCK
+# endif
+# define fsync _commit
+# define ftruncate(a, b) chsize(a, b)
 #endif /* defined(PHP_WIN32) */

 #if !HAVE_INET_ATON

Modified: php/php-src/trunk/main/php_network.h
===
--- php/php-src/trunk/main/php_network.h2009-09-08 01:45:25 UTC (rev 
288148)
+++ php/php-src/trunk/main/php_network.h2009-09-08 01:50:40 UTC (rev 
288149)
@@ -34,10 +34,14 @@
 #endif

 #ifdef PHP_WIN32
-#define EWOULDBLOCK WSAEWOULDBLOCK
-#define EINPROGRESSWSAEWOULDBLOCK
-#  define fsync _commit
-#  define ftruncate(a, b) chsize(a, b)
+# ifndef EWOULDBLOCK
+#  define EWOULDBLOCK  WSAEWOULDBLOCK
+# endif
+# ifndef EINPROGRESS
+#  define EINPROGRESS  WSAEWOULDBLOCK
+#endif
+# define fsync _commit
+# define ftruncate(a, b) chsize(a, b)
 #endif /* defined(PHP_WIN32) */

 #ifndef EWOULDBLOCK

Modified: php/php-src/trunk/main/streams/php_streams_int.h
===
--- php/php-src/trunk/main/streams/php_streams_int.h2009-09-08 01:45:25 UTC 
(rev 288148)
+++ php/php-src/trunk/main/streams/php_streams_int.h2009-09-08 01:50:40 UTC 
(rev 288149)
@@ -48,7 +48,7 @@

 #define CHUNK_SIZE 8192

-#ifdef PHP_WIN32
+#if defined(PHP_WIN32) && !defined(EWOULDBLOCK)
 #define EWOULDBLOCK WSAEWOULDBLOCK
 #endif


Modified: php/php-src/trunk/win32/build/config.w32
===
--- php/php-src/trunk/win32/build/config.w322009-09-08 01:45:25 UTC (rev 
288148)
+++ php/php-src/trunk/win32/build/config.w322009-09-08 01:50:40 UTC (rev 
288149)
@@ -15,8 +15,10 @@
 // 1310 is vs.net 2003
 // 1400 is vs.net 2005
 // 1500 is vs.net 2008
+// 1600 is vs.net 2010
 // Which version of the compiler do we have?
 VCVERS = probe_binary(CL).substr(0, 5).replace('.', '');
+STDOUT.WriteLine(VCVERS);
 STDOUT.WriteLine("  Detected compiler " + VC_VERSIONS[VCVERS]);
 AC_DEFINE('COMPILER', VC_VERSIONS[VCVERS], "Detected compiler version");
 DEFINE("PHP_COMPILER_SHORT", VC_VERSIONS_SHORT[VCVERS]);
@@ -147,7 +149,7 @@
}
 }

-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') {
if(PHP_MP == 'auto' || PHP_MP == 'no') {
 ADD_FLAG('CFLAGS', ' /MP ');

Modified: php/php-src/trunk/win32/build/confutils.js
===
--- php/php-src/trunk/win32/build/confutils.js  2009-09-08 01:45:25 UTC (rev 
288148)
+++ php/php-src/trunk/win32/build/confutils.js  2009-09-08 01:50:40 UTC (rev 
288149)
@@ -41,6 +41,7 @@
 VC_VERSIONS[1310] = 'MSVC7.1 (Visual C++ 2003)';
 VC_VERSIONS[1400] = 'MSVC8 (Visual C++ 2005)';
 VC_VERSIONS[1500] = 'MSVC9 (Visual C++ 2008)';
+VC_VERSIONS[1600] = 'MSVC10 (Visual C++ 2010)';

 var VC_VERSIONS_SHORT = new Array();
 VC_VERSIONS_SHORT[1200] = 'VC6';
@@ -48,6 +49,7 @@
 VC_VERSIONS_SHORT[1310] = 'VC7.1';
 VC_VERS