* 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>
|
2001-09-04 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
|
||||||
|
|
||||||
* fhandler_console.cc (fhandler_console::char_command): Save the cursor
|
* fhandler_console.cc (fhandler_console::char_command): Save the cursor
|
||||||
|
|
|
@ -53,31 +53,15 @@ uname (struct utsname *name)
|
||||||
switch (sysinfo.wProcessorArchitecture)
|
switch (sysinfo.wProcessorArchitecture)
|
||||||
{
|
{
|
||||||
case PROCESSOR_ARCHITECTURE_INTEL:
|
case PROCESSOR_ARCHITECTURE_INTEL:
|
||||||
/* But which of the x86 chips are we? */
|
unsigned int ptype;
|
||||||
/* Default to i386 if the specific chip cannot be determined */
|
if (sysinfo.dwProcessorType < 3) /* Shouldn't happen. */
|
||||||
switch (os_being_run)
|
ptype = 3;
|
||||||
{
|
else if (sysinfo.dwProcessorType > 9) /* P4 */
|
||||||
case win95:
|
ptype = 6;
|
||||||
case win98:
|
else
|
||||||
case winME:
|
ptype = sysinfo.dwProcessorType;
|
||||||
/* dwProcessorType only valid in Windows 95 */
|
|
||||||
if ((sysinfo.dwProcessorType == PROCESSOR_INTEL_386) ||
|
__small_sprintf (name->machine, "i%d86", ptype);
|
||||||
(sysinfo.dwProcessorType == PROCESSOR_INTEL_486) ||
|
|
||||||
(sysinfo.dwProcessorType == PROCESSOR_INTEL_PENTIUM))
|
|
||||||
__small_sprintf (name->machine, "i%d", sysinfo.dwProcessorType);
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case PROCESSOR_ARCHITECTURE_ALPHA:
|
case PROCESSOR_ARCHITECTURE_ALPHA:
|
||||||
strcpy (name->machine, "alpha");
|
strcpy (name->machine, "alpha");
|
||||||
|
|
Loading…
Reference in New Issue