You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2010/12/15 02:15:20 UTC

svn commit: r1049373 [10/11] - in /trafficserver/traffic/trunk: ./ example/app-template/ example/append-transform/ example/cache_scan/ example/gzip-transform/ example/null-transform/ example/output-header/ example/protocol/ example/redirect-1/ example/...

Modified: trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/ProcessManager.cc Wed Dec 15 01:15:09 2010
@@ -434,7 +434,7 @@ ProcessManager::addPluginCounter(const c
 {
   if (record_data->addPluginCounter(name, value) == true) {
     char msg[512];
-    sprintf(msg, "%s %d %lld", name, INK_COUNTER, value);
+    sprintf(msg, "%s %d %" PRId64 "", name, INK_COUNTER, value);
     signalManager(MGMT_SIGNAL_PLUGIN_ADD_REC, msg);
     return true;
   }
@@ -447,7 +447,7 @@ ProcessManager::addPluginInteger(const c
 {
   if (record_data->addPluginInteger(name, value) == true) {
     char msg[512];
-    sprintf(msg, "%s %d %lld", name, INK_INT, value);
+    sprintf(msg, "%s %d %" PRId64 "", name, INK_INT, value);
     pmgmt->signalManager(MGMT_SIGNAL_PLUGIN_ADD_REC, msg);
     return true;
   }
@@ -603,11 +603,11 @@ checkBackDoorP(int req_fd, char *message
         Records *the_records = (Records *) hash_value;
         switch (the_records->recs[id].stype) {
         case INK_COUNTER:
-          sprintf(reply, "\nRecord '%s' Val: '%lld'\n", the_records->recs[id].name,
+          sprintf(reply, "\nRecord '%s' Val: '%" PRId64 "'\n", the_records->recs[id].name,
                       the_records->recs[id].data.counter_data);
           break;
         case INK_INT:
-          sprintf(reply, "\nRecord: '%s' Val: '%lld'\n", the_records->recs[id].name,
+          sprintf(reply, "\nRecord: '%s' Val: '%" PRId64 "'\n", the_records->recs[id].name,
                       the_records->recs[id].data.int_data);
           break;
         case INK_FLOAT:

Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPI.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPI.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPI.cc Wed Dec 15 01:15:09 2010
@@ -451,7 +451,7 @@ MgmtRecordSetInt(const char *rec_name, M
   char str_val[MAX_RECORD_SIZE];
 
   memset(str_val, 0, MAX_RECORD_SIZE);
-  snprintf(str_val, sizeof(str_val), "%lld", int_val);
+  snprintf(str_val, sizeof(str_val), "%" PRId64 "", int_val);
 
   return MgmtRecordSet(rec_name, str_val, action_need);
 
@@ -481,7 +481,7 @@ MgmtRecordSetCounter(const char *rec_nam
   char str_val[MAX_RECORD_SIZE];
 
   memset(str_val, 0, MAX_RECORD_SIZE);
-  snprintf(str_val, sizeof(str_val), "%lld", counter_val);
+  snprintf(str_val, sizeof(str_val), "%" PRId64 "", counter_val);
 
   return MgmtRecordSet(rec_name, str_val, action_need);
 

Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPIShared.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPIShared.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPIShared.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPIShared.cc Wed Dec 15 01:15:09 2010
@@ -90,7 +90,7 @@ END:
  * OUTPUT: bool -- true if everything went well. false otherwise
  */
 INKError
-readHTTPResponse(int sock, char *buffer, int bufsize, uint64 timeout)
+readHTTPResponse(int sock, char *buffer, int bufsize, uint64_t timeout)
 {
 #ifdef _WIN32
   TimedIOStatus ret;
@@ -158,7 +158,7 @@ error:                         /* "Houst
  *                 closed)
  */
 INKError
-sendHTTPRequest(int sock, char *req, uint64 timeout)
+sendHTTPRequest(int sock, char *req, uint64_t timeout)
 {
   char request[BUFSIZ];
   char *requestPtr;
@@ -218,7 +218,7 @@ error:                         /* "Houst
 
 /* Modified from TrafficCop.cc (open_socket) */
 int
-connectDirect(const char *host, int port, uint64 timeout)
+connectDirect(const char *host, int port, uint64_t timeout)
 {
   NOWARN_UNUSED(timeout);
 #ifdef _WIN32

Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPIShared.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPIShared.h?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPIShared.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/CoreAPIShared.h Wed Dec 15 01:15:09 2010
@@ -73,9 +73,9 @@
 
 // used by INKReadFromUrl
 INKError parseHTTPResponse(char *buffer, char **header, int *hdr_size, char **body, int *bdy_size);
-INKError readHTTPResponse(int sock, char *buffer, int bufsize, uint64 timeout);
-INKError sendHTTPRequest(int sock, char *request, uint64 timeout);
-int connectDirect(const char *host, int port, uint64 timeout);
+INKError readHTTPResponse(int sock, char *buffer, int bufsize, uint64_t timeout);
+INKError sendHTTPRequest(int sock, char *request, uint64_t timeout);
+int connectDirect(const char *host, int port, uint64_t timeout);
 
 // used by NetworkUtilRemote.cc and NetworkUtilLocal.cc
 int socket_read_timeout(int fd, int sec, int usec);

Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/INKMgmtAPI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/INKMgmtAPI.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/INKMgmtAPI.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/INKMgmtAPI.cc Wed Dec 15 01:15:09 2010
@@ -2253,11 +2253,11 @@ INKReadFromUrlEx(const char *url, char *
 
   /* sending the HTTP request via the established socket */
   snprintf(request, BUFSIZE, "http://%s:%d/%s", httpHost, httpPort, httpPath);
-  if ((status = sendHTTPRequest(hFD, request, (uint64) timeout)) != INK_ERR_OKAY)
+  if ((status = sendHTTPRequest(hFD, request, (uint64_t) timeout)) != INK_ERR_OKAY)
     goto END;
 
   memset(buffer, 0, bufsize);   /* empty the buffer */
-  if ((status = readHTTPResponse(hFD, buffer, bufsize, (uint64) timeout)) != INK_ERR_OKAY)
+  if ((status = readHTTPResponse(hFD, buffer, bufsize, (uint64_t) timeout)) != INK_ERR_OKAY)
     goto END;
 
   if ((status = parseHTTPResponse(buffer, &hdr_temp, headerSize, &bdy_temp, bodySize))
@@ -2300,11 +2300,11 @@ INKLookupFromCacheUrl(INKString url, INK
     goto END;
   }
   snprintf(request, BUFSIZE, "http://{cache}/lookup_url?url=%s", url);
-  if ((err = sendHTTPRequest(fd, request, (uint64) timeout)) != INK_ERR_OKAY)
+  if ((err = sendHTTPRequest(fd, request, (uint64_t) timeout)) != INK_ERR_OKAY)
     goto END;
 
   memset(response, 0, URL_BUFSIZE);
-  if ((err = readHTTPResponse(fd, response, URL_BUFSIZE, (uint64) timeout)) != INK_ERR_OKAY)
+  if ((err = readHTTPResponse(fd, response, URL_BUFSIZE, (uint64_t) timeout)) != INK_ERR_OKAY)
     goto END;
 
   if ((err = parseHTTPResponse(response, &header, &hdr_size, &body, &bdy_size)) != INK_ERR_OKAY)
@@ -2338,11 +2338,11 @@ INKLookupFromCacheUrlRegex(INKString url
     goto END;
   }
   snprintf(request, BUFSIZE, "http://{cache}/lookup_regex?url=%s", url_regex);
-  if ((err = sendHTTPRequest(fd, request, (uint64) timeout)) != INK_ERR_OKAY)
+  if ((err = sendHTTPRequest(fd, request, (uint64_t) timeout)) != INK_ERR_OKAY)
     goto END;
 
   memset(response, 0, URL_BUFSIZE);
-  if ((err = readHTTPResponse(fd, response, URL_BUFSIZE, (uint64) timeout)) != INK_ERR_OKAY)
+  if ((err = readHTTPResponse(fd, response, URL_BUFSIZE, (uint64_t) timeout)) != INK_ERR_OKAY)
     goto END;
 
   if ((err = parseHTTPResponse(response, &header, &hdr_size, &body, &bdy_size)) != INK_ERR_OKAY)
@@ -2375,11 +2375,11 @@ INKDeleteFromCacheUrl(INKString url, INK
     goto END;
   }
   snprintf(request, BUFSIZE, "http://{cache}/delete_url?url=%s", url);
-  if ((err = sendHTTPRequest(fd, request, (uint64) timeout)) != INK_ERR_OKAY)
+  if ((err = sendHTTPRequest(fd, request, (uint64_t) timeout)) != INK_ERR_OKAY)
     goto END;
 
   memset(response, 0, URL_BUFSIZE);
-  if ((err = readHTTPResponse(fd, response, URL_BUFSIZE, (uint64) timeout)) != INK_ERR_OKAY)
+  if ((err = readHTTPResponse(fd, response, URL_BUFSIZE, (uint64_t) timeout)) != INK_ERR_OKAY)
     goto END;
 
   if ((err = parseHTTPResponse(response, &header, &hdr_size, &body, &bdy_size)) != INK_ERR_OKAY)
@@ -2413,11 +2413,11 @@ INKDeleteFromCacheUrlRegex(INKString url
     goto END;
   }
   snprintf(request, BUFSIZE, "http://{cache}/delete_regex?url=%s", url_regex);
-  if ((err = sendHTTPRequest(fd, request, (uint64) timeout)) != INK_ERR_OKAY)
+  if ((err = sendHTTPRequest(fd, request, (uint64_t) timeout)) != INK_ERR_OKAY)
     goto END;
 
   memset(response, 0, URL_BUFSIZE);
-  if ((err = readHTTPResponse(fd, response, URL_BUFSIZE, (uint64) timeout)) != INK_ERR_OKAY)
+  if ((err = readHTTPResponse(fd, response, URL_BUFSIZE, (uint64_t) timeout)) != INK_ERR_OKAY)
     goto END;
 
   if ((err = parseHTTPResponse(response, &header, &hdr_size, &body, &bdy_size)) != INK_ERR_OKAY)
@@ -2450,11 +2450,11 @@ INKInvalidateFromCacheUrlRegex(INKString
     goto END;
   }
   snprintf(request, BUFSIZE, "http://{cache}/invalidate_regex?url=%s", url_regex);
-  if ((err = sendHTTPRequest(fd, request, (uint64) timeout)) != INK_ERR_OKAY)
+  if ((err = sendHTTPRequest(fd, request, (uint64_t) timeout)) != INK_ERR_OKAY)
     goto END;
 
   memset(response, 0, URL_BUFSIZE);
-  if ((err = readHTTPResponse(fd, response, URL_BUFSIZE, (uint64) timeout)) != INK_ERR_OKAY)
+  if ((err = readHTTPResponse(fd, response, URL_BUFSIZE, (uint64_t) timeout)) != INK_ERR_OKAY)
     goto END;
 
   if ((err = parseHTTPResponse(response, &header, &hdr_size, &body, &bdy_size)) != INK_ERR_OKAY)
@@ -2823,7 +2823,7 @@ closeAllFds()
   }
 
   if (getuid() == 0 || geteuid() == 0) {        // only if it's successful
-    snprintf(command, sizeof(command), "/bin/ls -1 /proc/%lld/fd", (int64)getpid());
+    snprintf(command, sizeof(command), "/bin/ls -1 /proc/%" PRId64 "/fd", (int64_t)getpid());
     FILE *fd = popen(command, "r");
     if (fd) {
       while (!feof(fd)) {

Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/NetworkUtilsLocal.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/NetworkUtilsLocal.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/NetworkUtilsLocal.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/NetworkUtilsLocal.cc Wed Dec 15 01:15:09 2010
@@ -186,7 +186,7 @@ preprocess_msg(struct SocketInfo sock_in
 {
   INKError ret;
   int req_len;
-  int16 op;
+  int16_t op;
 
   // read operation type
   ret = socket_read_n(sock_info, (char *) &op, SIZE_OP_T);
@@ -266,7 +266,7 @@ Lerror:
 INKError
 parse_file_read_request(char *req, INKFileNameT * file)
 {
-  int16 file_t;
+  int16_t file_t;
 
   if (!req || !file)
     return INK_ERR_PARAMS;
@@ -293,8 +293,8 @@ parse_file_read_request(char *req, INKFi
 INKError
 parse_file_write_request(char *req, INKFileNameT * file, int *ver, int *size, char **text)
 {
-  int16 file_t, f_ver;
-  int32 f_size;
+  int16_t file_t, f_ver;
+  int32_t f_size;
 
   // check input is non-NULL
   if (!req || !file || !ver || !size || !text)
@@ -335,7 +335,7 @@ parse_file_write_request(char *req, INKF
 INKError
 parse_request_name_value(char *req, char **name_1, char **val_1)
 {
-  int32 name_len, val_len;
+  int32_t name_len, val_len;
   char *name, *val;
 
   if (!req || !name_1 || !val_1)
@@ -379,8 +379,8 @@ parse_request_name_value(char *req, char
 INKError
 parse_diags_request(char *req, INKDiagsT * mode, char **diag_msg)
 {
-  int16 diag_t;
-  int32 msg_len;
+  int16_t diag_t;
+  int32_t msg_len;
 
   // check input is non-NULL
   if (!req || !mode || !diag_msg)
@@ -415,7 +415,7 @@ parse_diags_request(char *req, INKDiagsT
 INKError
 parse_proxy_state_request(char *req, INKProxyStateT * state, INKCacheClearT * clear)
 {
-  int16 state_t, cache_t;
+  int16_t state_t, cache_t;
 
   // check input is non-NULL
   if (!req || !state || !clear)
@@ -455,10 +455,10 @@ send_reply(struct SocketInfo sock_info, 
 {
   INKError ret;
   char msg[SIZE_ERR_T];
-  int16 ret_val;
+  int16_t ret_val;
 
   // write the return value
-  ret_val = (int16) retval;
+  ret_val = (int16_t) retval;
   memcpy(msg, (void *) &ret_val, SIZE_ERR_T);
 
   // now push it to the socket
@@ -485,8 +485,8 @@ send_reply_list(struct SocketInfo sock_i
   INKError ret;
   int msg_pos = 0, total_len;
   char *msg;
-  int16 ret_val;
-  int32 list_size;              // to be safe, typecast
+  int16_t ret_val;
+  int32_t list_size;              // to be safe, typecast
 
   if (!list) {
     return INK_ERR_PARAMS;
@@ -498,12 +498,12 @@ send_reply_list(struct SocketInfo sock_i
     return INK_ERR_SYS_CALL;    // ERROR - malloc failed
 
   // write the return value
-  ret_val = (int16) retval;
+  ret_val = (int16_t) retval;
   memcpy(msg, (void *) &ret_val, SIZE_ERR_T);
   msg_pos += SIZE_ERR_T;
 
   // write the length of the string list
-  list_size = (int32) strlen(list);
+  list_size = (int32_t) strlen(list);
   memcpy(msg + msg_pos, (void *) &list_size, SIZE_LEN);
   msg_pos += SIZE_LEN;
 
@@ -538,8 +538,8 @@ send_record_get_reply(struct SocketInfo 
   INKError ret;
   int msg_pos = 0, total_len;
   char *msg;
-  int16 record_t, ret_val;
-  int32 v_size;                 // to be safe, typecast
+  int16_t record_t, ret_val;
+  int32_t v_size;                 // to be safe, typecast
 
   if (!val) {
     return INK_ERR_PARAMS;
@@ -551,17 +551,17 @@ send_record_get_reply(struct SocketInfo 
     return INK_ERR_SYS_CALL;    // ERROR - malloc failed
 
   // write the return value
-  ret_val = (int16) retval;
+  ret_val = (int16_t) retval;
   memcpy(msg, (void *) &ret_val, SIZE_ERR_T);
   msg_pos += SIZE_ERR_T;
 
   // write the size of the record value
-  v_size = (int32) val_size;
+  v_size = (int32_t) val_size;
   memcpy(msg + msg_pos, (void *) &v_size, SIZE_LEN);
   msg_pos += SIZE_LEN;
 
   // write the record type
-  record_t = (int16) rec_type;
+  record_t = (int16_t) rec_type;
   memcpy(msg + msg_pos, (void *) &record_t, SIZE_REC_T);
   msg_pos += SIZE_REC_T;
 
@@ -591,7 +591,7 @@ send_record_set_reply(struct SocketInfo 
   INKError ret;
   int total_len;
   char *msg;
-  int16 action_t, ret_val;
+  int16_t action_t, ret_val;
 
   total_len = SIZE_ERR_T + SIZE_ACTION_T;
   msg = (char *) xmalloc(sizeof(char) * total_len);
@@ -599,11 +599,11 @@ send_record_set_reply(struct SocketInfo 
     return INK_ERR_SYS_CALL;    // ERROR - malloc failed!
 
   // write the return value
-  ret_val = (int16) retval;
+  ret_val = (int16_t) retval;
   memcpy(msg, (void *) &ret_val, SIZE_ERR_T);
 
   // write the action needed
-  action_t = (int16) action_need;
+  action_t = (int16_t) action_need;
   memcpy(msg + SIZE_ERR_T, (void *) &action_t, SIZE_ACTION_T);
 
   // now push it to the socket
@@ -633,8 +633,8 @@ send_file_read_reply(struct SocketInfo s
   INKError ret;
   int msg_pos = 0, msg_len;
   char *msg;
-  int16 ret_val, f_ver;
-  int32 f_size;                 // to be safe
+  int16_t ret_val, f_ver;
+  int32_t f_size;                 // to be safe
 
   if (!text)
     return INK_ERR_PARAMS;
@@ -646,17 +646,17 @@ send_file_read_reply(struct SocketInfo s
     return INK_ERR_SYS_CALL;
 
   // write the return value
-  ret_val = (int16) retval;
+  ret_val = (int16_t) retval;
   memcpy(msg, (void *) &ret_val, SIZE_ERR_T);
   msg_pos += SIZE_ERR_T;
 
   // write file version
-  f_ver = (int16) ver;
+  f_ver = (int16_t) ver;
   memcpy(msg + msg_pos, (void *) &f_ver, SIZE_VER);
   msg_pos += SIZE_VER;
 
   // write file size
-  f_size = (int32) size;
+  f_size = (int32_t) size;
   memcpy(msg + msg_pos, (void *) &f_size, SIZE_LEN);
   msg_pos += SIZE_LEN;
 
@@ -687,10 +687,10 @@ send_proxy_state_get_reply(struct Socket
 {
   INKError ret;
   char msg[SIZE_PROXY_T];
-  int16 state_t;
+  int16_t state_t;
 
   // write the state
-  state_t = (int16) state;
+  state_t = (int16_t) state;
   memcpy(msg, (void *) &state_t, SIZE_PROXY_T);
 
   // now push it to the socket
@@ -717,7 +717,7 @@ send_event_active_reply(struct SocketInf
   INKError ret;
   int total_len;
   char *msg;
-  int16 is_active, ret_val;
+  int16_t is_active, ret_val;
 
   total_len = SIZE_ERR_T + SIZE_BOOL;
   msg = (char *) xmalloc(sizeof(char) * total_len);
@@ -725,11 +725,11 @@ send_event_active_reply(struct SocketInf
     return INK_ERR_SYS_CALL;    // ERROR - malloc failed!
 
   // write the return value
-  ret_val = (int16) retval;
+  ret_val = (int16_t) retval;
   memcpy(msg, (void *) &ret_val, SIZE_ERR_T);
 
   // write the boolean active state
-  is_active = (int16) active;
+  is_active = (int16_t) active;
   memcpy(msg + SIZE_ERR_T, (void *) &is_active, SIZE_BOOL);
 
   // now push it to the socket
@@ -756,8 +756,8 @@ send_event_notification(struct SocketInf
   INKError ret;
   int total_len, name_len, desc_len;
   char *msg;
-  int16 op_t;
-  int32 len;
+  int16_t op_t;
+  int32_t len;
 
   if (!event || !event->name || !event->description)
     return INK_ERR_PARAMS;
@@ -770,18 +770,18 @@ send_event_notification(struct SocketInf
     return INK_ERR_SYS_CALL;    // ERROR - malloc failed!
 
   // write the operation
-  op_t = (int16) EVENT_NOTIFY;
+  op_t = (int16_t) EVENT_NOTIFY;
   memcpy(msg, (void *) &op_t, SIZE_OP_T);
 
   // write the size of the event name
-  len = (int32) name_len;
+  len = (int32_t) name_len;
   memcpy(msg + SIZE_OP_T, (void *) &len, SIZE_LEN);
 
   // write the event name
   memcpy(msg + SIZE_OP_T + SIZE_LEN, event->name, name_len);
 
   // write size of description
-  len = (int32) desc_len;
+  len = (int32_t) desc_len;
   memcpy(msg + SIZE_OP_T + SIZE_LEN + name_len, (void *) &len, SIZE_LEN);
 
   // write the description

Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/TSControlMain.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/TSControlMain.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/TSControlMain.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/TSControlMain.cc Wed Dec 15 01:15:09 2010
@@ -742,7 +742,7 @@ handle_reconfigure(struct SocketInfo soc
 INKError
 handle_restart(struct SocketInfo sock_info, char *req)
 {
-  int16 cluster;
+  int16_t cluster;
   INKError ret;
 
   if (!req) {

Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/include/INKMgmtAPI.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/include/INKMgmtAPI.h?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/include/INKMgmtAPI.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/include/INKMgmtAPI.h Wed Dec 15 01:15:09 2010
@@ -142,8 +142,8 @@ extern "C"
  * Types
  ***************************************************************************/
 
-  typedef int64 INKInt;
-  typedef int64 INKCounter;
+  typedef int64_t INKInt;
+  typedef int64_t INKCounter;
   typedef float INKFloat;
   typedef char *INKString;
   typedef char *INKIpAddr;
@@ -548,7 +548,7 @@ typedef enum
  */
   typedef struct
   {
-    uint32 active;              /* valid field: INK_SSPEC_xxx */
+    uint32_t active;              /* valid field: INK_SSPEC_xxx */
     struct
     {                           /* time range */
       int hour_a;

Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/APITestCliRemote.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/APITestCliRemote.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/APITestCliRemote.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/APITestCliRemote.cc Wed Dec 15 01:15:09 2010
@@ -1060,7 +1060,7 @@ test_error_records()
   if (ret != INK_ERR_OKAY) {
     print_err("INKRecordGetInt", ret);
   } else
-    printf("[INKRecordGetInt] proxy.config.cop.core_signal=%lld \n", port1);
+    printf("[INKRecordGetInt] proxy.config.cop.core_signal=%" PRId64 " \n", port1);
 
   // test set integer
   ret = INKRecordSetInt("proy.config.cop.core_signal", new_port, &action);
@@ -1071,7 +1071,7 @@ test_error_records()
   if (INKRecordGetCounter("proxy.press.socks.connections_successful", &ctr1) != INK_ERR_OKAY)
     printf("INKRecordGetCounter FAILED!\n");
   else
-    printf("[INKRecordGetCounter]proxy.process.socks.connections_successful=%lld \n", ctr1);
+    printf("[INKRecordGetCounter]proxy.process.socks.connections_successful=%" PRId64 " \n", ctr1);
 
   printf("\n");
   if (INKRecordGetFloat("proxy.conig.http.cache.fuzz.probability", &flt1) != INK_ERR_OKAY)
@@ -1107,7 +1107,7 @@ test_records()
   if (INKRecordSetInt("proxy.config.cop.core_signal", new_port, &action) != INK_ERR_OKAY)
     printf("INKRecordSetInt FAILED!\n");
   else
-    printf("[INKRecordSetInt] proxy.config.cop.core_signal=%lld \n", new_port);
+    printf("[INKRecordSetInt] proxy.config.cop.core_signal=%" PRId64 " \n", new_port);
 #endif
 
 
@@ -1170,18 +1170,18 @@ test_records()
   if (INKRecordGetInt("proxy.config.cop.core_signal", &port1) != INK_ERR_OKAY)
     printf("INKRecordGetInt FAILED!\n");
   else
-    printf("[INKRecordGetInt] proxy.config.cop.core_signal=%lld \n", port1);
+    printf("[INKRecordGetInt] proxy.config.cop.core_signal=%" PRId64 " \n", port1);
 
   // test set integer
   if (INKRecordSetInt("proxy.config.cop.core_signal", new_port, &action) != INK_ERR_OKAY)
     printf("INKRecordSetInt FAILED!\n");
   else
-    printf("[INKRecordSetInt] proxy.config.cop.core_signal=%lld \n", new_port);
+    printf("[INKRecordSetInt] proxy.config.cop.core_signal=%" PRId64 " \n", new_port);
 
   if (INKRecordGetInt("proxy.config.cop.core_signal", &port2) != INK_ERR_OKAY)
     printf("INKRecordGetInt FAILED!\n");
   else
-    printf("[INKRecordGetInt] proxy.config.cop.core_signal=%lld \n", port2);
+    printf("[INKRecordGetInt] proxy.config.cop.core_signal=%" PRId64 " \n", port2);
   printf("\n");
 #endif
 
@@ -1191,17 +1191,17 @@ test_records()
   if (INKRecordGetCounter("proxy.process.socks.connections_successful", &ctr1) != INK_ERR_OKAY)
     printf("INKRecordGetCounter FAILED!\n");
   else
-    printf("[INKRecordGetCounter]proxy.process.socks.connections_successful=%lld \n", ctr1);
+    printf("[INKRecordGetCounter]proxy.process.socks.connections_successful=%" PRId64 " \n", ctr1);
 
   if (INKRecordSetCounter("proxy.process.socks.connections_successful", new_ctr, &action) != INK_ERR_OKAY)
     printf("INKRecordSetCounter FAILED!\n");
   else
-    printf("[INKRecordSetCounter] proxy.process.socks.connections_successful=%lld \n", new_ctr);
+    printf("[INKRecordSetCounter] proxy.process.socks.connections_successful=%" PRId64 " \n", new_ctr);
 
   if (INKRecordGetCounter("proxy.process.socks.connections_successful", &ctr2) != INK_ERR_OKAY)
     printf("INKRecordGetCounter FAILED!\n");
   else
-    printf("[INKRecordGetCounter]proxy.process.socks.connections_successful=%lld \n", ctr2);
+    printf("[INKRecordGetCounter]proxy.process.socks.connections_successful=%" PRId64 " \n", ctr2);
   printf("\n");
 #endif
 
@@ -1259,10 +1259,10 @@ test_rec_get(char *rec_name)
   else {
     switch (rec_ele->rec_type) {
     case INK_REC_INT:
-      printf("[INKRecordGet] %s=%lld\n", name, rec_ele->int_val);
+      printf("[INKRecordGet] %s=%" PRId64 "\n", name, rec_ele->int_val);
       break;
     case INK_REC_COUNTER:
-      printf("[INKRecordGet] %s=%lld\n", name, rec_ele->counter_val);
+      printf("[INKRecordGet] %s=%" PRId64 "\n", name, rec_ele->counter_val);
       break;
     case INK_REC_FLOAT:
       printf("[INKRecordGet] %s=%f\n", name, rec_ele->float_val);
@@ -1356,10 +1356,10 @@ test_record_get_mlt(void)
     printf("Record: %s = ", rec_ele->rec_name);
     switch (rec_ele->rec_type) {
     case INK_REC_INT:
-      printf("%lld\n", rec_ele->int_val);
+      printf("%" PRId64 "\n", rec_ele->int_val);
       break;
     case INK_REC_COUNTER:
-      printf("%lld\n", rec_ele->counter_val);
+      printf("%" PRId64 "\n", rec_ele->counter_val);
       break;
     case INK_REC_FLOAT:
       printf("%f\n", rec_ele->float_val);
@@ -2330,7 +2330,7 @@ print_stats()
   INKRecordGetInt("proxy.process.http.current_server_connections", &i7);
   INKRecordGetInt("proxy.process.http.current_server_transactions", &i8);
 
-  fprintf(stderr, "%lld, %lld, %lld, %lld, %lld, %lld, %lld, %lld\n", i1, i2, i3, i4, i5, i6, i7, i8);
+  fprintf(stderr, "%" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 "\n", i1, i2, i3, i4, i5, i6, i7, i8);
 
   INKRecordGetFloat("proxy.node.http.cache_hit_ratio", &f1);
   INKRecordGetFloat("proxy.node.http.bandwidth_hit_ratio", &f2);
@@ -2358,7 +2358,7 @@ print_stats()
   INKRecordGetInt("proxy.node.current_client_connections", &i9);
   INKRecordGetInt("proxy.node.current_cache_connections", &i10);
 
-  fprintf(stderr, "%lld, %lld, %lld, %lld, %lld, %lld, %lld, %lld, %lld, %lld\n",
+  fprintf(stderr, "%" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 "\n",
           i1, i2, i3, i4, i5, i6, i7, i8, i9, i10);
 
   INKRecordGetFloat("proxy.cluster.user_agent_total_bytes_avg_10s", &f1);
@@ -2376,11 +2376,11 @@ print_stats()
 
   fprintf(stderr, "CLUSTER stats: \n");
   fprintf(stderr, "%f, %f, %f, %f, %f, %f\n", f1, f2, f3, f4, f5, f6);
-  fprintf(stderr, "%lld, %lld, %lld, %lld, %lld\n", i1, i2, i3, i4, i5);
+  fprintf(stderr, "%" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 "\n", i1, i2, i3, i4, i5);
 
   fprintf(stderr, "PROCESS stats: \n");
   fprintf(stderr, "%f, %f\n", f1, f2);
-  fprintf(stderr, "%lld, %lld, %lld, %lld\n", i1, i2, i3, i4);
+  fprintf(stderr, "%" PRId64 ", %" PRId64 ", %" PRId64 ", %" PRId64 "\n", i1, i2, i3, i4);
 
 }
 

Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/CoreAPIRemote.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/CoreAPIRemote.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/CoreAPIRemote.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/CoreAPIRemote.cc Wed Dec 15 01:15:09 2010
@@ -493,7 +493,7 @@ MgmtRecordSet(const char *rec_name, cons
 }
 
 // first convert the MgmtInt into a string
-// NOTE: use long long, not just long, MgmtInt = int64
+// NOTE: use long long, not just long, MgmtInt = int64_t
 INKError
 MgmtRecordSetInt(const char *rec_name, MgmtInt int_val, INKActionNeedT * action_need)
 {
@@ -504,7 +504,7 @@ MgmtRecordSetInt(const char *rec_name, M
     return INK_ERR_PARAMS;
 
   bzero(str_val, MAX_RECORD_SIZE);
-  snprintf(str_val, sizeof(str_val), "%lld", int_val);
+  snprintf(str_val, sizeof(str_val), "%" PRId64 "", int_val);
   ret = mgmt_record_set(rec_name, str_val, action_need);
 
   return ret;
@@ -521,7 +521,7 @@ MgmtRecordSetCounter(const char *rec_nam
     return INK_ERR_PARAMS;
 
   bzero(str_val, MAX_RECORD_SIZE);
-  snprintf(str_val, sizeof(str_val), "%lld", counter_val);
+  snprintf(str_val, sizeof(str_val), "%" PRId64 "", counter_val);
   ret = mgmt_record_set(rec_name, str_val, action_need);
 
   return ret;

Modified: trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/NetworkUtilsRemote.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/NetworkUtilsRemote.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/NetworkUtilsRemote.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/api2/remote/NetworkUtilsRemote.cc Wed Dec 15 01:15:09 2010
@@ -90,12 +90,12 @@ int
 socket_test(int fd)
 {
   char msg[6];                  /* 6 = SIZE_OP + SIZE_LEN */
-  int16 op;
-  int32 msg_len = 0;
+  int16_t op;
+  int32_t msg_len = 0;
   int ret, amount_read = 0;
 
   // write the op
-  op = (int16) UNDEFINED_OP;
+  op = (int16_t) UNDEFINED_OP;
   memcpy(msg, (void *) &op, SIZE_OP_T);
 
   // write msg-len = 0
@@ -489,13 +489,13 @@ socket_test_thread(void *arg)
 INKError
 send_request(int fd, OpType op)
 {
-  int16 op_t;
-  int32 msg_len;
+  int16_t op_t;
+  int32_t msg_len;
   char msg_buf[SIZE_OP_T + SIZE_LEN];
   INKError err;
 
   // fill in op type
-  op_t = (int16) op;
+  op_t = (int16_t) op;
   memcpy(msg_buf, &op_t, SIZE_OP_T);
 
   // fill in msg_len == 0
@@ -520,15 +520,15 @@ INKError
 send_request_name(int fd, OpType op, char *name)
 {
   char *msg_buf;
-  int16 op_t;
-  int32 msg_len;
+  int16_t op_t;
+  int32_t msg_len;
   int total_len;
   INKError err;
 
   if (name == NULL) {           //reg callback for all events when op==EVENT_REG_CALLBACK
     msg_len = 0;
   } else {
-    msg_len = (int32) strlen(name);
+    msg_len = (int32_t) strlen(name);
   }
 
   total_len = SIZE_OP_T + SIZE_LEN + msg_len;
@@ -537,7 +537,7 @@ send_request_name(int fd, OpType op, cha
     return INK_ERR_SYS_CALL;
 
   // fill in op type
-  op_t = (int16) op;
+  op_t = (int16_t) op;
   memcpy(msg_buf, (void *) &op_t, SIZE_OP_T);
 
   // fill in msg_len
@@ -569,8 +569,8 @@ send_request_name_value(int fd, OpType o
 {
   char *msg_buf;
   int msg_pos = 0, total_len;
-  int32 msg_len, name_len, val_size;    // these are written to msg
-  int16 op_t;
+  int32_t msg_len, name_len, val_size;    // these are written to msg
+  int16_t op_t;
   INKError err;
 
   if (!name || !value)
@@ -586,7 +586,7 @@ send_request_name_value(int fd, OpType o
     return INK_ERR_SYS_CALL;
 
   // fill in op type
-  op_t = (int16) op;
+  op_t = (int16_t) op;
   memcpy(msg_buf + msg_pos, (void *) &op_t, SIZE_OP_T);
   msg_pos += SIZE_OP_T;
 
@@ -630,8 +630,8 @@ send_file_read_request(int fd, INKFileNa
 {
   char *msg_buf;
   int msg_pos = 0, total_len;
-  int32 msg_len = (int32) SIZE_FILE_T;  //marshalled values
-  int16 op, file_t;
+  int32_t msg_len = (int32_t) SIZE_FILE_T;  //marshalled values
+  int16_t op, file_t;
   INKError err;
 
   total_len = SIZE_OP_T + SIZE_LEN + SIZE_FILE_T;
@@ -640,7 +640,7 @@ send_file_read_request(int fd, INKFileNa
     return INK_ERR_SYS_CALL;
 
   // fill in op type
-  op = (int16) FILE_READ;
+  op = (int16_t) FILE_READ;
   memcpy(msg_buf + msg_pos, &op, SIZE_OP_T);
   msg_pos += SIZE_OP_T;
 
@@ -649,7 +649,7 @@ send_file_read_request(int fd, INKFileNa
   msg_pos += SIZE_LEN;
 
   // fill in file type
-  file_t = (int16) file;
+  file_t = (int16_t) file;
   memcpy(msg_buf + msg_pos, &file_t, SIZE_FILE_T);
 
   // send message
@@ -676,8 +676,8 @@ send_file_write_request(int fd, INKFileN
 {
   char *msg_buf;
   int msg_pos = 0, total_len;
-  int32 msg_len, f_size;        //marshalled values
-  int16 op, file_t, f_ver;
+  int32_t msg_len, f_size;        //marshalled values
+  int16_t op, file_t, f_ver;
   INKError err;
 
   if (!text)
@@ -690,7 +690,7 @@ send_file_write_request(int fd, INKFileN
     return INK_ERR_SYS_CALL;
 
   // fill in op type
-  op = (int16) FILE_WRITE;
+  op = (int16_t) FILE_WRITE;
   memcpy(msg_buf + msg_pos, &op, SIZE_OP_T);
   msg_pos += SIZE_OP_T;
 
@@ -699,17 +699,17 @@ send_file_write_request(int fd, INKFileN
   msg_pos += SIZE_LEN;
 
   // fill in file type
-  file_t = (int16) file;
+  file_t = (int16_t) file;
   memcpy(msg_buf + msg_pos, &file_t, SIZE_FILE_T);
   msg_pos += SIZE_FILE_T;
 
   // fill in file version
-  f_ver = (int16) ver;
+  f_ver = (int16_t) ver;
   memcpy(msg_buf + msg_pos, &f_ver, SIZE_VER);
   msg_pos += SIZE_VER;
 
   // fill in file size
-  f_size = (int32) size;        //typecase to be safe
+  f_size = (int32_t) size;        //typecase to be safe
   memcpy(msg_buf + msg_pos, &f_size, SIZE_LEN);
   msg_pos += SIZE_LEN;
 
@@ -737,8 +737,8 @@ send_record_get_request(int fd, char *re
 {
   char *msg_buf;
   int msg_pos = 0, total_len;
-  int16 op;
-  int32 msg_len;
+  int16_t op;
+  int32_t msg_len;
   INKError err;
 
   if (!rec_name)
@@ -750,12 +750,12 @@ send_record_get_request(int fd, char *re
     return INK_ERR_SYS_CALL;
 
   // fill in op type
-  op = (int16) RECORD_GET;
+  op = (int16_t) RECORD_GET;
   memcpy(msg_buf + msg_pos, (void *) &op, SIZE_OP_T);
   msg_pos += SIZE_OP_T;
 
   // fill in msg length
-  msg_len = (int32) strlen(rec_name);
+  msg_len = (int32_t) strlen(rec_name);
   memcpy(msg_buf + msg_pos, (void *) &msg_len, SIZE_LEN);
   msg_pos += SIZE_LEN;
 
@@ -800,8 +800,8 @@ send_proxy_state_get_request(int fd)
 INKError
 send_proxy_state_set_request(int fd, INKProxyStateT state, INKCacheClearT clear)
 {
-  int16 op, state_t, cache_t;
-  int32 msg_len;
+  int16_t op, state_t, cache_t;
+  int32_t msg_len;
   int total_len;
   char *msg_buf;
   INKError err;
@@ -812,19 +812,19 @@ send_proxy_state_set_request(int fd, INK
     return INK_ERR_SYS_CALL;
 
   // fill in op type
-  op = (int16) PROXY_STATE_SET;
+  op = (int16_t) PROXY_STATE_SET;
   memcpy(msg_buf, (void *) &op, SIZE_OP_T);
 
   // fill in msg_len
-  msg_len = (int32) (SIZE_PROXY_T + SIZE_TS_ARG_T);
+  msg_len = (int32_t) (SIZE_PROXY_T + SIZE_TS_ARG_T);
   memcpy(msg_buf + SIZE_OP_T, (void *) &msg_len, SIZE_LEN);
 
   // fill in proxy state
-  state_t = (int16) state;
+  state_t = (int16_t) state;
   memcpy(msg_buf + SIZE_OP_T + SIZE_LEN, (void *) &state_t, SIZE_PROXY_T);
 
   // fill in cache clearing option
-  cache_t = (int16) clear;
+  cache_t = (int16_t) clear;
   memcpy(msg_buf + SIZE_OP_T + SIZE_LEN + SIZE_PROXY_T, (void *) &cache_t, SIZE_TS_ARG_T);
 
   // send message
@@ -847,8 +847,8 @@ INKError
 send_restart_request(int fd, bool cluster)
 {
   char *msg_buf;
-  int16 op, clust_t;
-  int32 msg_len;
+  int16_t op, clust_t;
+  int32_t msg_len;
   int total_len;
   INKError err;
 
@@ -858,11 +858,11 @@ send_restart_request(int fd, bool cluste
     return INK_ERR_SYS_CALL;
 
   // fill in op type
-  op = (int16) RESTART;
+  op = (int16_t) RESTART;
   memcpy(msg_buf, (void *) &op, SIZE_OP_T);
 
   // fill in msg_len = SIZE_BOOL
-  msg_len = (int32) SIZE_BOOL;
+  msg_len = (int32_t) SIZE_BOOL;
   memcpy(msg_buf + SIZE_OP_T, (void *) &msg_len, SIZE_LEN);
 
   // fill in cluster?; true=0, false=1
@@ -1013,15 +1013,15 @@ INKError
 send_diags_msg(int fd, INKDiagsT mode, const char *diag_msg)
 {
   char *msg_buf;
-  int16 op_t, diag_t;
-  int32 msg_len, diag_msg_len;
+  int16_t op_t, diag_t;
+  int32_t msg_len, diag_msg_len;
   int total_len;
   INKError err;
 
   if (!diag_msg)
     return INK_ERR_PARAMS;
 
-  diag_msg_len = (int32) strlen(diag_msg);
+  diag_msg_len = (int32_t) strlen(diag_msg);
   msg_len = SIZE_DIAGS_T + SIZE_LEN + diag_msg_len;
   total_len = SIZE_OP_T + SIZE_LEN + msg_len;
   msg_buf = (char *) xmalloc(sizeof(char) * total_len);
@@ -1029,14 +1029,14 @@ send_diags_msg(int fd, INKDiagsT mode, c
     return INK_ERR_SYS_CALL;
 
   // fill in op type
-  op_t = (int16) DIAGS;
+  op_t = (int16_t) DIAGS;
   memcpy(msg_buf, (void *) &op_t, SIZE_OP_T);
 
   // fill in entire msg len
   memcpy(msg_buf + SIZE_OP_T, (void *) &msg_len, SIZE_LEN);
 
   // fill in INKDiagsT
-  diag_t = (int16) mode;
+  diag_t = (int16_t) mode;
   memcpy(msg_buf + SIZE_OP_T + SIZE_LEN, (void *) &diag_t, SIZE_DIAGS_T);
 
   // fill in diags msg_len
@@ -1084,7 +1084,7 @@ INKError
 parse_reply(int fd)
 {
   int ret, amount_read = 0;
-  int16 ret_val;
+  int16_t ret_val;
 
   // check to see if anything to read; wait for specified time = 1 sec
   if (socket_read_timeout(fd, MAX_TIME_WAIT, 0) <= 0) { // time expires before ready to read
@@ -1127,8 +1127,8 @@ INKError
 parse_reply_list(int fd, char **list)
 {
   int ret, amount_read = 0;
-  int16 ret_val;
-  int32 list_size;
+  int16_t ret_val;
+  int32_t list_size;
   INKError err_t;
 
   if (!list)
@@ -1230,8 +1230,8 @@ INKError
 parse_file_read_reply(int fd, int *ver, int *size, char **text)
 {
   int ret, amount_read = 0;
-  int32 f_size;
-  int16 ret_val, f_ver;
+  int32_t f_size;
+  int16_t ret_val, f_ver;
   INKError err_t;
 
   if (!ver || !size || !text)
@@ -1360,8 +1360,8 @@ INKError
 parse_record_get_reply(int fd, INKRecordT * rec_type, void **rec_val)
 {
   int ret, amount_read = 0;
-  int16 ret_val, rec_t;
-  int32 rec_size;
+  int16_t ret_val, rec_t;
+  int32_t rec_size;
   INKError err_t;
 
   if (!rec_type || !rec_val)
@@ -1488,7 +1488,7 @@ INKError
 parse_record_set_reply(int fd, INKActionNeedT * action_need)
 {
   int ret, amount_read = 0;
-  int16 ret_val, action_t;
+  int16_t ret_val, action_t;
   INKError err_t;
 
   if (!action_need)
@@ -1560,7 +1560,7 @@ INKError
 parse_proxy_state_get_reply(int fd, INKProxyStateT * state)
 {
   int ret, amount_read = 0;
-  int16 state_t;
+  int16_t state_t;
 
   if (!state)
     return INK_ERR_PARAMS;
@@ -1609,7 +1609,7 @@ INKError
 parse_event_active_reply(int fd, bool * is_active)
 {
   int ret, amount_read = 0;
-  int16 ret_val, active;
+  int16_t ret_val, active;
   INKError err_t;
 
   if (!is_active)
@@ -1682,8 +1682,8 @@ parse_event_notification(int fd, INKEven
 {
   int amount_read, ret;
   OpType msg_type;
-  int16 type_op;
-  int32 msg_len;
+  int16_t type_op;
+  int32_t msg_len;
   char *event_name = NUL, *desc = NULL;
 
   if (!event)

Modified: trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cli/CLI.cc Wed Dec 15 01:15:09 2010
@@ -1180,13 +1180,13 @@ handleOverseer(int fd, int mode)
             case RECD_COUNTER:{
                 RecCounter val;
                 RecGetRecordCounter(cur, &val);
-                snprintf(reply, sizeof(reply), "%s = \"%lld\"", cur, val);
+                snprintf(reply, sizeof(reply), "%s = \"%" PRId64 "\"", cur, val);
                 break;
               }
             case RECD_INT:{
                 RecInt val;
                 RecGetRecordInt(cur, &val);
-                snprintf(reply, sizeof(reply), "%s = \"%lld\"", cur, val);
+                snprintf(reply, sizeof(reply), "%s = \"%" PRId64 "\"", cur, val);
                 break;
               }
             case RECD_FLOAT:{

Modified: trafficserver/traffic/trunk/proxy/mgmt2/cli2/ShowCmd.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cli2/ShowCmd.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cli2/ShowCmd.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cli2/ShowCmd.cc Wed Dec 15 01:15:09 2010
@@ -2378,8 +2378,8 @@ ShowCacheStats()
   Cli_Printf("Bytes Used --- %d GB\n", bytes_used / (1024 * 1024 * 1024));
   Cli_Printf("Cache Size --- %d GB\n", bytes_total / (1024 * 1024 * 1024));
   Cli_Printf("--RAM Cache--\n");
-  Cli_Printf("Total Bytes -- %lld\n", ram_cache_total_bytes);
-  Cli_Printf("Bytes Used --- %lld\n", ram_cache_bytes_used);
+  Cli_Printf("Total Bytes -- %" PRId64 "\n", ram_cache_total_bytes);
+  Cli_Printf("Bytes Used --- %" PRId64 "\n", ram_cache_bytes_used);
   Cli_Printf("Hits --------- %d\n", ram_cache_hits);
   Cli_Printf("Misses ------- %d\n", ram_cache_misses);
   Cli_Printf("--Lookups--\n");

Modified: trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cluster/ClusterCom.cc Wed Dec 15 01:15:09 2010
@@ -825,8 +825,8 @@ ClusterCom::handleMultiCastMessage(char 
   /* Their wall clock time and last config change time */
   if ((line = ink_strtok_r(NULL, "\n", &last)) == NULL)
     goto Lbogus;
-  int64 tt;
-  if (sscanf(line, "time: %lld", &tt) != 1) {
+  int64_t tt;
+  if (sscanf(line, "time: %" PRId64 "", &tt) != 1) {
     mgmt_elog("[ClusterCom::handleMultiCastMessage] Invalid message-line(%d) '%s'\n", __LINE__, line);
     return;
   }
@@ -834,7 +834,7 @@ ClusterCom::handleMultiCastMessage(char 
 
   if ((line = ink_strtok_r(NULL, "\n", &last)) == NULL)
     goto Lbogus;
-  if (sscanf(line, "ctime: %lld", &tt) != 1) {
+  if (sscanf(line, "ctime: %" PRId64 "", &tt) != 1) {
     mgmt_elog("[ClusterCom::handleMultiCastMessage] Invalid message-line(%d) '%s'\n", __LINE__, line);
     return;
   }
@@ -1141,7 +1141,7 @@ ClusterCom::handleMultiCastFilePacket(ch
 {
   char *line, file[1024];
   version_t ver, our_ver;
-  int64 tt;
+  int64_t tt;
   InkHashTableValue hash_value;
   bool file_update_failure;
 
@@ -1150,7 +1150,7 @@ ClusterCom::handleMultiCastFilePacket(ch
 
     file_update_failure = false;
     // coverity[secure_coding]
-    if (sscanf(line, "%1023s %d %lld\n", file, &ver, &tt) != 3) {
+    if (sscanf(line, "%1023s %d %" PRId64 "\n", file, &ver, &tt) != 3) {
       mgmt_elog("[ClusterCom::handleMultiCastFilePacket] Invalid message-line(%d) '%s'\n", __LINE__, line);
       return;
     }
@@ -1459,7 +1459,7 @@ ClusterCom::constructSharedGenericPacket
 
   /* Current time stamp, for xntp like synching */
   if (time(NULL) > 0) {
-    snprintf(tmp, sizeof(tmp), "time: %lld\n", (int64)time(NULL));
+    snprintf(tmp, sizeof(tmp), "time: %" PRId64 "\n", (int64_t)time(NULL));
     ink_strncpy(&message[running_sum], tmp, (max - running_sum));
     running_sum += strlen(tmp);
   } else {
@@ -1485,7 +1485,7 @@ ClusterCom::constructSharedGenericPacket
   }
 #endif
 
-  snprintf(tmp, sizeof(tmp), "ctime: %lld\n", (int64)lmgmt->record_data->time_last_config_change);
+  snprintf(tmp, sizeof(tmp), "ctime: %" PRId64 "\n", (int64_t)lmgmt->record_data->time_last_config_change);
   ink_strncpy(&message[running_sum], tmp, (max - running_sum));
   running_sum += strlen(tmp);
   ink_release_assert(running_sum < max);
@@ -1497,12 +1497,12 @@ ClusterCom::constructSharedGenericPacket
     if (rec->rec_type == RECT_NODE) {
       switch (rec->data_type) {
       case RECD_COUNTER:
-        sprintf(tmp, "%d:%d: %lld\n", cnt, rec->data_type, rec->data.rec_counter);
+        sprintf(tmp, "%d:%d: %" PRId64 "\n", cnt, rec->data_type, rec->data.rec_counter);
         ink_strncpy(&message[running_sum], tmp, (max - running_sum));
         running_sum += strlen(tmp);
         break;
       case RECD_INT:
-        sprintf(tmp, "%d:%d: %lld\n", cnt, rec->data_type, rec->data.rec_int);
+        sprintf(tmp, "%d:%d: %" PRId64 "\n", cnt, rec->data_type, rec->data.rec_int);
         ink_strncpy(&message[running_sum], tmp, (max - running_sum));
         running_sum += strlen(tmp);
         break;
@@ -1620,7 +1620,7 @@ ClusterCom::constructSharedFilePacket(ch
       //time_t mod = rb->versionTimeStamp(ver);
       time_t mod = 0;
 
-      snprintf(tmp, sizeof(tmp), "%s %d %lld\n", line, ver, (int64)mod);
+      snprintf(tmp, sizeof(tmp), "%s %d %" PRId64 "\n", line, ver, (int64_t)mod);
       ink_strncpy(&message[running_sum], tmp, (max - running_sum));
       running_sum += strlen(tmp);
       ink_release_assert(running_sum < max);
@@ -2423,9 +2423,9 @@ checkBackDoor(int req_fd, char *message)
       case RECD_COUNTER:
       case RECD_INT:
         {
-          int64 val = (stype == RECD_COUNTER ? REC_readCounter(variable, &found) : REC_readInteger(variable, &found));
+          int64_t val = (stype == RECD_COUNTER ? REC_readCounter(variable, &found) : REC_readInteger(variable, &found));
           if (found) {
-            rep_len = snprintf(reply, sizeof(reply), "\nRecord '%s' Val: '%lld'\n", variable, val);
+            rep_len = snprintf(reply, sizeof(reply), "\nRecord '%s' Val: '%" PRId64 "'\n", variable, val);
           }
           break;
         }
@@ -2517,8 +2517,8 @@ checkBackDoor(int req_fd, char *message)
       mgmt_writeline(req_fd, reply, strlen(reply));
 
       snprintf(reply, sizeof(reply),
-               "Idle-Our-WC: %lld   Peer-WC-Last-Time: %ld  Delta: %ld Mgmt-Idle: %lld M-Alive: %d",
-               (int64)tmp->idle_ticks, tmp->last_time_recorded, tmp->delta, (int64)tmp->manager_idle_ticks, tmp->manager_alive);
+               "Idle-Our-WC: %" PRId64 "   Peer-WC-Last-Time: %ld  Delta: %ld Mgmt-Idle: %" PRId64 " M-Alive: %d",
+               (int64_t)tmp->idle_ticks, tmp->last_time_recorded, tmp->delta, (int64_t)tmp->manager_idle_ticks, tmp->manager_alive);
       mgmt_writeline(req_fd, reply, strlen(reply));
 
 
@@ -2538,7 +2538,7 @@ checkBackDoor(int req_fd, char *message)
     snprintf(reply, sizeof(reply), "\tproxy_running: %s", (lmgmt->proxy_running ? "true" : "false"));
     mgmt_writeline(req_fd, reply, strlen(reply));
 
-    snprintf(reply, sizeof(reply), "\tproxy_started_at: %lld", (int64)lmgmt->proxy_started_at);
+    snprintf(reply, sizeof(reply), "\tproxy_started_at: %" PRId64 "", (int64_t)lmgmt->proxy_started_at);
     mgmt_writeline(req_fd, reply, strlen(reply));
 
     snprintf(reply, sizeof(reply), "\trun_proxy: %s", (lmgmt->run_proxy ? "true" : "false"));

Modified: trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc Wed Dec 15 01:15:09 2010
@@ -940,9 +940,9 @@ getaddrinfo_error:
 
 static int
 test_port(int port, const char *request, char *buffer, int bufsize,
-          int64 test_timeout, char *ip = NULL, char *ip_to_bind = NULL)
+          int64_t test_timeout, char *ip = NULL, char *ip_to_bind = NULL)
 {
-  int64 start_time, timeout;
+  int64_t start_time, timeout;
   int sock;
   size_t length = strlen(request);
   int err, idx;
@@ -956,7 +956,7 @@ test_port(int port, const char *request,
 
   timeout = milliseconds() - start_time;
   if (timeout >= test_timeout) {
-    cop_log(COP_WARNING, "(test) timeout occurred [%lld ms]\n", timeout);
+    cop_log(COP_WARNING, "(test) timeout occurred [%" PRId64 " ms]\n", timeout);
     goto error;
   }
   timeout = test_timeout - timeout;
@@ -966,7 +966,7 @@ test_port(int port, const char *request,
     cop_log(COP_WARNING, "(test) poll write failed [%d '%s']\n", errno, strerror(errno));
     goto error;
   } else if (err == 0) {
-    cop_log(COP_WARNING, "(test) write timeout [%lld ms]\n", timeout);
+    cop_log(COP_WARNING, "(test) write timeout [%" PRId64 " ms]\n", timeout);
     goto error;
   }
   // Write the request to the server.
@@ -993,7 +993,7 @@ test_port(int port, const char *request,
 
     timeout = milliseconds() - start_time;
     if (timeout >= test_timeout) {
-      cop_log(COP_WARNING, "(test) timeout occurred [%lld ms]\n", timeout);
+      cop_log(COP_WARNING, "(test) timeout occurred [%" PRId64 " ms]\n", timeout);
       goto error;
     }
     timeout = test_timeout - timeout;
@@ -1003,7 +1003,7 @@ test_port(int port, const char *request,
       cop_log(COP_WARNING, "(test) poll read failed [%d '%s']\n", errno, strerror(errno));
       goto error;
     } else if (err == 0) {
-      cop_log(COP_WARNING, "(test) read timeout [%lld ]\n", timeout);
+      cop_log(COP_WARNING, "(test) read timeout [%" PRId64 " ]\n", timeout);
       goto error;
     }
 

Modified: trafficserver/traffic/trunk/proxy/mgmt2/preparse/StoreReadConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/preparse/StoreReadConfig.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/preparse/StoreReadConfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/preparse/StoreReadConfig.cc Wed Dec 15 01:15:09 2010
@@ -53,11 +53,11 @@ parseStorageFile(int fd)
     // parse
 
     char *e = strpbrk(n, " \t\n");
-    int64 size = -1;
+    int64_t size = -1;
     while (*e && !isdigit(*e))
       e++;
     if (e && *e) {
-      if (1 != sscanf(e, "%lld", &size)) {
+      if (1 != sscanf(e, "%" PRId64 "", &size)) {
         err = "error parsing size";
         goto Lfail;
       }

Modified: trafficserver/traffic/trunk/proxy/mgmt2/stats/StatType.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/stats/StatType.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/stats/StatType.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/stats/StatType.cc Wed Dec 15 01:15:09 2010
@@ -111,7 +111,7 @@ StatExprToken::assignTokenName(const cha
       if (!varIntFromName(m_token_name, &tempInt)) {
         tempInt = (RecInt) ERROR_VALUE;
       }
-      Debug(MODULE_INIT, "\tvar: %s, type: %d, value: %lld\n", m_token_name, m_token_type, tempInt);
+      Debug(MODULE_INIT, "\tvar: %s, type: %d, value: %" PRId64 "\n", m_token_name, m_token_type, tempInt);
     }
     break;
 
@@ -1000,7 +1000,7 @@ StatObjectList::Eval()
       delta = object->m_current_time - object->m_last_update;
 
       if (StatDebug) {
-        Debug(MODULE, "\tUPDATE:%lld THRESHOLD:%lld, DELTA:%lld\n", object->m_update_interval, threshold, delta);
+        Debug(MODULE, "\tUPDATE:%" PRId64 " THRESHOLD:%" PRId64 ", DELTA:%" PRId64 "\n", object->m_update_interval, threshold, delta);
       }
 
       /* Should we do the calculation? */

Modified: trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/utils/WebMgmtUtils.cc Wed Dec 15 01:15:09 2010
@@ -76,14 +76,14 @@ varSetFromStr(const char *varName, const
 
   switch (varDataType) {
   case RECD_INT:
-    if (sscanf(value, "%lld", &data.rec_int) == 1) {
+    if (sscanf(value, "%" PRId64 "", &data.rec_int) == 1) {
       RecSetRecordInt((char *) varName, data.rec_int);
     } else {
       found = false;
     }
     break;
   case RECD_COUNTER:
-    if (sscanf(value, "%lld", &data.rec_counter) == 1) {
+    if (sscanf(value, "%" PRId64 "", &data.rec_counter) == 1) {
       RecSetRecordCounter((char *) varName, data.rec_counter);
     } else {
       found = false;
@@ -421,7 +421,7 @@ commaStrFromInt(RecInt bytes, char *bufV
   int numCommas;
   char *curPtr;
 
-  sprintf(bufVal, "%lld", bytes);
+  sprintf(bufVal, "%" PRId64 "", bytes);
   len = strlen(bufVal);
 
   // The string is too short to need commas
@@ -458,7 +458,7 @@ MbytesFromInt(RecInt bytes, char *bufVal
 {
   RecInt mBytes = bytes / 1048576;
 
-  sprintf(bufVal, "%lld", mBytes);
+  sprintf(bufVal, "%" PRId64 "", mBytes);
 }
 
 // void bytesFromInt(RecInt bytes, char* bufVal)
@@ -470,7 +470,7 @@ MbytesFromInt(RecInt bytes, char *bufVal
 void
 bytesFromInt(RecInt bytes, char *bufVal)
 {
-  const int64 gb = 1073741824;
+  const int64_t gb = 1073741824;
   const long int mb = 1048576;
   const long int kb = 1024;
   int bytesP;
@@ -564,7 +564,7 @@ varStrFromName(const char *varNameConst,
     } else if (formatOption == 'c') {
       commaStrFromInt(data.rec_int, bufVal);
     } else {
-      sprintf(bufVal, "%lld", data.rec_int);
+      sprintf(bufVal, "%" PRId64 "", data.rec_int);
     }
     break;
 
@@ -577,7 +577,7 @@ varStrFromName(const char *varNameConst,
     } else if (formatOption == 'c') {
       commaStrFromInt(data.rec_counter, bufVal);
     } else {
-      sprintf(bufVal, "%lld", data.rec_counter);
+      sprintf(bufVal, "%" PRId64 "", data.rec_counter);
     }
     break;
   case RECD_FLOAT:

Modified: trafficserver/traffic/trunk/proxy/mgmt2/web2/WebConfigRender.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebConfigRender.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/web2/WebConfigRender.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/web2/WebConfigRender.cc Wed Dec 15 01:15:09 2010
@@ -3244,6 +3244,7 @@ writeVaddrsConfigForm(WebHttpContext * w
 int
 writeSecondarySpecsForm(WebHttpContext * whc, INKFileNameT file)
 {
+  NOWARN_UNUSED(file);
   textBuffer *output = whc->response_bdy;
 
   HtmlRndrTrOpen(output, HTML_CSS_NONE, HTML_ALIGN_NONE);

Modified: trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttp.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttp.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttp.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttp.cc Wed Dec 15 01:15:09 2010
@@ -828,8 +828,8 @@ handle_record_info(WebHttpContext * whc,
           {
             RecInt data = g_records[r].data.rec_int;
             RecInt data_default = g_records[r].data_default.rec_int;
-            snprintf(cur_value, BUF_SIZE, "%lld", data);
-            snprintf(def_value_rec, BUF_SIZE, "%lld", data_default);
+            snprintf(cur_value, BUF_SIZE, "%" PRId64 "", data);
+            snprintf(def_value_rec, BUF_SIZE, "%" PRId64 "", data_default);
             same = (data == data_default);
           }
           break;
@@ -865,8 +865,8 @@ handle_record_info(WebHttpContext * whc,
           {
             RecCounter data = g_records[r].data.rec_counter;
             RecCounter data_default = g_records[r].data_default.rec_counter;
-            snprintf(cur_value, BUF_SIZE, "%lld", data);
-            snprintf(def_value_rec, BUF_SIZE, "%lld", data_default);
+            snprintf(cur_value, BUF_SIZE, "%" PRId64 "", data);
+            snprintf(def_value_rec, BUF_SIZE, "%" PRId64 "", data_default);
             same = (data == data_default);
           }
           break;
@@ -998,7 +998,7 @@ handle_record_info(WebHttpContext * whc,
           {
             MgmtInt i = lmgmt->record_data->readInteger(RecordsConfig[r].name, &found);
             if (found) {
-              snprintf(cur_value, BUF_SIZE, "%lld", i);
+              snprintf(cur_value, BUF_SIZE, "%" PRId64 "", i);
               if (i == ink_atoi64(RecordsConfig[r].value)) {
                 same = true;
               }
@@ -1047,7 +1047,7 @@ handle_record_info(WebHttpContext * whc,
           {
             MgmtIntCounter ic = lmgmt->record_data->readCounter(RecordsConfig[r].name, &found);
             if (found) {
-              snprintf(cur_value, BUF_SIZE, "%lld", ic);
+              snprintf(cur_value, BUF_SIZE, "%" PRId64 "", ic);
               if (ic == ink_atoi64(RecordsConfig[r].value)) {
                 same = true;
               }

Modified: trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpContext.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpContext.h?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpContext.h (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpContext.h Wed Dec 15 01:15:09 2010
@@ -43,8 +43,8 @@ struct WebHttpContext
 {
 
   WebHttpAuthUser current_user; // current user and access privileges
-  uint32 request_state;         // client request state
-  uint32 server_state;          // bit-mask of enabled server features
+  uint32_t request_state;         // client request state
+  uint32_t server_state;          // bit-mask of enabled server features
   httpMessage *request;         // client request
   httpResponse *response_hdr;   // server response headers
   textBuffer *response_bdy;     // server repsonse body

Modified: trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpRender.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpRender.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpRender.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpRender.cc Wed Dec 15 01:15:09 2010
@@ -754,7 +754,7 @@ handle_summary_object(WebHttpContext * w
     char *r = ink_ctime_r(&upTime, dateBuf);
     if (r != NULL) {
       HtmlRndrText(output, dict_ht, HTML_ID_UP_SINCE);
-      snprintf(tmpBuf, sizeof(tmpBuf), ": %s (%lld:%02lld:%02lld:%02lld)", dateBuf, (int64)d, (int64)h, (int64)m, (int64)s);
+      snprintf(tmpBuf, sizeof(tmpBuf), ": %s (%" PRId64 ":%02lld:%02lld:%02lld)", dateBuf, (int64_t)d, (int64_t)h, (int64_t)m, (int64_t)s);
       output->copyFrom(tmpBuf, strlen(tmpBuf));
       HtmlRndrBr(output);
     }

Modified: trafficserver/traffic/trunk/proxy/mgmt2/web2/WebIntrMain.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebIntrMain.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/web2/WebIntrMain.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/web2/WebIntrMain.cc Wed Dec 15 01:15:09 2010
@@ -469,7 +469,7 @@ newTcpSocket(int port)
 
 // Keep track of the number of service threads for debugging
 //  purposes
-static volatile int32 numServiceThr = 0;
+static volatile int32_t numServiceThr = 0;
 
 void
 printServiceThr(int sig)
@@ -545,7 +545,7 @@ serviceThrReaper(void *arg)
 #else
           ink_sem_post(&wGlobals.serviceThrCount);
 #endif
-          ink_atomic_increment((int32 *) & numServiceThr, -1);
+          ink_atomic_increment((int32_t *) & numServiceThr, -1);
 
           wGlobals.serviceThrArray[i].alreadyShutdown = true;
           Debug("ui", "%s %d %s %d\n", "Shuting Down Socket FD ",
@@ -562,7 +562,7 @@ serviceThrReaper(void *arg)
 #else
       ink_sem_post(&wGlobals.serviceThrCount);
 #endif
-      ink_atomic_increment((int32 *) & numServiceThr, -1);
+      ink_atomic_increment((int32_t *) & numServiceThr, -1);
     }
 
     usleep(300000);
@@ -967,7 +967,7 @@ webIntr_main(void *x)
 #else
     ink_sem_wait(&wGlobals.serviceThrCount);
 #endif
-    ink_atomic_increment((int32 *) & numServiceThr, 1);
+    ink_atomic_increment((int32_t *) & numServiceThr, 1);
 
     // INKqa11624 - setup sockaddr struct for unix/tcp socket in different sizes
     if (acceptFD == cliFD) {
@@ -987,7 +987,7 @@ webIntr_main(void *x)
 #else
       ink_sem_post(&wGlobals.serviceThrCount);
 #endif
-      ink_atomic_increment((int32 *) & numServiceThr, -1);
+      ink_atomic_increment((int32_t *) & numServiceThr, -1);
     } else {                    // Accept succeeded
 
       if (serviceThr == HTTP_THR) {
@@ -1035,7 +1035,7 @@ webIntr_main(void *x)
 #else
         ink_sem_post(&wGlobals.serviceThrCount);
 #endif
-        ink_atomic_increment((int32 *) & numServiceThr, -1);
+        ink_atomic_increment((int32_t *) & numServiceThr, -1);
         xfree(clientInfo);
         close_socket(clientFD);
       } else {                  // IP is allowed
@@ -1065,7 +1065,7 @@ webIntr_main(void *x)
 #else
               ink_sem_post(&wGlobals.serviceThrCount);
 #endif
-              ink_atomic_increment((int32 *) & numServiceThr, -1);
+              ink_atomic_increment((int32_t *) & numServiceThr, -1);
             }
 
             break;

Modified: trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/web2/WebOverview.cc Wed Dec 15 01:15:09 2010
@@ -446,7 +446,7 @@ overviewRecord::varStrFromName(const cha
     } else if (formatOption == 'c') {
       commaStrFromInt(data.int_data, bufVal);
     } else {
-      sprintf(bufVal, "%lld", data.int_data);
+      sprintf(bufVal, "%" PRId64 "", data.int_data);
     }
     break;
   case RECD_COUNTER:
@@ -458,7 +458,7 @@ overviewRecord::varStrFromName(const cha
     } else if (formatOption == 'c') {
       commaStrFromInt(data.counter_data, bufVal);
     } else {
-      sprintf(bufVal, "%lld", data.counter_data);
+      sprintf(bufVal, "%" PRId64 "", data.counter_data);
     }
     break;
   case RECD_FLOAT:
@@ -1099,14 +1099,14 @@ overviewPage::generateTable(WebHttpConte
     // hit latency
     HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 0);
     current->varIntFromName("proxy.node.http.transaction_msec_avg_10s.hit_fresh", &t_hit);
-    snprintf(outBuf, sizeof(outBuf), "%lld", t_hit);
+    snprintf(outBuf, sizeof(outBuf), "%" PRId64 "", t_hit);
     output->copyFrom(outBuf, strlen(outBuf));
     HtmlRndrTdClose(output);
 
     // miss latency
     HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 0);
     current->varIntFromName("proxy.node.http.transaction_msec_avg_10s.miss_cold", &t_miss);
-    snprintf(outBuf, sizeof(outBuf), "%lld", t_miss);
+    snprintf(outBuf, sizeof(outBuf), "%" PRId64 "", t_miss);
     output->copyFrom(outBuf, strlen(outBuf));
     HtmlRndrTdClose(output);
 
@@ -1219,8 +1219,8 @@ overviewPage::generateTableCLI(textBuffe
       found = true;
     }
 
-    snprintf(docCountBuf, sizeof(docCountBuf), "%lld", docCount);
-    snprintf(loadMetricBuf, sizeof(loadMetricBuf), "%lld", loadMetric);
+    snprintf(docCountBuf, sizeof(docCountBuf), "%" PRId64 "", docCount);
+    snprintf(loadMetricBuf, sizeof(loadMetricBuf), "%" PRId64 "", loadMetric);
 
     // create output status line
     // coverity[non_const_printf_format_string]
@@ -1349,7 +1349,7 @@ overviewPage::addHostPanel(WebHttpContex
   HtmlRndrTdClose(output);
   HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 0);
   SEPARATOR;
-  snprintf(tmp, sizeof(tmp), "%lld", clients);
+  snprintf(tmp, sizeof(tmp), "%" PRId64 "", clients);
   output->copyFrom(tmp, strlen(tmp));
   HtmlRndrTdClose(output);
   HtmlRndrTrClose(output);
@@ -1360,7 +1360,7 @@ overviewPage::addHostPanel(WebHttpContex
   HtmlRndrTdClose(output);
   HtmlRndrTdOpen(output, HTML_CSS_BODY_TEXT, HTML_ALIGN_NONE, HTML_VALIGN_NONE, NULL, NULL, 0);
   SEPARATOR;
-  snprintf(tmp, sizeof(tmp), "%lld", servers);
+  snprintf(tmp, sizeof(tmp), "%" PRId64 "", servers);
   output->copyFrom(tmp, strlen(tmp));
   HtmlRndrTdClose(output);
   HtmlRndrTrClose(output);

Modified: trafficserver/traffic/trunk/proxy/mgmt2/web2/WebReconfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebReconfig.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/web2/WebReconfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/web2/WebReconfig.cc Wed Dec 15 01:15:09 2010
@@ -271,7 +271,7 @@ configAuthOtherUsers()
 {
   char fpath[FILE_NAME_MAX];
   char *fbuf;
-  int64 fsize;
+  int64_t fsize;
   MgmtHashTable *ht;
   InkHashTableEntry *hte;
   InkHashTableIteratorState htis;

Modified: trafficserver/traffic/trunk/proxy/mgmt2/web2/WebUtils.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/mgmt2/web2/WebUtils.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/mgmt2/web2/WebUtils.cc (original)
+++ trafficserver/traffic/trunk/proxy/mgmt2/web2/WebUtils.cc Wed Dec 15 01:15:09 2010
@@ -80,7 +80,7 @@ UU_decode(const char *inBuffer, int outB
   int inputBytesDecoded = 0;
 
   // Figure out much encoded string is really there
-  while (printableToSixBit[(uint8)inBuffer[inBytes]] <= MAX_PRINT_VAL) {
+  while (printableToSixBit[(uint8_t)inBuffer[inBytes]] <= MAX_PRINT_VAL) {
     inBytes++;
   }
 

Modified: trafficserver/traffic/trunk/proxy/signals.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/signals.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/signals.cc (original)
+++ trafficserver/traffic/trunk/proxy/signals.cc Wed Dec 15 01:15:09 2010
@@ -86,12 +86,12 @@ public:
       //       This is not error condition at the first place
       //       so why stderr?
       //
-      fprintf(stderr, "sbrk 0x%llux from first %llu from last %llu\n",
-              (uint64) ((ptrdiff_t) now), (uint64) ((ptrdiff_t) (now - end)),
-              (uint64) ((ptrdiff_t) (now - snap)));
+      fprintf(stderr, "sbrk 0x%" PRIu64 "x from first %" PRIu64 " from last %" PRIu64 "\n",
+              (uint64_t) ((ptrdiff_t) now), (uint64_t) ((ptrdiff_t) (now - end)),
+              (uint64_t) ((ptrdiff_t) (now - snap)));
 #ifdef DEBUG
       int fmdelta = fastmemtotal - fastmemsnap;
-      fprintf(stderr, "fastmem %lld from last %lld\n", (int64) fastmemtotal, (int64) fmdelta);
+      fprintf(stderr, "fastmem %" PRId64 " from last %" PRId64 "\n", (int64_t) fastmemtotal, (int64_t) fmdelta);
       fastmemsnap += fmdelta;
 #endif
       snap = now;

Modified: trafficserver/traffic/trunk/proxy/stats/CoupledStats.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/stats/CoupledStats.h?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/stats/CoupledStats.h (original)
+++ trafficserver/traffic/trunk/proxy/stats/CoupledStats.h Wed Dec 15 01:15:09 2010
@@ -90,7 +90,7 @@ private:
 public:
     CoupledStats(const char *name);
 
-  StatDescriptor *CreateStat(const char *name, int64 init_val);
+  StatDescriptor *CreateStat(const char *name, int64_t init_val);
 
   StatDescriptor *CreateStat(const char *name, float init_val);
 };
@@ -136,7 +136,7 @@ CoupledStats::grow_check(StatDescriptor 
 }
 
 CST_INLINE StatDescriptor *
-CoupledStats::CreateStat(const char *name, int64 init_val)
+CoupledStats::CreateStat(const char *name, int64_t init_val)
 {
   StatDescriptor *ret = NULL;
 

Modified: trafficserver/traffic/trunk/proxy/stats/Stats.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/stats/Stats.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/stats/Stats.cc (original)
+++ trafficserver/traffic/trunk/proxy/stats/Stats.cc Wed Dec 15 01:15:09 2010
@@ -85,7 +85,7 @@ StatDescriptor::update_value()
 }
 
 StatDescriptor *
-StatDescriptor::CreateDescriptor(const char *prefix, char *name, size_t name_len, int64 init_value)
+StatDescriptor::CreateDescriptor(const char *prefix, char *name, size_t name_len, int64_t init_value)
 {
   char *t = name;
   char tv[128];
@@ -137,7 +137,7 @@ StatDescriptor::CreateDescriptor(const c
 }
 
 StatDescriptor *
-StatDescriptor::CreateDescriptor(const char *name, int64 init_value)
+StatDescriptor::CreateDescriptor(const char *name, int64_t init_value)
 {
   int n_stat = ink_atomic_increment(&top_stat, 1);
   RecDataT dt;
@@ -200,7 +200,7 @@ StatDescriptor::CreateDescriptor(const c
 }
 
 void
-StatDescriptor::set(int64 val)
+StatDescriptor::set(int64_t val)
 {
   if (m_magic == SHALLOW_COPY) {
     ink_atomic_swap64(&m_value.rec_int, val);
@@ -230,7 +230,7 @@ StatDescriptor::set(float val)
 }
 
 void
-StatDescriptor::add(int64 val)
+StatDescriptor::add(int64_t val)
 {
   if (m_magic == SHALLOW_COPY) {
     ink_atomic_increment64(&m_value.rec_int, val);

Modified: trafficserver/traffic/trunk/proxy/stats/Stats.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/stats/Stats.h?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/stats/Stats.h (original)
+++ trafficserver/traffic/trunk/proxy/stats/Stats.h Wed Dec 15 01:15:09 2010
@@ -64,14 +64,14 @@ private:
   static volatile int top_stat;
 
 public:
-  static StatDescriptor *CreateDescriptor(const char *category, char *name, size_t name_len, int64 init_value);
+  static StatDescriptor *CreateDescriptor(const char *category, char *name, size_t name_len, int64_t init_value);
   static StatDescriptor *CreateDescriptor(const char *category, char *name, size_t name_len, float init_value);
-  static StatDescriptor *CreateDescriptor(const char *name, int64 init_value);
+  static StatDescriptor *CreateDescriptor(const char *name, int64_t init_value);
   static StatDescriptor *CreateDescriptor(const char *name, float init_value);
   static void initialize();
   const char *name() const { return m_name; }
 
-  int64 int_value() const;
+  int64_t int_value() const;
   float flt_value() const;
 
   bool int_type() const { return m_type == RECD_INT; }
@@ -82,7 +82,7 @@ public:
   void increment()
   {
     if (m_type == RECD_INT)
-      add((int64) 1);
+      add((int64_t) 1);
     else
       add((float) 1.0);
   }
@@ -90,12 +90,12 @@ public:
   void decrement()
   {
     if (m_type == RECD_INT)
-      add((int64) - 1);
+      add((int64_t) - 1);
     else
       add((float) -1.0);
   }
 
-  void subtract(int64 val)
+  void subtract(int64_t val)
   {
     add(-val);
   }
@@ -103,9 +103,9 @@ public:
   {
     add(-val);
   }
-  void set(int64 val);
+  void set(int64_t val);
   void set(float val);
-  void add(int64 val);
+  void add(int64_t val);
   void add(float val);
   void commit();
 
@@ -172,7 +172,7 @@ StatDescriptor::operator=(const StatDesc
   return *this;
 }
 
-ST_INLINE int64
+ST_INLINE int64_t
 StatDescriptor::int_value() const
 {
   if (m_magic == NULL_VALUE || m_magic == IN_ERROR) {
@@ -184,7 +184,7 @@ StatDescriptor::int_value() const
 
   RecData tmp = (m_magic == SHALLOW_COPY) ? m_value : const_cast<StatDescriptor *>(this)->update_value();
 
-  return m_type == RECD_INT ? tmp.rec_int : (int64) tmp.rec_float;
+  return m_type == RECD_INT ? tmp.rec_int : (int64_t) tmp.rec_float;
 }
 
 ST_INLINE float

Modified: trafficserver/traffic/trunk/proxy/wccp/Wccp.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/wccp/Wccp.h?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/wccp/Wccp.h (original)
+++ trafficserver/traffic/trunk/proxy/wccp/Wccp.h Wed Dec 15 01:15:09 2010
@@ -104,10 +104,10 @@ public:
   /// @name Well known (standard) services.
   //@{
   /// HTTP
-  static uint8 const HTTP = 0;
+  static uint8_t const HTTP = 0;
   //@}
   /// Service IDs of this value or less are reserved.
-  static uint8 const RESERVED = 50;
+  static uint8_t const RESERVED = 50;
   
   /// Number of ports in component (defined by protocol).
   static size_t const N_PORTS = 8;
@@ -115,25 +115,25 @@ public:
   /// @name Flag mask values.
   //@{
   /// Source IP address hash
-  static uint32 const SRC_IP_HASH = 1<<0;
+  static uint32_t const SRC_IP_HASH = 1<<0;
   /// Destination IP address hash
-  static uint32 const DST_IP_HASH = 1<<1;
+  static uint32_t const DST_IP_HASH = 1<<1;
   /// Source port hash.
-  static uint32 const SRC_PORT_HASH = 1<<2;
+  static uint32_t const SRC_PORT_HASH = 1<<2;
   /// Destination port hash
-  static uint32 const DST_PORT_HASH = 1<<3;
+  static uint32_t const DST_PORT_HASH = 1<<3;
   /// @a m_ports has port information.
-  static uint32 const PORTS_DEFINED = 1<<4;
+  static uint32_t const PORTS_DEFINED = 1<<4;
   /// @a m_ports has source ports (otherwise destination ports).
-  static uint32 const PORTS_SOURCE = 1<<5;
+  static uint32_t const PORTS_SOURCE = 1<<5;
   /// Alternate source IP address hash
-  static uint32 const SRC_IP_ALT_HASH = 1<<8;
+  static uint32_t const SRC_IP_ALT_HASH = 1<<8;
   /// Alternate destination IP address hash
-  static uint32 const DST_IP_ALT_HASH = 1<<9;
+  static uint32_t const DST_IP_ALT_HASH = 1<<9;
   /// Alternate source port hash
-  static uint32 const SRC_PORT_ALT_HASH = 1<<10;
+  static uint32_t const SRC_PORT_ALT_HASH = 1<<10;
   /// Alternate destination port hash
-  static uint32 const DST_PORT_ALT_HASH = 1<<11;
+  static uint32_t const DST_PORT_ALT_HASH = 1<<11;
   //@}
 
   /// Default constructor - no member initialization.
@@ -153,44 +153,44 @@ public:
   */
   self& setSvcType(ServiceGroup::Type svc);
 
-  uint8 getSvcId() const; ///< Get service ID field.
-  self& setSvcId(uint8 id); ///< Set service ID field to @a id.
+  uint8_t getSvcId() const; ///< Get service ID field.
+  self& setSvcId(uint8_t id); ///< Set service ID field to @a id.
 
-  uint8 getPriority() const; ///< Get priority field.
-  self& setPriority(uint8 pri); ///< Set priority field to @a p.
+  uint8_t getPriority() const; ///< Get priority field.
+  self& setPriority(uint8_t pri); ///< Set priority field to @a p.
 
-  uint8 getProtocol() const; ///< Get protocol field.
-  self& setProtocol(uint8 p); ///< Set protocol field to @a p.
+  uint8_t getProtocol() const; ///< Get protocol field.
+  self& setProtocol(uint8_t p); ///< Set protocol field to @a p.
 
-  uint32 getFlags() const; ///< Get flags field.
-  self& setFlags(uint32 f); ///< Set the flags flags in field to @a f.
+  uint32_t getFlags() const; ///< Get flags field.
+  self& setFlags(uint32_t f); ///< Set the flags flags in field to @a f.
   /// Set the flags in the flag field that are set in @a f.
   /// Other flags are unchanged.
-  self& enableFlags(uint32 f);
+  self& enableFlags(uint32_t f);
   /// Clear the flags in the flag field that are set in @a f.
   /// Other flags are unchanged.
-  self& disableFlags(uint32 f);
+  self& disableFlags(uint32_t f);
 
   /// Get a port value.
-  uint16 getPort(
+  uint16_t getPort(
     int idx ///< Index of target port.
   ) const;
   /// Set a port value.
   self& setPort(
     int idx, ///< Index of port.
-    uint16 port ///< Value for port.
+    uint16_t port ///< Value for port.
   );
   /// Zero (clear) all ports.
   self& clearPorts();
   //@}
 
 protected:
-  uint8 m_svc_type; ///< @ref Type.
-  uint8 m_svc_id; ///< ID for service type.
-  uint8 m_priority; ///< Redirection priority ordering.
-  uint8 m_protocol; ///< IP protocol for service.
-  uint32 m_flags; ///< Flags.
-  uint16 m_ports[N_PORTS]; ///< Service ports.
+  uint8_t m_svc_type; ///< @ref Type.
+  uint8_t m_svc_id; ///< ID for service type.
+  uint8_t m_priority; ///< Redirection priority ordering.
+  uint8_t m_protocol; ///< IP protocol for service.
+  uint32_t m_flags; ///< Flags.
+  uint16_t m_ports[N_PORTS]; ///< Service ports.
 };
 
 /// Security component option (sub-type)
@@ -208,7 +208,7 @@ public:
       This is also used as the address for the socket.
   */
   self& setAddr(
-    uint32 addr ///< IP address.
+    uint32_t addr ///< IP address.
   );
 
   /** Check if this endpoint is ready to use.
@@ -229,7 +229,7 @@ public:
       @see setAddr
   */
   int open(
-    uint32 addr = INADDR_ANY ///< Local IP address for socket.
+    uint32_t addr = INADDR_ANY ///< Local IP address for socket.
   );
 
   /// Get the internal socket.
@@ -317,8 +317,8 @@ public:
 
   */
   self& addSeedRouter(
-    uint8 id, ///< Service group ID.
-    uint32 addr ///< IP address of router.
+    uint8_t id, ///< Service group ID.
+    uint32_t addr ///< IP address of router.
   );
 
   /// Number of seconds until next housekeeping activity is due.
@@ -347,7 +347,7 @@ public:
 
   /// Add an address for a seed router.
   self& addSeedRouter(
-    uint32 addr ///< Router IP address.
+    uint32_t addr ///< Router IP address.
   );
   /// Set the security key.
   self& setKey(
@@ -446,25 +446,25 @@ ServiceGroup::setProtocol(uint8_t proto)
   return *this;
 }
 
-inline uint32
+inline uint32_t
 ServiceGroup::getFlags() const {
   return ntohl(m_flags);
 }
 
 inline ServiceGroup&
-ServiceGroup::setFlags(uint32 flags) {
+ServiceGroup::setFlags(uint32_t flags) {
   m_flags = htonl(flags);
   return *this;
 }
 
 inline ServiceGroup&
-ServiceGroup::enableFlags(uint32 flags) {
+ServiceGroup::enableFlags(uint32_t flags) {
   m_flags |= htonl(flags);
   return *this;
 }
 
 inline ServiceGroup&
-ServiceGroup::disableFlags(uint32 flags) {
+ServiceGroup::disableFlags(uint32_t flags) {
   m_flags &= ~htonl(flags);
   return *this;
 }

Modified: trafficserver/traffic/trunk/proxy/wccp/WccpConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/wccp/WccpConfig.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/wccp/WccpConfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/wccp/WccpConfig.cc Wed Dec 15 01:15:09 2010
@@ -44,7 +44,7 @@ using namespace wccp;
 // Scratch global list of seed router addresses.
 // Yeah, not thread safe, but it's just during configuration load.
 // Logic somewhat changed - can we move in to the load method?
-std::vector<uint32> Seed_Router;
+std::vector<uint32_t> Seed_Router;
 
 // Names used for various elements and properties.
 static char const * const SVC_NAME = "service";
@@ -458,7 +458,7 @@ load_security (
 ts::Errata
 load_routers (
   Value const& setting, ///< Source of addresses.
-  std::vector<uint32>& addrs ///< Output list
+  std::vector<uint32_t>& addrs ///< Output list
 ) {
   ts::Errata zret;
   int src_line;
@@ -490,7 +490,7 @@ ts::Errata
 CacheImpl::loadServicesFromFile(char const* path) {
   ts::Errata zret;
   int src_line = 0; // scratch for local source line caching.
-  std::vector<uint32> routers; // scratch per service loop.
+  std::vector<uint32_t> routers; // scratch per service loop.
   Value prop; // scratch var.
 
   ts::Rv<Configuration> cv = Configuration::loadFromPath(path);
@@ -606,7 +606,7 @@ CacheImpl::loadServicesFromFile(char con
     svc_info.setFlags(0);
     if ((prop = svc_cfg[SVC_PROP_PRIMARY_HASH]).hasValue()) {
       ts::Errata status = load_option_set(prop, HASH_OPTS, N_OPTS(HASH_OPTS));
-      uint32 f = 0;
+      uint32_t f = 0;
       src_line = prop.getSourceLine();
       for ( size_t i = 0 ; i < N_OPTS(HASH_OPTS) ; ++i )
         if (HASH_OPTS[i].m_found) f |= ServiceGroup::SRC_IP_HASH << i;
@@ -622,7 +622,7 @@ CacheImpl::loadServicesFromFile(char con
 
     if ((prop = svc_cfg[SVC_PROP_ALT_HASH]).hasValue()) {
       ts::Errata status = load_option_set(prop, HASH_OPTS, N_OPTS(HASH_OPTS));
-      uint32 f = 0;
+      uint32_t f = 0;
       src_line = prop.getSourceLine();
       for ( size_t i = 0 ; i < N_OPTS(HASH_OPTS) ; ++i )
         if (HASH_OPTS[i].m_found) f |= ServiceGroup::SRC_IP_ALT_HASH << i;
@@ -720,7 +720,7 @@ CacheImpl::loadServicesFromFile(char con
     // Properties after this are optional so we can proceed if they fail.
     GroupData& svc = this->defineServiceGroup(svc_info);
     // Add seed routers.
-    std::vector<uint32>::iterator rspot, rlimit;
+    std::vector<uint32_t>::iterator rspot, rlimit;
     for ( rspot = routers.begin(), rlimit = routers.end() ; rspot != rlimit ; ++rspot )
       svc.seedRouter(*rspot);
     for ( rspot = Seed_Router.begin(), rlimit = Seed_Router.end() ; rspot != rlimit ; ++rspot )

Modified: trafficserver/traffic/trunk/proxy/wccp/WccpEndPoint.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/wccp/WccpEndPoint.cc?rev=1049373&r1=1049372&r2=1049373&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/wccp/WccpEndPoint.cc (original)
+++ trafficserver/traffic/trunk/proxy/wccp/WccpEndPoint.cc Wed Dec 15 01:15:09 2010
@@ -239,7 +239,7 @@ CacheImpl::GroupData::GroupData()
 }
 
 CacheImpl::GroupData&
-CacheImpl::GroupData::seedRouter(uint32 addr) {
+CacheImpl::GroupData::seedRouter(uint32_t addr) {
   // Be nice and don't add it if it's already there.
   if (m_seed_routers.end() == find_by_member(m_seed_routers, &SeedRouter::m_addr, addr))
     m_seed_routers.push_back(SeedRouter(addr));
@@ -247,7 +247,7 @@ CacheImpl::GroupData::seedRouter(uint32 
 }
 
 time_t
-CacheImpl::GroupData::removeSeedRouter(uint32 addr) {
+CacheImpl::GroupData::removeSeedRouter(uint32_t addr) {
   time_t zret = 0;
   std::vector<SeedRouter>::iterator begin = m_seed_routers.begin(); 
   std::vector<SeedRouter>::iterator end = m_seed_routers.end();
@@ -267,7 +267,7 @@ CacheImpl::GroupData& CacheImpl::GroupDa
 CacheImpl::GroupData& CacheImpl::GroupData::setSecurity(SecurityOption style) { return static_cast<self&>(this->super::setSecurity(style)); }
 
 CacheImpl::CacheBag::iterator
-CacheImpl::GroupData::findCache(uint32 addr) {
+CacheImpl::GroupData::findCache(uint32_t addr) {
   return std::find_if(
     m_caches.begin(),
     m_caches.end(),
@@ -276,7 +276,7 @@ CacheImpl::GroupData::findCache(uint32 a
 }
 
 CacheImpl::RouterBag::iterator
-CacheImpl::GroupData::findRouter(uint32 addr) {
+CacheImpl::GroupData::findRouter(uint32_t addr) {
   return std::find_if(
     m_routers.begin(),
     m_routers.end(),
@@ -304,7 +304,7 @@ inline CacheImpl::RouterData::RouterData
   , m_send_caps(false) {
 }
 
-inline CacheImpl::RouterData::RouterData(uint32 addr)
+inline CacheImpl::RouterData::RouterData(uint32_t addr)
   : m_addr(addr)
   , m_generation(0)
   , m_rapid(0)
@@ -323,7 +323,7 @@ CacheImpl::RouterData::waitTime(time_t n
   return m_assign ? 0 : this->pingTime(now);
 }
 
-inline uint32
+inline uint32_t
 CacheImpl::CacheData::idAddr() const {
   return m_id.getAddr();
 }
@@ -333,7 +333,7 @@ CacheImpl::defineServiceGroup(
   ServiceGroup const& svc,
   ServiceGroup::Result* result
 ) {
-  uint8 svc_id = svc.getSvcId();
+  uint8_t svc_id = svc.getSvcId();
   GroupMap::iterator spot = m_groups.find(svc_id);
   GroupData* group; // service with target ID.
   ServiceGroup::Result zret;
@@ -392,7 +392,7 @@ CacheImpl::GroupData::cullRouters(time_t
   while ( idx < n ) {
     RouterData& router = m_routers[idx];
     if (router.m_recv.m_time + TIME_UNIT * 3 < now) {
-      uint32 addr = router.m_addr;
+      uint32_t addr = router.m_addr;
       // Clip the router by copying down and resizing.
       // Must do all caches as well.
       --n; // Decrement router counter first.
@@ -445,7 +445,7 @@ Cache::Service::setSecurity(SecurityOpti
 }
 
 CacheImpl&
-CacheImpl::seedRouter(uint8 id, uint32 addr) {
+CacheImpl::seedRouter(uint8_t id, uint32_t addr) {
   GroupMap::iterator spot = m_groups.find(id);
   if (spot != m_groups.end()) spot->second.seedRouter(addr);
   return *this;
@@ -457,7 +457,7 @@ CacheImpl::isConfigured() const {
 }
 
 int
-CacheImpl::open(uint32 addr) {
+CacheImpl::open(uint32_t addr) {
   int zret = this->super::open(addr);
   // If the socket was successfully opened, go through the
   // services and update the local service descriptor.
@@ -573,7 +573,7 @@ CacheImpl::checkRouterAssignment(
   // If group doesn't have an active assignment, always match w/o checking.
   bool zret = ! group.m_assign_info.isActive();
   if (! zret && ! comp.isEmpty()) { // invalid component doesn't match.
-    uint32 nc = comp.getCacheCount();
+    uint32_t nc = comp.getCacheCount();
     // Nothing for it but simple brute force - iterate over every bucket
     // in the assignment and verify the corresponding bucket in the
     // cache bit array is set.
@@ -733,10 +733,10 @@ CacheImpl::handleISeeYou(IpHeader const&
   logf(LVL_DEBUG, "Received WCCP2_I_SEE_YOU for group %d.", group.m_svc.getSvcId());
 
   // Prefered address for router.
-  uint32 router_addr = msg.m_router_id.idElt().getAddr();
+  uint32_t router_addr = msg.m_router_id.idElt().getAddr();
   // Where we sent our packet.
-  uint32 to_addr = msg.m_router_id.getToAddr();
-  uint32 recv_id = msg.m_router_id.idElt().getRecvId();
+  uint32_t to_addr = msg.m_router_id.getToAddr();
+  uint32_t recv_id = msg.m_router_id.idElt().getRecvId();
   RouterBag::iterator ar_spot; // active router
   int router_idx; // index in active routers.
   std::vector< SeedRouter >::iterator seed_spot;
@@ -808,9 +808,9 @@ CacheImpl::handleISeeYou(IpHeader const&
 
   // For all the other listed routers, seed them if they're not
   // already active.
-  uint32 nr = msg.m_router_view.getRouterCount();
-  for ( uint32 idx = 0; idx < nr ; ++idx ) {
-    uint32 addr = msg.m_router_view.getRouterAddr(idx);
+  uint32_t nr = msg.m_router_view.getRouterCount();
+  for ( uint32_t idx = 0; idx < nr ; ++idx ) {
+    uint32_t addr = msg.m_router_view.getRouterAddr(idx);
     if (group.m_routers.end() == find_by_member(group.m_routers, &RouterData::m_addr, addr))
       group.seedRouter(addr);
   }
@@ -819,8 +819,8 @@ CacheImpl::handleISeeYou(IpHeader const&
   // TBD: Must bump view if a router fails to report a cache it reported
   // in its last packet.
   group.resizeCacheSources();
-  uint32 nc = msg.m_router_view.getCacheCount();
-  for ( uint32 idx = 0 ; idx < nc ; ++idx ) {
+  uint32_t nc = msg.m_router_view.getCacheCount();
+  for ( uint32_t idx = 0 ; idx < nc ; ++idx ) {
     CacheIdElt& cache = msg.m_router_view.cacheElt(idx);
     CacheBag::iterator ac_spot = group.findCache(cache.getAddr());
     if (group.m_caches.end() == ac_spot) {
@@ -862,9 +862,9 @@ CacheImpl::handleRemovalQuery(IpHeader c
   if (svc != group.m_svc)
     return logf(LVL_INFO, "WCCP2_REMOVAL_QUERY ignored - service group definition %d does not match.\n", svc.getSvcId());
 
-  uint32 target_addr = msg.m_query.getCacheAddr(); // intended cache
+  uint32_t target_addr = msg.m_query.getCacheAddr(); // intended cache
   if (m_addr == target_addr) {
-    uint32 raddr = msg.m_query.getRouterAddr();
+    uint32_t raddr = msg.m_query.getRouterAddr();
     RouterBag::iterator router = group.findRouter(raddr);
     if (group.m_routers.end() != router) {
       router->m_rapid = true; // do rapid responses.
@@ -895,7 +895,7 @@ CacheImpl::handleRemovalQuery(IpHeader c
   return zret;
 }
 // ------------------------------------------------------
-inline uint32
+inline uint32_t
 RouterImpl::CacheData::idAddr() const {
   return m_id.getAddr();
 }
@@ -903,7 +903,7 @@ RouterImpl::CacheData::idAddr() const {
 RouterImpl::GroupData::GroupData() { }
 
 RouterImpl::CacheBag::iterator
-RouterImpl::GroupData::findCache(uint32 addr) {
+RouterImpl::GroupData::findCache(uint32_t addr) {
   return std::find_if(
     m_caches.begin(),
     m_caches.end(),
@@ -916,7 +916,7 @@ RouterImpl::defineServiceGroup(
   ServiceGroup const& svc,
   ServiceGroup::Result* result
 ) {
-  uint8 svc_id = svc.getSvcId();
+  uint8_t svc_id = svc.getSvcId();
   GroupMap::iterator spot = m_groups.find(svc_id);
   GroupData* group; // service with target ID.
   ServiceGroup::Result zret;
@@ -964,9 +964,9 @@ RouterImpl::handleHereIAm(IpHeader const
     return logf(LVL_INFO, "Service group %d defined by WCCP2_HERE_I_AM.\n", svc.getSvcId());
 
   // Check if this cache is already known.
-  uint32 cache_addr = msg.m_cache_id.getAddr();
+  uint32_t cache_addr = msg.m_cache_id.getAddr();
   int cache_idx;
-  uint32 cache_gen;
+  uint32_t cache_gen;
   CacheBag::iterator cache = group.findCache(cache_addr);
   if (cache == group.m_caches.end()) { // not known
     group.m_caches.push_back(CacheData());
@@ -994,7 +994,7 @@ RouterImpl::handleHereIAm(IpHeader const
   // Add any new routers
   i = msg.m_cache_view.getRouterCount();
   while(i-- > 0) {
-    uint32 addr = msg.m_cache_view.routerElt(i).getAddr();
+    uint32_t addr = msg.m_cache_view.routerElt(i).getAddr();
     RouterBag::iterator spot = find_by_member(group.m_routers, &RouterData::m_addr, addr);
     if (spot == group.m_routers.end()) {
       group.m_routers.push_back(RouterData());
@@ -1130,7 +1130,7 @@ EndPoint::instance() {
   return m_ptr ? m_ptr.get() : this->make();
 }
 
-EndPoint& EndPoint::setAddr(uint32 addr) {
+EndPoint& EndPoint::setAddr(uint32_t addr) {
   this->instance()->m_addr = addr;
   logf(LVL_DEBUG, "Endpoint address set to %s\n", ip_addr_to_str(addr));
   return *this;
@@ -1142,7 +1142,7 @@ EndPoint::isConfigured() const {
 }
 
 int
-EndPoint::open(uint32 addr) {
+EndPoint::open(uint32_t addr) {
   return this->instance()->open(addr);
 }
 
@@ -1207,7 +1207,7 @@ time_t Cache::waitTime() const {
 }
 
 Cache&
-Cache::addSeedRouter(uint8 id, uint32 addr) {
+Cache::addSeedRouter(uint8_t id, uint32_t addr) {
   this->instance()->seedRouter(id, addr);
   return *this;
 }