Commit 12581b4c authored by Feng Xiao's avatar Feng Xiao

Fixes traivs cpp build.

Remove the use of INT64_C/UINT64_C and add static_cast when neccessary.
parent 234ec017
......@@ -145,15 +145,15 @@ std::ostream& operator<<(std::ostream& o, const uint128& b) {
std::streamsize div_base_log;
switch (flags & std::ios::basefield) {
case std::ios::hex:
div = GOOGLE_ULONGLONG(0x1000000000000000); // 16^15
div = static_cast<uint64>(GOOGLE_ULONGLONG(0x1000000000000000)); // 16^15
div_base_log = 15;
break;
case std::ios::oct:
div = GOOGLE_ULONGLONG(01000000000000000000000); // 8^21
div = static_cast<uint64>(GOOGLE_ULONGLONG(01000000000000000000000)); // 8^21
div_base_log = 21;
break;
default: // std::ios::dec
div = GOOGLE_ULONGLONG(10000000000000000000); // 10^19
div = static_cast<uint64>(GOOGLE_ULONGLONG(10000000000000000000)); // 10^19
div_base_log = 19;
break;
}
......
......@@ -132,8 +132,8 @@ typedef uint64_t uint64;
#define GOOGLE_LL_FORMAT "I64" // As in printf("%I64d", ...)
#else
// By long long, we actually mean int64.
#define GOOGLE_LONGLONG(x) INT64_C(x)
#define GOOGLE_ULONGLONG(x) UINT64_C(x)
#define GOOGLE_LONGLONG(x) x##LL
#define GOOGLE_ULONGLONG(x) x##ULL
// Used to format real long long integers.
#define GOOGLE_LL_FORMAT "ll" // As in "%lld". Note that "q" is poor form also.
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment