]> sjero.net Git - wget/commitdiff
[svn] Check for both SIGUSR1 and SIGHUP before using them.
authorhniksic <devnull@localhost>
Thu, 30 Jun 2005 12:15:08 +0000 (05:15 -0700)
committerhniksic <devnull@localhost>
Thu, 30 Jun 2005 12:15:08 +0000 (05:15 -0700)
src/ChangeLog
src/main.c

index bbe364c64e4a2e3ba77e939bf19c85c39b11d7f8..ca419b494eee15530540cb256320db8ce76c7fff 100644 (file)
@@ -1,3 +1,7 @@
+2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * main.c: Check for both SIGHUP and SIGUSR1 before using them.
+
 2005-06-29  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * utils.c: Unconditionally include locale.h.
index d05292a7c5e84d8218b906092c05bdbdee3f444c..595efb2f931d9bcdf23dc2ed36b3ee7ef077424d 100644 (file)
@@ -64,7 +64,9 @@ struct options opt;
 
 extern char *version_string;
 
+#if defined(SIGHUP) || defined(SIGUSR1)
 static void redirect_output_signal (int);
+#endif
 
 const char *exec_name;
 \f
@@ -1002,6 +1004,15 @@ Can't timestamp and not clobber old files at the same time.\n"));
 }
 \f
 #if defined(SIGHUP) || defined(SIGUSR1)
+
+/* So the signal_name check doesn't blow when only one is available. */
+#ifndef SIGHUP
+# define SIGHUP -1
+#endif
+#ifndef SIGUSR1
+# define SIGUSR1 -1
+#endif
+
 /* Hangup signal handler.  When wget receives SIGHUP or SIGUSR1, it
    will proceed operation as usual, trying to write into a log file.
    If that is impossible, the output will be turned off.  */