diff --git a/cuBQL/math/common.h b/cuBQL/math/common.h index 0b462a6..7b51b7f 100644 --- a/cuBQL/math/common.h +++ b/cuBQL/math/common.h @@ -9,6 +9,7 @@ #include // using cmath causes issues under Windows #include +#include #include #include #include @@ -396,17 +397,10 @@ namespace cuBQL { { printf("%f",f); return o; } inline __cubql_both dbgout operator<<(dbgout o, double f) { printf("%lf",f); return o; } -#ifdef _WIN32 inline __cubql_both dbgout operator<<(dbgout o, uint64_t i) - { printf("%llu",(unsigned long long)i); return o; } + { printf("%" PRIu64, i); return o; } inline __cubql_both dbgout operator<<(dbgout o, int64_t i) - { printf("%lli",(long long)i); return o; } -#else - inline __cubql_both dbgout operator<<(dbgout o, uint64_t i) - { printf("%lu",i); return o; } - inline __cubql_both dbgout operator<<(dbgout o, int64_t i) - { printf("%li",i); return o; } -#endif + { printf("%" PRId64, i); return o; } template inline __cubql_both dbgout operator<<(dbgout o, T *ptr) { printf("%p",ptr); return o; }