zgrep: don't assume traditional behavior with signal numbers
[debian/gzip] / gzip.c
diff --git a/gzip.c b/gzip.c
index d42bfa857e1dc70f45a6fcd3d106cc5e43c5c126..1a9e3003eea667c50cb496769420bddde06f0779 100644 (file)
--- a/gzip.c
+++ b/gzip.c
@@ -144,10 +144,6 @@ static char const *const license_msg[] = {
 # define HAVE_WORKING_O_NOFOLLOW 0
 #endif
 
-#ifndef ELOOP
-# define ELOOP EINVAL
-#endif
-
 /* Separator for file name parts (see shorten_name()) */
 #ifdef NO_MULTIPLE_DOTS
 #  define PART_SEP "-"
@@ -234,11 +230,7 @@ static int handled_sig[] =
 #ifdef SIGHUP
     , SIGHUP
 #endif
-#ifdef SIGPIPE
     , SIGPIPE
-#else
-# define SIGPIPE 0
-#endif
 #ifdef SIGTERM
     , SIGTERM
 #endif
@@ -1553,8 +1545,7 @@ local void do_list(ifd, method)
     bytes_out = -1L;
     bytes_in = ifile_size;
 
-#if RECORD_IO == 0
-    if (method == DEFLATED && !last_member) {
+    if (!RECORD_IO && method == DEFLATED && !last_member) {
         /* Get the crc and uncompressed size for gzip'ed (not zip'ed) files.
          * If the lseek fails, we could use read() to get to the end, but
          * --list is used to get quick results.
@@ -1572,7 +1563,7 @@ local void do_list(ifd, method)
             bytes_out = LG(buf+4);
         }
     }
-#endif /* RECORD_IO */
+
     if (verbose)
       {
         struct tm *tm = localtime (&time_stamp.tv_sec);
@@ -1723,7 +1714,7 @@ local void copy_stat(ifstat)
         }
       }
 
-    if (gl_futimens (ofd, ofname, timespec) != 0)
+    if (fdutimens (ofd, ofname, timespec) != 0)
       {
         int e = errno;
         WARN ((stderr, "%s: ", program_name));