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