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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user