gzip: fix NO_SIZE_CHECK for VMS
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 17 Aug 2010 10:05:56 +0000 (03:05 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 17 Aug 2010 10:09:23 +0000 (03:09 -0700)
* gzip.c (do_list): Use if, not #if.
* tailor.h (NO_SIZE_CHECK) [defined(VAXC) || defined(VMS)]: Define.
* zip.c (zip): Simplify conditional, which was incorrect at any rate
for VMS.

gzip.c
tailor.h
zip.c

diff --git a/gzip.c b/gzip.c
index d42bfa857e1dc70f45a6fcd3d106cc5e43c5c126..acb8b55aff5db24ef86a11853129e582230e0533 100644 (file)
--- a/gzip.c
+++ b/gzip.c
@@ -1553,8 +1553,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 +1571,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);
index cc150ef8a040af1643154882a6b9c8f3d893095a..39eb0a104ed221f882d128a677138d9fdfb3f0d2 100644 (file)
--- a/tailor.h
+++ b/tailor.h
 #  define PATH_SEP2 ':'
 #  define SUFFIX_SEP ';'
 #  define NO_MULTIPLE_DOTS
+#  define NO_SIZE_CHECK
 #  define Z_SUFFIX "-gz"
 #  define RECORD_IO 1
 #  define casemap(c) tolow(c)
diff --git a/zip.c b/zip.c
index b0452acc0c35c789edb330edffb222f738bb6fce..71623660ad003fe32913acf0d7e72d7c407a219c 100644 (file)
--- a/zip.c
+++ b/zip.c
@@ -83,7 +83,7 @@ int zip(in, out)
 
     (void)deflate();
 
-#if !defined(NO_SIZE_CHECK) && !defined(RECORD_IO)
+#ifndef NO_SIZE_CHECK
   /* Check input size (but not in VMS -- variable record lengths mess it up)
    * and not on MSDOS -- diet in TSR mode reports an incorrect file size)
    */