From: Jim Meyering Date: Mon, 6 Feb 2017 18:13:39 +0000 (-0800) Subject: maint: change "time stamp" to "timestamp" globally X-Git-Tag: v1.9~36 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;ds=sidebyside;h=e914d164fb31f87c0bf37ecc8012d7dd90c55fba;p=debian%2Fgzip maint: change "time stamp" to "timestamp" globally This avoids a new syntax-check failure. * ChangeLog-2007: Perform that change. * NEWS: Likewise. * algorithm.doc: Likewise. * doc/gzip.texi: Likewise. * gunzip.in: Likewise. * gzip.1: Likewise. * gzip.c: Likewise. * gzip.h: Likewise. * m4/.gitignore: Likewise. * sample/ztouch: Likewise. * tests/timestamp: Likewise. * unzip.c: Likewise. * zip.c: Likewise. * znew.1: Likewise. * cfg.mk: Update the old news hash accordingly. --- diff --git a/ChangeLog-2007 b/ChangeLog-2007 index cdc3c70..847f7f1 100644 --- a/ChangeLog-2007 +++ b/ChangeLog-2007 @@ -234,7 +234,7 @@ (treat_file): Do not report an error with setuid, setgid, sticky, or non-regular, non-directory files if to_stdout. Allow 'force' to override the caution about sticky files. - Use the same form for time stamps that treat_stdin uses. + Use the same form for timestamps that treat_stdin uses. * zdiff.in: Fix typo that broke most usages. Problem reported by Jari Aalto in . While we're at it, @@ -463,7 +463,7 @@ 2006-12-01 Paul Eggert * doc/gzip.texi (Overview): Mention limits of gzip format's - time stamps. Also, gzip doesn't always preserve time stamps. + timestamps. Also, gzip doesn't always preserve timestamps. * gzip.c (abort_gzip_signal): Don't call abort () as a "safeguard", since it actually causes a core dump. Problem reported by @@ -605,7 +605,7 @@ On usage errors, suggest --help without outputting all the help. (main, do_list): Remove unnecessary casts. (treat_stdin, treat_file, get_method, copy_stat): - Support sub-second time stamp resolution. + Support sub-second timestamp resolution. (treat_file, copy_istat): Close some race conditions if files are renamed as we read or write them. (treat_file): Do not attempt to reset the access times of @@ -616,8 +616,8 @@ (make_ofname): Don't use WARN, as it affects exit status. (get_method): When the original file name was truncated, restore from its base name, not from its full name. - (do_list): Avoid undefined behavior with out-of-range time stamps. - ctime, for example, cannot be invoked on arbitrary time stamps safely, + (do_list): Avoid undefined behavior with out-of-range timestamps. + ctime, for example, cannot be invoked on arbitrary timestamps safely, since it might overrun an internal buffer. Do not assume that localtime succeeds. (copy_stat): Do not remove input file; that's now the caller's @@ -647,8 +647,8 @@ All uses changed. (xalloc_die): New function. (xmalloc): Remove; no longer needed. - * zip.c (zip): Watch for time stamp overflow; the old code - mishandled negative time stamps. + * zip.c (zip): Watch for timestamp overflow; the old code + mishandled negative timestamps. * gzexe.in: Add support for --help, --version, --. Don't call basename or sed if we can avoid it. @@ -1228,7 +1228,7 @@ Wed Aug 18 09:34:23 1993 Jean-loup Gailly (jloup@chorus.fr) Check also the correctness of the first byte of an .Z file. Return non zero status for an invalid option. Remove "NEWFILES" from os2/gzip.def for Borland C++ on OS/2. - Remove "time stamp restored" message (just obey the -N request). + Remove "timestamp restored" message (just obey the -N request). Thu Jun 24 10:27:57 1993 Jean-loup Gailly (jloup@chorus.fr) @@ -1376,8 +1376,8 @@ Fri May 28 11:40:01 1993 Jean-loup Gailly (jloup@chorus.fr) Do not use the variable name 'overhead' which is reserved on Lynx! One BULL compiler does not like *p++ in inflate.c => *p, p++. Use casts on free and memcmp to avoid warnings. - Remove the "off by more than one minute" time stamp kludge, but - document how to avoid saving the time stamp on pipes if desired. + Remove the "off by more than one minute" timestamp kludge, but + document how to avoid saving the timestamp on pipes if desired. Include crypt.h in inflate.c (one system predefines the CRYPT symbol). Add links to gunzip and (g)zcat in the default make rule. Create installation directories if they do not exist. @@ -1422,7 +1422,7 @@ Thu Mar 18 18:56:43 1993 Jean-loup Gailly (jloup@chorus.fr) Fix acgeneral.m4 AC_COMPILE_CHECK to avoid warnings. Don't use alloca.c with gcc. (One NeXT user did not have alloca.h). Change all error messages according to GNU standards. - Restore time stamp only if off by more than one minute. + Restore timestamp only if off by more than one minute. Allow installation of zcat as gzcat. Suppress help message and send compressed data to the terminal when gzip is invoked without parameters and without redirection. @@ -1550,7 +1550,7 @@ Fri Feb 10 09:45:49 1993 Jean-loup Gailly (jloup@chorus.fr) Fix unlzw.c to make DYN_ALLOC and MAXSEG_64K independent options. Allow INBUFSIZ to be >= 32K in unlzw (don't use sign of rsize) Generate tar file in old format to avoid problems with old systems. - Preserve time stamp in znew -P if touch -r works. + Preserve timestamp in znew -P if touch -r works. Use ${PAGER-more} instead of ${PAGER:-more} in zmore. Do not use unsigned instead of mode_t. Better error message for trailing garbage in .z file; ignore this @@ -1652,7 +1652,7 @@ Mon Jan 5 10:16:24 1993 Jean-loup Gailly (jloup@chorus.fr) * Beta version 0.7 Use "make check" instead of "make test". Do not rely on dirname in znew. - Keep time stamp and pass options to gzip in znew. + Keep timestamp and pass options to gzip in znew. Rename .l files back to .1 to avoid conflict with lex Do not create .z.z files with gzip -r. Use nice_match in match.asm @@ -1679,7 +1679,7 @@ Tue Dec 30 20:00:19 1992 Jean-loup Gailly (jloup@chorus.fr) Display "untested" instead of "OK" for gzip -t foo.Z With -t, skip stdin in .Z format Allow multiple compressed members in an input file. - Ignore a zero time stamp. + Ignore a zero timestamp. Made znew safer. Tue Dec 29 10:00:19 1992 Noah Friedman (friedman@gnu.ai.mit.edu) diff --git a/NEWS b/NEWS index 262fcc2..7086553 100644 --- a/NEWS +++ b/NEWS @@ -4,11 +4,11 @@ GNU gzip NEWS -*- outline -*- ** Bug fixes - When converting time stamps to gzip file format (32-bit unsigned) or + When converting timestamps to gzip file format (32-bit unsigned) or to time_t format (system-dependent), gzip now ignores out-of-range values instead of shoehorning them into the destination format, - sometimes with undefined behavior. This affects time stamps before - 1970 and after 2106, and time stamps after 2038 on platforms with + sometimes with undefined behavior. This affects timestamps before + 1970 and after 2106, and timestamps after 2038 on platforms with 32-bit signed time_t. [bug present since the beginning] Support for VMS and Amiga has been removed. It was not working anyway, @@ -223,10 +223,10 @@ Major changes in Gzip 1.3.7 (2006-12-06) Major changes in Gzip 1.3.6 (2006-11-20) -* Fix some race conditions in setting file time stamps, permissions, and owner. +* Fix some race conditions in setting file timestamps, permissions, and owner. * Fix some race conditions in signal handling. * When gzip exits due to a signal, it exits with the signal's status, not 1. -* gzip now restores file time stamps to the resolution supported by the +* gzip now restores file timestamps to the resolution supported by the time-setting primitives of the operating system, typically 1 microsecond. Formerly it restored them only to the nearest second. * gzip -r no longer attempts to reset the last-access times of directories @@ -359,7 +359,7 @@ Major changes from 1.0.7 to 1.1. * Added comparison of zip and gzip in the readme file. * Added small sample programs (ztouch, sub, add) * Use less memory when compiled with -DSMALL_MEM (for MSDOS). -* Remove the "off by more than one minute" time stamp kludge +* Remove the "off by more than one minute" timestamp kludge Major changes from 1.0.6 to 1.0.7. * Allow zmore to read from standard input (like more). @@ -438,7 +438,7 @@ Major changes from 1.0.1 to 1.0.2 on such systems. * Added gzexe to compress rarely used executables. * Reduce memory usage (required for MSDOS and useful on all systems). -* Preserve time stamp in znew -P (pipe option) if touch -r works. +* Preserve timestamp in znew -P (pipe option) if touch -r works. Major changes from 1.0 to 1.0.1 @@ -479,7 +479,7 @@ Major changes from 0.7 to 0.8: Major changes from 0.6 to 0.7: * Use "make check" instead of "make test". -* Keep time stamp and pass options to gzip in znew. +* Keep timestamp and pass options to gzip in znew. * Do not create .z.z files with gzip -r. * Allow again gunzip .zip files (was working in 0.5) * Allow again compilation with TurboC 2.0 (was working in 0.4) diff --git a/algorithm.doc b/algorithm.doc index c8c3a92..aa46705 100644 --- a/algorithm.doc +++ b/algorithm.doc @@ -97,10 +97,10 @@ input size or the available size on the output media. If input does not come from a regular disk file, the file modification time is set to the time at which compression started. -The time stamp is useful mainly when one gzip file is transferred over +The timestamp is useful mainly when one gzip file is transferred over a network. In this case it would not help to keep ownership attributes. In the local case, the ownership attributes are preserved -by gzip when compressing/decompressing the file. A time stamp of zero +by gzip when compressing/decompressing the file. A timestamp of zero is ignored. Bit 0 in the flags is only an optional indication, which can be set by diff --git a/cfg.mk b/cfg.mk index a325e01..b70ee6e 100644 --- a/cfg.mk +++ b/cfg.mk @@ -35,7 +35,7 @@ bootstrap-tools = autoconf,automake,gnulib # Now that we have better tests, make this the default. export VERBOSE = yes -old_NEWS_hash = 8856cfaaa524d2f64231c21b004a5c1a +old_NEWS_hash = 8721b8773b81ae1ad7f7c8779e30ea03 sc_obs_header_regex = \ \<(STDC_HEADERS|HAVE_(LIMITS|STRING|UNISTD|STDLIB)_H)\> diff --git a/doc/gzip.texi b/doc/gzip.texi index 19061cf..0176da4 100644 --- a/doc/gzip.texi +++ b/doc/gzip.texi @@ -98,15 +98,15 @@ For example, if file names are limited to 14 characters, gzip.msdos.exe is compressed to gzi.msd.exe.gz. Names are not truncated on systems which do not have a limit on file name length. -By default, @command{gzip} keeps the original file name and time stamp in +By default, @command{gzip} keeps the original file name and timestamp in the compressed file. These are used when decompressing the file with the @option{-N} option. This is useful when the compressed file name was -truncated or when the time stamp was not preserved after a file +truncated or when the timestamp was not preserved after a file transfer. However, due to limitations in the current @command{gzip} file -format, fractional seconds are discarded. Also, time stamps must fall +format, fractional seconds are discarded. Also, timestamps must fall within the range 1970-01-01 00:00:01 through 2106-02-07 06:28:15 -@abbr{UTC}, and hosts whose operating systems use 32-bit time -stamps are further restricted to time stamps no later than 2038-01-19 +@abbr{UTC}, and hosts whose operating systems use 32-bit timestamps +are further restricted to timestamps no later than 2038-01-19 03:14:07 @abbr{UTC}. The upper bounds assume the typical case where leap seconds are ignored. @@ -168,7 +168,7 @@ larger than the original. The worst case expansion is a few bytes for the @command{gzip} file header, plus 5 bytes every 32K block, or an expansion ratio of 0.015% for large files. Note that the actual number of used disk blocks almost never increases. @command{gzip} normally preserves the mode, -ownership and time stamps of files when compressing or decompressing. +ownership and timestamps of files when compressing or decompressing. The @command{gzip} file format is specified in P. Deutsch, GZIP file format specification version 4.3, @@ -199,8 +199,8 @@ Mandatory arguments to long options are mandatory for short options too. -k, --keep keep (don't delete) input files -l, --list list compressed file contents -L, --license display software license - -n, --no-name do not save or restore the original name and time stamp - -N, --name save or restore the original name and time stamp + -n, --no-name do not save or restore the original name and timestamp + -N, --name save or restore the original name and timestamp -q, --quiet suppress all warnings -r, --recursive operate recursively on directories --rsyncable make rsync-friendly archive @@ -309,7 +309,7 @@ displayed: @example method: compression method (deflate,compress,lzh,pack) crc: the 32-bit CRC of the uncompressed data -date & time: time stamp for the uncompressed file +date & time: timestamp for the uncompressed file @end example The @abbr{CRC} is given as ffffffff for a file not in gzip format. @@ -334,20 +334,20 @@ Display the @command{gzip} license then quit. @item --no-name @itemx -n -When compressing, do not save the original file name and time stamp by +When compressing, do not save the original file name and timestamp by default. (The original name is always saved if the name had to be truncated.) When decompressing, do not restore the original file name if present (remove only the @command{gzip} suffix from the compressed file name) and do not restore the original -time stamp if present (copy it from the compressed file). This option +timestamp if present (copy it from the compressed file). This option is the default when decompressing. @item --name @itemx -N -When compressing, always save the original file name and time stamp; this +When compressing, always save the original file name and timestamp; this is the default. When decompressing, restore the original file name and -time stamp if present. This option is useful on systems which have -a limit on file name length or when the time stamp has been lost after +timestamp if present. This option is useful on systems which have +a limit on file name length or when the timestamp has been lost after a file transfer. @item --quiet diff --git a/gunzip.in b/gunzip.in index 395d1a6..140809c 100644 --- a/gunzip.in +++ b/gunzip.in @@ -34,8 +34,8 @@ Mandatory arguments to long options are mandatory for short options too. -f, --force force overwrite of output file and compress links -k, --keep keep (don't delete) input files -l, --list list compressed file contents - -n, --no-name do not save or restore the original name and time stamp - -N, --name save or restore the original name and time stamp + -n, --no-name do not save or restore the original name and timestamp + -N, --name save or restore the original name and timestamp -q, --quiet suppress all warnings -r, --recursive operate recursively on directories -S, --suffix=SUF use suffix SUF on compressed files diff --git a/gzip.1 b/gzip.1 index 67148fc..ffc8041 100644 --- a/gzip.1 +++ b/gzip.1 @@ -56,7 +56,7 @@ keeps the original file name and timestamp in the compressed file. These are used when decompressing the file with the .B \-N option. This is useful when the compressed file name was truncated or -when the time stamp was not preserved after a file transfer. +when the timestamp was not preserved after a file transfer. .PP Compressed files can be restored to their original form using .I gzip -d @@ -238,7 +238,7 @@ displayed: method: compression method crc: the 32-bit CRC of the uncompressed data - date & time: time stamp for the uncompressed file + date & time: timestamp for the uncompressed file The compression methods currently supported are deflate, compress, lzh (SCO compress -H) and pack. The crc is given as ffffffff for a file @@ -257,20 +257,20 @@ Display the license and quit. .TP .B \-n --no-name -When compressing, do not save the original file name and time stamp by +When compressing, do not save the original file name and timestamp by default. (The original name is always saved if the name had to be truncated.) When decompressing, do not restore the original file name if present (remove only the .I gzip suffix from the compressed file name) and do not restore the original -time stamp if present (copy it from the compressed file). This option +timestamp if present (copy it from the compressed file). This option is the default when decompressing. .TP .B \-N --name -When compressing, always save the original file name and time stamp; this +When compressing, always save the original file name and timestamp; this is the default. When decompressing, restore the original file name and -time stamp if present. This option is useful on systems which have -a limit on file name length or when the time stamp has been lost after +timestamp if present. This option is useful on systems which have +a limit on file name length or when the timestamp has been lost after a file transfer. .TP .B \-q --quiet diff --git a/gzip.c b/gzip.c index 707a190..3d2aeaf 100644 --- a/gzip.c +++ b/gzip.c @@ -194,7 +194,7 @@ static char *env; /* contents of GZIP env variable */ static char const *z_suffix; /* default suffix (can be set with --suffix) */ static size_t z_len; /* strlen(z_suffix) */ -/* The original time stamp (modification time). Its tv_nsec component +/* The original timestamp (modification time). Its tv_nsec component is negative if the original time is unknown or is out of time_t range; the latter can happen on hosts with 32-bit signed time_t because the gzip format's MTIME is 32-bit unsigned. */ @@ -365,8 +365,8 @@ local void help() " -m do not save or restore the original modification time", " -M, --time save or restore the original modification time", #endif - " -n, --no-name do not save or restore the original name and time stamp", - " -N, --name save or restore the original name and time stamp", + " -n, --no-name do not save or restore the original name and timestamp", + " -N, --name save or restore the original name and timestamp", " -q, --quiet suppress all warnings", #if ! NO_DIR " -r, --recursive operate recursively on directories", @@ -752,7 +752,7 @@ local void treat_stdin() strcpy(ifname, "stdin"); strcpy(ofname, "stdout"); - /* Get the file's time stamp and size. */ + /* Get the file's timestamp and size. */ if (fstat (STDIN_FILENO, &istat) != 0) { progerror ("standard input"); @@ -1479,7 +1479,7 @@ local int get_method(in) uch magic[10]; /* magic header */ int imagic0; /* first magic byte or EOF */ int imagic1; /* like magic[1], but can represent EOF */ - ulg stamp; /* time stamp */ + ulg stamp; /* timestamp */ /* If --force and --stdout, zcat == cat, so do not complain about * premature end of file: use try_byte instead of get_byte. @@ -1932,7 +1932,7 @@ local void copy_stat(ifstat) if (fdutimens (ofd, ofname, timespec) == 0) { if (restoring && 1 < verbose) { - fprintf(stderr, "%s: time stamp restored\n", ofname); + fprintf(stderr, "%s: timestamp restored\n", ofname); } } else diff --git a/gzip.h b/gzip.h index 2c5d748..76abd51 100644 --- a/gzip.h +++ b/gzip.h @@ -152,7 +152,7 @@ extern char ifname[]; /* input file name or "stdin" */ extern char ofname[]; /* output file name or "stdout" */ extern char *program_name; /* program name */ -extern struct timespec time_stamp; /* original time stamp (modification time) */ +extern struct timespec time_stamp; /* original timestamp (modification time) */ extern off_t ifile_size; /* input file size, -1 for devices (debug only) */ typedef int file_t; /* Do not use stdio */ diff --git a/m4/.gitignore b/m4/.gitignore index 73df7bd..286888d 100644 --- a/m4/.gitignore +++ b/m4/.gitignore @@ -141,3 +141,4 @@ /yesno.m4 /getprogname.m4 /limits-h.m4 +/pthread_rwlock_rdlock.m4 diff --git a/sample/ztouch b/sample/ztouch index c5d30ad..297f621 100755 --- a/sample/ztouch +++ b/sample/ztouch @@ -1,5 +1,5 @@ #! /usr/local/bin/perl -# Set the time stamp of a gzip'ed file from that stored in the file. +# Set the timestamp of a gzip'ed file from that stored in the file. # usage: ztouch files... foreach $file (@ARGV) { diff --git a/tests/timestamp b/tests/timestamp index 5434dfe..e538a4d 100755 --- a/tests/timestamp +++ b/tests/timestamp @@ -22,7 +22,7 @@ TZ=UTC0 export TZ -# On platforms supporting time stamps outside gzip's range, +# On platforms supporting timestamps outside gzip's range, # test that gzip warns when converting them to gzip format. for time in 190101010000 196912312359.59 197001010000 210602070628.16; do if touch -t $time in; then @@ -31,7 +31,7 @@ for time in 190101010000 196912312359.59 197001010000 210602070628.16; do rm -f in.gz in done -# Test that time stamps in range for gzip do not generate warnings. +# Test that timestamps in range for gzip do not generate warnings. for time in 197001010000.01 203801190314.07 203801190314.08 210602070628.15; do if touch -t $time in; then gzip in || fail=1 @@ -39,7 +39,7 @@ for time in 197001010000.01 203801190314.07 203801190314.08 210602070628.15; do rm -f in.gz in done -# On platforms that fail to support time stamps within gzip's range, +# On platforms that fail to support timestamps within gzip's range, # test that gzip warns when converting them from gzip format. touch -t 210602070628.15 in || { printf '\037\213\10\0\377\377\377\377\0\377\3\0\0\0\0\0\0\0\0\0' >y2106.gz || @@ -47,7 +47,7 @@ touch -t 210602070628.15 in || { returns_ 2 gzip -Nlv k || fail=1 Exit $fail diff --git a/unzip.c b/unzip.c index 9ef43db..867cdcc 100644 --- a/unzip.c +++ b/unzip.c @@ -96,7 +96,7 @@ int check_zipfile(in) ext_header = (h[LOCFLG] & EXTFLG) != 0; pkzip = 1; - /* Get ofname and time stamp from local header (to be done) */ + /* Get ofname and timestamp from local header (to be done) */ return OK; } diff --git a/zip.c b/zip.c index af51f98..eb5661f 100644 --- a/zip.c +++ b/zip.c @@ -60,9 +60,9 @@ int zip(in, out) stamp = time_stamp.tv_sec; else { - /* It's intended that time stamp 0 generates this warning, + /* It's intended that timestamp 0 generates this warning, since gzip format reserves 0 for something else. */ - warning ("file time stamp out of range for gzip format"); + warning ("file timestamp out of range for gzip format"); stamp = 0; } put_long (stamp); diff --git a/znew.1 b/znew.1 index 2a7e5e1..ffd3c91 100644 --- a/znew.1 +++ b/znew.1 @@ -36,7 +36,7 @@ If the .B \-P option is used, .I znew -does not maintain the time stamp if +does not maintain the timestamp if .IR touch (1) does not support the .B \-r