mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 07:50:40 +01:00
[v0.89] Change freq from int64 to int32, which fixes a compilation issue. Fix Makefile in Windows
This commit is contained in:
2
Makefile
2
Makefile
@@ -28,7 +28,7 @@ else
|
|||||||
SRC_DIR=src/x86/
|
SRC_DIR=src/x86/
|
||||||
SOURCE += $(COMMON_SRC) $(SRC_DIR)cpuid.c $(SRC_DIR)apic.c $(SRC_DIR)cpuid_asm.c $(SRC_DIR)uarch.c
|
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
|
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
|
SANITY_FLAGS += -Wno-pedantic-ms-format
|
||||||
OUTPUT=cpufetch.exe
|
OUTPUT=cpufetch.exe
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ char* get_str_freq(struct frequency* freq) {
|
|||||||
else if(freq->max >= 1000)
|
else if(freq->max >= 1000)
|
||||||
snprintf(string,size,"%.2f"STRING_GIGAHERZ,(float)(freq->max)/1000);
|
snprintf(string,size,"%.2f"STRING_GIGAHERZ,(float)(freq->max)/1000);
|
||||||
else
|
else
|
||||||
snprintf(string,size,"%ld"STRING_MEGAHERZ,freq->max);
|
snprintf(string,size,"%d"STRING_MEGAHERZ,freq->max);
|
||||||
|
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,8 +46,8 @@ enum {
|
|||||||
typedef int32_t VENDOR;
|
typedef int32_t VENDOR;
|
||||||
|
|
||||||
struct frequency {
|
struct frequency {
|
||||||
int64_t base;
|
int32_t base;
|
||||||
int64_t max;
|
int32_t max;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct hypervisor {
|
struct hypervisor {
|
||||||
|
|||||||
@@ -914,13 +914,8 @@ void debug_cache(struct cache* cach) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void debug_frequency(struct frequency* freq) {
|
void debug_frequency(struct frequency* freq) {
|
||||||
#ifdef _WIN32
|
printf("maxf=%d Mhz\n",freq->max);
|
||||||
printf("maxf=%I64d Mhz\n",freq->max);
|
printf("basef=%d Mhz\n",freq->base);
|
||||||
printf("basef=%I64d Mhz\n",freq->base);
|
|
||||||
#else
|
|
||||||
printf("maxf=%ld Mhz\n",freq->max);
|
|
||||||
printf("basef=%ld Mhz\n",freq->base);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void free_topo_struct(struct topology* topo) {
|
void free_topo_struct(struct topology* topo) {
|
||||||
|
|||||||
Reference in New Issue
Block a user