diff options
Diffstat (limited to 'ext/standard/info.c')
-rw-r--r-- | ext/standard/info.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/ext/standard/info.c b/ext/standard/info.c index 7746d0658..631ab3487 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: info.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: info.c 299960 2010-05-30 07:46:45Z pajoye $ */ #include "php.h" #include "php_ini.h" @@ -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"); |