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.h

From: Date: Tue, 08 Sep 2009 01:50:40 +0000
Subject: 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.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-60350@lists.php.net to get a copy of this message
kalle Tue, 08 Sep 2009 01:50:40 +0000 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 ECONNRESET WSAECONNRESET +# 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.h 2009-09-08 01:45:25 UTC (rev 288148) +++ php/php-src/trunk/main/php_network.h 2009-09-08 01:50:40 UTC (rev 288149) @@ -34,10 +34,14 @@ #endif #ifdef PHP_WIN32 -#define EWOULDBLOCK WSAEWOULDBLOCK -#define EINPROGRESS WSAEWOULDBLOCK -# 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.h 2009-09-08 01:45:25 UTC (rev 288148) +++ php/php-src/trunk/main/streams/php_streams_int.h 2009-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.w32 2009-09-08 01:45:25 UTC (rev 288148) +++ php/php-src/trunk/win32/build/config.w32 2009-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_VERSIONS_SHORT[1400] = 'VC8'; VC_VERSIONS_SHORT[1500] = 'VC9'; +VC_VERSIONS_SHORT[1600] = 'VC10'; if (PROGRAM_FILES == null) { PROGRAM_FILES = "C:\\Program Files"; Modified: php/php-src/trunk/win32/php_stdint.h =================================================================== --- php/php-src/trunk/win32/php_stdint.h 2009-09-08 01:45:25 UTC (rev 288148) +++ php/php-src/trunk/win32/php_stdint.h 2009-09-08 01:50:40 UTC (rev 288149) @@ -264,7 +264,13 @@ #define INTMAX_C INT64_C #define UINTMAX_C UINT64_C -static __inline int64_t llabs( int64_t i ) { return i >= 0? i: -i; } +// In VC10+, llabs is an intrinsic function, so don't define it +#if _MSC_VER < 1600 +static __inline int64_t llabs( int64_t i ) +{ + return i >= 0 ? i : -i; +} +#endif #endif // __STDC_CONSTANT_MACROS ]

« previous php.cvs (#60350) next »