]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
From: Markus Gyger <mgyger@itr.ch>
authorwessels <>
Tue, 17 Sep 1996 22:32:20 +0000 (22:32 +0000)
committerwessels <>
Tue, 17 Sep 1996 22:32:20 +0000 (22:32 +0000)
==============================================================================
> The most important change to this version is the switch to ANSI-style
> coding.
Great! Here are some diffs to keep my picky ISO C compiler more
silent.

18 files changed:
ChangeLog
include/version.h
lib/rfc1738.c
scripts/cache-compare.pl
src/acl.cc
src/cache_cf.cc
src/client_side.cc
src/comm.cc
src/debug.cc
src/disk.cc
src/dns.cc
src/errorpage.cc
src/icmp.cc
src/ident.cc
src/main.cc
src/squid.h
src/stat.cc
src/tools.cc

index 69ac6d0d08fc5606a5473bcdab2b6d6e31eed0d9..59b4a5594a653a0f707ae2b5a67e5993a49386b9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Changes to squid-1.1.beta3 ():
+
+       - s/()/(void)/
+       - Fixed 8k page leak in icmpRecv().
+
 Changes to squid-1.1.beta2 (September 16, 1996):
 
        - Switched to ANSI style coding.
index 135534480c85c0f13b44e33f31f77217a8abb72d..41ca162ef0e72d883e59aa66fa652b5358af91a8 100644 (file)
@@ -1,9 +1,9 @@
-/* $Id: version.h,v 1.41 1996/09/14 16:55:26 wessels Exp $
+/* $Id: version.h,v 1.42 1996/09/17 16:32:25 wessels Exp $
  *
  *  SQUID_VERSION - String for version id of this distribution
  */
 #ifndef SQUID_VERSION
-#define SQUID_VERSION  "1.1.beta2"
+#define SQUID_VERSION  "1.1.beta3"
 #endif
 
 #ifndef SQUID_RELEASE_TIME
index e334bd49555a4e63061580af8b7f7ed1f0de0354..cd38939232feb67f8b8d7558028b169180ffffeb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rfc1738.c,v 1.4 1996/09/14 08:50:50 wessels Exp $
+ * $Id: rfc1738.c,v 1.5 1996/09/17 16:32:26 wessels Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -161,7 +161,7 @@ rfc1738_escape(char *url)
            }
        }
        /* RFC 1738 says any control chars (0x00-0x1F) are encoded */
-       if (*p <= (char) 0x1F) {
+       if ((unsigned char) *p <= (unsigned char) 0x1F) {
            do_escape = 1;
        }
        /* RFC 1738 says 0x7f is encoded */
@@ -169,7 +169,8 @@ rfc1738_escape(char *url)
            do_escape = 1;
        }
        /* RFC 1738 says any non-US-ASCII are encoded */
