Bug 795351: Replace LL_MaxInt(), LL_MinInt(), LL_MaxUint() with stdint macros; r=ehsan
authorIsaac Aggrey <isaac.aggrey@gmail.com>
Fri, 28 Sep 2012 17:08:26 -0500
changeset 108663 70ab9f476d86a8966b2a35804278722a9023ea5e
parent 108662 bd990a83194e76ef61ee2a5bf53d9e3f8ee32dc2
child 108664 63bbe1bad5273e375f128bc689d613878f406f88
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersehsan
bugs795351
milestone18.0a1
Bug 795351: Replace LL_MaxInt(), LL_MinInt(), LL_MaxUint() with stdint macros; r=ehsan
netwerk/base/src/nsInputStreamPump.cpp
xpcom/tests/TestStrings.cpp
--- a/netwerk/base/src/nsInputStreamPump.cpp
+++ b/netwerk/base/src/nsInputStreamPump.cpp
@@ -29,17 +29,17 @@ static PRLogModuleInfo *gStreamPumpLog =
 
 //-----------------------------------------------------------------------------
 // nsInputStreamPump methods
 //-----------------------------------------------------------------------------
 
 nsInputStreamPump::nsInputStreamPump()
     : mState(STATE_IDLE)
     , mStreamOffset(0)
-    , mStreamLength(LL_MaxUint())
+    , mStreamLength(UINT64_MAX)
     , mStatus(NS_OK)
     , mSuspendCount(0)
     , mLoadFlags(LOAD_NORMAL)
     , mWaiting(false)
     , mCloseWhenDone(false)
 {
 #if defined(PR_LOGGING)
     if (!gStreamPumpLog)
--- a/xpcom/tests/TestStrings.cpp
+++ b/xpcom/tests/TestStrings.cpp
@@ -681,42 +681,42 @@ bool test_appendint()
     test_appendbases(0x, ffffffffffffffff, ULL, 16)
     return true;
   }
 
 bool test_appendint64()
   {
     nsCString str;
 
-    int64_t max = LL_MaxInt();
+    int64_t max = INT64_MAX;
     static const char max_expected[] = "9223372036854775807";
-    int64_t min = LL_MinInt();
+    int64_t min = INT64_MIN;
     static const char min_expected[] = "-9223372036854775808";
     static const char min_expected_oct[] = "1000000000000000000000";
     int64_t maxint_plus1 = LL_INIT(1, 0);
     static const char maxint_plus1_expected[] = "4294967296";
     static const char maxint_plus1_expected_x[] = "100000000";
 
     str.AppendInt(max);
 
     if (!str.Equals(max_expected)) {
-      fprintf(stderr, "Error appending LL_MaxInt(): Got %s\n", str.get());
+      fprintf(stderr, "Error appending INT64_MAX: Got %s\n", str.get());
       return false;
     }
 
     str.Truncate();
     str.AppendInt(min);
     if (!str.Equals(min_expected)) {
-      fprintf(stderr, "Error appending LL_MinInt(): Got %s\n", str.get());
+      fprintf(stderr, "Error appending INT64_MIN: Got %s\n", str.get());
       return false;
     }
     str.Truncate();
     str.AppendInt(min, 8);
     if (!str.Equals(min_expected_oct)) {
-      fprintf(stderr, "Error appending LL_MinInt() (oct): Got %s\n", str.get());
+      fprintf(stderr, "Error appending INT64_MIN (oct): Got %s\n", str.get());
       return false;
     }
 
 
     str.Truncate();
     str.AppendInt(maxint_plus1);
     if (!str.Equals(maxint_plus1_expected)) {
       fprintf(stderr, "Error appending UINT32_MAX + 1: Got %s\n", str.get());