diff --git a/src/utils/smallut.cpp b/src/utils/smallut.cpp index 9f550b6a..d41aef58 100644 --- a/src/utils/smallut.cpp +++ b/src/utils/smallut.cpp @@ -670,7 +670,7 @@ bool pcSubst(const string& in, string& out, const map& subs) } return true; } -inline static int ulltorbuf(unsigned long long val, char *rbuf) +inline static int ulltorbuf(uint64_t val, char *rbuf) { int idx; for (idx = 0; val; idx++) { @@ -690,7 +690,7 @@ inline static void ullcopyreverse(const char *rbuf, string& buf, int idx) } } -void ulltodecstr(unsigned long long val, string& buf) +void ulltodecstr(uint64_t val, string& buf) { buf.clear(); if (val == 0) { @@ -705,7 +705,7 @@ void ulltodecstr(unsigned long long val, string& buf) return; } -void lltodecstr(long long val, string& buf) +void lltodecstr(int64_t val, string& buf) { buf.clear(); if (val == 0) { @@ -730,14 +730,14 @@ void lltodecstr(long long val, string& buf) return; } -string lltodecstr(long long val) +string lltodecstr(int64_t val) { string buf; lltodecstr(val, buf); return buf; } -string ulltodecstr(unsigned long long val) +string ulltodecstr(uint64_t val) { string buf; ulltodecstr(val, buf); @@ -745,7 +745,7 @@ string ulltodecstr(unsigned long long val) } // Convert byte count into unit (KB/MB...) appropriate for display -string displayableBytes(off_t size) +string displayableBytes(int64_t size) { const char *unit; diff --git a/src/utils/smallut.h b/src/utils/smallut.h index 1281a6f9..6a16b529 100644 --- a/src/utils/smallut.h +++ b/src/utils/smallut.h @@ -19,6 +19,7 @@ #define _SMALLUT_H_INCLUDED_ #include +#include #include #include @@ -162,13 +163,13 @@ extern std::string escapeShell(const std::string& str); extern std::string truncate_to_word(const std::string& input, std::string::size_type maxlen); -void ulltodecstr(unsigned long long val, std::string& buf); -void lltodecstr(long long val, std::string& buf); -std::string lltodecstr(long long val); -std::string ulltodecstr(unsigned long long val); +void ulltodecstr(uint64_t val, std::string& buf); +void lltodecstr(int64_t val, std::string& buf); +std::string lltodecstr(int64_t val); +std::string ulltodecstr(uint64_t val); /** Convert byte count into unit (KB/MB...) appropriate for display */ -std::string displayableBytes(off_t size); +std::string displayableBytes(int64_t size); /** Break big string into lines */ std::string breakIntoLines(const std::string& in, unsigned int ll = 100,