-       if ((*p >= (char) 0x80) && (*p <= (char) 0xFF)) {
+       if (((unsigned char) *p >= (unsigned char) 0x80) &&
+           ((unsigned char) *p <= (unsigned char) 0xFF)) {
            do_escape = 1;
        }
        /* Do the triplet encoding, or just copy the char */
index edc4cc1d3f1c9d8381c2ccfe9858be35ad068837..c14523176f5a4876ba449583c2ff58b79d2cb2a3 100755 (executable)
 # BUGS:
 # Should probably cache the gethostbyname() calls.
 
-@getfrom = ('SOURCE', 'localhost:3128');
+@getfrom = ('SOURCE', 'localhost:3128', 'bo:3128');
 
 require 'sys/socket.ph';
-$gettimeofday = 116;           # cheating, should use require syscall.ph
+$gettimeofday = 1128;          # cheating, should use require syscall.ph
 
 while (<>) {
        chop ($url = $_);
index a12a31bfc62481469bafccdc9296a9f22ce35c8f..5b155def6b776880ecd521f5124ef596ad1a5777 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: acl.cc,v 1.40 1996/09/17 02:29:48 wessels Exp $
+ * $Id: acl.cc,v 1.41 1996/09/17 16:32:31 wessels Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -173,7 +173,7 @@ decode_addr(char *asc, struct in_addr *addr, struct in_addr *mask)
        break;
     case 1:                    /* a significant bits value for a mask */
        if (a1 >= 0 && a1 < 33) {
-           addr->s_addr = htonl(0xffffffff << (32 - a1));
+           addr->s_addr = htonl(0xfffffffful << (32 - a1));
            break;
        }
     default:
@@ -192,16 +192,16 @@ decode_addr(char *asc, struct in_addr *addr, struct in_addr *mask)
 
        /* Guess netmask */
        a = ntohl(addr->s_addr);
-       if (!(a & 0xFFFFFFFF))
-           mask->s_addr = htonl(0x00000000);
+       if (!(a & 0xFFFFFFFFul))
+           mask->s_addr = htonl(0x00000000ul);
        else if (!(a & 0x00FFFFFF))
-           mask->s_addr = htonl(0xFF000000);
+           mask->s_addr = htonl(0xFF000000ul);
        else if (!(a & 0x0000FFFF))
-           mask->s_addr = htonl(0xFFFF0000);
+           mask->s_addr = htonl(0xFFFF0000ul);
        else if (!(a & 0x000000FF))
-           mask->s_addr = htonl(0xFFFFFF00);
+           mask->s_addr = htonl(0xFFFFFF00ul);
        else
-           mask->s_addr = htonl(0xFFFFFFFF);
+           mask->s_addr = htonl(0xFFFFFFFFul);
        addr->s_addr &= mask->s_addr;
        /* 1.2.3.4/255.255.255.0  --> 1.2.3.0 */
     }
index aa79160ed3b66c8f3c162de6d748e02b8db27d78..bd14ccf2a945a79065747b386ba77c040d5dc944 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cache_cf.cc,v 1.90 1996/09/17 02:29:50 wessels Exp $
+ * $Id: cache_cf.cc,v 1.91 1996/09/17 16:32:32 wessels Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -190,7 +190,7 @@ struct SquidConfig Config;
 #define DefaultTcpOutgoingAddr INADDR_NONE
 #define DefaultUdpIncomingAddr INADDR_ANY
 #define DefaultUdpOutgoingAddr INADDR_NONE
-#define DefaultClientNetmask   0xFFFFFFFF
+#define DefaultClientNetmask    0xFFFFFFFFul
 #define DefaultSslProxyPort    0
 #define DefaultSslProxyHost    (char *)NULL
 #define DefaultIpcacheSize     1024
@@ -351,15 +351,15 @@ addToIPACL(ip_acl ** list, char *ip_str, ip_access_type access)
        switch (c) {
        case 4:
            if (a1 == 0 && a2 == 0 && a3 == 0 && a4 == 0)       /* world   */
-               lmask.s_addr = 0x00000000;
+               lmask.s_addr = 0x00000000ul;
            else if (a2 == 0 && a3 == 0 && a4 == 0)     /* class A */
-               lmask.s_addr = htonl(0xff000000);
+               lmask.s_addr = htonl(0xff000000ul);
            else if (a3 == 0 && a4 == 0)        /* class B */
-               lmask.s_addr = htonl(0xffff0000);
+               lmask.s_addr = htonl(0xffff0000ul);
            else if (a4 == 0)   /* class C */
-               lmask.s_addr = htonl(0xffffff00);
+               lmask.s_addr = htonl(0xffffff00ul);
            else
-               lmask.s_addr = 0xffffffff;
+               lmask.s_addr = 0xfffffffful;
            break;
 
        case 5:
@@ -368,7 +368,7 @@ addToIPACL(ip_acl ** list, char *ip_str, ip_access_type access)
                    ip_str);
                return;
            }
-           lmask.s_addr = htonl(0xffffffff << (32 - m1));
+           lmask.s_addr = htonl(0xfffffffful << (32 - m1));
            break;
 
        case 8:
index 3f4d74b32bc082928c969f4565338dec1b58a0d1..5a4e2d8fe97218ee69ad7a9514525121fabfee7e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.29 1996/09/17 02:29:51 wessels Exp $
+ * $Id: client_side.cc,v 1.30 1996/09/17 16:32:34 wessels Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -225,7 +225,7 @@ clientRedirectDone(void *data, char *result)
 #define CHECK_PROXY_FILE_TIME 300
 
 char *
