]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
POSIX: Use u_short everywhere instead of a mix with ushort
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 2 Jun 2011 13:14:51 +0000 (01:14 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 2 Jun 2011 13:14:51 +0000 (01:14 +1200)
compat/os/mswin.h
include/MemPool.h
include/MemPoolChunked.h
src/ClientDelayConfig.cc
src/DelayConfig.cc
src/cache_cf.cc
src/cf.data.depend
src/cf.data.pre
src/tests/testHttpRequest.cc

index 5942fadbbf6c146810397c15937c846bdacc8cb8..299c2bd7d630f01d6fb9e4352cb0282eb2bc5b15 100644 (file)
@@ -161,7 +161,7 @@ typedef unsigned long ino_t;
 #define SIGUSR1 30     /* user defined signal 1 */
 #define SIGUSR2 31     /* user defined signal 2 */
 
-typedef unsigned short int ushort;
+typedef unsigned short int u_short;
 #if !_SQUID_CYGWIN_
 typedef int uid_t;
 typedef int gid_t;
index 126883267c28b9418a6a5b3d0263e1d04f02faad..1b0ff5aaa2b74e28fc6b267054b3d34839b74ee4 100644 (file)
@@ -57,7 +57,7 @@
 /// \ingroup MemPoolsAPI
 #define MEM_MIN_FREE  32
 /// \ingroup MemPoolsAPI
-#define MEM_MAX_FREE  65535    /* ushort is max number of items per chunk */
+#define MEM_MAX_FREE  65535    /* u_short is max number of items per chunk */
 
 class MemImplementingAllocator;
 class MemPoolStats;
index 00657908db4941ceb0d3ef066ba6651df98b8d7a..874f25406c2cc041f63c5cd3091a14de1819db7f 100644 (file)
@@ -12,7 +12,7 @@
 /// \ingroup MemPoolsAPI
 #define MEM_MIN_FREE  32
 /// \ingroup MemPoolsAPI
-#define MEM_MAX_FREE  65535    /* ushort is max number of items per chunk */
+#define MEM_MAX_FREE  65535    /* u_short is max number of items per chunk */
 
 class MemChunk;
 
index d2c1369947871414ac165e24c98518ed696afbfe..bdb670da01349ace0c79151ff27c26fecaebc040 100644 (file)
@@ -58,7 +58,7 @@ void ClientDelayConfig::parsePoolCount()
 
 void ClientDelayConfig::parsePoolRates()
 {
-    ushort pool;
+    u_short pool;
     ConfigParser::ParseUShort(&pool);
 
     if (pool < 1 || pool > pools.size()) {
@@ -74,7 +74,7 @@ void ClientDelayConfig::parsePoolRates()
 
 void ClientDelayConfig::parsePoolAccess(ConfigParser &parser)
 {
-    ushort pool;
+    u_short pool;
 
     ConfigParser::ParseUShort(&pool);
 
index 3ad5a118ea42f91a4e1ea2fc3c7ee1289af8bd21..5691aff9a71014761242a6ae6638c944ed400997 100644 (file)
@@ -60,7 +60,7 @@ DelayConfig::parsePoolCount()
 void
 DelayConfig::parsePoolClass()
 {
-    ushort pool;
+    u_short pool;
 
     ConfigParser::ParseUShort(&pool);
 
@@ -69,7 +69,7 @@ DelayConfig::parsePoolClass()
         return;
     }
 
-    ushort delay_class_;
+    u_short delay_class_;
     ConfigParser::ParseUShort(&delay_class_);
 
     if (delay_class_ < 1 || delay_class_ > 5) {
@@ -85,7 +85,7 @@ DelayConfig::parsePoolClass()
 void
 DelayConfig::parsePoolRates()
 {
-    ushort pool;
+    u_short pool;
     ConfigParser::ParseUShort(&pool);
 
     if (pool < 1 || pool > DelayPools::pools()) {
@@ -106,7 +106,7 @@ DelayConfig::parsePoolRates()
 void
 DelayConfig::parsePoolAccess(ConfigParser &parser)
 {
-    ushort pool;
+    u_short pool;
 
     ConfigParser::ParseUShort(&pool);
 
index 0722bd476e512fa93fd179fc30cdea8866498abb..c424e98240c04558ce1a67a3c68072946fdfc528 100644 (file)
@@ -146,7 +146,7 @@ static void configDoConfigure(void);
 static void parse_refreshpattern(refresh_t **);
 static uint64_t parseTimeUnits(const char *unit,  bool allowMsec);
 static void parseTimeLine(time_msec_t * tptr, const char *units, bool allowMsec);
-static void parse_ushort(u_short * var);
+static void parse_u_short(u_short * var);
 static void parse_string(char **);
 static void default_all(void);
 static void defaults_if_none(void);
@@ -1597,7 +1597,7 @@ free_acl_b_size_t(acl_size_t ** head)
 #include "DelayPools.h"
 #include "DelayConfig.h"
 /* do nothing - free_delay_pool_count is the magic free function.
- * this is why delay_pool_count isn't just marked TYPE: ushort
+ * this is why delay_pool_count isn't just marked TYPE: u_short
  */
 #define free_delay_pool_class(X)
 #define free_delay_pool_access(X)
@@ -1647,7 +1647,7 @@ parse_delay_pool_access(DelayConfig * cfg)
 #if USE_DELAY_POOLS
 #include "ClientDelayConfig.h"
 /* do nothing - free_client_delay_pool_count is the magic free function.
- * this is why client_delay_pool_count isn't just marked TYPE: ushort
+ * this is why client_delay_pool_count isn't just marked TYPE: u_short
  */
 
 #define free_client_delay_pool_access(X)
@@ -3165,19 +3165,19 @@ free_b_int64_t(int64_t * var)
 #define free_kb_int64_t free_b_int64_t
 
 static void
-dump_ushort(StoreEntry * entry, const char *name, u_short var)
+dump_u_short(StoreEntry * entry, const char *name, u_short var)
 {
     storeAppendPrintf(entry, "%s %d\n", name, var);
 }
 
 static void
-free_ushort(u_short * u)
+free_u_short(u_short * u)
 {
     *u = 0;
 }
 
 static void
-parse_ushort(u_short * var)
+parse_u_short(u_short * var)
 {
     ConfigParser::ParseUShort(var);
 }
index fc5f3ff1b27633f375dae964ed4fa8dbb36bcfee..ecd183f37a4bdf694232ea8a68b95aba52c34759 100644 (file)
@@ -61,7 +61,7 @@ time_msec
 time_t
 tristate
 uri_whitespace
-ushort
+u_short
 wccp2_method
 wccp2_amethod
 wccp2_service
index 9d7fb39cde29add85c56620c266d0ae43a68d3bc..96663996042ae8fa0a9b4f35603ae08172f0074d 100644 (file)
@@ -4765,7 +4765,7 @@ LOC: Config.Announce.file
 DOC_NONE
 
 NAME: announce_port
-TYPE: ushort
+TYPE: u_short
 DEFAULT: 3131
 LOC: Config.Announce.port
 DOC_START
@@ -5007,7 +5007,7 @@ DOC_END
 
 NAME: delay_initial_bucket_level
 COMMENT: (percent, 0-100)
-TYPE: ushort
+TYPE: u_short
 DEFAULT: 50
 IFDEF: USE_DELAY_POOLS
 LOC: Config.Delay.initial
@@ -5039,7 +5039,7 @@ DOC_END
 
 NAME: client_delay_initial_bucket_level
 COMMENT: (percent, 0-no_limit)
-TYPE: ushort
+TYPE: u_short
 DEFAULT: 50
 IFDEF: USE_DELAY_POOLS
 LOC: Config.ClientDelay.initial
@@ -5449,7 +5449,7 @@ COMMENT_START
 COMMENT_END
 
 NAME: snmp_port
-TYPE: ushort
+TYPE: u_short
 LOC: Config.Port.snmp
 DEFAULT: 0
 IFDEF: SQUID_SNMP
@@ -5521,7 +5521,7 @@ COMMENT_START
 COMMENT_END
 
 NAME: icp_port udp_port
-TYPE: ushort
+TYPE: u_short
 DEFAULT: 0
 LOC: Config.Port.icp
 DOC_START
@@ -5535,7 +5535,7 @@ DOC_END
 
 NAME: htcp_port
 IFDEF: USE_HTCP
-TYPE: ushort
+TYPE: u_short
 DEFAULT: 0
 LOC: Config.Port.htcp
 DOC_START
@@ -5796,7 +5796,7 @@ DOC_END
 
 NAME: mcast_miss_ttl
 IFDEF: MULTICAST_MISS_STREAM
-TYPE: ushort
+TYPE: u_short
 LOC: Config.mcast_miss.ttl
 DEFAULT: 16
 DOC_START
@@ -5807,7 +5807,7 @@ DOC_END
 
 NAME: mcast_miss_port
 IFDEF: MULTICAST_MISS_STREAM
-TYPE: ushort
+TYPE: u_short
 LOC: Config.mcast_miss.port
 DEFAULT: 3135
 DOC_START
index 054d5d9b413ec2d789e14988c275f12f2515ba1e..a2337de040ce6800581d844b2e3bb5894d6ebc1b 100644 (file)
@@ -33,7 +33,7 @@ void
 testHttpRequest::testCreateFromUrlAndMethod()
 {
     /* vanilla url */
-    ushort expected_port;
+    u_short expected_port;
     char * url = xstrdup("http://foo:90/bar");
     HttpRequest *aRequest = HttpRequest::CreateFromUrlAndMethod(url, METHOD_GET);
     expected_port = 90;
@@ -83,7 +83,7 @@ void
 testHttpRequest::testCreateFromUrl()
 {
     /* vanilla url */
-    ushort expected_port;
+    u_short expected_port;
     char * url = xstrdup("http://foo:90/bar");
     HttpRequest *aRequest = HttpRequest::CreateFromUrl(url);
     expected_port = 90;
@@ -102,7 +102,7 @@ testHttpRequest::testCreateFromUrl()
 void
 testHttpRequest::testIPv6HostColonBug()
 {
-    ushort expected_port;
+    u_short expected_port;
     char * url = NULL;
     HttpRequest *aRequest = NULL;