diff --git a/Makefile b/Makefile index 53fff5a..c02ab26 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ else SRC_DIR=src/x86/ SOURCE += $(COMMON_SRC) $(SRC_DIR)cpuid.c $(SRC_DIR)apic.c $(SRC_DIR)cpuid_asm.c $(SRC_DIR)uarch.c HEADERS += $(COMMON_HDR) $(SRC_DIR)cpuid.h $(SRC_DIR)apic.h $(SRC_DIR)cpuid_asm.h $(SRC_DIR)uarch.h - CXXFLAGS += -D_ARCH_X86 + CXXFLAGS += -DARCH_X86 SANITY_FLAGS += -Wno-pedantic-ms-format OUTPUT=cpufetch.exe endif diff --git a/src/common/cpu.c b/src/common/cpu.c index aadf98a..7e417fb 100755 --- a/src/common/cpu.c +++ b/src/common/cpu.c @@ -157,7 +157,7 @@ char* get_str_freq(struct frequency* freq) { else if(freq->max >= 1000) snprintf(string,size,"%.2f"STRING_GIGAHERZ,(float)(freq->max)/1000); else - snprintf(string,size,"%ld"STRING_MEGAHERZ,freq->max); + snprintf(string,size,"%d"STRING_MEGAHERZ,freq->max); return string; } diff --git a/src/common/cpu.h b/src/common/cpu.h index 57d783b..6f8f942 100644 --- a/src/common/cpu.h +++ b/src/common/cpu.h @@ -46,8 +46,8 @@ enum { typedef int32_t VENDOR; struct frequency { - int64_t base; - int64_t max; + int32_t base; + int32_t max; }; struct hypervisor { diff --git a/src/x86/cpuid.c b/src/x86/cpuid.c index 4106b79..7fe9851 100755 --- a/src/x86/cpuid.c +++ b/src/x86/cpuid.c @@ -914,13 +914,8 @@ void debug_cache(struct cache* cach) { } void debug_frequency(struct frequency* freq) { - #ifdef _WIN32 - printf("maxf=%I64d Mhz\n",freq->max); - printf("basef=%I64d Mhz\n",freq->base); - #else - printf("maxf=%ld Mhz\n",freq->max); - printf("basef=%ld Mhz\n",freq->base); - #endif + printf("maxf=%d Mhz\n",freq->max); + printf("basef=%d Mhz\n",freq->base); } void free_topo_struct(struct topology* topo) {