]> granicus.if.org Git - php/commitdiff
- Added recent Windows versions to php_uname and fix undefined windows version
authorPierre Joye <pajoye@php.net>
Sun, 30 May 2010 07:46:45 +0000 (07:46 +0000)
committerPierre Joye <pajoye@php.net>
Sun, 30 May 2010 07:46:45 +0000 (07:46 +0000)
NEWS
ext/standard/info.c

diff --git a/NEWS b/NEWS
index 769dd698bc4d5338047644d2588dd33887f6dc4d..6f44506cdea16f9e08492f60be1f4eb58805d885 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,8 @@ PHP                                                                        NEWS
   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)
index f9d32998968b241f8f5773f6f3bf7c5ce99fbf20..18483a37da1c6cb588981804e641e6775438ff7c 100644 (file)
@@ -281,11 +281,22 @@ char* php_get_windows_name()
        }
 
        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");