com php-src: backport the basic code to properly recognize win 8.1 and 10: ext/standard/info.c

From: Date: Sun, 31 May 2015 17:01:58 +0000
Subject: com php-src: backport the basic code to properly recognize win 8.1 and 10: ext/standard/info.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-87014@lists.php.net to get a copy of this message
Commit: 1e9522021ab147d7986fbd93dcd3eafae2b24620 Author: Anatol Belski <ab@php.net> Sun, 31 May 2015 19:01:58 +0200 Parents: 31d59bf91569ba5a7cad6e433c49e44847b559b5 Branches: PHP-5.5 PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1e9522021ab147d7986fbd93dcd3eafae2b24620 Log: backport the basic code to properly recognize win 8.1 and 10 Changed paths: M ext/standard/info.c Diff: diff --git a/ext/standard/info.c b/ext/standard/info.c index df96199..82b6bf8 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -320,6 +320,17 @@ char* php_get_windows_name() } if (VER_PLATFORM_WIN32_NT==osvi.dwPlatformId && osvi.dwMajorVersion > 4 ) { + + if (osvi.dwMajorVersion == 10) { + if( osvi.dwMinorVersion == 0 ) { + if( osvi.wProductType == VER_NT_WORKSTATION ) { + major = "Windows 10"; + } else { + major = "Windows Server 2016"; + } + } + } + if (osvi.dwMajorVersion == 6) { if( osvi.dwMinorVersion == 0 ) { if( osvi.wProductType == VER_NT_WORKSTATION ) { @@ -366,6 +377,12 @@ char* php_get_windows_name() major = "Windows Server 2012"; } } + } else if (osvi.dwMinorVersion == 3) { + if( osvi.wProductType == VER_NT_WORKSTATION ) { + major = "Windows 8.1"; + } else { + major = "Windows Server 2012 R2"; + } } else { major = "Unknown Windows version"; }

« previous php.cvs (#87014) next »