Fix MSVC cpu detection after last patch

This commit is contained in:
Stas Degteff 2005-10-16 09:52:01 +00:00
parent 178cee4ed9
commit 998de912ee

View File

@ -253,16 +253,10 @@ char *gcpuid(char *_cpuname)
unsigned char stepping; /* CPU stepping value, 4 bits */
// unsigned cpu_id; /* stepping ID, 12 bits: 0x0FMS */
// unsigned features; /* CPU features info */
}scpuid;
}scpuid; /* ISO C: static variabled is initialised with 0 */
// memset( &scpuid, 0, sizeof(scpuid) );
// TO_PORT_TAG: CPUID
#if defined(_MSC_VER)
scpuid.vendor[_MAX_VNAME_LEN] = 0;
#undef and
#undef and // and is defined as &&, this is conflicted with assembler instruction "and"
__asm
{
@ -432,7 +426,7 @@ char *gcpuid(char *_cpuname)
"eax", "ebx", "ecx", "edx", "esp"
);
cpuname(scpuid.family, scpuid.model, scpuid.vendor, _cpuname);
cpuname(scpuid.family?scpuid.family:scpuid.cpu, scpuid.model, scpuid.vendor, _cpuname);
#else
#if defined(MSDOS) || defined(DOS) || defined(__MSDOS__) || defined(_DOS) \