* uname.cc (uname): Eliminate os specific retrieving of x86
processor type.
This commit is contained in:
parent
63c17b5426
commit
37f75da24d
|
@ -1,3 +1,8 @@
|
|||
Tue Sep 4 22:14:00 2001 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* uname.cc (uname): Eliminate os specific retrieving of x86
|
||||
processor type.
|
||||
|
||||
2001-09-04 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
|
||||
|
||||
* fhandler_console.cc (fhandler_console::char_command): Save the cursor
|
||||
|
|
|
@ -53,31 +53,15 @@ uname (struct utsname *name)
|
|||
switch (sysinfo.wProcessorArchitecture)
|
||||
{
|
||||
case PROCESSOR_ARCHITECTURE_INTEL:
|
||||
/* But which of the x86 chips are we? */
|
||||
/* Default to i386 if the specific chip cannot be determined */
|
||||
switch (os_being_run)
|
||||
{
|
||||
case win95:
|
||||
case win98:
|
||||
case winME:
|
||||
/* dwProcessorType only valid in Windows 95 */
|
||||
if ((sysinfo.dwProcessorType == PROCESSOR_INTEL_386) ||
|
||||
(sysinfo.dwProcessorType == PROCESSOR_INTEL_486) ||
|
||||
(sysinfo.dwProcessorType == PROCESSOR_INTEL_PENTIUM))
|
||||
__small_sprintf (name->machine, "i%d", sysinfo.dwProcessorType);
|
||||
unsigned int ptype;
|
||||
if (sysinfo.dwProcessorType < 3) /* Shouldn't happen. */
|
||||
ptype = 3;
|
||||
else if (sysinfo.dwProcessorType > 9) /* P4 */
|
||||
ptype = 6;
|
||||
else
|
||||
strcpy (name->machine, "i386");
|
||||
break;
|
||||
case winNT:
|
||||
/* wProcessorLevel only valid in Windows NT */
|
||||
__small_sprintf (name->machine, "i%d86",
|
||||
sysinfo.dwProcessorType > 6 ?
|
||||
6 : sysinfo.dwProcessorType);
|
||||
break;
|
||||
default:
|
||||
strcpy (name->machine, "i386");
|
||||
break;
|
||||
}
|
||||
ptype = sysinfo.dwProcessorType;
|
||||
|
||||
__small_sprintf (name->machine, "i%d86", ptype);
|
||||
break;
|
||||
case PROCESSOR_ARCHITECTURE_ALPHA:
|
||||
strcpy (name->machine, "alpha");
|
||||
|
|
Loading…
Reference in New Issue