You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2014/08/26 17:07:35 UTC

git commit: Remove inconventional INTUxx definitions in favor of POSIX

Repository: trafficserver
Updated Branches:
  refs/heads/master e6f56c5cf -> 00ca3555a


Remove inconventional INTUxx definitions in favor of POSIX


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/00ca3555
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/00ca3555
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/00ca3555

Branch: refs/heads/master
Commit: 00ca3555ad6cf68f04819ba45d8b6b79fd28c7e5
Parents: e6f56c5
Author: James Peach <jp...@apache.org>
Authored: Tue Aug 26 08:07:26 2014 -0700
Committer: James Peach <jp...@apache.org>
Committed: Tue Aug 26 08:07:26 2014 -0700

----------------------------------------------------------------------
 iocore/dns/DNS.cc           |  2 +-
 lib/ts/ink_defs.h           |  5 -----
 mgmt/utils/test_marshall.cc | 11 ++++++-----
 proxy/Transform.h           |  2 +-
 proxy/TransformInternal.h   |  2 +-
 proxy/http/HttpTunnel.h     |  2 +-
 6 files changed, 10 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/00ca3555/iocore/dns/DNS.cc
----------------------------------------------------------------------
diff --git a/iocore/dns/DNS.cc b/iocore/dns/DNS.cc
index 0d6d233..cb41b93 100644
--- a/iocore/dns/DNS.cc
+++ b/iocore/dns/DNS.cc
@@ -920,7 +920,7 @@ DNSHandler::get_query_id()
   q2 = q1 = (uint16_t)(generator.random() & 0xFFFF);
   if (query_id_in_use(q2)) {
     uint16_t i = q2>>6;
-    while (qid_in_flight[i] == INTU64_MAX) {
+    while (qid_in_flight[i] == UINT64_MAX) {
       if (++i ==  sizeof(qid_in_flight)/sizeof(uint64_t)) {
         i = 0;
       }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/00ca3555/lib/ts/ink_defs.h
----------------------------------------------------------------------
diff --git a/lib/ts/ink_defs.h b/lib/ts/ink_defs.h
index ad728a5..5089df9 100644
--- a/lib/ts/ink_defs.h
+++ b/lib/ts/ink_defs.h
@@ -49,14 +49,9 @@
 #ifndef INT64_MIN
 #define INT64_MAX (9223372036854775807LL)
 #define INT64_MIN (-INT64_MAX -1LL)
-#define INTU32_MAX (4294967295U)
 #define INT32_MAX (2147483647)
 #define INT32_MIN (-2147483647-1)
 #endif
-// Hack for MacOSX, have to take this out of the group above.
-#ifndef INTU64_MAX
-#define INTU64_MAX (18446744073709551615ULL)
-#endif
 
 #define POSIX_THREAD
 #define POSIX_THREAD_10031c

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/00ca3555/mgmt/utils/test_marshall.cc
----------------------------------------------------------------------
diff --git a/mgmt/utils/test_marshall.cc b/mgmt/utils/test_marshall.cc
index f70e953..be39bd1 100644
--- a/mgmt/utils/test_marshall.cc
+++ b/mgmt/utils/test_marshall.cc
@@ -16,13 +16,14 @@
  * limitations under the License.
  */
 
+#include "ink_defs.h"
+#include "ink_thread.h"
+#include "ink_inet.h"
+
 #include <ts/TestBox.h>
 #include <MgmtMarshall.h>
 #include <MgmtSocket.h>
 
-#include "ink_thread.h"
-#include "ink_inet.h"
-
 #define CHECK_EQ(expr, len) do { \
   MgmtMarshallInt rcvd = static_cast<MgmtMarshallInt>(expr); \
   box.check(rcvd == static_cast<MgmtMarshallInt>(len), "%s returned length %d, expected %d", #expr, rcvd, static_cast<MgmtMarshallInt>(len)); \
@@ -231,13 +232,13 @@ REGRESSION_TEST(MessageMarshall)(RegressionTest * t, int /* atype ATS_UNUSED */,
 
   // Marshall some integral types.
   mint = -156;
-  mlong = INTU32_MAX;
+  mlong = UINT32_MAX;
   CHECK_EQ(mgmt_message_marshall(msgbuf, 1, ifields, countof(ifields), &mint, &mlong), -1);
   CHECK_EQ(mgmt_message_marshall(msgbuf, sizeof(msgbuf), ifields, countof(ifields), &mint, &mlong), 12);
   CHECK_EQ(mgmt_message_parse(msgbuf, 1, ifields, countof(ifields), &mint, &mlong), -1);
   CHECK_EQ(mgmt_message_parse(msgbuf, sizeof(msgbuf), ifields, countof(ifields), &mint, &mlong), 12);
   CHECK_VALUE(mint, -156, "%" PRId32);
-  CHECK_VALUE(mlong, static_cast<MgmtMarshallLong>(INTU32_MAX), "%" PRId64);
+  CHECK_VALUE(mlong, static_cast<MgmtMarshallLong>(UINT32_MAX), "%" PRId64);
 
   // Marshall a string.
   for (unsigned i = 0; i < countof(stringvals); ++i) {

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/00ca3555/proxy/Transform.h
----------------------------------------------------------------------
diff --git a/proxy/Transform.h b/proxy/Transform.h
index 26ac2be..4492d2a 100644
--- a/proxy/Transform.h
+++ b/proxy/Transform.h
@@ -78,7 +78,7 @@ class TransformVCChain : public VConnection
       @a limit. The default is to accurately compute the backlog.
   */
   virtual uint64_t backlog(
-			   uint64_t limit = INTU64_MAX ///< Maximum value of interest
+			   uint64_t limit = UINT64_MAX ///< Maximum value of interest
 			  ) = 0;
 };
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/00ca3555/proxy/TransformInternal.h
----------------------------------------------------------------------
diff --git a/proxy/TransformInternal.h b/proxy/TransformInternal.h
index 873561e..25ba297 100644
--- a/proxy/TransformInternal.h
+++ b/proxy/TransformInternal.h
@@ -77,7 +77,7 @@ public:
   /** Compute the backlog.
       @return The actual backlog, or a value at least @a limit.
   */
-  virtual uint64_t backlog(uint64_t limit = INTU64_MAX);
+  virtual uint64_t backlog(uint64_t limit = UINT64_MAX);
 
 public:
   VConnection * m_transform;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/00ca3555/proxy/http/HttpTunnel.h
----------------------------------------------------------------------
diff --git a/proxy/http/HttpTunnel.h b/proxy/http/HttpTunnel.h
index 81fac50..4b44642 100644
--- a/proxy/http/HttpTunnel.h
+++ b/proxy/http/HttpTunnel.h
@@ -238,7 +238,7 @@ struct HttpTunnelProducer
       @return The actual backlog or a number at least @a limit.
    */
   uint64_t backlog(
-		   uint64_t limit = INTU64_MAX ///< More than this is irrelevant
+		   uint64_t limit = UINT64_MAX ///< More than this is irrelevant
 		   );
   /// Check if producer is original (to ATS) source of data.
   /// @return @c true if this producer is the source of bytes from outside ATS.