]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
misc cleanup related to #include shuffle
authorwessels <>
Wed, 27 Mar 1996 11:42:08 +0000 (11:42 +0000)
committerwessels <>
Wed, 27 Mar 1996 11:42:08 +0000 (11:42 +0000)
src/main.cc
src/squid.h
src/store.cc
src/tools.cc

index 3d37532a543d97e86fb54c1e4c189c600aba8a48..b699de23aa931d3f1d202feb2f2925c420426874 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: main.cc,v 1.8 1996/03/27 02:13:04 wessels Exp $ */
+/* $Id: main.cc,v 1.9 1996/03/27 04:42:08 wessels Exp $ */
 
 #include "squid.h"
 
@@ -37,7 +37,6 @@ static int binaryPortNumOverride = 0;
 static int udpPortNumOverride = 0;
 
 void raise_debug_lvl(), reset_debug_lvl();
-void death(), deathb(), shut_down(), rotate_logs();
 void sig_child();
 
 int main(argc, argv)
@@ -214,7 +213,7 @@ Usage: cached [-Rsehvz] [-f config-file] [-d debug-level] [-[apu] port]\n\
 
     if (catch_signals) {
        signal(SIGSEGV, death);
-       signal(SIGBUS, deathb);
+       signal(SIGBUS, death);
     }
     signal(SIGPIPE, SIG_IGN);
     signal(SIGCHLD, sig_child);
index 036c4e573ae95521c25a6d4c844a2b390df8e8a1..ecb33dd4dd6675b54d3a7e7ed85d500e93b60da7 100644 (file)
@@ -1,5 +1,5 @@
 
-/* $Id: squid.h,v 1.1 1996/03/27 01:46:18 wessels Exp $ */
+/* $Id: squid.h,v 1.2 1996/03/27 04:42:09 wessels Exp $ */
 
 #include "config.h"
 #include "autoconf.h"
@@ -8,7 +8,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <sys/types.h>
-#include <bstring.h>
 #include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
@@ -20,7 +19,6 @@
 #include <signal.h>
 #include <string.h>
 #include <strings.h>
-#include <sys/errno.h>
 #include <sys/param.h>
 #include <sys/resource.h>
 #include <sys/select.h>
@@ -66,12 +64,12 @@ typedef struct icp_common_s icp_common_t;
 typedef struct _cacheinfo cacheinfo;
 
 /* 32 bit integer compatability hack */
-#if SIZEOF_LONG == 4
-typedef long num32;
-typedef unsigned long u_num32;
-#elif SIZEOF_INT == 4
+#if SIZEOF_INT == 4
 typedef int num32;
 typedef unsigned int u_num32;
+#elif SIZEOF_LONG == 4
+typedef long num32;
+typedef unsigned long u_num32;
 #else
 typedef long num32;            /* assume that long's are 32bit */
 typedef unsigned long u_num32;
index 19dd19184cd7b1a319f0b9b673ee29dc941918b2..e15136ffd6ebdd311577a80b3b23f9e6df5f4861 100644 (file)
@@ -1,5 +1,5 @@
 
-/* $Id: store.cc,v 1.10 1996/03/27 01:46:23 wessels Exp $ */
+/* $Id: store.cc,v 1.11 1996/03/27 04:42:09 wessels Exp $ */
 
 /* 
  * Here is a summary of the routines which change mem_status and swap_status:
@@ -2344,7 +2344,7 @@ int urlcmp(url1, url2)
      char *url1, *url2;
 {
     if (!url1 || !url2)
-       death();
+       fatal_dump("urlcmp: Got a NULL url pointer.\n");
     return (strcmp(url1, url2));
 }
 
index ea6c150796c47d1f67330dce8d858f1624cb9703..cc4b821633a23c48fe8aaf0c9fd18f1907f95505 100644 (file)
@@ -1,5 +1,5 @@
 
-/* $Id: tools.cc,v 1.7 1996/03/27 02:13:04 wessels Exp $ */
+/* $Id: tools.cc,v 1.8 1996/03/27 04:42:10 wessels Exp $ */
 
 #include "squid.h"
 
@@ -55,11 +55,18 @@ void print_warranty()
        puts(dead_msg());
 }
 
-void death()
+void death(sig)
+       int sig;
 {
-    fprintf(stderr, "FATAL: Received Segment Violation...dying.\n");
+    if (sig == SIGSEGV)
+       fprintf(stderr, "FATAL: Received Segment Violation...dying.\n");
+    else if (sig == SIGBUS)
+        fprintf(stderr, "FATAL: Received bus error...dying.\n");
+    else
+        fprintf(stderr, "FATAL: Received signal %d...dying.\n", sig);
     signal(SIGSEGV, SIG_DFL);
     signal(SIGBUS, SIG_DFL);
+    signal(sig, SIG_DFL);
     storeWriteCleanLog();
     PrintRusage(NULL, stderr);
     print_warranty();
@@ -67,18 +74,6 @@ void death()
 }
 
 
-void deathb()
-{
-    fprintf(stderr, "FATAL: Received bus error...dying.\n");
-    signal(SIGSEGV, SIG_DFL);
-    signal(SIGBUS, SIG_DFL);
-    signal(SIGBUS, SIG_DFL);
-    storeWriteCleanLog();
-    PrintRusage(NULL, stderr);
-    print_warranty();
-    abort();
-}
-
 void rotate_logs(sig)
      int sig;
 {