Skip to content

Commit e0c1fa3

Browse files
committed
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: backport the fix for bug #67739
2 parents 9b9aa4b + ae74549 commit e0c1fa3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ext/standard/info.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,14 @@ PHPAPI char *php_get_uname(char mode)
592592

593593
php_get_windows_cpu(wincpu, sizeof(wincpu));
594594
dwBuild = (DWORD)(HIWORD(dwVersion));
595+
596+
/* Windows "version" 6.2 could be Windows 8/Windows Server 2012, but also Windows 8.1/Windows Server 2012 R2 */
597+
if (dwWindowsMajorVersion == 6 && dwWindowsMinorVersion == 2) {
598+
if (strncmp(winver, "Windows 8.1", 11) == 0 || strncmp(winver, "Windows Server 2012 R2", 22) == 0) {
599+
dwWindowsMinorVersion = 3;
600+
}
601+
}
602+
595603
snprintf(tmp_uname, sizeof(tmp_uname), "%s %s %d.%d build %d (%s) %s",
596604
"Windows NT", ComputerName,
597605
dwWindowsMajorVersion, dwWindowsMinorVersion, dwBuild, winver?winver:"unknown", wincpu);

0 commit comments

Comments
 (0)