]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Portability: Drop u_short type
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 27 Aug 2011 14:42:51 +0000 (08:42 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 27 Aug 2011 14:42:51 +0000 (08:42 -0600)
Use uint16_t for precise binary size or unsigned short instead.

47 files changed:
compat/os/mswin.h
helpers/basic_auth/squid_radius_auth/radius.h
helpers/basic_auth/squid_radius_auth/squid_rad_auth.c
helpers/ntlm_auth/fakeauth/fakeauth_auth.c
include/MemPool.h
include/MemPoolChunked.h
include/getaddrinfo.h
include/snmp_session.h
lib/getnameinfo.c
src/ConfigParser.h
src/DelayConfig.cc
src/DelayPools.h
src/HttpRequest.h
src/Parsing.cc
src/Parsing.h
src/Store.h
src/StoreMeta.h
src/StoreSwapLogData.h
src/cache_cf.cc
src/comm.cc
src/comm.h
src/defines.h
src/delay_pools.cc
src/errorpage.h
src/fde.h
src/fs/ufs/ufscommon.cc
src/ftp.cc
src/htcp.cc
src/icmp/Icmp4.cc
src/icmp/Icmp6.cc
src/internal.cc
src/ip/IpAddress.cc
src/ip/IpAddress.h
src/ip/testIpAddress.cc
src/main.cc
src/neighbors.cc
src/pconn.cc
src/pconn.h
src/protos.h
src/send-announce.cc
src/structs.h
src/tests/stub_cache_cf.cc
src/tests/testHttpRequest.cc
src/tunnel.cc
src/ufsdump.cc
src/url.cc
src/wccp2.cc

index cfa2f3790a2a7a90aca4f91a1a13dff71b73532c..4c7a11fae6a61f6b23be0007cd462bc731eb60a7 100644 (file)
@@ -176,7 +176,6 @@ typedef unsigned long ino_t;
 #define SIGUSR1 30     /* user defined signal 1 */
 #define SIGUSR2 31     /* user defined signal 2 */
 
-typedef unsigned short int ushort;
 #if !_SQUID_CYGWIN_
 typedef int uid_t;
 typedef int gid_t;
index aa5f3d6a7c6811e0695655a3878f8bea5817286e..fc16ed72ee7941588056a93ef417e5e627d1887d 100644 (file)
@@ -37,7 +37,7 @@
 typedef struct pw_auth_hdr {
     u_char             code;
     u_char             id;
-    u_short            length;
+    uint16_t           length;
     u_char             vector[AUTH_VECTOR_LEN];
     u_char             data[2];
 } AUTH_HDR;
index ea4c0686f76bcf1ad07261fc4f927ed424a2afa2..868756db84764760f82e8c336e913ac706f6f0df 100644 (file)
@@ -175,7 +175,7 @@ md5_calc(uint8_t out[16], void *in, size_t len)
  *    Receive and verify the result.
  */
 static int
-result_recv(u_int32_t host, u_short udp_port, char *buffer, int length)
+result_recv(uint32_t host, unsigned short udp_port, char *buffer, int length)
 {
     AUTH_HDR *auth;
     int totallen;
@@ -292,7 +292,7 @@ static int
 authenticate(int socket_fd, const char *username, const char *passwd)
 {
     AUTH_HDR *auth;
-    u_short total_length;
+    unsigned short total_length;
     u_char *ptr;
     int length;
     char passbuf[MAXPASS];
@@ -457,7 +457,7 @@ main(int argc, char **argv)
     struct sockaddr_in salocal;
     struct sockaddr_in saremote;
     struct servent *svp;
-    u_short svc_port;
+    unsigned short svc_port;
     char username[MAXPWNAM];
     char passwd[MAXPASS];
     char *ptr;
@@ -519,7 +519,7 @@ main(int argc, char **argv)
      */
     svp = getservbyname(svc_name, "udp");
     if (svp != NULL)
-        svc_port = ntohs((u_short) svp->s_port);
+        svc_port = ntohs((unsigned short) svp->s_port);
     else
         svc_port = atoi(svc_name);
     if (svc_port == 0)
index eee401d6e5ece63de2bc9353cf44e667e109467e..7ce98b3b7fc237cb54dfcb4e178b825aa73d6550 100644 (file)
@@ -211,7 +211,7 @@ char *
 ntlmGetString(ntlmhdr * hdr, strhdr * str, int flags)
 {
     static char buf[512];
-    u_short *s, c;
+    unsigned short *s, c;
     char *d, *sc;
     int l, o;
 
@@ -225,7 +225,7 @@ ntlmGetString(ntlmhdr * hdr, strhdr * str, int flags)
     }
     if ((flags & NEGOTIATE_ASCII) == 0) {
         /* UNICODE string */
-        s = (u_short *) ((char *) hdr + o);
+        s = (unsigned short *) ((char *) hdr + o);
         d = buf;
 
         for (l >>= 1; l; s++, l--) {
index 0702e49e1219832322ea0148f9e2be1afcd31406..45a707cad4dc8488f5faf823bd8edb2a1f128097 100644 (file)
@@ -58,7 +58,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    /* unsigned short is max number of items per chunk */
 
 class MemImplementingAllocator;
 class MemPoolStats;
index 00657908db4941ceb0d3ef066ba6651df98b8d7a..78b24b83a0698ed33747698dda465fae0ec215a4 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    /* unsigned short is max number of items per chunk */
 
 class MemChunk;
 
index f0ca67ace22bb5df3b82245c275e2de49abe70b6..ec34ca19e95f68b308cea2b5851671033b8c1575 100644 (file)
@@ -108,14 +108,6 @@ SQUIDCEXTERN void xfreeaddrinfo (struct addrinfo *ai);
 
 /* Convert error return from getaddrinfo() to string */
 SQUIDCEXTERN const char *xgai_strerror (int code);
-<<<<<<< TREE
-=======
-#if !defined(gai_strerror)
-    >>>>>>> MERGE-SOURCE
-    <<<<<<< TREE
-    =======
-#endif
-        >>>>>>> MERGE-SOURCE
 
 #endif /* HAVE_GETADDRINFO */
 
index f46e455b1d21d8c102c56dcdb1f5fc9c1d232b75..167fee159f934a3adeb7f13a6ed0fcf08ec069d8 100644 (file)
@@ -38,8 +38,8 @@ struct snmp_session {
     int retries;               /* Number of retries before timeout. */
     int timeout;               /* Number of uS until first timeout, then exponential backoff */
     char *peername;            /* Domain name or dotted IP address of default peer */
-    u_short remote_port;       /* UDP port number of peer. */
-    u_short local_port;                /* My UDP port number, 0 for default, picked randomly */
+    unsigned short remote_port;        /* UDP port number of peer. */
+    unsigned short local_port;         /* My UDP port number, 0 for default, picked randomly */
 };
 
 #define RECEIVED_MESSAGE   1
index b598e1a59738f1181e09924e9f1a93f8f4454697..34ea48f0084fa4f1abebed1ebe3e94a3a4033ea8 100644 (file)
@@ -159,7 +159,7 @@ int flags;
     const struct afd *afd;
     struct servent *sp;
     struct hostent *hp;
-    u_short port;
+    unsigned short port;
     int family, i;
     const char *addr;
     u_int32_t v4a;
index 4d5a25ba6abdeca4ad4282f0a5343fd52409aaaa..3d47369d1fb47d6b991432fb48c394e6f46b84d2 100644 (file)
@@ -63,7 +63,7 @@ class ConfigParser
 
 public:
     void destruct();
-    static void ParseUShort(u_short *var);
+    static void ParseUShort(unsigned short *var);
     static void ParseBool(bool *var);
     static void ParseString(char **var);
     static void ParseString(String *var);
index fe2aefca56beb7d1f1f5438e9bf1e8f9220bbfa9..8ef0973dbf7eb9cb829ee4e73ce5d979b1a8918b 100644 (file)
@@ -52,7 +52,7 @@
 void
 DelayConfig::parsePoolCount()
 {
-    u_short pools_;
+    unsigned short pools_;
     ConfigParser::ParseUShort(&pools_);
     DelayPools::pools(pools_);
 }
@@ -60,7 +60,7 @@ DelayConfig::parsePoolCount()
 void
 DelayConfig::parsePoolClass()
 {
-    ushort pool;
+    unsigned short pool;
 
     ConfigParser::ParseUShort(&pool);
 
@@ -69,7 +69,7 @@ DelayConfig::parsePoolClass()
         return;
     }
 
-    ushort delay_class_;
+    unsigned 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;
+    unsigned short pool;
     ConfigParser::ParseUShort(&pool);
 
     if (pool < 1 || pool > DelayPools::pools()) {
@@ -106,7 +106,7 @@ DelayConfig::parsePoolRates()
 void
 DelayConfig::parsePoolAccess(ConfigParser &parser)
 {
-    ushort pool;
+    unsigned short pool;
 
     ConfigParser::ParseUShort(&pool);
 
index 4f258cea083cb218d9dc00869423afec97e96ebc..f7ff974e098e7b60247d48331744369187ab6457 100644 (file)
@@ -65,7 +65,7 @@ public:
     static void Init();
     static void Update(void *);
     static unsigned short pools();
-    static void pools (u_short pools);
+    static void pools(unsigned short pools);
     static void FreePools();
     static unsigned char *DelayClasses();
     static void registerForUpdates(Updateable *);
index 974abd08b25adf496df41ae6e1afaf06cf63834c..efd306398ce6b2537f42ba429e3609e42edc225a 100644 (file)
@@ -151,7 +151,7 @@ public:
 
     AuthUserRequest *auth_user_request;
 
-    u_short port;
+    unsigned short port;
 
     String urlpath;
 
index 595bab9dcbffc84973ec9a299e07cba08fe33f0f..7bab1c78b14b0ad82dc1242e0d54a33cd609cef7 100644 (file)
@@ -110,7 +110,7 @@ GetInteger(void)
     return i;
 }
 
-u_short
+unsigned short
 GetShort(void)
 {
     char *token = strtok(NULL, w_space);
index 69882a54a5addd4da99f1dca1f0a3f10e2b75737..96c917581ef3b8a141a3f0ce7cfa853c45edba8b 100644 (file)
@@ -54,7 +54,7 @@ extern int64_t GetInteger64(void);
  */
 extern int GetInteger(void);
 
-extern u_short GetShort(void);
+extern unsigned short GetShort(void);
 
 // on success, returns true and sets *p (if any) to the end of the integer
 extern bool StringToInt(const char *str, int &result, const char **p, int base);
index f117d27c0eeff5fcd38b5e2db6fa30aa0f78c087..516745ab36b228136026eaf1636f4e00a6430805 100644 (file)
@@ -139,15 +139,15 @@ public:
     time_t expires;
     time_t lastmod;
     uint64_t swap_file_sz;
-    u_short refcount;
-    u_short flags;
+    uint16_t refcount;
+    uint16_t flags;
     /* END OF ON-DISK STORE_META_STD */
 
     sfileno swap_filen:25;
 
     sdirno swap_dirn:7;
 
-    u_short lock_count;                /* Assume < 65536! */
+    unsigned short lock_count;         /* Assume < 65536! */
 
     mem_status_t mem_status:3;
 
index 50f3fca36b820e5a948a341c97a45bbede069d6c..596cc72ff67b68bd97838753495a52bcf9a0478f 100644 (file)
@@ -101,9 +101,9 @@ enum {
         time_t lastref;
         time_t expires;
         time_t lastmod;
-        size_t swap_file_sz;
-        u_short refcount;
-        u_short flags;
+        uint64_t swap_file_sz;
+        uint16_t refcount;
+        uint16_t flags;
      \endcode
      */
     STORE_META_STD,
index dbd576bc4dbbe059048724bd983c27c088b5ad9b..5fad46944fde8b61231e9a0d9696e365d7d8da9b 100644 (file)
@@ -146,14 +146,14 @@ public:
      * Since its a 16-bit quantity, it is susceptible to overflow
      * if a single object is accessed 65,536 times before being replaced.
      */
-    u_short refcount;
+    uint16_t refcount;
 
     /**
      * A copy of the StoreEntry flags field. Used as a sanity
      * check when rebuilding the cache at startup. Objects that
      * have the KEY_PRIVATE flag set are not added back to the cache.
      */
-    u_short flags;
+    uint16_t flags;
 
     /**
      * The 128-bit MD5 hash for this object.
index c556e34e7140787380246ada54755899f6f4e081..17d11dba2cfe542812942a3b5d41bf5baf4afcfa 100644 (file)
@@ -133,7 +133,7 @@ static void configDoConfigure(void);
 static void parse_refreshpattern(refresh_t **);
 static int parseTimeUnits(const char *unit);
 static void parseTimeLine(time_t * tptr, const char *units);
-static void parse_ushort(u_short * var);
+static void parse_ushort(unsigned short * var);
 static void parse_string(char **);
 static void default_all(void);
 static void defaults_if_none(void);
@@ -1758,7 +1758,7 @@ isUnsignedNumeric(const char *str, size_t len)
  \param proto  'tcp' or 'udp' for protocol
  \returns       Port the named service is supposed to be listening on.
  */
-static u_short
+static unsigned short
 GetService(const char *proto)
 {
     struct servent *port = NULL;
@@ -1772,7 +1772,7 @@ GetService(const char *proto)
     if ( !isUnsignedNumeric(token, strlen(token)) )
         port = getservbyname(token, proto);
     if (port != NULL) {
-        return ntohs((u_short)port->s_port);
+        return ntohs((unsigned short)port->s_port);
     }
     /** Or a numeric translation of the config text. */
     return xatos(token);
@@ -1782,7 +1782,7 @@ GetService(const char *proto)
  \returns       Port the named TCP service is supposed to be listening on.
  \copydoc GetService(const char *proto)
  */
-inline u_short
+inline unsigned short
 GetTcpService(void)
 {
     return GetService("tcp");
@@ -1792,7 +1792,7 @@ GetTcpService(void)
  \returns       Port the named UDP service is supposed to be listening on.
  \copydoc GetService(const char *proto)
  */
-inline u_short
+inline unsigned short
 GetUdpService(void)
 {
     return GetService("udp");
@@ -2760,25 +2760,25 @@ 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_ushort(StoreEntry * entry, const char *name, unsigned short var)
 {
     storeAppendPrintf(entry, "%s %d\n", name, var);
 }
 
 static void
-free_ushort(u_short * u)
+free_ushort(unsigned short * u)
 {
     *u = 0;
 }
 
 static void
-parse_ushort(u_short * var)
+parse_ushort(unsigned short * var)
 {
     ConfigParser::ParseUShort(var);
 }
 
 void
-ConfigParser::ParseUShort(u_short *var)
+ConfigParser::ParseUShort(unsigned short *var)
 {
     *var = GetShort();
 }
index e9a87b18fb4c61a85d522248fa884ae4083a65b7..aff238b425e53811f48e672aa97410ff58419312 100644 (file)
@@ -207,7 +207,7 @@ public:
 
 // defaults given by client
     char *host;
-    u_short default_port;
+    unsigned short default_port;
     IpAddress default_addr;
     // NP: CANNOT store the default addr:port together as it gets set/reset differently.
 
@@ -546,7 +546,7 @@ comm_has_incomplete_write(int fd)
  */
 
 /* Return the local port associated with fd. */
-u_short
+unsigned short
 comm_local_port(int fd)
 {
     IpAddress temp;
@@ -794,7 +794,7 @@ comm_openex(int sock_type,
     if ((flags & COMM_REUSEADDR))
         commSetReuseAddr(new_socket);
 
-    if (addr.GetPort() > (u_short) 0) {
+    if (addr.GetPort() > (unsigned short) 0) {
 #ifdef _SQUID_MSWIN_
         if (sock_type != SOCK_DGRAM)
 #endif
@@ -863,7 +863,7 @@ ConnectStateData::operator delete (void *address)
 
 
 void
-commConnectStart(int fd, const char *host, u_short port, AsyncCall::Pointer &cb)
+commConnectStart(int fd, const char *host, unsigned short port, AsyncCall::Pointer &cb)
 {
     debugs(cb->debugSection, cb->debugLevel, "commConnectStart: FD " << fd <<
            ", cb " << cb << ", " << host << ":" << port); // TODO: just print *cb
@@ -884,7 +884,7 @@ commConnectStart(int fd, const char *host, u_short port, AsyncCall::Pointer &cb)
 // a generic call name and debug level when creating an AsyncCall. This will
 // also cut the number of callback registration routines in half.
 void
-commConnectStart(int fd, const char *host, u_short port, CNCB * callback, void *data)
+commConnectStart(int fd, const char *host, unsigned short port, CNCB * callback, void *data)
 {
     debugs(5, 5, "commConnectStart: FD " << fd << ", data " << data << ", " << host << ":" << port);
     AsyncCall::Pointer call = commCbCall(5,3,
index fed7d70aecea901db483c3fc9c5df2169bac6990..2c9a5bc4cae722cff3bae8210559a1b4d7317966 100644 (file)
@@ -46,8 +46,8 @@ SQUIDCEXTERN void comm_reset_close(int fd);
 #if LINGERING_CLOSE
 SQUIDCEXTERN void comm_lingering_close(int fd);
 #endif
-SQUIDCEXTERN void commConnectStart(int fd, const char *, u_short, CNCB *, void *);
-void commConnectStart(int fd, const char *, u_short, AsyncCall::Pointer &cb);
+SQUIDCEXTERN void commConnectStart(int fd, const char *, unsigned short, CNCB *, void *);
+void commConnectStart(int fd, const char *, unsigned short, AsyncCall::Pointer &cb);
 
 SQUIDCEXTERN int comm_connect_addr(int sock, const IpAddress &addr);
 SQUIDCEXTERN void comm_init(void);
@@ -73,7 +73,7 @@ SQUIDCEXTERN int comm_open(int, int, IpAddress &, int, const char *note);
 SQUIDCEXTERN int comm_open_listener(int sock_type, int proto, IpAddress &addr, int flags, const char *note);
 
 SQUIDCEXTERN int comm_openex(int, int, IpAddress &, int, unsigned char TOS, const char *);
-SQUIDCEXTERN u_short comm_local_port(int fd);
+SQUIDCEXTERN unsigned short comm_local_port(int fd);
 SQUIDCEXTERN int comm_set_tos(int fd, int tos);
 
 SQUIDCEXTERN void commSetSelect(int, unsigned int, PF *, void *, time_t);
index dc4e7ea5e44448662567409ca48e9be31b4641f6..9dca48c6231212db5e997d1b0db1270266e9accc 100644 (file)
 #define SwapMetaType(x) (char)x[0]
 #define SwapMetaSize(x) &x[sizeof(char)]
 #define SwapMetaData(x) &x[STORE_META_TLD_START]
-#define STORE_HDR_METASIZE (4*sizeof(time_t)+2*sizeof(u_short)+sizeof(uint64_t))
-#define STORE_HDR_METASIZE_OLD (4*sizeof(time_t)+2*sizeof(u_short)+sizeof(size_t))
+#define STORE_HDR_METASIZE (4*sizeof(time_t)+2*sizeof(uint16_t)+sizeof(uint64_t))
+#define STORE_HDR_METASIZE_OLD (4*sizeof(time_t)+2*sizeof(uint16_t)+sizeof(size_t))
 
 #define COUNT_INTERVAL 60
 /*
index 8c6d8722873973746b789cc3d4aa86c3732b07d9..da7c0b37546ecaa45f9dc8d6e6b230b5434b6534 100644 (file)
@@ -667,7 +667,7 @@ DelayPools::pools()
 }
 
 void
-DelayPools::pools (u_short newPools)
+DelayPools::pools(unsigned short newPools)
 {
     if (pools()) {
         debugs(3, 0, "parse_delay_pool_count: multiple delay_pools lines, aborting all previous delay_pools config");
index 880a4316222ccefea0c9c5ce93b69357268ed0b4..4d58370336d813fafe23e980e947d2fc598853fc 100644 (file)
@@ -132,7 +132,7 @@ public:
     HttpRequest *request;
     char *url;
     int xerrno;
-    u_short port;
+    unsigned short port;
     String dnsError; ///< DNS lookup error message
     time_t ttl;
 
index eb4b6b5900e1347a4f1fa1039980c5755d1b0868..8bad6ca39db2c5a3902e5a88050233a24cf19f8f 100644 (file)
--- a/src/fde.h
+++ b/src/fde.h
@@ -53,7 +53,7 @@ public:
     void noteUse(PconnPool *);
 
     unsigned int type;
-    u_short remote_port;
+    unsigned short remote_port;
 
     IpAddress local_addr;
     unsigned char tos;
index af21f233bb322a997fbe8bd23f1ef48c3642def8..6da30515330ce2e88e6397080e0c34673483faf5 100644 (file)
@@ -61,8 +61,8 @@ public:
         time_t expires;
         time_t lastmod;
         uint32_t swap_file_sz;
-        u_short refcount;
-        u_short flags;
+        uint16_t refcount;
+        uint16_t flags;
         unsigned char key[SQUID_MD5_DIGEST_LENGTH];
     };
     UFSSwapLogParser_v1_32bs(FILE *fp):UFSSwapLogParser(fp) {
@@ -109,8 +109,8 @@ public:
         int32_t expires;
         int32_t lastmod;
         uint32_t swap_file_sz;
-        u_short refcount;
-        u_short flags;
+        uint16_t refcount;
+        uint16_t flags;
         unsigned char key[SQUID_MD5_DIGEST_LENGTH];
     };
     UFSSwapLogParser_v1_32bst(FILE *fp):UFSSwapLogParser(fp) {
@@ -155,8 +155,8 @@ public:
         time_t expires;
         time_t lastmod;
         uint64_t swap_file_sz;
-        u_short refcount;
-        u_short flags;
+        uint16_t refcount;
+        uint16_t flags;
         unsigned char key[SQUID_MD5_DIGEST_LENGTH];
     };
     UFSSwapLogParser_v1_64bfn(FILE *fp):UFSSwapLogParser(fp) {
@@ -378,8 +378,8 @@ struct InitStoreEntry : public unary_function<StoreMeta, void> {
                 time_t expires;
                 time_t lastmod;
                 size_t swap_file_sz;
-                u_short refcount;
-                u_short flags;
+                uint16_t refcount;
+                uint16_t flags;
             } *tmp;
             tmp = (struct old_metahdr *)x.value;
             assert(x.length == STORE_HDR_METASIZE_OLD);
index 0683c7847c0b6923ceb897b9ab51c4a59c681fb9..59b71832e4c698386ca7ac981fc900f9697d011f 100644 (file)
@@ -202,7 +202,7 @@ public:
     struct DataChannel: public FtpChannel {
         MemBuf *readBuf;
         char *host;
-        u_short port;
+        unsigned short port;
         bool read_pending;
     } data;
 
@@ -2452,7 +2452,7 @@ ftpReadEPSV(FtpStateData* ftpState)
 {
     int code = ftpState->ctrl.replycode;
     char h1, h2, h3, h4;
-    u_short port;
+    unsigned short port;
     IpAddress ipa_remote;
     int fd = ftpState->data.fd;
     char *buf;
@@ -2756,7 +2756,7 @@ ftpReadPasv(FtpStateData * ftpState)
     int h1, h2, h3, h4;
     int p1, p2;
     int n;
-    u_short port;
+    unsigned short port;
     IpAddress ipa_remote;
     int fd = ftpState->data.fd;
     char *buf;
index 4d164d12308764d7cbdef690c12d6061f3e89e31..e3b0e8944b81ae47a66502b6bacd932c92b75c40 100644 (file)
@@ -447,12 +447,12 @@ htcpBuildTstOpData(char *buf, size_t buflen, htcpStuff * stuff)
 static ssize_t
 htcpBuildClrOpData(char *buf, size_t buflen, htcpStuff * stuff)
 {
-    u_short reason;
+    unsigned short reason;
 
     switch (stuff->rr) {
     case RR_REQUEST:
         debugs(31, 3, "htcpBuildClrOpData: RR_REQUEST");
-        reason = htons((u_short)stuff->reason);
+        reason = htons((unsigned short)stuff->reason);
         xmemcpy(buf, &reason, 2);
         return htcpBuildSpecifier(buf + 2, buflen - 2, stuff) + 2;
     case RR_RESPONSE:
index e2bffad3c643c26f9a176b7a3619daa4ce168a5f..20382d0b79a39222bbd20b7c9b00e3a06caf2a39 100644 (file)
@@ -117,7 +117,7 @@ Icmp4::SendEcho(IpAddress &to, int opcode, const char *payload, int len)
     icmp->icmp_code = 0;
     icmp->icmp_cksum = 0;
     icmp->icmp_id = icmp_ident;
-    icmp->icmp_seq = (u_short) icmp_pkts_sent++;
+    icmp->icmp_seq = (unsigned short) icmp_pkts_sent++;
 
     // Construct ICMP packet data content
     echo = (icmpEchoData *) (icmp + 1);
@@ -135,7 +135,7 @@ Icmp4::SendEcho(IpAddress &to, int opcode, const char *payload, int len)
         icmp_pktsize += len;
     }
 
-    icmp->icmp_cksum = CheckSum((u_short *) icmp, icmp_pktsize);
+    icmp->icmp_cksum = CheckSum((unsigned short *) icmp, icmp_pktsize);
 
     to.GetAddrInfo(S);
     ((sockaddr_in*)S->ai_addr)->sin_port = 0;
index f37e23766de8fbc3be1cb88330020408fb1f44d7..945916daa71db093e8f69765e161c260c9466f2e 100644 (file)
@@ -158,7 +158,7 @@ Icmp6::SendEcho(IpAddress &to, int opcode, const char *payload, int len)
     icmp->icmp6_code = 0;
     icmp->icmp6_cksum = 0;
     icmp->icmp6_id = icmp_ident;
-    icmp->icmp6_seq = (u_short) icmp_pkts_sent++;
+    icmp->icmp6_seq = (unsigned short) icmp_pkts_sent++;
 
     icmp6_pktsize = sizeof(struct icmp6_hdr);
 
@@ -179,7 +179,7 @@ Icmp6::SendEcho(IpAddress &to, int opcode, const char *payload, int len)
         icmp6_pktsize += len;
     }
 
-    icmp->icmp6_cksum = CheckSum((u_short *) icmp, icmp6_pktsize);
+    icmp->icmp6_cksum = CheckSum((unsigned short *) icmp, icmp6_pktsize);
 
     to.GetAddrInfo(S);
     ((sockaddr_in6*)S->ai_addr)->sin6_port = 0;
index 5b4ccdbe6bf00c95895550de52bfec32add43c61..c3edf1cf621931be702e1cac0ec3903daf9d9f3d 100644 (file)
@@ -93,7 +93,7 @@ internalStaticCheck(const char *urlpath)
  * makes internal url with a given host and port (remote internal url)
  */
 char *
-internalRemoteUri(const char *host, u_short port, const char *dir, const char *name)
+internalRemoteUri(const char *host, unsigned short port, const char *dir, const char *name)
 {
     static char lc_host[SQUIDHOSTNAMELEN];
     assert(host && name);
index f13da467ad4e292aec7bbbf3de549c62910f5703..8ea0d06b477aad7cf23ad942e9aa254aee1423a6 100644 (file)
@@ -741,12 +741,14 @@ bool IpAddress::operator <(const IpAddress &rhs) const
     return ( matchIPAddr(rhs) < 0);
 }
 
-u_short IpAddress::GetPort() const
+unsigned short
+IpAddress::GetPort() const
 {
     return ntohs( m_SocketAddr.sin6_port );
 }
 
-u_short IpAddress::SetPort(u_short prt)
+unsigned short
+IpAddress::SetPort(unsigned short prt)
 {
     m_SocketAddr.sin6_port = htons(prt);
 
index 0933c653fb1bd3a4d5afa0961a2a30c7b9648ae2..f6542e3db8c50ce792180cb91eb086e1b0efb109 100644 (file)
@@ -176,7 +176,7 @@ public:
      \retval 0 Port is unset or an error occured.
      \retval n Port associated with this address in host native -endian.
      */
-    u_short GetPort() const;
+    unsigned short GetPort() const;
 
     /** Set the Port value for an address.
      *  Replaces any previously existing Port value.
@@ -184,7 +184,7 @@ public:
      \retval 0 Port is unset or an error occured.
      \retval n Port associated with this address in host native -endian.
      */
-    u_short SetPort(u_short port);
+    unsigned short SetPort(unsigned short port);
 
     /// Set object to contain the specific IP case ANY_ADDR (format-neutral).
     /// see IsAnyAddr() for more detail.
index 0048808fa6152a9ea6d937b268e62e0ca441b090..e908b06972368d0142f769ef94dfcffa216c1d99 100644 (file)
@@ -41,7 +41,7 @@ testIpAddress::testDefaults()
     CPPUNIT_ASSERT( !anIPA.IsNoAddr() );
     CPPUNIT_ASSERT( anIPA.IsIPv4() );
     CPPUNIT_ASSERT( !anIPA.IsSockAddr() );
-    CPPUNIT_ASSERT_EQUAL( (u_short) 0 , anIPA.GetPort() );
+    CPPUNIT_ASSERT_EQUAL( (unsigned short) 0 , anIPA.GetPort() );
     CPPUNIT_ASSERT( anIPA.IsIPv6() );
 }
 
@@ -62,7 +62,7 @@ testIpAddress::testInAddrConstructor()
     CPPUNIT_ASSERT( anIPA.IsIPv4() );
     CPPUNIT_ASSERT( !anIPA.IsIPv6() );
     CPPUNIT_ASSERT( !anIPA.IsSockAddr() );
-    CPPUNIT_ASSERT_EQUAL( (u_short) 0 , anIPA.GetPort() );
+    CPPUNIT_ASSERT_EQUAL( (unsigned short) 0 , anIPA.GetPort() );
     anIPA.GetInAddr(outval);
     CPPUNIT_ASSERT( memcmp(&inval, &outval, sizeof(struct in_addr)) == 0 );
 }
@@ -86,7 +86,7 @@ testIpAddress::testInAddr6Constructor()
     CPPUNIT_ASSERT( !anIPA.IsIPv4() );
     CPPUNIT_ASSERT( anIPA.IsIPv6() );
     CPPUNIT_ASSERT( !anIPA.IsSockAddr() );
-    CPPUNIT_ASSERT_EQUAL( (u_short) 0 , anIPA.GetPort() );
+    CPPUNIT_ASSERT_EQUAL( (unsigned short) 0 , anIPA.GetPort() );
     anIPA.GetInAddr(outval);
     CPPUNIT_ASSERT( memcmp( &inval, &outval, sizeof(struct in6_addr)) == 0 );
 }
@@ -115,7 +115,7 @@ testIpAddress::testSockAddrConstructor()
     CPPUNIT_ASSERT( anIPA.IsIPv4() );
     CPPUNIT_ASSERT( !anIPA.IsIPv6() );
     CPPUNIT_ASSERT( anIPA.IsSockAddr() );
-    CPPUNIT_ASSERT_EQUAL( (u_short) 80 , anIPA.GetPort() );
+    CPPUNIT_ASSERT_EQUAL( (unsigned short) 80 , anIPA.GetPort() );
     anIPA.GetSockAddr(outsock);
     CPPUNIT_ASSERT( memcmp( &insock, &outsock, sizeof(struct sockaddr_in)) == 0 );
 }
@@ -147,7 +147,7 @@ testIpAddress::testSockAddr6Constructor()
     CPPUNIT_ASSERT( !anIPA.IsIPv4() );
     CPPUNIT_ASSERT( anIPA.IsIPv6() );
     CPPUNIT_ASSERT( anIPA.IsSockAddr() );
-    CPPUNIT_ASSERT_EQUAL( (u_short) 80 , anIPA.GetPort() );
+    CPPUNIT_ASSERT_EQUAL( (unsigned short) 80 , anIPA.GetPort() );
     anIPA.GetSockAddr(outsock);
     CPPUNIT_ASSERT( memcmp( &insock, &outsock, sizeof(struct sockaddr_in6)) == 0 );
 }
@@ -179,7 +179,7 @@ testIpAddress::testCopyConstructor()
     CPPUNIT_ASSERT( outIPA.IsIPv4() );
     CPPUNIT_ASSERT( !outIPA.IsIPv6() );
     CPPUNIT_ASSERT( outIPA.IsSockAddr() );
-    CPPUNIT_ASSERT_EQUAL( (u_short) 80 , outIPA.GetPort() );
+    CPPUNIT_ASSERT_EQUAL( (unsigned short) 80 , outIPA.GetPort() );
     outIPA.GetSockAddr(outsock);
     CPPUNIT_ASSERT( memcmp( &insock, &outsock, sizeof(struct sockaddr_in)) == 0 );
 }
@@ -204,7 +204,7 @@ testIpAddress::testHostentConstructor()
     CPPUNIT_ASSERT( anIPA.IsIPv4() );
     CPPUNIT_ASSERT( !anIPA.IsIPv6() );
     CPPUNIT_ASSERT( !anIPA.IsSockAddr() );
-    CPPUNIT_ASSERT_EQUAL( (u_short) 0 , anIPA.GetPort() );
+    CPPUNIT_ASSERT_EQUAL( (unsigned short) 0 , anIPA.GetPort() );
     anIPA.GetInAddr(outval);
     CPPUNIT_ASSERT( memcmp( &expectval, &outval, sizeof(struct in_addr)) == 0 );
 }
@@ -224,7 +224,7 @@ testIpAddress::testStringConstructor()
     CPPUNIT_ASSERT( !anIPA.IsNoAddr() );
     CPPUNIT_ASSERT( anIPA.IsIPv4() );
     CPPUNIT_ASSERT( !anIPA.IsIPv6() );
-    CPPUNIT_ASSERT_EQUAL( (u_short) 0 , anIPA.GetPort() );
+    CPPUNIT_ASSERT_EQUAL( (unsigned short) 0 , anIPA.GetPort() );
     CPPUNIT_ASSERT( !anIPA.IsSockAddr() );
     anIPA.GetInAddr(outval);
     CPPUNIT_ASSERT( memcmp( &expectval, &outval, sizeof(struct in_addr)) == 0 );
@@ -249,7 +249,7 @@ testIpAddress::testStringConstructor()
     CPPUNIT_ASSERT( !bnIPA.IsIPv4() );
     CPPUNIT_ASSERT(  bnIPA.IsIPv6() );
     CPPUNIT_ASSERT( !bnIPA.IsSockAddr() );
-    CPPUNIT_ASSERT_EQUAL( (u_short) 0 , bnIPA.GetPort() );
+    CPPUNIT_ASSERT_EQUAL( (unsigned short) 0 , bnIPA.GetPort() );
     bnIPA.GetInAddr(outval6);
     CPPUNIT_ASSERT( memcmp( &expectv6, &outval6, sizeof(struct in6_addr)) == 0 );
 
@@ -267,7 +267,7 @@ testIpAddress::testStringConstructor()
     CPPUNIT_ASSERT( !cnIPA.IsIPv4() );
     CPPUNIT_ASSERT( cnIPA.IsIPv6() );
     CPPUNIT_ASSERT( !cnIPA.IsSockAddr() );
-    CPPUNIT_ASSERT_EQUAL( (u_short) 0 , cnIPA.GetPort() );
+    CPPUNIT_ASSERT_EQUAL( (unsigned short) 0 , cnIPA.GetPort() );
     cnIPA.GetInAddr(outval6);
     CPPUNIT_ASSERT( memcmp( &expectv6, &outval6, sizeof(struct in6_addr)) == 0 );
 }
@@ -288,7 +288,7 @@ testIpAddress::testSetEmpty()
     CPPUNIT_ASSERT( anIPA.IsIPv4() );
     CPPUNIT_ASSERT( !anIPA.IsIPv6() );
     CPPUNIT_ASSERT( !anIPA.IsSockAddr() );
-    CPPUNIT_ASSERT_EQUAL( (u_short) 0 , anIPA.GetPort() );
+    CPPUNIT_ASSERT_EQUAL( (unsigned short) 0 , anIPA.GetPort() );
 
     anIPA.SetEmpty();
 
@@ -298,7 +298,7 @@ testIpAddress::testSetEmpty()
     CPPUNIT_ASSERT( anIPA.IsIPv4() );
     CPPUNIT_ASSERT( anIPA.IsIPv6() );
     CPPUNIT_ASSERT( !anIPA.IsSockAddr() );
-    CPPUNIT_ASSERT_EQUAL( (u_short) 0 , anIPA.GetPort() );
+    CPPUNIT_ASSERT_EQUAL( (unsigned short) 0 , anIPA.GetPort() );
 }
 
 void
@@ -722,7 +722,7 @@ testIpAddress::testBugNullingDisplay()
     CPPUNIT_ASSERT( !anIPA.IsNoAddr() );
     CPPUNIT_ASSERT( anIPA.IsIPv4() );
     CPPUNIT_ASSERT( !anIPA.IsIPv6() );
-    CPPUNIT_ASSERT_EQUAL( (u_short) 0 , anIPA.GetPort() );
+    CPPUNIT_ASSERT_EQUAL( (unsigned short) 0 , anIPA.GetPort() );
     CPPUNIT_ASSERT( !anIPA.IsSockAddr() );
     anIPA.GetInAddr(outval);
     CPPUNIT_ASSERT( memcmp( &expectval, &outval, sizeof(struct in_addr)) == 0 );
@@ -736,7 +736,7 @@ testIpAddress::testBugNullingDisplay()
     CPPUNIT_ASSERT( !anIPA.IsNoAddr() );
     CPPUNIT_ASSERT( anIPA.IsIPv4() );
     CPPUNIT_ASSERT( !anIPA.IsIPv6() );
-    CPPUNIT_ASSERT_EQUAL( (u_short) 0 , anIPA.GetPort() );
+    CPPUNIT_ASSERT_EQUAL( (unsigned short) 0 , anIPA.GetPort() );
     CPPUNIT_ASSERT( !anIPA.IsSockAddr() );
     anIPA.GetInAddr(outval);
     CPPUNIT_ASSERT( memcmp( &expectval, &outval, sizeof(struct in_addr)) == 0 );
@@ -751,7 +751,7 @@ testIpAddress::testBugNullingDisplay()
     CPPUNIT_ASSERT( !anIPA.IsNoAddr() );
     CPPUNIT_ASSERT( anIPA.IsIPv4() );
     CPPUNIT_ASSERT( !anIPA.IsIPv6() );
-    CPPUNIT_ASSERT_EQUAL( (u_short) 0 , anIPA.GetPort() );
+    CPPUNIT_ASSERT_EQUAL( (unsigned short) 0 , anIPA.GetPort() );
     CPPUNIT_ASSERT( !anIPA.IsSockAddr() );
     anIPA.GetInAddr(outval);
     CPPUNIT_ASSERT( memcmp( &expectval, &outval, sizeof(struct in_addr)) == 0 );
@@ -765,7 +765,7 @@ testIpAddress::testBugNullingDisplay()
     CPPUNIT_ASSERT( !anIPA.IsNoAddr() );
     CPPUNIT_ASSERT( anIPA.IsIPv4() );
     CPPUNIT_ASSERT( !anIPA.IsIPv6() );
-    CPPUNIT_ASSERT_EQUAL( (u_short) 0 , anIPA.GetPort() );
+    CPPUNIT_ASSERT_EQUAL( (unsigned short) 0 , anIPA.GetPort() );
     CPPUNIT_ASSERT( !anIPA.IsSockAddr() );
     anIPA.GetInAddr(outval);
     CPPUNIT_ASSERT( memcmp( &expectval, &outval, sizeof(struct in_addr)) == 0 );
index 643073372dcf5b2c7448050e37e7eed50471b581..ea3995e563eaec592c111edefb5819fcf336addd 100644 (file)
@@ -920,7 +920,7 @@ mainInitialize(void)
     setEffectiveUser();
 
     if (icpPortNumOverride != 1)
-        Config.Port.icp = (u_short) icpPortNumOverride;
+        Config.Port.icp = (unsigned short) icpPortNumOverride;
 
     _db_init(Debug::cache_log, Debug::debugOptions);
 
index 1618cff53768f9bd4fa585598b936cc21487631c..bcefbcb5d87ace511f6154e1c33f53f5451eb3b7 100644 (file)
@@ -74,7 +74,7 @@ static OBJH neighborDumpNonPeers;
 static void dump_peers(StoreEntry * sentry, peer * peers);
 
 static icp_common_t echo_hdr;
-static u_short echo_port;
+static unsigned short echo_port;
 
 static int NLateReplies = 0;
 static peer *first_ping = NULL;
@@ -586,7 +586,7 @@ neighbors_init(void)
         nul = *AI;
         nul.GetInAddr( *((struct in_addr*)&echo_hdr.shostid) );
         sep = getservbyname("echo", "udp");
-        echo_port = sep ? ntohs((u_short) sep->s_port) : 7;
+        echo_port = sep ? ntohs((unsigned short) sep->s_port) : 7;
     }
 
     first_ping = Config.peers;
index 571d7986993899246763ca8bc92537ef1a49e06f..2ce60bc09246c6457ff5faf4ac215d4c0426a559 100644 (file)
@@ -177,7 +177,7 @@ IdleConnList::timeout(int fd, void *data)
 /* ========== PconnPool PRIVATE FUNCTIONS ============================================ */
 
 const char *
-PconnPool::key(const char *host, u_short port, const char *domain, IpAddress &client_address)
+PconnPool::key(const char *host, unsigned short port, const char *domain, IpAddress &client_address)
 {
     LOCAL_ARRAY(char, buf, SQUIDHOSTNAMELEN * 3 + 10);
     char ntoabuf[MAX_IPSTRLEN];
@@ -248,7 +248,7 @@ PconnPool::~PconnPool()
 }
 
 void
-PconnPool::push(int fd, const char *host, u_short port, const char *domain, IpAddress &client_address)
+PconnPool::push(int fd, const char *host, unsigned short port, const char *domain, IpAddress &client_address)
 {
     IdleConnList *list;
     const char *aKey;
@@ -293,7 +293,7 @@ PconnPool::push(int fd, const char *host, u_short port, const char *domain, IpAd
  * transactions create persistent connections but are not retriable.
  */
 int
-PconnPool::pop(const char *host, u_short port, const char *domain, IpAddress &client_address, bool isRetriable)
+PconnPool::pop(const char *host, unsigned short port, const char *domain, IpAddress &client_address, bool isRetriable)
 {
     const char * aKey = key(host, port, domain, client_address);
 
index 735cfdf95d193251a9a02e3454bb69440e2d2010..ca54cccf742490cda5bf6fa239a82b99fd7d9b92 100644 (file)
@@ -73,8 +73,8 @@ public:
     ~PconnPool();
 
     void moduleInit();
-    void push(int fd, const char *host, u_short port, const char *domain, IpAddress &client_address);
-    int pop(const char *host, u_short port, const char *domain, IpAddress &client_address, bool retriable);
+    void push(int fd, const char *host, unsigned short port, const char *domain, IpAddress &client_address);
+    int pop(const char *host, unsigned short port, const char *domain, IpAddress &client_address, bool retriable);
     void count(int uses);
     void dumpHist(StoreEntry *e);
     void dumpHash(StoreEntry *e);
@@ -82,7 +82,7 @@ public:
 
 private:
 
-    static const char *key(const char *host, u_short port, const char *domain, IpAddress &client_address);
+    static const char *key(const char *host, unsigned short port, const char *domain, IpAddress &client_address);
 
     int hist[PCONN_HIST_SZ];
     hash_table *table;
index ab7d4018015ee2e8a6dd81f99ebe9401539eabc9..192d495a59deb49f18a547bb56ebc4c93e279b4e 100644 (file)
@@ -610,7 +610,7 @@ SQUIDCEXTERN char *urlCanonicalClean(const HttpRequest *);
 SQUIDCEXTERN const char *urlCanonicalFakeHttps(const HttpRequest * request);
 SQUIDCEXTERN bool urlIsRelative(const char *);
 SQUIDCEXTERN char *urlMakeAbsolute(const HttpRequest *, const char *);
-SQUIDCEXTERN char *urlRInternal(const char *host, u_short port, const char *dir, const char *name);
+SQUIDCEXTERN char *urlRInternal(const char *host, unsigned short port, const char *dir, const char *name);
 SQUIDCEXTERN char *urlInternal(const char *dir, const char *name);
 SQUIDCEXTERN int matchDomainName(const char *host, const char *domain);
 SQUIDCEXTERN int urlCheckRequest(const HttpRequest *);
@@ -684,7 +684,7 @@ SQUIDCEXTERN void internalStart(HttpRequest *, StoreEntry *);
 SQUIDCEXTERN int internalCheck(const char *urlpath);
 SQUIDCEXTERN int internalStaticCheck(const char *urlpath);
 SQUIDCEXTERN char *internalLocalUri(const char *dir, const char *name);
-SQUIDCEXTERN char *internalRemoteUri(const char *, u_short, const char *, const char *);
+SQUIDCEXTERN char *internalRemoteUri(const char *, unsigned short, const char *, const char *);
 SQUIDCEXTERN const char *internalHostname(void);
 SQUIDCEXTERN int internalHostnameIs(const char *);
 
index 46f07114b93d34d63de8740c16b38ae37e53af78..159e25105beec01461757260ffee904b1e97236e 100644 (file)
@@ -63,7 +63,7 @@ send_announce(const ipcache_addrs *ia, const DnsLookupDetails &, void *junk)
     IpAddress S;
     char *host = Config.Announce.host;
     char *file = NULL;
-    u_short port = Config.Announce.port;
+    unsigned short port = Config.Announce.port;
     int l;
     int n;
     int fd;
index 68a0d1724cf54c876cccbca7db71627fb486b1fe..c32e13ad23ecd3f03474860456e9cfd4af2f2e47 100644 (file)
@@ -105,7 +105,7 @@ struct acl_size_t {
 };
 
 struct ushortlist {
-    u_short i;
+    unsigned short i;
     ushortlist *next;
 };
 
@@ -192,14 +192,14 @@ struct SquidConfig {
     acl_size_t *ReplyBodySize;
 
     struct {
-        u_short icp;
+        unsigned short icp;
 #if USE_HTCP
 
-        u_short htcp;
+        unsigned short htcp;
 #endif
 #if SQUID_SNMP
 
-        u_short snmp;
+        unsigned short snmp;
 #endif
     } Port;
 
@@ -332,7 +332,7 @@ struct SquidConfig {
         char *host;
         char *file;
         time_t period;
-        u_short port;
+        unsigned short port;
     } Announce;
 
     struct {
@@ -848,18 +848,18 @@ struct peer {
     struct {
         int version;
         int counts[ICP_END+1];
-        u_short port;
+        unsigned short port;
     } icp;
 
 #if USE_HTCP
     struct {
         double version;
         int counts[2];
-        u_short port;
+        unsigned short port;
     } htcp;
 #endif
 
-    u_short http_port;
+    unsigned short http_port;
     domain_ping *peer_domain;
     domain_type *typelist;
     acl_access *access;
index 9c3e7fb7ca39ec9aa0051b429860ee12c136e66e..9844b745fa47237cf16aabc06041eeee4bfd8450 100644 (file)
@@ -104,7 +104,7 @@ strtokFile(void)
 }
 
 void
-ConfigParser::ParseUShort(u_short *var)
+ConfigParser::ParseUShort(unsigned short *var)
 {
     fatal("not implemented 10");
 }
index 82d5907bf4e2ba6b1a6ff0cc150f7c579a18a3b5..eed1e4e1190f4beac9b61512420e854bbe09ed4b 100644 (file)
@@ -43,7 +43,7 @@ void
 testHttpRequest::testCreateFromUrlAndMethod()
 {
     /* vanilla url */
-    ushort expected_port;
+    unsigned short expected_port;
     char * url = xstrdup("http://foo:90/bar");
     HttpRequest *aRequest = HttpRequest::CreateFromUrlAndMethod(url, METHOD_GET);
     expected_port = 90;
@@ -93,7 +93,7 @@ void
 testHttpRequest::testCreateFromUrl()
 {
     /* vanilla url */
-    ushort expected_port;
+    unsigned short expected_port;
     char * url = xstrdup("http://foo:90/bar");
     HttpRequest *aRequest = HttpRequest::CreateFromUrl(url);
     expected_port = 90;
@@ -112,7 +112,7 @@ testHttpRequest::testCreateFromUrl()
 void
 testHttpRequest::testIPv6HostColonBug()
 {
-    ushort expected_port;
+    unsigned short expected_port;
     char * url = NULL;
     HttpRequest *aRequest = NULL;
 
index ea5381d44c6247f9552f7f9246fd2cbc121dd292..b39703e1e9e2346a0db1567e277f065292adbd8d 100644 (file)
@@ -64,7 +64,7 @@ public:
     bool noConnections() const;
     char *url;
     char *host;                        /* either request->host or proxy host */
-    u_short port;
+    unsigned short port;
     HttpRequest *request;
     FwdServer *servers;
 
index 72c0273b614224272856dac9180f9ac93f670fa5..1e143022d97e8a31b614dc6bc6c4ef316725a10e 100644 (file)
@@ -104,8 +104,8 @@ struct MetaStd {
     time_t expires;
     time_t lastmod;
     size_t swap_file_sz;
-    u_short refcount;
-    u_short flags;
+    uint16_t refcount;
+    uint16_t flags;
 };
 
 struct MetaStdLfs {
@@ -114,8 +114,8 @@ struct MetaStdLfs {
     time_t expires;
     time_t lastmod;
     uint64_t swap_file_sz;
-    u_short refcount;
-    u_short flags;
+    uint16_t refcount;
+    uint16_t flags;
 };
 
 struct DumpStoreMeta : public unary_function<StoreMeta, void> {
index c6dcd8abfdb0375b2c1ae97e34ad04c5db401c71..79fab548cb37c3802de0b4853eaade1b9ffb6784 100644 (file)
@@ -446,7 +446,7 @@ urlParseFinish(const HttpRequestMethod& method,
 
     request->SetHost(host);
     xstrncpy(request->login, login, MAX_LOGIN_SZ);
-    request->port = (u_short) port;
+    request->port = (unsigned short) port;
     return request;
 }
 
index b24c7ed7d98a6f5b597f983e978b3354e7653ccf..a0a2e7a78ca059608a3f98f65540ea5581905e6b 100644 (file)
@@ -1633,7 +1633,7 @@ wccp2AssignBuckets(void *voidnotused)
     int router_len;
     int bucket_counter;
     uint32_t service_flags;
-    u_short port = WCCP_PORT;
+    unsigned short port = WCCP_PORT;
 
     /* Packet segments */