com php-src: Patches #67739: ext/standard/info.c
| From: | Anatol Belski | Date: | Fri, 01 Aug 2014 20:38:18 +0000 |
| Subject: | com php-src: Patches #67739: ext/standard/info.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-79710@lists.php.net to get a copy of this message | ||
Commit: 513d48f2efb03950b81d76e4cddcc1075868bb0f
Author: Christian Wenz <christian@wenz.org> Fri, 1 Aug 2014 22:38:18 +0200
Parents: 60cc43a279479822af55dded38cafabe9b9123af
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=513d48f2efb03950b81d76e4cddcc1075868bb0f
Log:
Patches #67739
Fixes #67739: Windows 8.1/Server 2012 R2 OS build number reported as 6.2 (instead of 6.3)
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 12e36b4..0d06037 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);