diff options
| author | Ondřej Surý <ondrej@sury.org> | 2014-08-25 11:37:32 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2014-08-25 11:37:32 +0200 |
| commit | 4b01785e700724da58ab36336a92a44c5d8246a8 (patch) | |
| tree | 94beaa316d16d2a191164f26efc78b3a744718d0 /ext/standard/info.c | |
| parent | 66921ccd8c83bce7c509b6f005951c2fac8fbb80 (diff) | |
| download | php-upstream/5.4.32.tar.gz | |
New upstream version 5.4.32upstream/5.4.32
Diffstat (limited to 'ext/standard/info.c')
| -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 98b4a8098..786820866 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); |
