提交 29e91b97 编写于 作者: M mikael

7170275: os::print_os_info needs to know about Windows 8

Summary: Recognize Windows 8 and Windows Server 2012
Reviewed-by: sla, kvn, azeemj
上级 b966bc7d
...@@ -1591,7 +1591,8 @@ void os::win32::print_windows_version(outputStream* st) { ...@@ -1591,7 +1591,8 @@ void os::win32::print_windows_version(outputStream* st) {
case 5001: st->print(" Windows XP"); break; case 5001: st->print(" Windows XP"); break;
case 5002: case 5002:
case 6000: case 6000:
case 6001: { case 6001:
case 6002: {
// Retrieve SYSTEM_INFO from GetNativeSystemInfo call so that we could // Retrieve SYSTEM_INFO from GetNativeSystemInfo call so that we could
// find out whether we are running on 64 bit processor or not. // find out whether we are running on 64 bit processor or not.
SYSTEM_INFO si; SYSTEM_INFO si;
...@@ -1623,6 +1624,14 @@ void os::win32::print_windows_version(outputStream* st) { ...@@ -1623,6 +1624,14 @@ void os::win32::print_windows_version(outputStream* st) {
} }
if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
st->print(" , 64 bit"); st->print(" , 64 bit");
} else if (os_vers == 6002) {
if (osvi.wProductType == VER_NT_WORKSTATION) {
st->print(" Windows 8");
} else {
st->print(" Windows Server 2012");
}
if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
st->print(" , 64 bit");
} else { // future os } else { // future os
// Unrecognized windows, print out its major and minor versions // Unrecognized windows, print out its major and minor versions
st->print(" Windows NT %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion); st->print(" Windows NT %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册