]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #767: Problems making Squid 3.0 PRE3 64 bit
authorserassio <>
Sun, 3 Jul 2005 21:25:03 +0000 (21:25 +0000)
committerserassio <>
Sun, 3 Jul 2005 21:25:03 +0000 (21:25 +0000)
Fixed the following on HP Tru64 and probably on some other 64 bit platforms:

- assert() must test logical expressions, not pointers
- STATUS define conflict in parse.c (snmplib)
- Warnings SMB, fakeauth and MSNT helpers
- Various debug() ==> debugs() changes
- Alpha asm access to CPU profiling info
- timezone should be long, not time_t
- Various clean of ESI code
- assert() definition problem in diskd.cc

33 files changed:
helpers/basic_auth/MSNT/smblib-util.c
helpers/basic_auth/MSNT/smblib.c
helpers/ntlm_auth/SMB/ntlm_auth.c
helpers/ntlm_auth/SMB/smbval/smbencrypt.c
helpers/ntlm_auth/SMB/smbval/smblib.c
helpers/ntlm_auth/SMB/smbval/std-includes.h
helpers/ntlm_auth/fakeauth/fakeauth_auth.c
include/profiling.h
lib/hash.c
lib/heap.c
lib/rfc1123.c
lib/util.c
snmplib/mib.c
snmplib/parse.c
src/DiskIO/DiskDaemon/diskd.cc
src/ESI.cc
src/ESICustomParser.cc
src/ESICustomParser.h
src/ESIExpatParser.cc
src/ESIExpatParser.h
src/ESIExpression.cc
src/ESIInclude.cc
src/ESILibxml2Parser.cc
src/ESILibxml2Parser.h
src/ESIParser.h
src/ESISequence.cc
src/ESIVarState.cc
src/StoreHashIndex.h
src/htcp.cc
src/mem.cc
src/net_db.cc
src/squid.h
src/store_dir.cc

index 7a8e5466019378b1e42acd85cd4a191cbac73abf..fcc7de0ae47abc35552ca0147afe48fcf6ff1f53 100644 (file)
@@ -256,7 +256,6 @@ SMB_Negotiate(SMB_Handle_Type Con_Handle, const char *Prots[])
        Con_Handle->Encrypt_Key_Len = SVAL(SMB_Hdr(pkt), SMB_negrLM_ekl_offset);
 
        p = (SMB_Hdr(pkt) + SMB_negrLM_buf_offset);
-       fprintf(stderr, "%d", (int) (SMB_Hdr(pkt) + SMB_negrLM_buf_offset));
        memcpy(Con_Handle->Encrypt_Key, p, 8);
 
        p = (SMB_Hdr(pkt) + SMB_negrLM_buf_offset + Con_Handle->Encrypt_Key_Len);
index be82e009e27d514d1676d840b17766de66568c15..d9b202b90220a5729a1f6ca9b5e21c34da708c60 100644 (file)
@@ -27,6 +27,7 @@ int SMBlib_errno;
 int SMBlib_SMB_Error;
 #define SMBLIB_ERRNO
 #define uchar unsigned char
+#include "util.h"
 #include "smblib-priv.h"
 #include "smblib.h"
 #include "rfcnb-priv.h"
