From b45d00dd913de2051f9c894375f333bf30db45fd Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 17 Aug 2010 03:05:56 -0700 Subject: [PATCH] gzip: fix NO_SIZE_CHECK for VMS * 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 | 5 ++--- tailor.h | 1 + zip.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gzip.c b/gzip.c index d42bfa8..acb8b55 100644 --- 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); diff --git a/tailor.h b/tailor.h index cc150ef..39eb0a1 100644 --- a/tailor.h +++ b/tailor.h @@ -162,6 +162,7 @@ # 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 b0452ac..7162366 100644 --- 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) */ -- 2.47.2