pajoye Sun, 30 May 2010 07:46:45 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=299960
Log: - Added recent Windows versions to php_uname and fix undefined windows version Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/standard/info.c U php/php-src/trunk/ext/standard/info.c Modified: php/php-src/branches/PHP_5_3/NEWS =================================================================== --- php/php-src/branches/PHP_5_3/NEWS 2010-05-30 07:36:19 UTC (rev 299959) +++ php/php-src/branches/PHP_5_3/NEWS 2010-05-30 07:46:45 UTC (rev 299960) @@ -17,6 +17,8 @@ Made implicit use of NULL IV a warning. (Sara) - Added openssl_cipher_iv_length(). (Sara) - Added FastCGI Process Manager (FPM) SAPI. (Tony) +- Added recent Windows versions to php_uname and fix undefined windows + version support. (Pierre) - Changed namespaced classes so that the ctor can only be named __construct now. (Stas) Modified: php/php-src/branches/PHP_5_3/ext/standard/info.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/standard/info.c 2010-05-30 07:36:19 UTC (rev 299959) +++ php/php-src/branches/PHP_5_3/ext/standard/info.c 2010-05-30 07:46:45 UTC (rev 299960) @@ -281,11 +281,22 @@ } if (VER_PLATFORM_WIN32_NT==osvi.dwPlatformId && osvi.dwMajorVersion > 4 ) { - if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 0 ) { - if (osvi.wProductType == VER_NT_WORKSTATION) { - major = "Windows Vista"; + if (osvi.dwMajorVersion == 6) { + if( osvi.dwMinorVersion == 0 ) { + if( osvi.wProductType == VER_NT_WORKSTATION ) { + major = "Windows Vista"; + } else { + major = "Windows Server 2008"; + } + } else + if ( osvi.dwMinorVersion == 2 ) { + if( osvi.wProductType == VER_NT_WORKSTATION ) { + major = "Windows 7"; + } else { + major = "Windows Server 2008 R2"; + } } else { - major = "Windows Server 2008"; + major = "Unknow Windows version"; } pGPI = (PGPI) GetProcAddress(GetModuleHandle("kernel32.dll"), "GetProductInfo"); Modified: php/php-src/trunk/ext/standard/info.c =================================================================== --- php/php-src/trunk/ext/standard/info.c 2010-05-30 07:36:19 UTC (rev 299959) +++ php/php-src/trunk/ext/standard/info.c 2010-05-30 07:46:45 UTC (rev 299960) @@ -281,11 +281,22 @@ } if (VER_PLATFORM_WIN32_NT==osvi.dwPlatformId && osvi.dwMajorVersion > 4 ) { - if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 0 ) { - if (osvi.wProductType == VER_NT_WORKSTATION) { - major = "Windows Vista"; + if (osvi.dwMajorVersion == 6) { + if( osvi.dwMinorVersion == 0 ) { + if( osvi.wProductType == VER_NT_WORKSTATION ) { + major = "Windows Vista"; + } else { + major = "Windows Server 2008"; + } + } else + if ( osvi.dwMinorVersion == 1 ) { + if( osvi.wProductType == VER_NT_WORKSTATION ) { + major = "Windows 7"; + } else { + major = "Windows Server 2008 R2"; + } } else { - major = "Windows Server 2008"; + major = "Unknow Windows version"; } pGPI = (PGPI) GetProcAddress(GetModuleHandle("kernel32.dll"), "GetProductInfo");
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php