trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject trafficserver git commit: TS-3316: various trivial build fixes for 32bit systems.
Date Thu, 22 Jan 2015 23:02:19 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master a9f219f79 -> cc6b44fad


TS-3316: various trivial build fixes for 32bit systems.


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

Branch: refs/heads/master
Commit: cc6b44fad9ba735d2591dd2e0aa991ce5bc91f9a
Parents: a9f219f
Author: James Peach <jpeach@apache.org>
Authored: Fri Jan 16 16:00:36 2015 -0800
Committer: James Peach <jpeach@apache.org>
Committed: Thu Jan 22 14:55:56 2015 -0800

----------------------------------------------------------------------
 CHANGES                                             |  3 +++
 cmd/traffic_crashlog/procinfo.cc                    |  2 +-
 iocore/hostdb/HostDB.cc                             |  2 +-
 iocore/net/SSLSessionCache.cc                       |  2 +-
 mgmt/api/CoreAPI.cc                                 |  2 +-
 .../collapsed_connection/collapsed_connection.cc    | 16 ++++++++--------
 plugins/experimental/ts_lua/ts_lua_http_intercept.c |  2 +-
 7 files changed, 16 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cc6b44fa/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 2d81063..8022ffe 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.3.0
+
+  *) [TS-3316] Fix the build for 32 bit architectures.
+
   *) [TS-3100] Extend tr-pass to allow malformed HTTP GET requested to be blind
    tunneled.
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cc6b44fa/cmd/traffic_crashlog/procinfo.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_crashlog/procinfo.cc b/cmd/traffic_crashlog/procinfo.cc
index 52c2176..4886530 100644
--- a/cmd/traffic_crashlog/procinfo.cc
+++ b/cmd/traffic_crashlog/procinfo.cc
@@ -284,7 +284,7 @@ crashlog_write_registers(FILE * fp, const crashlog_target& target)
   // x86 register names as per ucontext.h.
 #if defined(__i386__)
 #define REGFMT "0x%08" PRIx32
-#define ADDRCAST(x) ((uint32_t)(x))
+#define REGCAST(x) ((uint32_t)(x))
   static const char * names[NGREG] = {
     "GS", "FS", "ES", "DS", "EDI", "ESI", "EBP", "ESP",
     "EBX", "EDX", "ECX", "EAX", "TRAPNO", "ERR", "EIP", "CS",

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cc6b44fa/iocore/hostdb/HostDB.cc
----------------------------------------------------------------------
diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index dff462b..74f13bc 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -2152,7 +2152,7 @@ HostDBContinuation::backgroundEvent(int /* event ATS_UNUSED */, Event
* /* e ATS
     }
     hostdb_hostfile_check_timestamp = hostdb_current_interval;
     if (0 == stat(hostdb_hostfile_path, &info)) {
-      if (info.st_mtime > hostdb_hostfile_update_timestamp) {
+      if (info.st_mtime > (time_t)hostdb_hostfile_update_timestamp) {
         ParseHostFile(hostdb_hostfile_path);
       }
     } else {

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cc6b44fa/iocore/net/SSLSessionCache.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLSessionCache.cc b/iocore/net/SSLSessionCache.cc
index b3cbc1e..6fdd3c5 100644
--- a/iocore/net/SSLSessionCache.cc
+++ b/iocore/net/SSLSessionCache.cc
@@ -40,7 +40,7 @@ using ts::detail::RBNode;
 SSLSessionCache::SSLSessionCache()
   : session_bucket(NULL), nbuckets(SSLConfigParams::session_cache_number_buckets)
 {
-  Debug("ssl.session_cache", "Created new ssl session cache %p with %ld buckets each with
size max size %ld",
+  Debug("ssl.session_cache", "Created new ssl session cache %p with %zu buckets each with
size max size %zu",
     this, nbuckets, SSLConfigParams::session_cache_max_bucket_size);
 
   session_bucket = new SSLSessionBucket[nbuckets];

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cc6b44fa/mgmt/api/CoreAPI.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/CoreAPI.cc b/mgmt/api/CoreAPI.cc
index 35509ef..f48fd01 100644
--- a/mgmt/api/CoreAPI.cc
+++ b/mgmt/api/CoreAPI.cc
@@ -366,7 +366,7 @@ ServerBacktrace(unsigned /* options */, char ** trace)
 
   Debug("backtrace", "tracing %zd threads for traffic_server PID %ld", threads.count(), (long)lmgmt->watched_process_pid);
   for_Vec(pid_t, threadid, threads) {
-    Debug("backtrace", "tracing thread %zd", (long)threadid);
+    Debug("backtrace", "tracing thread %ld", (long)threadid);
     // Get the thread name using /proc/PID/comm
     ats_scoped_fd fd;
     char threadname[128];

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cc6b44fa/plugins/experimental/collapsed_connection/collapsed_connection.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/collapsed_connection/collapsed_connection.cc b/plugins/experimental/collapsed_connection/collapsed_connection.cc
index 99dc96d..8a21426 100644
--- a/plugins/experimental/collapsed_connection/collapsed_connection.cc
+++ b/plugins/experimental/collapsed_connection/collapsed_connection.cc
@@ -374,7 +374,7 @@ addOrCheckKeepPassRecords(uint32_t hash_key, int64_t timeout)
       keep_pass_list->push_back(passRecord);
       getCurrentKeepPassEntries(keep_pass_list);
       TSDebug(PLUGIN_NAME,
-              "push_back pass entry with timeout = %zd, hash_key = %u", passRecord.timeout,
passRecord.hash_key);
+              "push_back pass entry with timeout = %" PRId64 ", hash_key = %" PRIu32, passRecord.timeout,
passRecord.hash_key);
     } else {
       added = false;
     }
