com php-src: backport the fix for bug #67739: ext/standard/info.c

From: Date: Mon, 04 Aug 2014 07:57:08 +0000
Subject: com php-src: backport the fix for bug #67739: ext/standard/info.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-79712@lists.php.net to get a copy of this message
Commit: ae74549239f80ef40e978942b71c08a7e8a09a23 Author: Anatol Belski <ab@php.net> Mon, 4 Aug 2014 09:57:08 +0200 Parents: 61ec9b5b0f80bc6016548d48f433fe22e2dc24ec Branches: PHP-5.4 PHP-5.5 PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ae74549239f80ef40e978942b71c08a7e8a09a23 Log: backport the fix for bug #67739 Bugs: https://bugs.php.net/67739 Changed paths: M ext/standard/info.c Diff: diff --git a/ext/standard/info.c b/ext/standard/info.c index 98b4a80..7868208 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -600,6 +600,14 @@ PHPAPI char *php_get_uname(char mode) php_get_windows_cpu(wincpu, sizeof(wincpu)); dwBuild = (DWORD)(HIWORD(dwVersion)); + + /* Windows "version" 6.2 could be Windows 8/Windows Server 2012, but also Windows 8.1/Windows Server 2012 R2 */ + if (dwWindowsMajorVersion == 6 && dwWindowsMinorVersion == 2) { + if (strncmp(winver, "Windows 8.1", 11) == 0 || strncmp(winver, "Windows Server 2012 R2", 22) == 0) { + dwWindowsMinorVersion = 3; + } + } + snprintf(tmp_uname, sizeof(tmp_uname), "%s %s %d..%d build %d (%s) %s", "Windows NT", ComputerName, dwWindowsMajorVersion, dwWindowsMinorVersion, dwBuild, winver?winver:"unknown", wincpu);

« previous php.cvs (#79712) next »