summaryrefslogtreecommitdiff
path: root/ext/standard
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2010-05-30 07:46:45 (GMT)
committerPierre Joye <pajoye@php.net>2010-05-30 07:46:45 (GMT)
commit91721f73f2fb683b25f96e1f68348b62d057ee0f (patch)
tree58fcaf1880828615ce154c0fa3678fee5a9d0493 /ext/standard
parent5dba22d79e16505f4f520b039646b58629b5b402 (diff)
downloadphp-91721f73f2fb683b25f96e1f68348b62d057ee0f.tar.gz
- Added recent Windows versions to php_uname and fix undefined windows version
Diffstat (limited to 'ext/standard')
-rw-r--r--ext/standard/info.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/ext/standard/info.c b/ext/standard/info.c
index 0344064..480317b 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
@@ -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 == 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");