@@ -392,13 +392,13 @@ addOrCheckKeepPassRecords(uint32_t hash_key, int64_t timeout)
       keep_pass_list->erase(it++);
       getCurrentKeepPassEntries(keep_pass_list);
       TSDebug(PLUGIN_NAME,
-              "remove pass entry with timeout = %zd, hash_key = %u", thisRecord.timeout,
thisRecord.hash_key);
+              "remove pass entry with timeout = %" PRId64 ", hash_key = %" PRIu32, thisRecord.timeout,
thisRecord.hash_key);
     } else if (false == added) {
       if (thisRecord.timeout >= passRecord.timeout) {
         keep_pass_list->insert(it, passRecord);
         getCurrentKeepPassEntries(keep_pass_list);
         TSDebug(PLUGIN_NAME,
-                "insert pass entry with timeout = %zd, hash_key = %u", passRecord.timeout,
passRecord.hash_key);
+                "insert pass entry with timeout = %" PRId64 ", hash_key = %" PRIu32, passRecord.timeout,
passRecord.hash_key);
         break;
       }
     } else {
@@ -436,7 +436,7 @@ insertNewHashEntry(CcTxnData * txn_data)
     size = getCurrentHashEntries(active_hash_map);
     TSMutexUnlock(plugin_data->mutex);
     if (false != map_ret.second) {
-      TSDebug(PLUGIN_NAME, "[%" PRIu64 "] hash_key inserted, active_hash_map.size = %zd",
txn_data->seq_id, size);
+      TSDebug(PLUGIN_NAME, "[%" PRIu64 "] hash_key inserted, active_hash_map.size = %" PRId64,
txn_data->seq_id, size);
       ret = CC_INSERT;
     } else if (CC_PASS == map_ret.first->second) {
       TSDebug(PLUGIN_NAME, "hash value = %d, previous request mark it non-cacheable", map_ret.first->second);
@@ -458,12 +458,12 @@ insertNewHashEntry(CcTxnData * txn_data)
       txn_data->wait_time = cur_ms - txn_data->wait_time;
       // Pass cache lock
       ret = CC_PASS;
-      TSDebug(PLUGIN_NAME, "timeout (%zd > %d), pass plugin",
+      TSDebug(PLUGIN_NAME, "timeout (%" PRId64 " > %d), pass plugin",
               txn_data->wait_time, static_cast < int32_t > (txn_data->config->max_lock_retry_timeout));
     }
   } else if (0 != txn_data->wait_time) {
     txn_data->wait_time = TShrtime() / 1000000 - txn_data->wait_time;
-    TSDebug(PLUGIN_NAME, "waited for %zd ms", txn_data->wait_time);
+    TSDebug(PLUGIN_NAME, "waited for %" PRId64 " ms", txn_data->wait_time);
   }
 
   return ret;
@@ -503,14 +503,14 @@ updateOrRemoveHashEntry(CcTxnData * txn_data)
       size = getCurrentHashEntries(active_hash_map);
       TSMutexUnlock(plugin_data->mutex);
 
-      TSDebug(PLUGIN_NAME, "[%" PRIu64 "] hashEntry updated, active_hash_map.size = %zd",
txn_data->seq_id, size);
+      TSDebug(PLUGIN_NAME, "[%" PRIu64 "] hashEntry updated, active_hash_map.size = %" PRId64,
txn_data->seq_id, size);
       txn_data->cc_state = CC_PASSED;
     } else {
       addOrCheckKeepPassRecords(0, 0);
       size = getCurrentHashEntries(active_hash_map);
       TSMutexUnlock(plugin_data->mutex);
 
-      TSDebug(PLUGIN_NAME, "[%" PRIu64 "] hashEntry removed, active_hash_map.size = %zd",
txn_data->seq_id, size);
+      TSDebug(PLUGIN_NAME, "[%" PRIu64 "] hashEntry removed, active_hash_map.size = %" PRId64,
txn_data->seq_id, size);
       txn_data->cc_state = CC_DONE;
     }
     ret = TS_SUCCESS;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cc6b44fa/plugins/experimental/ts_lua/ts_lua_http_intercept.c
----------------------------------------------------------------------
diff --git a/plugins/experimental/ts_lua/ts_lua_http_intercept.c b/plugins/experimental/ts_lua/ts_lua_http_intercept.c
index 47b37e9..02cc287 100644
--- a/plugins/experimental/ts_lua/ts_lua_http_intercept.c
+++ b/plugins/experimental/ts_lua/ts_lua_http_intercept.c
@@ -207,7 +207,7 @@ ts_lua_http_intercept_handler(TSCont contp, TSEvent event, void *edata)
 
   } else {
     mtxp = ictx->mctx->mutexp;
-    n = (int64_t) edata & 0xFFFF;
+    n = (int)((intptr_t) edata & 0xFFFF);
     TSMutexLock(mtxp);
     ret = ts_lua_http_intercept_run_coroutine(ictx, n);
   }


Mime
View raw message