summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/containers/hash_tables_unittest.cc7
-rw-r--r--base/rand_util.cc3
-rw-r--r--base/strings/string_number_conversions_unittest.cc27
-rw-r--r--base/time/time_mac.cc3
-rw-r--r--base/time/time_posix.cc2
-rw-r--r--base/time/time_unittest.cc4
-rw-r--r--base/time/time_win.cc3
7 files changed, 27 insertions, 22 deletions
diff --git a/base/containers/hash_tables_unittest.cc b/base/containers/hash_tables_unittest.cc
index 60fbeaa..f775dff 100644
--- a/base/containers/hash_tables_unittest.cc
+++ b/base/containers/hash_tables_unittest.cc
@@ -4,6 +4,7 @@
#include "base/containers/hash_tables.h"
+#include <stdint.h>
#include <string>
#include "base/basictypes.h"
@@ -31,7 +32,7 @@ TEST_F(HashPairTest, IntegerPairs) {
INSERT_PAIR_TEST(Int16Int16Pair, 4, 6);
INSERT_PAIR_TEST(Int16Int32Pair, 9, (1 << 29) + 378128932);
INSERT_PAIR_TEST(Int16Int64Pair, 10,
- (GG_INT64_C(1) << 60) + GG_INT64_C(78931732321));
+ (INT64_C(1) << 60) + INT64_C(78931732321));
typedef std::pair<int32, int16> Int32Int16Pair;
typedef std::pair<int32, int32> Int32Int32Pair;
@@ -40,7 +41,7 @@ TEST_F(HashPairTest, IntegerPairs) {
INSERT_PAIR_TEST(Int32Int16Pair, 4, 6);
INSERT_PAIR_TEST(Int32Int32Pair, 9, (1 << 29) + 378128932);
INSERT_PAIR_TEST(Int32Int64Pair, 10,
- (GG_INT64_C(1) << 60) + GG_INT64_C(78931732321));
+ (INT64_C(1) << 60) + INT64_C(78931732321));
typedef std::pair<int64, int16> Int64Int16Pair;
typedef std::pair<int64, int32> Int64Int32Pair;
@@ -49,7 +50,7 @@ TEST_F(HashPairTest, IntegerPairs) {
INSERT_PAIR_TEST(Int64Int16Pair, 4, 6);
INSERT_PAIR_TEST(Int64Int32Pair, 9, (1 << 29) + 378128932);
INSERT_PAIR_TEST(Int64Int64Pair, 10,
- (GG_INT64_C(1) << 60) + GG_INT64_C(78931732321));
+ (INT64_C(1) << 60) + INT64_C(78931732321));
}
// Verify that base::hash_set<const char*> compares by pointer value, not as C
diff --git a/base/rand_util.cc b/base/rand_util.cc
index 1525b91..931eb4e 100644
--- a/base/rand_util.cc
+++ b/base/rand_util.cc
@@ -5,6 +5,7 @@
#include "base/rand_util.h"
#include <math.h>
+#include <stdint.h>
#include <algorithm>
#include <limits>
@@ -37,7 +38,7 @@ double BitsToOpenEndedUnitInterval(uint64 bits) {
COMPILE_ASSERT(std::numeric_limits<double>::radix == 2, otherwise_use_scalbn);
static const int kBits = std::numeric_limits<double>::digits;
- uint64 random_bits = bits & ((GG_UINT64_C(1) << kBits) - 1);
+ uint64 random_bits = bits & ((UINT64_C(1) << kBits) - 1);
double result = ldexp(static_cast<double>(random_bits), -1 * kBits);
DCHECK_GE(result, 0.0);
DCHECK_LT(result, 1.0);
diff --git a/base/strings/string_number_conversions_unittest.cc b/base/strings/string_number_conversions_unittest.cc
index 4787614..0bc72f1 100644
--- a/base/strings/string_number_conversions_unittest.cc
+++ b/base/strings/string_number_conversions_unittest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/strings/string_number_conversions.h"
+
#include <errno.h>
#include <stdint.h>
#include <stdio.h>
@@ -10,7 +12,6 @@
#include <limits>
#include "base/format_macros.h"
-#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -237,10 +238,10 @@ TEST(StringNumberConversionsTest, StringToInt64) {
{"42", 42, true},
{"-2147483648", INT_MIN, true},
{"2147483647", INT_MAX, true},
- {"-2147483649", GG_INT64_C(-2147483649), true},
- {"-99999999999", GG_INT64_C(-99999999999), true},
- {"2147483648", GG_INT64_C(2147483648), true},
- {"99999999999", GG_INT64_C(99999999999), true},
+ {"-2147483649", INT64_C(-2147483649), true},
+ {"-99999999999", INT64_C(-99999999999), true},
+ {"2147483648", INT64_C(2147483648), true},
+ {"99999999999", INT64_C(99999999999), true},
{"9223372036854775807", kint64max, true},
{"-9223372036854775808", kint64min, true},
{"09", 9, true},
@@ -304,8 +305,8 @@ TEST(StringNumberConversionsTest, StringToUint64) {
{"2147483647", INT_MAX, true},
{"-2147483649", 0, false},
{"-99999999999", 0, false},
- {"2147483648", GG_UINT64_C(2147483648), true},
- {"99999999999", GG_UINT64_C(99999999999), true},
+ {"2147483648", UINT64_C(2147483648), true},
+ {"99999999999", UINT64_C(99999999999), true},
{"9223372036854775807", kint64max, true},
{"-9223372036854775808", 0, false},
{"09", 9, true},
@@ -327,7 +328,7 @@ TEST(StringNumberConversionsTest, StringToUint64) {
{"-", 0, false},
{"-9223372036854775809", 0, false},
{"-99999999999999999999", 0, false},
- {"9223372036854775808", GG_UINT64_C(9223372036854775808), true},
+ {"9223372036854775808", UINT64_C(9223372036854775808), true},
{"99999999999999999999", kuint64max, false},
{"18446744073709551615", kuint64max, true},
{"18446744073709551616", kuint64max, false},
@@ -550,7 +551,7 @@ TEST(StringNumberConversionsTest, HexStringToInt64) {
{"42", 66, true},
{"-42", -66, true},
{"+42", 66, true},
- {"40acd88557b", GG_INT64_C(4444444448123), true},
+ {"40acd88557b", INT64_C(4444444448123), true},
{"7fffffff", INT_MAX, true},
{"-80000000", INT_MIN, true},
{"ffffffff", 0xffffffff, true},
@@ -558,7 +559,7 @@ TEST(StringNumberConversionsTest, HexStringToInt64) {
{"0x42", 66, true},
{"-0x42", -66, true},
{"+0x42", 66, true},
- {"0x40acd88557b", GG_INT64_C(4444444448123), true},
+ {"0x40acd88557b", INT64_C(4444444448123), true},
{"0x7fffffff", INT_MAX, true},
{"-0x80000000", INT_MIN, true},
{"0xffffffff", 0xffffffff, true},
@@ -607,7 +608,7 @@ TEST(StringNumberConversionsTest, HexStringToUInt64) {
{"42", 66, true},
{"-42", 0, false},
{"+42", 66, true},
- {"40acd88557b", GG_INT64_C(4444444448123), true},
+ {"40acd88557b", INT64_C(4444444448123), true},
{"7fffffff", INT_MAX, true},
{"-80000000", 0, false},
{"ffffffff", 0xffffffff, true},
@@ -615,14 +616,14 @@ TEST(StringNumberConversionsTest, HexStringToUInt64) {
{"0x42", 66, true},
{"-0x42", 0, false},
{"+0x42", 66, true},
- {"0x40acd88557b", GG_INT64_C(4444444448123), true},
+ {"0x40acd88557b", INT64_C(4444444448123), true},
{"0x7fffffff", INT_MAX, true},
{"-0x80000000", 0, false},
{"0xffffffff", 0xffffffff, true},
{"0XDeadBeef", 0xdeadbeef, true},
{"0x7fffffffffffffff", kint64max, true},
{"-0x8000000000000000", 0, false},
- {"0x8000000000000000", GG_UINT64_C(0x8000000000000000), true},
+ {"0x8000000000000000", UINT64_C(0x8000000000000000), true},
{"-0x8000000000000001", 0, false},
{"0xFFFFFFFFFFFFFFFF", kuint64max, true},
{"FFFFFFFFFFFFFFFF", kuint64max, true},
diff --git a/base/time/time_mac.cc b/base/time/time_mac.cc
index e263d07..957d513 100644
--- a/base/time/time_mac.cc
+++ b/base/time/time_mac.cc
@@ -8,6 +8,7 @@
#include <CoreFoundation/CFTimeZone.h>
#include <mach/mach.h>
#include <mach/mach_time.h>
+#include <stdint.h>
#include <sys/sysctl.h>
#include <sys/time.h>
#include <sys/types.h>
@@ -114,7 +115,7 @@ namespace base {
// => Thu Jan 01 00:00:00 UTC 1970
// irb(main):011:0> Time.at(-11644473600).getutc()
// => Mon Jan 01 00:00:00 UTC 1601
-static const int64 kWindowsEpochDeltaSeconds = GG_INT64_C(11644473600);
+static const int64 kWindowsEpochDeltaSeconds = INT64_C(11644473600);
// static
const int64 Time::kWindowsEpochDeltaMicroseconds =
diff --git a/base/time/time_posix.cc b/base/time/time_posix.cc
index 8b207eb..3464e8c 100644
--- a/base/time/time_posix.cc
+++ b/base/time/time_posix.cc
@@ -137,7 +137,7 @@ struct timespec TimeDelta::ToTimeSpec() const {
// => Thu Jan 01 00:00:00 UTC 1970
// irb(main):011:0> Time.at(-11644473600).getutc()
// => Mon Jan 01 00:00:00 UTC 1601
-static const int64 kWindowsEpochDeltaSeconds = GG_INT64_C(11644473600);
+static const int64 kWindowsEpochDeltaSeconds = INT64_C(11644473600);
// static
const int64 Time::kWindowsEpochDeltaMicroseconds =
diff --git a/base/time/time_unittest.cc b/base/time/time_unittest.cc
index 456782c..1ee3269 100644
--- a/base/time/time_unittest.cc
+++ b/base/time/time_unittest.cc
@@ -4,8 +4,8 @@
#include "base/time/time.h"
+#include <stdint.h>
#include <time.h>
-
#include <limits>
#include <string>
@@ -832,7 +832,7 @@ TEST(TimeDelta, WindowsEpoch) {
exploded.millisecond = 0;
Time t = Time::FromUTCExploded(exploded);
// Unix 1970 epoch.
- EXPECT_EQ(GG_INT64_C(11644473600000000), t.ToInternalValue());
+ EXPECT_EQ(INT64_C(11644473600000000), t.ToInternalValue());
// We can't test 1601 epoch, since the system time functions on Linux
// only compute years starting from 1900.
diff --git a/base/time/time_win.cc b/base/time/time_win.cc
index d2403f2..6410fa0 100644
--- a/base/time/time_win.cc
+++ b/base/time/time_win.cc
@@ -36,6 +36,7 @@
#pragma comment(lib, "winmm.lib")
#include <windows.h>
#include <mmsystem.h>
+#include <stdint.h>
#include "base/basictypes.h"
#include "base/cpu.h"
@@ -106,7 +107,7 @@ base::LazyInstance<base::Lock>::Leaky g_high_res_lock =
// number of leap year days between 1601 and 1970: (1970-1601)/4 excluding
// 1700, 1800, and 1900.
// static
-const int64 Time::kTimeTToMicrosecondsOffset = GG_INT64_C(11644473600000000);
+const int64 Time::kTimeTToMicrosecondsOffset = INT64_C(11644473600000000);
// static
Time Time::Now() {