diff options
author | Anatol Belski <ab@php.net> | 2014-08-04 09:57:59 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-08-04 09:57:59 +0200 |
commit | e0c1fa30c46bb384c099f67e79246082d4faef38 (patch) | |
tree | b561b1961a40f68b0b9adc9ea04e200be239b4a7 | |
parent | 9b9aa4b81178af7ff7c516834617d9c609b29325 (diff) | |
parent | ae74549239f80ef40e978942b71c08a7e8a09a23 (diff) | |
download | php-git-e0c1fa30c46bb384c099f67e79246082d4faef38.tar.gz |
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
backport the fix for bug #67739
-rw-r--r-- | ext/standard/info.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/standard/info.c b/ext/standard/info.c index b2ff32db92..076ef0b601 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -592,6 +592,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); |