-proxyAuthenticate(void)
+proxyAuthenticate(char *headers)
 {
     /* Keep the time measurements and the hash
      * table of users and passwords handy */
index 180df7da3d329aa64012d95fcadabf0ac5547e59..3c008bd724938ec06cfc8992825a05399fda864b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm.cc,v 1.73 1996/09/17 02:29:52 wessels Exp $
+ * $Id: comm.cc,v 1.74 1996/09/17 16:32:35 wessels Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -1328,7 +1328,7 @@ commHandleWrite(int fd, RWStateData * state)
 /* Select for Writing on FD, until SIZE bytes are sent.  Call
  * * HANDLER when complete. */
 void
-comm_write(int fd, char *buf, int size, int timeout, rw_complete_handler * handler, void *handler_data, void (*free) (void *))
+comm_write(int fd, char *buf, int size, int timeout, rw_complete_handler * handler, void *handler_data, void (*free_func) (void *))
 {
     RWStateData *state = NULL;
 
@@ -1347,7 +1347,7 @@ comm_write(int fd, char *buf, int size, int timeout, rw_complete_handler * handl
     state->timeout = timeout;
     state->time = squid_curtime;
     state->handler_data = handler_data;
-    state->free = free;
+    state->free = free_func;
     fd_table[fd].rwstate = state;
     comm_set_select_handler(fd,
        COMM_SELECT_WRITE,
index ead56201b00d3f6ad08eab13af6797c2aa9fda79..84f5e5b4447528093033ba0d70c34b81f03f40d1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: debug.cc,v 1.24 1996/09/17 02:29:52 wessels Exp $
+ * $Id: debug.cc,v 1.25 1996/09/17 16:32:36 wessels Exp $
  *
  * DEBUG: section 0     Debug Routines
  * AUTHOR: Harvest Derived
 
 #include "squid.h"
 
-char *_db_file = __FILE__;
-int _db_line = 0;
+char *volatile _db_file = __FILE__;
+volatile int _db_line = 0;
 
 FILE *debug_log = NULL;
 static char *debug_log_file = NULL;
index 1179fca59d7c72d38b3b1b25227a3f7d1add5088..b39537b1a9e2547d251911f48ad7390981a28562 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: disk.cc,v 1.26 1996/09/17 02:29:53 wessels Exp $
+ * $Id: disk.cc,v 1.27 1996/09/17 16:32:37 wessels Exp $
  *
  * DEBUG: section 6     Disk I/O Routines
  * AUTHOR: Harvest Derived
@@ -338,7 +338,7 @@ file_write(int fd,
     int access_code,
     void (*handle) (),
     void *handle_data,
-    void (*free) (void *))
+    void (*free_func) (void *))
 {
     dwrite_q *wq = NULL;
 
@@ -355,7 +355,7 @@ file_write(int fd,
     wq->len = len;
     wq->cur_offset = 0;
     wq->next = NULL;
-    wq->free = free;
+    wq->free = free_func;
     file_table[fd].wrt_handle = handle;
     file_table[fd].wrt_handle_data = handle_data;
 
index 93ae445e359c131dfbb4f1c0042245f184d34e2c..9ad470af16e0ca81d96a84bcd1f737931aad482d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dns.cc,v 1.11 1996/09/17 02:29:54 wessels Exp $
+ * $Id: dns.cc,v 1.12 1996/09/17 16:32:38 wessels Exp $
  *
  * DEBUG: section 34    Dnsserver interface
  * AUTHOR: Harvest Derived
@@ -285,7 +285,7 @@ dnsShutdownServers(void)
 {
     dnsserver_t *dnsData = NULL;
     int k;
-    static char *shutdown = "$shutdown\n";
+    static char *shutdown_cmd = "$shutdown\n";
 
     debug(34, 3, "dnsShutdownServers:\n");
 
@@ -309,8 +309,8 @@ dnsShutdownServers(void)
        debug(34, 3, "dnsShutdownServers: sending '$shutdown' to dnsserver #%d\n", dnsData->id);
        debug(34, 3, "dnsShutdownServers: --> FD %d\n", dnsData->outpipe);
        comm_write(dnsData->outpipe,
-           xstrdup(shutdown),
-           strlen(shutdown),
+           xstrdup(shutdown_cmd),
+           strlen(shutdown_cmd),
            0,                  /* timeout */
            NULL,               /* Handler */
            NULL,               /* Handler-data */
index 8ff3de1f779c19564f87022c810c3503c34fe8d1..29d695f56fc0381c62134c825a1a73c6b96f8752 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: errorpage.cc,v 1.39 1996/09/17 02:29:54 wessels Exp $
+ * $Id: errorpage.cc,v 1.40 1996/09/17 16:32:39 wessels Exp $
  *
  * DEBUG: section 4     Error Generation
  * AUTHOR: Duane Wessels
@@ -152,22 +152,22 @@ errorInitialize(void)
 void
 squid_error_entry(StoreEntry * entry, log_type type, char *msg)
 {
-    int index;
+    int error_index;
 
     if (type < ERR_MIN || type > ERR_MAX)
        fatal_dump("squid_error_entry: type out of range.");
-    index = (int) (type - ERR_MIN);
-    debug(4, 1, "%s: %s\n", ErrorData[index].tag, entry->url);
+    error_index = (int) (type - ERR_MIN);
+    debug(4, 1, "%s: %s\n", ErrorData[error_index].tag, entry->url);
     sprintf(tmp_error_buf, SQUID_ERROR_MSG_P1,
        entry->url,
        entry->url,
-       ErrorData[index].shrt);
+       ErrorData[error_index].shrt);
     if (msg) {
        sprintf(tbuf, SQUID_ERROR_MSG_P2, msg);
        strcat(tmp_error_buf, tbuf);
     }
     sprintf(tbuf, SQUID_ERROR_MSG_P3,
-       ErrorData[index].lng,
+       ErrorData[error_index].lng,
        Config.errHtmlText,
        appname,
        version_string,
@@ -186,25 +186,25 @@ squid_error_entry(StoreEntry * entry, log_type type, char *msg)
 char *
 squid_error_url(char *url, int method, int type, char *address, int code, char *msg)
 {
-    int index;
+    int error_index;
 
     *tmp_error_buf = '\0';
     if (type < ERR_MIN || type > ERR_MAX)
        fatal_dump("squid_error_url: type out of range.");
-    index = (int) (type - ERR_MIN);
-    debug(4, 1, "%s: %s\n", ErrorData[index].tag, url);
+    error_index = (int) (type - ERR_MIN);
+    debug(4, 1, "%s: %s\n", ErrorData[error_index].tag, url);
     sprintf(tmp_error_buf, "HTTP/1.0 %d Cache Detected Error\r\nContent-type: text/html\r\n\r\n", code);
     sprintf(tbuf, SQUID_ERROR_MSG_P1,
        url,
        url,
-       ErrorData[index].shrt);
+       ErrorData[error_index].shrt);
     strcat(tmp_error_buf, tbuf);
     if (msg) {
        sprintf(tbuf, SQUID_ERROR_MSG_P2, msg);
        strcat(tmp_error_buf, tbuf);
     }
     sprintf(tbuf, SQUID_ERROR_MSG_P3,
-       ErrorData[index].lng,
+       ErrorData[error_index].lng,
        Config.errHtmlText,
        appname,
        version_string,
@@ -233,13 +233,13 @@ Generated by %s/%s@%s\n\
 char *
 squid_error_request(char *request, int type, char *address, int code)
 {
-    int index;
+    int error_index;
 
     *tmp_error_buf = '\0';
     if (type < ERR_MIN || type > ERR_MAX)
        fatal_dump("squid_error_request: type out of range.");
-    index = (int) (type - ERR_MIN);
-    debug(4, 1, "%s: %s\n", ErrorData[index].tag, request);
+    error_index = (int) (type - ERR_MIN);
+    debug(4, 1, "%s: %s\n", ErrorData[error_index].tag, request);
     sprintf(tmp_error_buf, "HTTP/1.0 %d Cache Detected Error\r\nContent-type: text/html\r\n\r\n", code);
     sprintf(tbuf, SQUID_REQUEST_ERROR_MSG,
        request,
index 16c88e264833833e7e5842b8f9627e7d7f53c61a..83d6d94c0519f7af146bb854a52152781ec3eea1 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: icmp.cc,v 1.5 1996/09/17 05:16:57 wessels Exp $
+ * $Id: icmp.cc,v 1.6 1996/09/17 16:32:40 wessels Exp $
  *
  * DEBUG: section 37    ICMP Routines
  * AUTHOR: Duane Wessels
@@ -174,7 +174,7 @@ icmpSendEcho(struct in_addr to, int opcode, char *payload, int len)
     int icmp_pktsize = sizeof(struct icmphdr);
     pkt = get_free_8k_page();
     memset(pkt, '\0', 8192);
-    icmp = (struct icmphdr *) pkt;
+    icmp = (struct icmphdr *) (void *) pkt;
     icmp->icmp_type = ICMP_ECHO;
     icmp->icmp_code = 0;
     icmp->icmp_cksum = 0;
@@ -242,9 +242,9 @@ icmpRecv(int unused1, void *unused2)
        (struct sockaddr *) &from,
        &fromlen);
     debug(37, 9, "icmpRecv: %d bytes from %s\n", n, inet_ntoa(from.sin_addr));
-    ip = (struct iphdr *) pkt;
+    ip = (struct iphdr *) (void *) pkt;
     iphdrlen = ip->ip_hl << 2;
-    icmp = (struct icmphdr *) (pkt + iphdrlen);
+    icmp = (struct icmphdr *) (void *) (pkt + iphdrlen);
     if (icmp->icmp_type == ICMP_ECHOREPLY) {
        if (icmp->icmp_id == icmp_ident) {
            hops = ipHops(ip->ip_ttl);
@@ -301,7 +301,7 @@ icmpQueueSend(struct in_addr to,
        (void *) IcmpQueueHead);
 }
 
-void
+static void
 icmpSend(int fd, icmpQueueData * queue)
 {
     int x;
@@ -321,7 +321,7 @@ icmpSend(int fd, icmpQueueData * queue)
            debug(37, 0, "icmpSend: Wrote %d of %d bytes\n", x, queue->len);
        }
        IcmpQueueHead = queue->next;
-       icmpLog((struct icmphdr *) queue->msg, queue->to.sin_addr, 0, 0);
+       icmpLog((struct icmphdr *) (void *) queue->msg, queue->to.sin_addr, 0, 0);
        if (queue->free)
            queue->free(queue->msg);
        safe_free(queue);
index 658d859e086023b1533021d8947e10b9acc5f5a8..357430fa9d8a33670e765e2ea3c0bae3b1011e22 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ident.cc,v 1.14 1996/09/16 21:20:47 wessels Exp $
+ * $Id: ident.cc,v 1.15 1996/09/17 16:32:41 wessels Exp $
  *
  * DEBUG: section 30    Ident (RFC 931)
  * AUTHOR: Duane Wessels
@@ -47,12 +47,10 @@ void
 identStart(int sock, icpStateData * icpState)
 {
     char *host;
-    u_short port;
     LOCAL_ARRAY(char, reqbuf, BUFSIZ);
     int status;
 
     host = inet_ntoa(icpState->peer.sin_addr);
-    port = ntohs(icpState->peer.sin_port);
 
     if (sock < 0) {
        sock = comm_open(SOCK_STREAM,
index 17ecb660aa79ebaed7ab66d4c8ff41f39358d968..455f9517e13e87d427511f6ae9e5fe2634ba0d9a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: main.cc,v 1.79 1996/09/17 02:30:00 wessels Exp $
+ * $Id: main.cc,v 1.80 1996/09/17 16:32:42 wessels Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -120,9 +120,9 @@ int opt_syslog_enable = 0;  /* disabled by default */
 int opt_no_ipcache = 0;                /* use ipcache by default */
 static int opt_send_signal = -1;       /* no signal to send */
 int vhost_mode = 0;
-int unbuffered_logs = 1;       /* debug and hierarhcy unbuffered by default */
-int shutdown_pending = 0;      /* set by SIGTERM handler (shut_down()) */
-int reread_pending = 0;                /* set by SIGHUP handler */
+volatile int unbuffered_logs = 1;        /* debug and hierarchy unbuffered by default */
+volatile int shutdown_pending = 0;       /* set by SIGTERM handler (shut_down()) */
+volatile int reread_pending = 0;         /* set by SIGHUP handler */
 char version_string[] = SQUID_VERSION;
 char appname[] = "squid";
 char localhost[] = "127.0.0.1";
@@ -132,7 +132,7 @@ char *dash_str = "-";
 /* for error reporting from xmalloc and friends */
 extern void (*failure_notify) __P((char *));
 
-static int rotate_pending = 0; /* set by SIGUSR1 handler */
+volatile static int rotate_pending = 0;  /* set by SIGUSR1 handler */
 static int httpPortNumOverride = 1;
 static int icpPortNumOverride = 1;     /* Want to detect "-u 0" */
 #if MALLOC_DBG
@@ -540,29 +540,29 @@ static time_t
 mainMaintenance(void)
 {
     time_t next;
-    int n;
     if (squid_curtime >= next_maintain) {
        storeMaintainSwapSpace();
        next_maintain = squid_curtime + 1;
     }
-    if (store_rebuilding != STORE_NOT_REBUILDING)
-       goto maintenance_done;
-    if (squid_curtime >= next_ip_purge) {
-       ipcache_purgelru();
-       next_ip_purge = squid_curtime + 10;
-    } else if (squid_curtime >= next_dirclean) {
-       /* clean a cache directory every 15 seconds */
-       /* 15 * 16 * 256 = 17 hrs */
-       storeDirClean();
-       next_dirclean = squid_curtime + 15;
-    } else if (squid_curtime >= next_cleaning) {
-       n = storePurgeOld();
-       next_cleaning = squid_curtime + Config.cleanRate;
-    } else if (squid_curtime >= next_announce) {
-       send_announce();
-       next_announce = squid_curtime + Config.Announce.rate;
+
+    if (store_rebuilding == STORE_NOT_REBUILDING) {
+       if (squid_curtime >= next_ip_purge) {
+           ipcache_purgelru();
+           next_ip_purge = squid_curtime + 10;
+       } else if (squid_curtime >= next_dirclean) {
+           /* clean a cache directory every 15 seconds */
+           /* 15 * 16 * 256 = 17 hrs */
+           storeDirClean();
+           next_dirclean = squid_curtime + 15;
+       } else if (squid_curtime >= next_cleaning) {
+           storePurgeOld();
+           next_cleaning = squid_curtime + Config.cleanRate;
+       } else if (squid_curtime >= next_announce) {
+           send_announce();
+           next_announce = squid_curtime + Config.Announce.rate;
+       }
     }
-  maintenance_done:
+
     next = next_ip_purge;
     if (next_dirclean < next)
        next = next_dirclean;
index 9ac08387e5879e6f45ae4bdc0a99a92eead08a68..0b959710c215165f56030b69b6511410f4dcae02 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: squid.h,v 1.49 1996/09/16 21:11:14 wessels Exp $
+ * $Id: squid.h,v 1.50 1996/09/17 16:32:45 wessels Exp $
  *
  * AUTHOR: Duane Wessels
  *
 #endif
 
 #ifndef INADDR_NONE
-#define INADDR_NONE -1
+#define INADDR_NONE ((unsigned long) -1)
 #endif
 
 #if !defined(HAVE_RUSAGE) && defined(_SQUID_HPUX_)
@@ -264,8 +264,8 @@ extern int do_reuse;                /* main.c */
 extern int theHttpConnection;  /* main.c */
 extern int theInIcpConnection; /* main.c */
 extern int theOutIcpConnection;        /* main.c */
-extern int shutdown_pending;   /* main.c */
-extern int reread_pending;     /* main.c */
+extern volatile int shutdown_pending;   /* main.c */
+extern volatile int reread_pending;     /* main.c */
 extern int opt_unlink_on_reload;       /* main.c */
 extern int opt_reload_hit_only;        /* main.c */
 extern int opt_dns_tests;      /* main.c */
index e15cdd3d4becc90242ac0806f6d429990bc02fcb..07a81c29fde7cc959ddf6b0c4bcf45f109d1dca5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: stat.cc,v 1.71 1996/09/17 02:30:03 wessels Exp $
+ * $Id: stat.cc,v 1.72 1996/09/17 16:32:46 wessels Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -120,8 +120,8 @@ typedef struct _squid_read_data_t {
 
 /* GLOBALS */
 Meta_data meta_data;
-unsigned long ntcpconn = 0;
-unsigned long nudpconn = 0;
+volatile unsigned long ntcpconn = 0;
+volatile unsigned long nudpconn = 0;
 struct _iostats IOStats;
 
 char *stat_describe();
index 47ab643fba7ce5e7c6875cc45d8ce6f5263d19b1..7cf44c908176cef69d82331cfaa3a483db6c9b97 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tools.cc,v 1.60 1996/09/17 02:30:06 wessels Exp $
+ * $Id: tools.cc,v 1.61 1996/09/17 16:32:49 wessels Exp $
  *
  * DEBUG: section 21    Misc Functions
  * AUTHOR: Harvest Derived
@@ -613,7 +613,7 @@ accessLogTime(time_t t)
 {
     struct tm *tm;
     static char buf[128];
-    static char last_t = 0;
+    static time_t last_t = 0;
     if (t != last_t) {
        tm = localtime(&t);
        strftime(buf, 127, "%y/%m/%d %T", tm);