diff options
| author | Anatol Belski <ab@php.net> | 2015-05-31 19:01:58 +0200 |
|---|---|---|
| committer | Anatol Belski <ab@php.net> | 2015-05-31 19:01:58 +0200 |
| commit | 1e9522021ab147d7986fbd93dcd3eafae2b24620 (patch) | |
| tree | f6f309b430a98e02f544325a7dcef53068611f57 | |
| parent | 31d59bf91569ba5a7cad6e433c49e44847b559b5 (diff) | |
| download | php-git-1e9522021ab147d7986fbd93dcd3eafae2b24620.tar.gz | |
backport the basic code to properly recognize win 8.1 and 10
| -rw-r--r-- | ext/standard/info.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/standard/info.c b/ext/standard/info.c index df96199f4f..82b6bf8b48 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -320,6 +320,17 @@ char* php_get_windows_name() } if (VER_PLATFORM_WIN32_NT==osvi.dwPlatformId && osvi.dwMajorVersion > 4 ) { + + if (osvi.dwMajorVersion == 10) { + if( osvi.dwMinorVersion == 0 ) { + if( osvi.wProductType == VER_NT_WORKSTATION ) { + major = "Windows 10"; + } else { + major = "Windows Server 2016"; + } + } + } + if (osvi.dwMajorVersion == 6) { if( osvi.dwMinorVersion == 0 ) { if( osvi.wProductType == VER_NT_WORKSTATION ) { @@ -366,6 +377,12 @@ char* php_get_windows_name() major = "Windows Server 2012"; } } + } else if (osvi.dwMinorVersion == 3) { + if( osvi.wProductType == VER_NT_WORKSTATION ) { + major = "Windows 8.1"; + } else { + major = "Windows Server 2012 R2"; + } } else { major = "Unknown Windows version"; } |