@@ -127,12 +128,12 @@ SMB_Connect_Server(SMB_Handle_Type Con_Handle,
      * service we are going to call, sine some servers want it in uppercase */
 
     for (i = 0; i < strlen(server); i++)
-       called[i] = toupper(server[i]);
+       called[i] = xtoupper(server[i]);
 
     called[strlen(server)] = 0;        /* Make it a string */
 
     for (i = 0; i < strlen(con->myname); i++)
-       calling[i] = toupper(con->myname[i]);
+       calling[i] = xtoupper(con->myname[i]);
 
     calling[strlen(con->myname)] = 0;  /* Make it a string */
 
@@ -229,12 +230,12 @@ SMB_Connect(SMB_Handle_Type Con_Handle,
      * service we are going to call, sine some servers want it in uppercase */
 
     for (i = 0; i < strlen(host); i++)
-       called[i] = toupper(host[i]);
+       called[i] = xtoupper(host[i]);
 
     called[strlen(host)] = 0;  /* Make it a string */
 
     for (i = 0; i < strlen(con->myname); i++)
-       calling[i] = toupper(con->myname[i]);
+       calling[i] = xtoupper(con->myname[i]);
 
     calling[strlen(con->myname)] = 0;  /* Make it a string */
 
index 8bd47060e7ef896e1339df7bf9d81bca3dd1eed7..0ed3258907dcd652b4bc1bff6d8145cfc5f1b175 100644 (file)
@@ -82,7 +82,7 @@ uc(char *string)
 {
     char *p = string, c;
     while ((c = *p)) {
-       *p = toupper(c);
+       *p = xtoupper(c);
        p++;
     }
 }
@@ -93,7 +93,7 @@ lc(char *string)
 {
     char *p = string, c;
     while ((c = *p)) {
-       *p = tolower(c);
+       *p = xtolower(c);
        p++;
     }
 }
index 008b240841f36149e5f51cc6ee4d8f69b0931353..41b5cbcbb152729610eb208f7715381f6eba5ef4 100644 (file)
@@ -200,7 +200,7 @@ strupper(char *s)
         * #endif *//* KANJI_WIN95_COMPATIBILITY */
        {
            if (islower((int)(unsigned char)*s))
-               *s = toupper(*s);
+               *s = xtoupper(*s);
            s++;
        }
     }
index d22a01e5f01db18a88451ebcd54eeb0548fb9247..179a6cee47d9683420f0e31a19b617bd94c55eb7 100644 (file)
@@ -171,12 +171,12 @@ SMB_Connect_Server(SMB_Handle_Type Con_Handle,
      * service we are going to call, sine some servers want it in uppercase */
 
     for (i = 0; i < strlen(server); i++)
-       called[i] = toupper(server[i]);
+       called[i] = xtoupper(server[i]);
 
     called[strlen(server)] = 0;        /* Make it a string */
 
     for (i = 0; i < strlen(con->myname); i++)
-       calling[i] = toupper(con->myname[i]);
+       calling[i] = xtoupper(con->myname[i]);
 
     calling[strlen(con->myname)] = 0;  /* Make it a string */
 
@@ -272,12 +272,12 @@ SMB_Connect(SMB_Handle_Type Con_Handle,
      * service we are going to call, sine some servers want it in uppercase */
 
     for (i = 0; i < strlen(host); i++)
-       called[i] = toupper(host[i]);
+       called[i] = xtoupper(host[i]);
 
     called[strlen(host)] = 0;  /* Make it a string */
 
     for (i = 0; i < strlen(con->myname); i++)
-       calling[i] = toupper(con->myname[i]);
+       calling[i] = xtoupper(con->myname[i]);
 
     calling[strlen(con->myname)] = 0;  /* Make it a string */
 
index d772c1dd7568237347c6558d4f4f10dc7908aa72..1bd081c1eb85bf9192db2d0598dbf22cae3229cd 100644 (file)
@@ -24,6 +24,7 @@
  */
 
 /* the types are provided by squid's configure preocess */
+#include "util.h"
 #define BOOL int16_t
 #define int16 int16_t
 
index b74a2b4bda76465c7abf7184efaca5637625a3be..34210732874bc40a66c870f79e594857bdf0383a 100644 (file)
@@ -57,7 +57,7 @@ lc(char *string)
 {
     char *p = string, c;
     while ((c = *p)) {
-       *p = tolower(c);
+       *p = xtolower(c);
        p++;
     }
 }
index 6766cb22bd2732e5668cddc36006c4bfd2244cfe..02f35a11e5fa59688a703ba1b6a839fa2374e193 100644 (file)
@@ -30,7 +30,7 @@ get_tick(void)
 {
     hrtime_t regs;
 
-asm volatile ("rpcc $0":"=A" (regs));  /* I'm not sure of syntax */
+asm volatile ("rpcc %0" : "=r" (regs));
     return regs;
 }
 
@@ -39,6 +39,7 @@ static __inline hrtime_t
 get_tick(void)
 {
     hrtime_t regs;
+
     __asm {
         cpuid
         rdtsc
index 9d2b6272de59cec11f4b7a060d30fb270676d6b2..0ff9c86a9bcd3eb98d1583ede348262ece138a5e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: hash.c,v 1.17 2004/12/21 17:28:28 robertc Exp $
+ * $Id: hash.c,v 1.18 2005/07/03 15:25:07 serassio Exp $
  *
  * DEBUG: section 0     Hash Tables
  * AUTHOR: Harvest Derived
@@ -244,7 +244,7 @@ hash_next(hash_table * hid)
 void
 hash_last(hash_table * hid)
 {
-    assert(hid);
+    assert(hid != NULL);
     hid->next = NULL;
     hid->current_slot = 0;
 }
@@ -312,7 +312,7 @@ hashFreeItems(hash_table * hid, HASHFREE * free_func)
 void
 hashFreeMemory(hash_table * hid)
 {
-    assert(hid);
+    assert(hid != NULL);
     if (hid->buckets)
        xfree(hid->buckets);
     xfree(hid);
index 3fbc9dc03f08f00cd7f5c15d806af0b2cb3af409..9daefcf2131c85312098e4edd1c68f49665f44ee 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: heap.c,v 1.9 2003/01/23 00:37:01 robertc Exp $
+ * $Id: heap.c,v 1.10 2005/07/03 15:25:07 serassio Exp $
  *
  * AUTHOR: John Dilley, Hewlett Packard
  *
@@ -122,7 +122,7 @@ void
 delete_heap(heap * hp)
 {
     int i;
-    assert(hp);
+    assert(hp != NULL);
     for (i = 0; i < hp->last; i++) {
        xfree(hp->nodes[i]);
     }
index cb31fcac292d5a5b0f20d08d56dcf258761a3332..6ea50f7ad400725851d7d17fb53c2e470d5ad0c9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: rfc1123.c,v 1.34 2005/03/09 20:02:06 serassio Exp $
+ * $Id: rfc1123.c,v 1.35 2005/07/03 15:25:07 serassio Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -231,7 +231,7 @@ parse_rfc1123(const char *str)
 #elif defined(_SQUID_CYGWIN_)
 #elif defined(_SQUID_MSWIN_)
 #else
-       extern time_t timezone;
+       extern long timezone;
 #endif
        /*
         * The following assumes a fixed DST offset of 1 hour,
index da822b64b0709114901bc241034f705969a03f55..064eab67aa7b7c27158b6a305fbcfd7d17c13b34 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: util.c,v 1.92 2004/12/21 17:28:28 robertc Exp $
+ * $Id: util.c,v 1.93 2005/07/03 15:25:07 serassio Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -631,7 +631,7 @@ xstrndup(const char *s, size_t n)
     size_t sz;
     void *p;
     PROF_start(xstrndup);
-    assert(s);
+    assert(s != NULL);
     assert(n);
     sz = strlen(s) + 1;
     if (sz > n)
index 20b169a27efa0709cb609d6e485df7bca674e45a..69348ca5853eb0ce2c5cebae5949dd17838d19d5 100644 (file)
@@ -128,11 +128,11 @@ lc_cmp(const char *s1, const char *s2)
 
     while (*s1 && *s2) {
        if (xisupper(*s1))
-           c1 = tolower(*s1);
+           c1 = xtolower(*s1);
        else
            c1 = *s1;
        if (xisupper(*s2))
-           c2 = tolower(*s2);
+           c2 = xtolower(*s2);
        else
            c2 = *s2;
        if (c1 != c2)
index 537e61144dae5060dd0866228b5cc12345911926..98dd796dc2c4e0453de859e3912bb3e988c10723 100644 (file)
@@ -135,7 +135,7 @@ int Line = 1;
 #define        WRITEONLY   20
 #undef NOACCESS
 #define NOACCESS    21
-#define STATUS     22
+#define SNMP_STATUS 22
 #define MANDATORY   23
 #define SNMP_OPTIONAL    24
 #define OBSOLETE    25
@@ -193,7 +193,7 @@ struct tok tokens[] =
     {"read-only", sizeof("read-only") - 1, READONLY},
     {"ACCESS", sizeof("ACCESS") - 1, ACCESS},
     {"MAX-ACCESS", sizeof("MAX-ACCESS") - 1, ACCESS},
-    {"STATUS", sizeof("STATUS") - 1, STATUS},
+    {"STATUS", sizeof("STATUS") - 1, SNMP_STATUS},
     {"SYNTAX", sizeof("SYNTAX") - 1, SYNTAX},
     {"OBJECT-TYPE", sizeof("OBJECT-TYPE") - 1, OBJTYPE},
     {"{", sizeof("{") - 1, LEFTBRACKET},
@@ -867,7 +867,7 @@ parse_objecttype(register FILE *fp, char *name)
        return 0;
     }
     type = get_token(fp, token);
-    if (type != STATUS) {
+    if (type != SNMP_STATUS) {
        print_error("Should be STATUS", token, nexttype);
        free_node(np);
        return 0;
index 4ff44af369e4db78a5a40cba9ab5459998ca15be..9eacbb3c2ec3d91cb06c95d8b1549b488b19fb1f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: diskd.cc,v 1.2 2004/12/21 15:47:33 robertc Exp $
+ * $Id: diskd.cc,v 1.3 2005/07/03 15:25:09 serassio Exp $
  *
  * DEBUG: section --    External DISKD process implementation.
  * AUTHOR: Harvest Derived
 
 #include "DiskIO/DiskDaemon/diomsg.h"
 
-#undef assert
-#include <assert.h>
+void
+xassert(const char *msg, const char *file, int line)
+{
+    fprintf(stderr,"assertion failed: %s:%d: \"%s\"\n", file, line, msg);
 
+    abort();
+}
 
 const int diomsg::msg_snd_rcv_sz = sizeof(diomsg) - sizeof(mtyp_t);
 #define DEBUG(LEVEL) if ((LEVEL) <= DebugLevel)
index 91fe1655276d96e3d452bd60608afe88615bdbba..84e0a31ef91b816c353bfeb2230de518ffee0e3e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ESI.cc,v 1.14 2005/06/03 15:24:14 serassio Exp $
+ * $Id: ESI.cc,v 1.15 2005/07/03 15:25:08 serassio Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -688,7 +688,7 @@ ESIContext::send ()
 
     cbdataReferenceDone (templock);
 
-    debug (86,5)("ESIContext::send: this=%p sent %d\n",this,len);
+    debugs (86,5,"ESIContext::send: this=" << this << " sent " << len);
 
     return len;
 }
@@ -785,7 +785,7 @@ esiProcessStream (clientStreamNode *thisNode, clientHttpRequest *http, HttpReply
         /* Increase our buffer area with incoming data */
         assert (recievedData.length <= HTTP_REQBUF_SZ);
         assert (thisNode->readBuffer.offset == recievedData.offset);
-        debug (86,5)("esiProcessStream found %u bytes of body data at offset %ld\n", recievedData.length, (long)recievedData.offset);
+        debugs (86,5, "esiProcessStream found " << recievedData.length << " bytes of body data at offset " << recievedData.offset);
         /* secure the data for later use */
 
         if (!context->incoming.getRaw()) {
@@ -1187,7 +1187,7 @@ ESIContext::parserComment (const char *s)
             debug (86,0)("ESIContext::parserComment: Parsing fragment '%s' failed.\n", s + 3);
             setError();
             char tempstr[1024];
-            snprintf(tempstr, 1023, "ESIContext::parserComment: Parse error at line %d:\n%s\n",
+            snprintf(tempstr, 1023, "ESIContext::parserComment: Parse error at line %ld:\n%s\n",
                      tempParser->lineNumber(),
                      tempParser->errorString());
             debug (86,0)("%s",tempstr);
@@ -1243,13 +1243,13 @@ ESIContext::parseOneBuffer()
 {
     assert (buffered.getRaw());
 
-    debug (86,9)("ESIContext::parseOneBuffer: %d bytes\n",buffered->len);
+    debugs (86,9,"ESIContext::parseOneBuffer: " << buffered->len << " bytes");
     bool lastBlock = buffered->next.getRaw() == NULL && flags.finishedtemplate ? true : false;
 
     if (! parserState.theParser->parse(buffered->buf, buffered->len, lastBlock)) {
         setError();
         char tempstr[1024];
-        snprintf (tempstr, 1023, "esiProcess: Parse error at line %d:\n%s\n",
+        snprintf (tempstr, 1023, "esiProcess: Parse error at line %ld:\n%s\n",
                   parserState.theParser->lineNumber(),
                   parserState.theParser->errorString());
         debug (86,0)("%s", tempstr);
@@ -2060,13 +2060,13 @@ esiChoose::addElement(ESIElement::Pointer element)
     } else {
         elements.push_back (element);
 
-        debug (86,3)("esiChooseAdd: Added a new element, elements = %d\n", elements.size());
+        debugs (86,3, "esiChooseAdd: Added a new element, elements = " << elements.size());
 
         if (chosenelement == -1)
             if ((dynamic_cast<esiWhen *>(element.getRaw()))->
                     testsTrue()) {
                 chosenelement = elements.size() - 1;
-                debug (86,3)("esiChooseAdd: Chose element %d\n", elements.size());
+                debugs (86,3, "esiChooseAdd: Chose element " << elements.size());
             }
     }
 
@@ -2083,7 +2083,7 @@ esiChoose::selectElement()
         if ((dynamic_cast<esiWhen *>(elements[counter].getRaw()))->
                 testsTrue()) {
             chosenelement = counter;
-            debug (86,3)("esiChooseAdd: Chose element %d\n", counter + 1);
+            debugs (86,3, "esiChooseAdd: Chose element " << counter + 1);
             return;
         }
     }
index 3e98703759c2383a395c45053d5fd8df8498937a..1badccf3252fe9d09aa44a8585e7a24377276791 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ESICustomParser.cc,v 1.6 2005/03/28 21:44:12 hno Exp $
+ * $Id: ESICustomParser.cc,v 1.7 2005/07/03 15:25:08 serassio Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -51,14 +51,20 @@ ESICustomParser::GetTrie()
 
     SearchTrie = new Trie(new TrieCaseless);
 
+    static const ESITAG_t ESITAG_value = ESITAG;
+
     assert (SearchTrie->add
-            ("<esi:",5,(void *)ESITAG));
+            ("<esi:",5,(void *)&ESITAG_value));
+
+    static const ESITAG_t ESIENDTAG_value = ESIENDTAG;
 
     assert (SearchTrie->add
-            ("</esi:",6,(void *)ESIENDTAG));
+            ("</esi:",6,(void *)&ESIENDTAG_value));
+
+    static const ESITAG_t ESICOMMENT_value = ESICOMMENT;
 
     assert (SearchTrie->add
-            ("<!--",4,(void *)ESICOMMENT));
+            ("<!--",4,(void *)&ESICOMMENT_value));
 
     return SearchTrie;
 }
@@ -75,19 +81,19 @@ char const *
 ESICustomParser::findTag(char const *buffer, size_t bufferLength)
 {
     size_t myOffset (0);
-    void *resulttype = NULL;
+    ESITAG_t *resulttype = NULL;
 
     while (myOffset < bufferLength &&
-            (resulttype =GetTrie()->findPrefix (buffer + myOffset, bufferLength - myOffset)) == NULL)
+            (resulttype = static_cast<ESITAG_t *>(GetTrie()->findPrefix (buffer + myOffset, bufferLength - myOffset)))
+            == NULL)
         ++myOffset;
 
     if (myOffset == bufferLength)
         return NULL;
 
-    debug (86,9)("ESICustomParser::findTag: found %p\n", resulttype);
+    debug (86,9)("ESICustomParser::findTag: found %d\n", *resulttype);
 
-    /* Yuck! */
-    lastTag = static_cast<ESITAG_t>((int)resulttype);
+    lastTag = *resulttype;
 
     return buffer + myOffset;
 }
@@ -285,7 +291,7 @@ ESICustomParser::parse(char const *dataToParse, size_t const lengthOfData, bool
     return !openESITags;
 }
 
-size_t
+long int
 ESICustomParser::lineNumber() const
 {
     /* We don't track lines in the body */
index d3de62157512177fa4c166811e53152b21fdc21f..a1a00aaf5964fd80ea86127d32ad9f0e0efa1f16 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ESICustomParser.h,v 1.5 2005/03/28 21:44:12 hno Exp $
+ * $Id: ESICustomParser.h,v 1.6 2005/07/03 15:25:08 serassio Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -45,7 +45,7 @@ public:
     ~ESICustomParser();
     /* true on success */
     bool parse(char const *dataToParse, size_t const lengthOfData, bool const endOfStream);
-    size_t lineNumber() const;
+    long int lineNumber() const;
     char const * errorString() const;
 
 private:
index 71b46c7369b33fac3a0344d8ecc863903c4640b1..f210b0c4d1f1aac4c4a05e9dbbcdf4e6dec464a3 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ESIExpatParser.cc,v 1.3 2005/03/28 21:44:12 hno Exp $
+ * $Id: ESIExpatParser.cc,v 1.4 2005/07/03 15:25:08 serassio Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -93,10 +93,10 @@ ESIExpatParser::parse(char const *dataToParse, size_t const lengthOfData, bool c
     return XML_Parse(myParser(), dataToParse, lengthOfData, endOfStream);
 }
 
-size_t
+long int
 ESIExpatParser::lineNumber() const
 {
-    return XML_GetCurrentLineNumber(myParser());
+    return (long int)XML_GetCurrentLineNumber(myParser());
 }
 
 char const *
index 5be5f8181532c0600deb998a674458a17048c2d8..29d84770e0e68b7811e684634c53ce2b116e22d3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ESIExpatParser.h,v 1.3 2005/03/28 21:44:12 hno Exp $
+ * $Id: ESIExpatParser.h,v 1.4 2005/07/03 15:25:08 serassio Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -44,7 +44,7 @@ public:
     ~ESIExpatParser();
     /* true on success */
     bool parse(char const *dataToParse, size_t const lengthOfData, bool const endOfStream);
-    size_t lineNumber() const;
+    long int lineNumber() const;
     char const * errorString() const;
 
 private:
index 288473cb80db20a479d32b7390406771d2868f44..63197cc7d8bc8b5c0f7a30990c8c18f6b264d027 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ESIExpression.cc,v 1.3 2003/07/14 14:15:56 robertc Exp $
+ * $Id: ESIExpression.cc,v 1.4 2005/07/03 15:25:08 serassio Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -728,7 +728,7 @@ getsymbol (const char *s, char const **endptr)
                 debug (86,1) ("failed to convert '%s' to float \n", s);
                 *endptr = origs;
             } else {
-                debug (86,6) ("found %f of length %d\n",rv.value.floating, end - s);
+                debugs (86,6, "found " << rv.value.floating << " of length " << end - s);
                 *endptr = end;
                 rv.eval = evalliteral;
                 rv.valuestored = ESI_LITERAL_FLOAT;
@@ -744,7 +744,7 @@ getsymbol (const char *s, char const **endptr)
                 debug (86,1) ("failed to convert '%s' to int \n", s);
                 *endptr = origs;
             } else {
-                debug (86,6) ("found %d of length %d\n",rv.value.integral, end - s);
+                debugs (86,6, "found " << rv.value.integral << " of length " << end - s);
                 *endptr = end;
                 rv.eval = evalliteral;
                 rv.valuestored = ESI_LITERAL_INT;
index b8e45acc6827cf307edd5f94f54cbaa16e01b36e..b07b60a3b0a875107157d18234e4ec511a6d9378 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ESIInclude.cc,v 1.5 2004/12/21 17:28:29 robertc Exp $
+ * $Id: ESIInclude.cc,v 1.6 2005/07/03 15:25:08 serassio Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -91,7 +91,7 @@ esiBufferRecipient (clientStreamNode *node, clientHttpRequest *http, HttpReply *
     assert (recievedData.length <= sizeof(esiStream->localbuffer->buf));
     assert (!esiStream->finished);
 
-    debug (86,5) ("esiBufferRecipient rep %p body %p len %d\n", rep, recievedData.data, recievedData.length);
+    debugs (86,5, "esiBufferRecipient rep " << rep << " body " << recievedData.data << " len " << recievedData.length);
     assert (node->readBuffer.offset == recievedData.offset || recievedData.length == 0);
 
     /* trivial case */
index f32c330371dd2c383befd7afa65e5e05c7a2c036..3373e5c9c61a1efdae793a39efe48d934e671892 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ESILibxml2Parser.cc,v 1.2 2005/03/28 21:44:12 hno Exp $
+ * $Id: ESILibxml2Parser.cc,v 1.3 2005/07/03 15:25:08 serassio Exp $
  *
  * AUTHOR: Joachim Bauch (mail@joachim-bauch.de)
  *
@@ -138,10 +138,10 @@ ESILibxml2Parser::parse(char const *dataToParse, size_t const lengthOfData, bool
     return (xmlParseChunk(parser, dataToParse, lengthOfData, endOfStream) == 0);
 }
 
-size_t
+long int
 ESILibxml2Parser::lineNumber() const
 {
-    return xmlSAX2GetLineNumber(parser);
+    return (long int)xmlSAX2GetLineNumber(parser);
 }
 
 char const *
index 6a4bef56913b7d73ecfd4ecd4d5bc6c4dd4282b6..1fe174774746753570279794c8370245c9fe4b28 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ESILibxml2Parser.h,v 1.2 2005/03/28 21:44:12 hno Exp $
+ * $Id: ESILibxml2Parser.h,v 1.3 2005/07/03 15:25:08 serassio Exp $
  *
  * AUTHOR: Joachim Bauch (mail@joachim-bauch.de)
  *
@@ -63,7 +63,7 @@ public:
     ~ESILibxml2Parser();
     /* true on success */
     bool parse(char const *dataToParse, size_t const lengthOfData, bool const endOfStream);
-    size_t lineNumber() const;
+    long int lineNumber() const;
     char const * errorString() const;
 
     ESIParserClient *getClient() { return theClient; }
index d76c179388cd17b380bbc17f5b96212528301839..f0575ea9a464bf5ffc5328fd4267c68897308ed0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ESIParser.h,v 1.4 2005/04/30 19:32:01 serassio Exp $
+ * $Id: ESIParser.h,v 1.5 2005/07/03 15:25:08 serassio Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -55,7 +55,7 @@ public:
     static char *Type;
     /* true on success */
     virtual bool parse(char const *dataToParse, size_t const lengthOfData, bool const endOfStream) = 0;
-    virtual size_t lineNumber() const =0;
+    virtual long int lineNumber() const =0;
     virtual char const * errorString() const =0;
 
 protected:
index 9c4bbe19235ff7324e556a7d3e176acd79062887..72af794ca4dbddb076ced27302d24a57c404be3c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ESISequence.cc,v 1.4 2004/08/30 05:12:31 robertc Exp $
+ * $Id: ESISequence.cc,v 1.5 2005/07/03 15:25:08 serassio Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -90,7 +90,7 @@ esiSequence::render(ESISegment::Pointer output)
      * and rendered elements 
      */
     assert (output->next == NULL);
-    debug (86,5)("esiSequenceRender: rendering %d elements\n", processedcount);
+    debugs (86,5, "esiSequenceRender: rendering " << processedcount << " elements");
 
     for (size_t i = 0; i < processedcount; ++i) {
         elements[i]->render(output);
@@ -173,7 +173,7 @@ esiSequence::addElement (ESIElement::Pointer element)
     }
 
     elements.push_back(element);
-    debug (86,3)("esiSequenceAdd: Added a new element, elements = %d\n", elements.size());
+    debugs (86,3, "esiSequenceAdd: Added a new element, elements = " << elements.size());
     return true;
 }
 
@@ -203,7 +203,7 @@ esiSequence::processStep(int dovars)
 esiProcessResult_t
 esiSequence::processOne(int dovars, size_t index)
 {
-    debug (86,5)("esiSequence::process %p about to process element[%d] %p\n", this, index, elements[index].getRaw());
+    debugs (86,5, "esiSequence::process " << this << " about to process element[" << index << "] " << elements[index].getRaw());
 
     switch (elements[index]->process(dovars)) {
 
index 8c82fcbdad1a2aebc6d74e904e586ecbfbc71008..511989f226c54426b9a35210ccc60a410114b521 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ESIVarState.cc,v 1.4 2005/01/06 13:16:39 serassio Exp $
+ * $Id: ESIVarState.cc,v 1.5 2005/07/03 15:25:08 serassio Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -129,7 +129,7 @@ void
 ESIVarState::feedData (const char *buf, size_t len)
 {
     /* TODO: if needed - tune to skip segment iteration */
-    debug (86,6)("esiVarState::feedData: accepting %d bytes\n", len);
+    debugs (86,6, "esiVarState::feedData: accepting " << len << " bytes");
     ESISegment::ListAppend (input, buf, len);
 }
 
index a34f0cb17bd4388807b24c36ca0cf92b0106c89b..ec2666965828228f75a222a1a523c8c45c42f55a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StoreHashIndex.h,v 1.1 2005/01/03 16:08:25 robertc Exp $
+ * $Id: StoreHashIndex.h,v 1.2 2005/07/03 15:25:08 serassio Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -75,7 +75,7 @@ public:
 
     virtual void maintain();
 
-    virtual void updateSize(unsigned int, int);
+    virtual void updateSize(size_t, int);
 
     virtual StoreSearch *search(String const url, HttpRequest *);
 
index 870d7d5e6b31b7bbbd1cdf93110a1fd1bce31a57..1aecd5b9435635a4a7722f6e49bf4eacb030b1d0 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: htcp.cc,v 1.57 2004/08/30 05:12:31 robertc Exp $
+ * $Id: htcp.cc,v 1.58 2005/07/03 15:25:08 serassio Exp $
  *
  * DEBUG: section 31    Hypertext Caching Protocol
  * AUTHOR: Duane Wesssels
@@ -305,7 +305,7 @@ htcpBuildCountstr(char *buf, size_t buflen, const char *s)
     else
         len = 0;
 
-    debug(31, 3) ("htcpBuildCountstr: LENGTH = %d\n", len);
+    debugs(31, 3, "htcpBuildCountstr: LENGTH = " << len);
 
     debug(31, 3) ("htcpBuildCountstr: TEXT = {%s}\n", s ? s : "<NULL>");
 
index aaebd7186e7379a84d53db2fcc3428e8afa27c28..7cecb83060b20179f18991177f6ebbe90c9874f4 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: mem.cc,v 1.85 2004/08/30 05:12:31 robertc Exp $
+ * $Id: mem.cc,v 1.86 2005/07/03 15:25:08 serassio Exp $
  *
  * DEBUG: section 13    High Level Memory Pool Management
  * AUTHOR: Harvest Derived
@@ -397,7 +397,7 @@ Mem::Init(void)
         StrPools[i].pool = MemPools::GetInstance().create(StrPoolsAttrs[i].name, StrPoolsAttrs[i].obj_size);
 
         if (StrPools[i].pool->objectSize() != StrPoolsAttrs[i].obj_size)
-            debug(13, 1) ("Notice: %s is %d bytes instead of requested %d bytes\n", StrPoolsAttrs[i].name, StrPoolsAttrs[i].obj_size, StrPoolsAttrs[i].obj_size);
+            debugs(13, 1, "Notice: " << StrPoolsAttrs[i].name << " is " << StrPoolsAttrs[i].obj_size << " bytes instead of requested " << StrPoolsAttrs[i].obj_size << " bytes");
     }
 
     cachemgrRegister("mem",
index cfebca674559a2e61435d8fd2bc7dd806a4c4bcd..ea3a05b3cabc0ed411b1457b6c2b20f0364266a7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: net_db.cc,v 1.176 2005/04/18 21:52:42 hno Exp $
+ * $Id: net_db.cc,v 1.177 2005/07/03 15:25:08 serassio Exp $
  *
  * DEBUG: section 38    Network Measurement Database
  * AUTHOR: Duane Wessels
@@ -710,7 +710,7 @@ netdbExchangeHandleReply(void *data, StoreIOBuffer recievedData)
 
     /* Get the size of the buffer now */
     size = ex->buf_ofs + recievedData.length;
-    debug(38, 3) ("netdbExchangeHandleReply: %d bytes buf\n", (int) size);
+    debugs(38, 3, "netdbExchangeHandleReply: " << size << " bytes buf");
 
     /* Check if we're still doing headers */
 
@@ -721,7 +721,7 @@ netdbExchangeHandleReply(void *data, StoreIOBuffer recievedData)
         /* skip reply headers */
 
         if ((hdr_sz = headersEnd(p, ex->buf_ofs))) {
-            debug(38, 5) ("netdbExchangeHandleReply: hdr_sz = %d\n", hdr_sz);
+            debugs(38, 5, "netdbExchangeHandleReply: hdr_sz = " << hdr_sz);
             rep = ex->e->getReply();
             assert (0 != rep->sline.status);
             debug(38, 3) ("netdbExchangeHandleReply: reply status %d\n",
index c6b9fafbabf91e7d6449ff1d9c9f75fb45b92528..0e922721ee5e05a46c186a23af423472e5913d6b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: squid.h,v 1.246 2005/06/03 15:00:55 serassio Exp $
+ * $Id: squid.h,v 1.247 2005/07/03 15:25:08 serassio Exp $
  *
  * AUTHOR: Duane Wessels
  *
@@ -471,6 +471,12 @@ void free(V x) { fatal("Do not use ::free()"); }
 #ifndef PRIu64 /* ISO C99 Standard printf() macro for 64 bit unsigned int */
 #ifdef _SQUID_MSWIN_ /* Windows native port using MSVCRT */
 #define PRIu64 "I64u"
+/* FIXME: Temporary hack to allow the build on Digital/Compaq/HP Tru64 Unix.
+   Long term solution: add type size detect in configure like Squid 2.5 and
+   define PRIu64 according to the size of long int and int64_t.      
+ */
+#elif defined(__alpha) && defined(_SQUID_OSF_)
+#define PRIu64 "lu"
 #else
 #define PRIu64 "llu"
 #endif /* _SQUID_MSWIN_ */
index 5a572f1e6d7abb01cacd46125c939a670f34d095..896e86cd8bbc9ded532cfa112cb86ef3cb62c316 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir.cc,v 1.150 2005/01/03 16:08:26 robertc Exp $
+ * $Id: store_dir.cc,v 1.151 2005/07/03 15:25:09 serassio Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -859,7 +859,7 @@ StoreHashIndex::maintain()
 }
 
 void
-StoreHashIndex::updateSize(unsigned int, int)
+StoreHashIndex::updateSize(size_t, int)
 {}
 
 void