@@ -307,7 +307,17 @@ char* php_get_windows_name()
307
307
GetSystemInfo (& si );
308
308
}
309
309
310
- if (VER_PLATFORM_WIN32_NT == osvi .dwPlatformId && osvi .dwMajorVersion >= 6 ) {
310
+ if (VER_PLATFORM_WIN32_NT == osvi .dwPlatformId && osvi .dwMajorVersion >= 10 ) {
311
+ if (osvi .dwMajorVersion == 10 ) {
312
+ if ( osvi .dwMinorVersion == 0 ) {
313
+ if ( osvi .wProductType == VER_NT_WORKSTATION ) {
314
+ major = "Windows 10" ;
315
+ } else {
316
+ major = "Windows Server 2016" ;
317
+ }
318
+ }
319
+ }
320
+ } else if (VER_PLATFORM_WIN32_NT == osvi .dwPlatformId && osvi .dwMajorVersion >= 6 ) {
311
321
if (osvi .dwMajorVersion == 6 ) {
312
322
if ( osvi .dwMinorVersion == 0 ) {
313
323
if ( osvi .wProductType == VER_NT_WORKSTATION ) {
@@ -323,6 +333,11 @@ char* php_get_windows_name()
323
333
}
324
334
} else if ( osvi .dwMinorVersion == 2 ) {
325
335
/* could be Windows 8/Windows Server 2012, could be Windows 8.1/Windows Server 2012 R2 */
336
+ /* XXX and one more X - the above comment is true if no manifest is used for two cases:
337
+ - if the PHP build doesn't use the correct manifest
338
+ - if PHP DLL loaded under some binary that doesn't use the correct manifest
339
+
340
+ So keep the handling here as is for now, even if we know 6.2 is win8 and nothing else, and think about an improvement. */
326
341
OSVERSIONINFOEX osvi81 ;
327
342
DWORDLONG dwlConditionMask = 0 ;
328
343
int op = VER_GREATER_EQUAL ;
@@ -353,6 +368,12 @@ char* php_get_windows_name()
353
368
major = "Windows Server 2012" ;
354
369
}
355
370
}
371
+ } else if (osvi .dwMinorVersion == 3 ) {
372
+ if ( osvi .wProductType == VER_NT_WORKSTATION ) {
373
+ major = "Windows 8.1" ;
374
+ } else {
375
+ major = "Windows Server 2012 R2" ;
376
+ }
356
377
} else {
357
378
major = "Unknown Windows version" ;
358
379
}
0 commit comments