New upstream version 1.8
[debian/gzip] / ChangeLog
1 2016-04-26  Jim Meyering  <meyering@fb.com>
2
3         version 1.8
4         * NEWS: Record release date.
5
6         gnulib: update to latest
7
8 2016-04-19  Paul Eggert  <eggert@cs.ucla.edu>
9
10         gzip: simplify by closing ourselves
11         This simplifies the previous fix, by avoiding the use of the
12         closein module.  That module was problematic, as gzip normally
13         does not use stdio for output and never uses it for input.
14         Also, it is a heavyweight module, as it drags many files into lib
15         (c-ctype.c, c-ctype.h, closein.c, closein.h, closeout.c, closeout.h,
16         close-stream.c, close-stream.h, config.charset, c-strcasecmp.c,
17         c-strcaseeq.h, c-strcase.h, c-strncasecmp.c, fpending.c, fpending.h,
18         freadahead.c, freadahead.h, localcharset.c, localcharset.h, mbrtowc.c,
19         mbsinit.c, quotearg.c, quotearg.h, quote.h, ref-add.sin, ref-del.sin,
20         streq.h, wctype-h.c, wctype.in.h) and into m4 (closein.m4, closeout.m4,
21         close-stream.m4, codeset.m4, configmake.m4, fpending.m4, freadahead.m4,
22         glibc21.m4, localcharset.m4, locale-fr.m4, locale-ja.m4, locale-zh.m4,
23         mbrtowc.m4, mbsinit.m4, mbstate_t.m4, quotearg.m4, wctype_h.m4),
24         and these files are thus no longer needed.
25         * bootstrap.conf (gnulib_modules): Remove closein.
26         * gzip.c: Don't include closein.h.
27         (stdin_was_read): New static var.
28         (main): Don't use close_stdin.
29         Invoke finish_out to exit after outputting via stdio's stdout.
30         Close stdin after reading it.
31         Restore previous way of closing stdout.
32         (treat_stdin): Record that stdin was read.
33         (finish_out): New function.
34
35         gzip: fix bug with -l output to pipes
36         Problem reported by Christian Franke via Eric Blake in:
37         http://bugs.gnu.org/23314
38         * NEWS: Mention this.
39         * gzip.c (main): Do not close stdout twice when given -l.
40         Instead, -l now just fflushes stdout, so that fdatasync
41         can synchronize it if --synchronize is also specified.
42         * tests/list: New test case.
43         * tests/Makefile.am (TESTS): Add it.
44
45 2016-03-28  Paul Eggert  <eggert@cs.ucla.edu>
46
47         Port to Oracle Solaris Studio 12.4
48         Problem reported by Kiyoshi KANAZAWA in: http://bugs.gnu.org/23133
49         * NEWS: Document this.
50         * configure.ac (ASMV): Do not define if NO_ASM is
51         anywhere in DEFS; it doesn't need to be surrounded by white space.
52         * lib/match.c: Do not use x86 version if __x86_64__ is defined.
53
54 2016-03-27  Jim Meyering  <meyering@fb.com>
55
56         maint: post-release administrivia
57         * NEWS: Add header line for next release.
58         * .prev-version: Record previous version.
59         * cfg.mk (old_NEWS_hash): Auto-update.
60
61         version 1.7
62         * NEWS: Record release date.
63
64 2016-03-26  Paul Eggert  <eggert@cs.ucla.edu>
65
66         Port to NetBSD 7.0
67         Problem reported by Assaf Gordon in: http://bugs.gnu.org/23107#13
68         * gzexe.in, zdiff.in, zgrep.in: Don't rely on mktemp -t,
69         as it has a different meaning in NetBSD.
70
71         * tests/init.sh: Sync from Gnulib.
72
73         Port to Alpine Linux which uses Busybox
74         * Makefile.am (check-local): Use plain diff rather than
75
76 2016-03-24  Jim Meyering  <meyering@fb.com>
77
78         gzip: also honor GZIP=--rsyncable
79         * gzip.c (main): Also accept --rsyncable when it is specified
80         via the GZIP environment variable.
81         I noticed this when gzip's "make dist" failed because maint.mk
82         detected that gzip now honors --rsyncable, yet when it set GZIP_ENV
83         to include that, and that propagated via automake-generated code
84         to the GZIP setting used in the "make dist" rule, there, it was not
85         honored, and caused "make dist" to fail.
86
87 2016-03-21  Paul Eggert  <eggert@cs.ucla.edu>
88
89         Fix typo in previous patch
90
91         Port to Solaris 11 /bin/sh
92         * m4/shell.m4 (AC_PROG_SHELL): Reject Solaris 11 /bin/sh.
93         A problem was reported by Nelson H. F. Beebe for OpenIndiana.
94         I reproduced a problem with different symptoms on Solaris 11.
95         Switching to Bash fixed it, and I hope this fixes it for
96         OpenIndiana too, since both problems appear to be shell-related.
97
98 2016-03-18  Paul Eggert  <eggert@cs.ucla.edu>
99
100         zgrep: with -f SPECIAL, read SPECIAL just once
101         Problem reported by Fulvio Scapin in: http://bugs.gnu.org/22945
102         * NEWS: Document this.
103         * tests/zgrep-f: Add a test.
104         Adjust a test to cover the case of more than one line in -f's input.
105         * zgrep.in (with_filename): With -f FILE, if FILE is stdin or not
106         a regular file, copy it into a temporary and use the temporary.
107
108 2016-03-15  Paul Eggert  <eggert@cs.ucla.edu>
109
110         gzip: port to AIX 7.1 + xlc V12.1
111         * inflate.c, unlzw.c, util.c: Include tailor.h after including any
112         system include file that might in turn include signal.h for the
113         first time, so that SIGPIPE is not #defined to 0 prematurely,
114         which clashes with signal.h's SIGPIPE.
115
116 2016-03-15  Jim Meyering  <meyering@fb.com>
117
118         gnulib: update to latest
119
120         maint: don't ignore gitlog-to-changelog failure
121         * Makefile.am (gen-ChangeLog): Don't ignore failure of
122         gitlog-to-changelog. This syncs to coreutils' copy of this rule.
123
124 2016-03-06  Paul Eggert  <eggert@cs.ucla.edu>
125
126         gzip: pacify clang
127         * gzip.c (do_list): Use 2D array of char for month abbreviations,
128         as this is clearer anyway, and it pacifies Clang.  Problem reported
129         by Assaf Gordon in: http://bugs.gnu.org/22900#40
130
131 2016-03-06  Jim Meyering  <meyering@fb.com>
132
133         tests: port to systems for which ":" is not the PATH separator
134         * Makefile.am (new_path): New variable.
135         (check-local): Use $(PATH_SEPARATOR) rather than a literal ":",
136         to avoid "make syntax-check" failure.
137
138 2016-03-06  Paul Eggert  <eggert@cs.ucla.edu>
139
140         doc: minor --rsyncable doc fixes
141         * doc/gzip.texi (Sample): Mention --rsyncable.
142         * gzip.c (help): Sort and do not capitalize the new --rsyncable
143         help string.
144
145         gzip: minor zgrep cleanup
146         * zgrep.in: Simplify previous change.
147
148         gzip: port zgrep to Solaris 11.2
149         Problem reported by Assaf Gordon in: http://bugs.gnu.org/22900#11
150         * zgrep.in: Port to Solaris 11.2 /bin/sh (ksh 93u 2011-02-08),
151         where $? is 256+SIG when a process was killed with signal SIG, and
152         where 'exit 257' is equivalent to 'exit 1'.  Apparently some other
153         sh implementations use 256+128+SIG.  So, instead of using plain
154         'exit $?', use the equivalent of 'exit ((128 * (128 <= $?)) + $? %
155         128)' within the script, and use the equivalent of 'kill -$($? %
156         128)' at the top level if the exit status is 128 or more.
157
158         gzip: remove --__bindir
159         * NEWS: Document this.
160         * gzexe.in, gunzip.in, zcat.in, zcmp.in, zdiff.in, zegrep.in:
161         * zfgrep.in, zforce.in, zgrep.in, zless.in, zmore.in, znew.in:
162         Remove support for undocumented --__bindir option.  Callers can
163         set PATH instead; that's less error-prone.  This fixes some
164         'make check' failures on my Solaris 11 box, which occurred
165         because the test scripts were mistakenly testing the installed
166         gzip rather than the gzip in the working directory.
167         * Makefile.am (.in): Don't replace bindir.
168         (check-local): Set PATH instead of using --__bindir.
169         * tests/help-version (gunzip_setuphelp, gzexe_setuphelp)
170         (zcat_setuphelp, zcmp_setuphelp, zdiff_setuphelp)
171         (zegrep_setuphelp, zfgrep_setuphelp, zforce_setuphelp)
172         (zgrep_setuphelp, zless_setuphelp, zmore_setuphelp)
173         (znew_setuphelp): Remove.  All uses removed.
174         (lbracket_setup): Default args to empty.
175
176 2016-03-04  Jim Meyering  <meyering@fb.com>
177
178         tests: fix "make check" failure on AIX 7.1
179         * tests/Makefile.am (TESTS_ENVIRONMENT): Modernize:
180         remove unused shell_or_perl_ function, and use an
181         export_with_values function as grep does, to remove
182         a lot of duplication.
183         Reported by Assaf Gordon in http://debbugs.gnu.org/22900
184
185 2016-03-02  Rusty Russell  <rusty@rustcorp.com.au>
186
187         gzip: support the --rsyncable option
188         * deflate.c: Include verify.h.
189         (RSYNC_WIN, RSYNC_SUM_MATCH): Define.
190         (rsync_sum, rsync_chunk_end): Declare file-scoped globals.
191         (lm_init): Initialize globals.
192         (fill_window): Update rsync_chunk_end.
193         (rsync_roll): New function.
194         (RSYNC_ROLL): New macro.
195         (FLUSH_BLOCK): Update for new "pad" parameter.
196         (deflate_fast): Use RSYNC_ROLL and flush/pad.
197         (deflate): Likewise.
198         * trees.c (flush_block): Add "pad" parameter.
199         * gzip.c (rsync): New global.
200         (RSYNCABLE_OPTION, longopts, help): Add the option.
201         (main): Set the new global.
202         * gzip.h (rsync): Declare new global.
203         (flush_block): Update prototype.
204         * doc/gzip.texi: Document it.
205         * gzip.1: Likewise.
206         * bootstrap.conf: Use verify module.
207         * NEWS (New feature): Mention it.
208         * Makefile.am (check-local): Add tests and use AM_V__* command-
209         hiding opions. Reported against Debian here:
210         https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=118118
211
212 2016-02-28  Jim Meyering  <meyering@fb.com>
213
214         maint: dist-check.mk: remove .deps dirs before comparing
215         "make distcheck" with automake-from-trunk would fail like this:
216           ...
217           Only in /gz/tests/torture/gzip/test/gzip-1.6.42-9d47.old: .deps
218           Only in /gz/tests/torture/gzip/test/gzip-1.6.42-9d47.old/lib: .deps
219           Only in /gz/tests/torture/gzip/test/gzip-1.6.42-9d47.old/lib/glthread: .deps
220         * dist-check.mk (my-distcheck): Remove all .deps directories before
221         comparing the two hierarchies.
222
223 2016-02-28  Paul Eggert  <eggert@cs.ucla.edu>
224
225         misc: update --version copyright
226         * gunzip.in, gzexe.in, zcat.in, zdiff.in, zforce.in, zgrep.in:
227         * zless.in, zmore.in, znew.in: Update copyright year in --version
228         output to 2016.
229
230         gzip: new option --synchronous
231         This follows up on the earlier patch to avoid data loss near the
232         system crashes.  It makes the new behavior optional, with the
233         default off.  See: http://bugs.gnu.org/22768
234         * NEWS, doc/gzip.texi (Sample, Invoking gzip), gunzip.in (usage):
235         * gzip.1, zcat.in (usage):
236         Document this.
237         * gzip.c (synchronous): New static var.
238         (SYNCHRONOUS_OPTION): New constant.
239         (longopts, help, main, treat_file): Add support for --synchronous.
240
241         gzip: use constants, not fileno
242         * gzip.c (main, treat_stdin, treat_file, get_method)
243         (check_ofname): Prefer STDIN_FILENO to fileno (stdin),
244         and similarly for STDOUT_FILENO.
245
246         gzip: fdatasync output dir before unlinking
247         This follows up on the earlier patch to avoid data loss near
248         the system crashes.  See: http://bugs.gnu.org/22768
249         * bootstrap.conf (gnulib_modules): Add dirname-lgpl, fdatasync,
250         openat-safer, unistd-safer, unlinkat.
251         * gzip.c: Include stddef.h, dirname.h.
252         Include fcntl--.h instead of fcntl-safer.h.
253         (RW_USER): Remove; no longer needed.
254         (dfname, dfd): New static vars.
255         (dot): New static const.
256         (atdir_eq, atdir_set): New functions.
257         (treat_file): Also fdatasync the output directory, if !keep.
258         (treat_file, create_outfile, open_and_stat):
259         Use dir fd for unlinkat and openat, if possible.
260         (open_and_stat): Omit mode argument, since it was always the
261         same.  All callers changed.
262         * lib/.gitignore, m4/.gitignore: Add new gnulib files.
263         * tailor.h (PROTO, NO_STDIN_FSTAT, OPEN): Remove.  Remove MACOS
264         section, as this stuff would not work anyway now, and circa 2001
265         Apple stopped supporting Mac OS 9 and earlier.
266         * zip.c: Do not include unistd.h and fcntl.h, as this file does
267         not directly use any symbols defined by those headers.
268
269 2016-02-22  Paul Eggert  <eggert@cs.ucla.edu>
270
271         fsync output file before closing
272         Problem reported by Yanyan Jiang 蒋炎岩 in: http://bugs.gnu.org/22768
273         * NEWS: Document this.
274         * bootstrap.conf (gnulib_modules): Add fsync.
275         * gzip.c (treat_file): Call fsync just before closing the output.
276         * lib/.gitignore, m4/.gitignore: Add fsync-related gnulib files.
277
278 2016-01-22  Jason Leschnik  <jason@leschnik.me>
279
280         doc: correct a diagnostic in man page to match actual
281         * gzip.1: s/no change/unchanged/
282         This addresses http://debbugs.gnu.org/22413
283
284 2016-01-01  Jim Meyering  <meyering@fb.com>
285
286         maint: update copyright year, bootstrap, init.sh
287         Run "make update-copyright" and then...
288
289         * gzip.c: Transform the copyright notice via s/2015/2016/.
290         * gnulib: Update to latest.
291         * tests/init.sh: Update from gnulib.
292         * bootstrap: Likewise.
293
294 2015-11-01  Jim Meyering  <meyering@fb.com>
295
296         maint: avoid three warnings from the very latest gcc-built-from-git
297         * unzip.c (unzip): Correct two format strings to match the types of the corresponding arguments.
298         * unlzw.c (unlzw): Cast an "int" to unsigned to match expected type of %x.
299
300 2015-08-24  Jim Meyering  <meyering@fb.com>
301
302         maint: adjust copyright notices in *.in files to be consistent
303         The copyright year ranges in *.in files were not being updated,
304         because of a missing ", Inc." suffix.  Add that, run
305         run "make udpate-copyright", and ensure 2010..2015 year
306         ranges are covered.
307         * gunzip.in: Update copyright notice and year ranges.
308         * gzexe.in: Likewise.
309         * zcat.in: Likewise.
310         * zdiff.in: Likewise.
311         * zforce.in: Likewise.
312         * zgrep.in: Likewise.
313         * zless.in: Likewise.
314         * zmore.in: Likewise.
315         * znew.in: Likewise.
316
317 2015-08-24  Jim Meyering  <meyering@fb.com>
318
319         build: avoid -Wshift-negative-value warning
320         Configured with --enable-gcc-warnings, a gcc-6.x build would fail with this:
321
322           gzip.c:118:32: error: left shift of negative value
323            #define OFF_T_MIN (~ (off_t) 0 << (sizeof (off_t) * CHAR_BIT - 1))
324
325         * gzip.c [OFF_T_MAX]: Define in terms of TYPE_MAXIMUM, not OFF_T_MIN.
326         [OFF_T_MIN]: Remove now-unused definition.
327         Include "intprops.h" for definiton of TYPE_MAXIMUM.
328         * bootstrap.conf (gnulib_modules): Add intprops.
329
330 2015-07-30  Jim Meyering  <meyering@fb.com>
331
332         maint: remove dead code
333         This package has not been compilable with -DCRYPT
334         since commit v1.4-82-g9d1b943.  Remove final vestiges.
335         * bits.c (copy_block) [CRYPT]: Remove #ifdef'd code.
336         * inflate.c (NEXTBYTE) [CRYPT]: Likewise.
337         Prompted by a report from Flávio Medeiros
338         that HEADER and T might be used uninitialized.
339
340 2015-03-17  Paul Eggert  <eggert@cs.ucla.edu>
341
342         gzip: make the GZIP env var obsolescent
343         * NEWS, gzip.1:
344         * doc/gzip.texi (Environment, Tapes): Document this.
345         * gzip.c (args): Remove static var; no longer needed now that
346         'main' frees it.  All uses removed.
347         (ENV_OPTION, shortopts): New constants.
348         (main): Warn about nontrivial uses of GZIP.  Reject dangerous uses.
349         * tests/gzip-env: New test case.
350         * tests/Makefile.am (TESTS): Add it.
351         * util.c (add_envopt): Create new vector instead of adding to old
352         one.  Only use changed.
353
354 2015-03-13  Paul Eggert  <eggert@cs.ucla.edu>
355
356         maint: adjust to recent gnulib
357         * doc/.gitignore: Add gendocs_template_min.
358         * lib/.gitignore: Add assure.h.
359
360 2015-02-08  Jim Meyering  <meyering@fb.com>
361
362         maint: ensure that --version's copyright date is current
363         * cfg.mk (sc_gzip_copyright_check): Ensure we keep this copyright
364         year number up to date.  Reported by Paul Eggert.
365         * gzip.c (license_msg): Include only the current year number,
366         as is done in nearly every other program.
367
368         gnulib: update to latest
369
370 2015-01-01  Jim Meyering  <meyering@fb.com>
371
372         maint: update copyright year ranges to include 2015; update gnulib
373
374 2014-11-10  Jim Meyering  <meyering@fb.com>
375
376         maint: move new NEWS entry into block for upcoming release
377         * NEWS: Move the latest NEWS entry from the block for gzip-1.6
378         into the block for the upcoming release.
379
380 2014-11-10  Paul Eggert  <eggert@cs.ucla.edu>
381
382         gzip: adjust -v output when -k is also specified
383         Problem reported by Eric Benoit in: http://bugs.gnu.org/16401
384         * gzip.c (treat_file): When keeping a file, don't say it's replaced.
385         * NEWS: Document this.
386         * tests/keep: Test this.
387
388 2014-11-10  Jim Meyering  <meyering@fb.com>
389
390         maint: enable more syntax checks
391         * cfg.mk (local-checks-to-skip): Remove several rule names from this
392         list, thus enabling the corresponding checks.  To fix some, I made
393         syntactic changes to source files.  In other cases, I exempted certain
394         files from the checks.
395         Add exemptions for these:
396           sc_prohibit_atoi_atof = ^(gzip|sample/sub)\.c$$
397           sc_space_tab = ^lib/match\.c$$
398           sc_useless_cpp_parens = ^(lib/match\.c|tailor\.h)$$
399         * configure.ac: Add quotes to fix under-quoting.
400         * deflate.c: Remove unnecessary cpp parentheses.
401         * tests/Makefile.am (TEST_ENVIRONMENT): Remove space-before-TAB.
402         * unlzw.c: Change some TABs to spaces.
403
404         maint: avoid false positive match in check for double semicolon
405         * cfg.mk (exclude_file_name_regexp--sc_prohibit_double_semicolon):
406         Exempt the file, lib/match.c, from gnulib's new double-semicolon
407         check.
408
409         gnulib+bootstrap: update to latest
410         * gnulib: Update the submodule.
411         * bootstrap: Update from gnulib.
412
413 2014-10-10  Paul Eggert  <eggert@cs.ucla.edu>
414
415         tests: use local dir for output
416         Reported by Kiyoshi KANAZAWA in: http://bugs.gnu.org/18679
417         * tests/unpack-invalid: Use local directory, not /tmp, for output.
418
419 2014-08-10  Paul Eggert  <eggert@cs.ucla.edu>
420
421         gzip: fix --suffix=z bug (Bug#18239)
422         * gzip.c (get_suffix): Put --suffix string at the end
423         of the list of suffixes if it is a suffix of one one them.
424         * tests/z-suffix: New file.
425         * tests/Makefile.am (TESTS): Add it.
426
427 2014-06-12  Paul Eggert  <eggert@cs.ucla.edu>
428
429         zgrep: exit with status 0 if a file matches and there's no trouble
430         Reported by Pavel Raiskup in: http://bugs.gnu.org/17760
431         * zgrep.in (res): Treat exit status 0 to be greater than 1.
432         Also, exit immediately on software configuration error.
433
434 2014-06-07  Paul Eggert  <eggert@cs.ucla.edu>
435
436         doc: use UTF-8 in the manual
437         * doc/gzip.texi: Switch to UTF-8 encoding.  Fix ASCIIisms.
438         Don't use @sc; plain caps are fine for GNU manuals.
439
440         maint: update .gitignore files
441         * lib/.gitignore, m4/.gitignore: Adjust to match current sources.
442         Also, sort.
443
444 2014-06-07  Jim Meyering  <meyering@fb.com>
445
446         maint: udpate all copyright notices via "make update-copyright"
447
448         maint: update copyright year range in gzip.texi
449         * doc/gzip.texi: Update copyright date.
450
451         maint: update gnulib to latest and adapt streamsavedir usage
452         * gnulib: Update module to latest.
453         * gzip.c (treat_dir): Gnulib's streamsavedir API has changed:
454         call it with a new argument, SAVEDIR_SORT_NONE, to retain the
455         preceding behavior.
456
457 2014-03-06  Paul Eggert  <eggert@cs.ucla.edu>
458
459         zless: improve gzip failure checking, and port to new -V format
460         Problem reported by Jaroslaw Weglinski, and LESSOPEN change
461         suggested by Mark Nudelman, in: http://bugs.gnu.org/16951
462         This doesn't fix bug 16951 entirely, as 'less' needs to be changed
463         too, but it's a start.
464         * zless.in (check_exit_status): New var.
465         (LESSOPEN): Use it.
466         (use_input_pipe_on_stdin): Adjust to output format on Fedora 20,
467         where 'less -V' outputs "less 458 (POSIX regular expressions)"
468         on the first line.
469
470 2013-10-24  Paul Eggert  <eggert@cs.ucla.edu>
471
472         gzip: fix permissions issue on Solaris-like systems
473         I.e., on systems that let users give files away.
474         * gzip.c (do_chown): New function.
475         (copy_stat): Use it, to change the group, then the permissions,
476         then the owner.  Idea suggested by Vladimir Marek in
477         <http://bugs.gnu.org/15672#11>
478
479 2013-10-03  Paul Eggert  <eggert@cs.ucla.edu>
480
481         znew: avoid denial-of-service issue
482         Reported by Rich Burridge in <http://bugs.gnu.org/15522>.
483         * znew.in: Rewrite to avoid the need for a temporary file in /tmp.
484         That way, we avoid the need for set -C
485         and worrying about denial of service.
486         Use touch -r and chmod --reference rather than cpmod.
487         Assume cp -p works, as it's now universal.
488         Quote 'echo' args better, while we're at it.
489         (warn, tmp, cpmod, cpmodarg): Remove.
490         (GZIP): Unset, so that we needn't test for gzip extension.
491         (ext): Now always '.gz'.
492         * znew.1: Document the change of implementation assumptions.
493
494 2013-06-19  Paul Eggert  <eggert@cs.ucla.edu>
495
496         Fix spelling typo in newly-added comment.
497
498         tests: zgrep-signal race condition fix
499         * tests/zgrep-signal: Check that Perl supports dup2.
500         (exec_with_SIGPIPE_SIGDFL): Remove.
501         (write_to_dangling_pipe): Simplify by moving more of it into Perl.
502         Fix race condition, where subcommand writes to a pipe before the ":"
503         command exits.  Problem reported by Thorsten Glaser in
504         <http://lists.gnu.org/archive/html/bug-gzip/2013-06/msg00028.html>.
505
506 2013-06-12  Paul Eggert  <eggert@cs.ucla.edu>
507
508         zgrep: usage should say which grep options are not supported
509         * zgrep.in (usage): Document which grep options are not supported.
510         Problem reported by Liron Paryente in
511         <http://lists.gnu.org/archive/html/bug-grep/2013-06/msg00005.html>.
512
513 2013-06-11  Paul Eggert  <eggert@cs.ucla.edu>
514
515         gzip: port util.c to Compaq C V6.5-303
516         * util.c (crc_32_tab): Move definition to front, since this
517         compiler doesn't allow declarations of static arrays with
518         incomplete types.  Problem reported by Steven M. Schweda in
519         <http://lists.gnu.org/archive/html/bug-gzip/2013-06/msg00010.html>.
520
521         tests: zgrep-context assumes grep knows context
522         * tests/Makefile.am (TESTS_ENVIRONMENT): Pass GREP too.
523         * tests/zgrep-context: Check that the underlying grep supports
524         context options.  Problem reported by Steven M. Schweda in
525         <http://lists.gnu.org/archive/html/bug-gzip/2013-06/msg00010.html>.
526
527         doc: zgrep exit status, unsupported options
528         * zgrep.1 (EXIT STATUS, BUGS): New sections.
529         Problem reported by Bdale Garbee in
530         <http://lists.gnu.org/archive/html/bug-gzip/2013-06/msg00007.html>.
531
532         maint: port to platforms lacking SIGPIPE
533         * tailor.h (SIGPIPE): Define to 0 if not defined.  This fixes a
534         porting bug introduced as part of 2012-11-16 syntax-check cleanup.
535         Problem reported by Bdale Garbee in
536         <http://lists.gnu.org/archive/html/bug-gzip/2013-06/msg00006.html>.
537
538 2013-06-09  Jim Meyering  <meyering@fb.com>
539
540         maint: post-release administrivia
541         * NEWS: Add header line for next release.
542         * .prev-version: Record previous version.
543         * cfg.mk (old_NEWS_hash): Auto-update.
544
545         version 1.6
546         * NEWS: Record release date.
547
548         build: avoid automake warning that suggests use of subdir-objects
549         * configure.ac (AM_INIT_AUTOMAKE): Use the subdir-objects option.
550
551         build: avoid warning about deprecated use of automake's ACLOCAL_AMFLAGS
552         * Makefile.am (ACLOCAL_AMFLAGS): Don't use this deprecated variable.
553         * configure.ac: Do this instead: AC_CONFIG_MACRO_DIR([m4]).
554
555         build: use more portable shell syntax in search of working shell
556         * m4/shell.m4: Adjust sh/case syntax not to evoke a syntax
557         error from Solaris 10's /bin/sh.
558
559         build: update gnulib to latest, and bootstrap
560
561 2013-05-28  Jim Meyering  <meyering@fb.com>
562
563         tests: exercise the new --keep option
564         * tests/keep: New file.
565         * tests/Makefile.am (TESTS): Add it.
566
567 2013-05-28  Rodrigo Campos  <rodrigo@sdfg.com.ar>
568
569         gzip: add "--keep" option to retain (don't delete) input files
570         gzip now accepts the --keep (-k) option, for consistency with tools
571         like xz, lzip and bzip2.  With this option, gzip no longer removes
572         named input files when compressing and decompressing.
573         * doc/gzip.texi: Document it.
574         * gzip.1: Likewise.
575         * gunzip.in: Likewise.
576         * NEWS: Likewise.
577         * gzip.c: Add support for "--keep".
578
579 2013-04-15  Paul Eggert  <eggert@cs.ucla.edu>
580
581         tests: redo patch for non-GNU gzip installed in /usr/local/bin
582         Problem with previous patch reported by Antonio Diaz Diaz in
583         <http://lists.gnu.org/archive/html/bug-gzip/2013-04/msg00011.html>.
584         * tests/help-version (gunzip_setuphelp, gzexe_setuphelp)
585         (zcat_setuphelp, zcmp_setuphelp, zdiff_setuphelp)
586         (zegrep_setuphelp, zfgrep_setuphelp, zforce_setuphelp)
587         (zgrep_setuphelp, zless_setuphelp, zmore_setuphelp)
588         (znew_setuphelp): New functions, used when testing even --help.
589         (zdiff_setup, zcat_setup, znew_setup, zgrep_setup, gzexe_setup):
590         Use gzip_setuphelp to set --__bindir.
591
592 2013-04-10  Paul Eggert  <eggert@cs.ucla.edu>
593
594         tests: work even if non-GNU gzip is installed in /usr/local/bin
595         Problem reported by Antonio Diaz Diaz in
596         <http://lists.gnu.org/archive/html/bug-gzip/2013-04/msg00004.html>.
597         * tests/help-version (zdiff_setup, zcat_setup, znew_setup, zgrep_setup)
598         (gzexe_setup): Pass --__bindir so that subsidiary programs are our
599         own's, not /usr/local/bin's.  This requires using 'eval' on the result.
600         (zcmp_setup, gunzip_setup, zmore_setup, zless_setup, zforce_setup)
601         (zegrep_setup, zfgrep_setup): Invoke one of the other setup functions,
602         to make the patterns more obvious and simplify future maintenance.
603         * zcmp.in, zegrep.in, zfgrep.in: Pass __bindir to subsidiary program.
604
605         maint: adjust to Gnulib, Automake changes
606         * .gitignore: Add *.trs.
607         * lib/.gitignore: Add unused-parameter.h.
608
609         tests: port to Solaris 10 /bin/sh
610         * tests/Makefile.am (TESTS_ENVIRONMENT):
611         Use "FOO=val; export FOO" rather than "export FOO=val",
612         as the latter form doesn't work with Solaris /bin/sh.
613
614 2013-02-25  Paul Eggert  <eggert@cs.ucla.edu>
615
616         gzip: port to DMF file systems
617         * util.c (read_buffer): When reading a file with O_NONBLOCK, if
618         the read fails with errno==EAGAIN, clear O_NONBLOCK and try again.
619         Problem reported by Vitezslav Cizek in
620         <http://lists.gnu.org/archive/html/bug-gzip/2013-02/msg00030.html>.
621
622 2013-02-05  Paul Eggert  <eggert@cs.ucla.edu>
623
624         gzip: fix bug where you say "n" and gzip acts as if you said "y"
625         Problem reported for GCC 4.7 x86-64 -O2 by Allan McRae in
626         <http://lists.gnu.org/archive/html/bug-gzip/2013-02/msg00000.html>.
627         * NEWS: Document this.  Use consistent format in earlier note.
628         * gzip.c: Include yesno.h.
629         * gzip.h (yesno): Remove decl; that's yesno.h's job.
630
631 2013-01-06  Paul Eggert  <eggert@cs.ucla.edu>
632
633         maint: adjust to Gnulib changes
634         * lib/.gitignore: Add glthread, math.c, unistd.c, wctype-h.c.
635         * m4/.gitignore: Remove inline.m4.
636
637 2013-01-04  Jim Meyering  <jim@meyering.net>
638
639         maint: update all copyright year number ranges
640         Run "make update-copyright".
641
642         build: update gnulib submodule to latest
643
644 2012-12-10  Paul Eggert  <eggert@cs.ucla.edu>
645
646         diagnose unexpected EOF and zero lengths in packed data
647         Problem reported by Aki Helin.
648         * NEWS: Mention Aki's reports.
649         * tests/unpack-invalid: New file,
650         with test data suggested by Aki.
651         * tests/Makefile.am (TESTS): Add it.
652         * unpack.c (read_byte): New function.
653         (look_bits, read_tree): Use it.
654         (read_tree): Check against zero bit length Huffman code.
655
656         gzip: diagnose invalid code in packed data
657         * unpack.c (unpack): When encountering a code out of range, report
658         it and fail rather than charging ahead with randomish output.
659         Problem reported by Aki Helin.
660
661 2012-11-16  Jim Meyering  <jim@meyering.net>
662
663         maint: avoid new syntax-check failures
664         * cfg.mk (_gl_TS_unmarked_extern_vars): Append nice_match, to avoid
665         false-positive syntax-check failure on i686.
666         * gzip.c (SIGPIPE): Remove definition.  Now always provided via gnulib.
667         * lib/.gitignore: xsize.c, added by gnulib-tool.
668
669 2012-11-16  Paul Eggert  <eggert@cs.ucla.edu>
670
671         gzip: fix debugging/porting typo
672         * unlzw.c (unlzw) [DEBUG]: Don't assume 'long' can be printed with %d.
673
674         maint: merge build improvements from coreutils
675         * configure.ac: Invoke gl_ASSERT_NO_GNULIB_POSIXCHECK.
676         (--enable-gcc-warnings): Change help message.
677         (gl_GCC_VERSION_IFELSE): New macro.
678         Do not omit -Wunused-macros for main code.
679         Adjust other -W options as per coreutils.
680         * lib/Makefile.am (AM_CFLAGS): Use GNULIB_WARN_CFLAGS, not WARN_CFLAGS.
681         * unlzw.c (REGISTERS, REG1, REG2, ..., REG16): Remove.
682         All uses removed.  These provoked -Wunused-macros warnings.
683         This sort of fiddling with registers hasn't been needed for years.
684
685         build: update gnulib submodule to latest
686
687         maint: port to platforms lacking SIGPIPE
688         * gzip.c (SIGPIPE): Define to 0 if not already defined.
689
690         doc: bring up to date and fix troff typos
691         * doc/gzip.texi (Overview): Update RFC URLs.
692         * gzip.1: Likewise.  Don't say "SEE ALSO" to programs that almost
693         nobody has installed anymore.
694         * gzip.1, zmore.1: Fix some troff typos.
695         * zdiff.1: Clarify what happens with input files.  Don't talk
696         about temporary file names, as they're rarely used these days.
697
698 2012-10-24  Paul Eggert  <eggert@cs.ucla.edu>
699
700         tests: exercise the grep -e portability fix
701         Remove workaround for Solaris, since the bug should be fixed now.
702         Suggested by Petr Sumbera in
703         <http://lists.gnu.org/archive/html/bug-gzip/2012-10/msg00005.html>.
704         * tests/zgrep-context, tests/zgrep-f: All uses removed.
705         * tests/init.cfg (require_POSIX_grep_): Remove.
706
707 2012-10-23  Eric Blake  <eblake@redhat.com>
708
709         build: default to --enable-gcc-warnings in a git tree
710         Anyone building from cloned sources can be assumed to have a new
711         enough environment, such that enabling gcc warnings by default will
712         be useful.  Tarballs still default to no warnings, and the default
713         can still be overridden with --disable-gcc-warnings.
714         * configure.ac (gl_gcc_warnings): Set default based on environment.
715
716 2012-10-20  Paul Eggert  <eggert@cs.ucla.edu>
717
718         zgrep: do not assume standard 'grep' has -e
719         On Solaris 11, /usr/bin/grep -e does not work.
720         Problem reported by Petr Sumbera in
721         <http://lists.gnu.org/archive/html/bug-gzip/2012-10/msg00003.html>.
722         * Makefile.am (.in): Substitute @GREP@.
723         * configure.ac (AC_PROG_GREP): Invoke.
724         * zgrep.in (grep): Use @GREP@.
725
726 2012-08-14  Paul Eggert  <eggert@cs.ucla.edu>
727
728         zgrep: do not assume GNU expr
729         * zgrep.in: Do not assume '\+' has the GNU behavior in the BRE
730         given to 'expr', as POSIX does not guarantee that.  Come to think
731         of it, use a shell pattern rather than 'expr', as this is more
732         efficient.
733
734 2012-08-08  Jim Meyering  <meyering@redhat.com>
735
736         tests: exercise the just-fixed part of zgrep
737         * tests/zgrep-context: New file.
738         * tests/Makefile.am (TESTS): Add it.
739
740 2012-08-08  Jim Meyering  <meyering@redhat.com>
741
742         zgrep: handle a multi-digit context option like -15
743         * zgrep.in: Do not malfunction when given an option like -15.
744         Before, it could end up treating the pattern as a file name:
745
746           $ echo x | gzip | zgrep -15 x
747           gzip: x.gz: No such file or directory
748
749         * NEWS (Bug fixes): Mention it.
750         Reported by Dan Bloch via Thomas Bushnell in
751         https://bugs.launchpad.net/bugs/1032831
752
753 2012-08-07  Jim Meyering  <meyering@redhat.com>
754
755         build: update gnulib, bootstrap and init.sh
756
757         maint: fix misspellings in old ChangeLog and NEWS
758         * ChangeLog-2007: s/Supress/Suppress/
759         * NEWS: Likewise.
760         * cfg.mk (old_NEWS_hash): Update to match typo fix.
761
762 2012-06-19  Paul Eggert  <eggert@cs.ucla.edu>
763
764         zmore: rewrite to fix bugs and assume POSIX
765         Problem reported for Solaris 9 by Daniel in
766         <http://lists.gnu.org/archive/html/bug-gzip/2012-06/msg00007.html>.
767         Rather than figure out what exactly went wrong in Solaris 9
768         it was easier to rip out all the buggy compatibility and stty cruft.
769         * zmore.in: Don't use stty or trap; simply pipe the output to 'more'
770         and let it deal with signals and terminal control.
771         Use printf, not 'echo', to avoid problems with backslashes.
772         Don't assume ANS is not 's' in the environment.
773         Use a 'more'-style header instead of rolling our own style.
774         Paginate the header, too; the old behavior lost the header.
775         * NEWS, zmore.1: Document this.
776
777 2012-06-17  Jim Meyering  <meyering@redhat.com>
778
779         maint: add .mailmap
780         * .mailmap: New file.  Unify two spellings of Paul's name,
781         to make git log output slightly cleaner.
782
783         maint: post-release administrivia
784         * NEWS: Add header line for next release.
785         * .prev-version: Record previous version.
786         * cfg.mk (old_NEWS_hash): Auto-update.
787
788         version 1.5
789         * NEWS: Record release date.
790
791         build: update gnulib for fixed maint.mk
792
793         build: update gnulib submodule; bootstrap and init.sh, too
794         * cfg.mk: Exempt crufty tailor.h from its use of "#define off_t...".
795         * .gitignore, m4/.gitignore: Update semi-automatically (via bootstrap).
796
797 2012-04-24  Paul Eggert  <eggert@cs.ucla.edu>
798
799         doc: document -rf change
800         * NEWS: Document the ZFS fix.
801
802         gzip: remove CLOSEDIR
803         * gzip.c (CLOSEDIR): Remove; no longer used.
804
805         gzip: port gzip -rf to ZFS
806         Problem reported privately by Rich Burridge.
807         * bootstrap.conf: Add savedir.
808         * gzip.c: Include <savedir.h>.
809         (_D_EXACT_NAMELEN): Remove.
810         (treat_dir): Use savedir rather than reading directory entries one
811         at a time, to avoid revisiting an already-compressed file when using
812         ZFS and the -rf flags are specified.
813         * lib/.gitignore, m4/.gitignore: Ignore savedir-related files.
814
815 2012-03-18  Paul Eggert  <eggert@cs.ucla.edu>
816
817         gzip: fix nondeterministic compression results
818         Reported by Jakub Wilk in <http://bugs.debian.org/647522>.
819         * deflate.c (fill_window): Don't let garbage pollute the dictionary.
820
821 2012-01-11  Jim Meyering  <meyering@redhat.com>
822
823         tests: make all test scripts executable; work with automake-1.12
824         * tests/Makefile.am (TESTS_ENVIRONMENT): Adapt to work with upcoming
825         automake-1.12.
826         * tests/mixed: Make executable.
827         * tests/zgrep-f: Likewise.
828         * tests/zgrep-signal: Likewise.
829         * tests/znew-k: Likewise.
830
831         build: accommodate newer bootstrap from gnulib
832         * bootstrap.conf (gnulib_tool_option_extras): Add both --symlink
833         and --makefile-name=gnulib.mk.
834         * bootstrap: Update from gnulib.
835         * tests/init.sh: Update from gnulib.
836         * lib/Makefile.am: Initialize all of the following so that
837         generated code in gnulib.mk may use += to append to those variables:
838         AM_CFLAGS, BUILT_SOURCES, CLEANFILES, EXTRA_DIST, MOSTLYCLEANDIRS,
839         MOSTLYCLEANFILES, SUFFIXES, noinst_LTLIBRARIES.
840
841 2012-01-01  Jim Meyering  <meyering@redhat.com>
842
843         maint: update all copyright year number ranges
844         Run "make update-copyright".
845
846 2011-12-21  Paul Eggert  <eggert@cs.ucla.edu>
847
848         zless: decompress stdin too, if less 429 or later
849         * zless.in: Use LESSOPEN |- feature of less 429 or later.
850         Problem reported by Jeroen Roovers via Mike Frysinger in
851         <http://lists.gnu.org/archive/html/bug-gzip/2011-12/msg00006.html>.
852
853 2011-11-29  Jim Meyering  <meyering@redhat.com>
854
855         build: update gnulib submodule to latest
856
857         build: accommodate gnulib's new warnings with --enable-gcc-warnings
858         * configure.ac (WERROR_CFLAGS): Disable two new warnings:
859         -Wno-format-nonliteral, -Wno-unsuffixed-float-constants.
860         * gzip.h (bi_reverse): Declare with _GL_ATTRIBUTE_CONST.
861         (gzip_base_name): Declare with _GL_ATTRIBUTE_PURE.
862
863 2011-11-29  Jim Meyering  <meyering@redhat.com>
864
865         tests: use "compare exp out", not "compare out exp"
866         Likewise, when an empty file is expected, use "compare /dev/null out",
867         not "compare out /dev/null". I.e., specify the expected/desired contents
868         via the first file name.  Prompted by a suggestion from Bruno Haible
869         in http://thread.gmane.org/gmane.comp.gnu.grep.bugs/4020/focus=29154
870
871         Run these commands:
872
873             git grep -l -E 'compare [^ ]+ exp' \
874               |xargs perl -pi -e 's/\b(compare) (\S+) (exp\S*)/$1 $3 $2/'
875             git grep -l -E 'compare [^ ]+ /dev/null' \
876               |xargs perl -pi -e 's,\b(compare) (\S+) (/dev/null),$1 $3 $2,'
877
878 2011-11-05  Jim Meyering  <meyering@redhat.com>
879
880         build: update gnulib submodule to latest
881
882 2011-11-02  Paul Eggert  <eggert@cs.ucla.edu>
883
884         * tests/zgrep-signal: Don't assume exit status 141 on PIPE signal.
885         Problem reported by Eric Blake in
886         <http://lists.gnu.org/archive/html/bug-gzip/2011-11/msg00007.html>.
887
888         * tests/zgrep-signal: Use perl instead of a nonportable shell trap.
889         Problem reported by Eric Blake in
890         <http://lists.gnu.org/archive/html/bug-gzip/2011-11/msg00005.html>.
891
892         * tests/zgrep-signal: Test for Fedora 15 signal bug.
893         Also, don't assume that SIGPIPE is SIG_DFL on entry.
894
895 2011-11-02  Jim Meyering  <meyering@redhat.com>
896
897         build: update gnulib submodule to latest
898
899         tests: mixed: correct size-enumeration logic
900         * tests/mixed (sizes): Fix misplaced "&& break" that made us test
901         only with a size of 0, rather than all sizes in 0..64.
902
903         maint: avoid "make syntax-check" failure
904         * gzip.c (treat_stdin): Indent with spaces, not TABs.
905
906 2011-11-02  Paul Eggert  <eggert@cs.ucla.edu>
907
908         * gzip.c (treat_stdin): If quiet, be quiet with plain gzip -q.
909         Problem reported by Michaël Guitton in
910         <http://lists.gnu.org/archive/html/bug-gzip/2011-11/msg00000.html>.
911
912 2011-08-10  Jim Meyering  <meyering@redhat.com>
913
914         maint: remove amiga, atari, msdos, nt, os2, vms sub-directories,
915         and all files therein.  This was proposed months prior, and no
916         one objected.
917         * amiga/Makefile.gcc: Remove file.
918         * amiga/Makefile.sasc: Likewise.
919         * amiga/match.a: Likewise.
920         * amiga/tailor.c: Likewise.
921         * amiga/utime.h: Likewise.
922         * atari/Makefile.st: Likewise.
923         * msdos/Makefile.bor: Likewise.
924         * msdos/Makefile.djg: Likewise.
925         * msdos/Makefile.msc: Likewise.
926         * msdos/doturboc.bat: Likewise.
927         * msdos/gzip.prj: Likewise.
928         * msdos/match.asm: Likewise.
929         * msdos/tailor.c: Likewise.
930         * nt/Makefile.nt: Likewise.
931         * os2/Makefile.os2: Likewise.
932         * os2/gzip.def: Likewise.
933         * os2/gzip16.def: Likewise.
934         * vms/Makefile.gcc: Likewise.
935         * vms/Makefile.mms: Likewise.
936         * vms/Makefile.vms: Likewise.
937         * vms/Readme.vms: Likewise.
938         * vms/gzip.hlp: Likewise.
939         * vms/makegzip.com: Likewise.
940         * vms/vms.c: Likewise.
941         * Makefile.am (EXTRA_DIST): Remove those file names.
942
943         build: use largefile module and update to latest gnulib
944         * configure.ac: Remove AC_SYS_LARGEFILE, subsumed by ...
945         * bootstrap.conf (gnulib_modules): ...this.  Use largefile module.
946         * gnulib: Update to latest.
947
948 2011-07-12  Jim Meyering  <meyering@redhat.com>
949
950         maint: update init.sh and bootstrap from gnulib
951         * bootstrap: Update from gnulib.
952         * tests/init.sh: Update from gnulib.
953
954         maint: use gnulib's realloc-gnu and malloc-gnu modules
955         * bootstrap.conf (gnulib_modules): Use realloc-gnu and malloc-gnu,
956         rather than the now-deprecated realloc and malloc modules.
957
958         build: update gnulib submodule to latest
959
960 2011-06-21  Paul Eggert  <eggert@cs.ucla.edu>
961
962         * deflate.c: Export nice_match to assembler.
963         (static_unless_ASMV): New macro.
964         (nice_match): Use it.
965
966 2011-06-08  Jim Meyering  <meyering@redhat.com>
967
968         build: fix "make syntax-check"
969         * cfg.mk (_gl_TS_unmarked_extern_vars): Add good_match.
970
971         build: avoid link failure: this time on i686 linux
972         * deflate.c (good_match): Must not be static, since it may
973         be used from lib/match.c.
974
975 2011-05-14  Jim Meyering  <meyering@redhat.com>
976
977         build: avoid link failure on at least i386-FreeBSD7.2
978         * deflate.c (match_start, prev_length, max_chain_length): Do not
979         declare these as static.  On some types of system/arch, they are
980         used via match_.s.
981         * cfg.mk (_gl_TS_unmarked_extern_vars): Mark those three variables
982         as known-extern: match_start, prev_length, max_chain_length.
983
984 2011-05-13  Jim Meyering  <meyering@redhat.com>
985
986         avoid new build failure on a system without <crypt.h>
987         * bits.c: Don't include "crypt.h", now that it's deleted.
988
989         maint: use gnulib's new readme-release module
990         * bootstrap.conf (gnulib_modules): Add readme-release.
991         (bootstrap_epilogue): Add the recommended perl one-liner.
992         * README-release: Remove file; it is now generated from gnulib.
993         * .gitignore: Add it.
994
995 2011-05-09  Jim Meyering  <meyering@redhat.com>
996
997         build: update gnulib submodule to latest
998
999         maint: prepare for gnulib's new tight-scope syntax-check rule
1000         * cfg.mk (_gl_TS_dir): Define.
1001         (_gl_TS_unmarked_extern_vars): Define.
1002
1003         maint: declare many variables to be static
1004         * deflate.c: Likewise.
1005         * gzip.c: Likewise.
1006         * gzip.h: Likewise.
1007         * inflate.c: Likewise.
1008         * trees.c: Likewise.
1009         * unzip.c: Likewise.
1010         * util.c: Likewise.
1011
1012         maint: remove crypt.[ch] stubs
1013         * Makefile.am (gzip_SOURCES): Remove crypt.c
1014         (EXTRA_DIST): Remove crypt.h
1015         * crypt.c, crypt.h: Remove files.
1016         * unpack.c: Don't #include "crypt.h"
1017         * zip.c: Likewise
1018         * util.c: Likewise.
1019         * unzip.c: Likewise.
1020
1021         maint: limit scope of several functions
1022         * deflate.c (longest_match): Move extern declaration into #if-ASMV block.
1023         [!ASMV]: Define as static.
1024         * inflate.c: Remove unnecessary prototypes.
1025         ANSI-declify functions and declare them to be static.
1026
1027         maint: remove all uses of OF((...)) prototype-hiding macro
1028         * bits.c: Remove all uses of OF.
1029         * deflate.c: Likewise.
1030         * gzip.c: Likewise.
1031         * inflate.c: Likewise.
1032         * lzw.h: Likewise.
1033         * trees.c: Likewise.
1034         * unlzh.c: Likewise.
1035         * unpack.c: Likewise.
1036         * util.c: Likewise.
1037         * gzip.h: Likewise.
1038         (OF): Remove its definition, too.
1039
1040         maint: prepare for tight-scope rule: use noinst_HEADERS
1041         * Makefile.am (EXTRA_DIST): Move lzw.h and gzip.h from here to ...
1042         (noinst_HEADERS): ...here.
1043         For convenience, since the tight-scope rule uses $(noinst_HEADERS).
1044
1045 2011-04-14  Jim Meyering  <meyering@redhat.com>
1046
1047         maint: update bootstrap and init.sh from gnulib
1048         * bootstrap: Likewise.
1049         * tests/init.sh: Update from gnulib.
1050
1051         maint: note that we'll remove amiga, atari, msdos, nt, os2, vms soon
1052         If someone can show that any of these are being used, let us know.
1053         * TODO: Note the plan to remove those directories this year.
1054
1055         build: update gnulib submodule to latest
1056
1057         maint: fix typos in vms manual: s/it\nit/\nit/
1058         * vms/gzip.hlp: Remove doubled "it".
1059
1060 2011-04-10  Jim Meyering  <meyering@redhat.com>
1061
1062         maint: fix typos in comment: s/to to/to/
1063         * deflate.c: Remove doubled 'to's.
1064
1065 2011-03-20  Jim Meyering  <meyering@redhat.com>
1066
1067         maint: stop using .x-sc_* files to list syntax-check exemptions
1068         Instead, use the new mechanism with which you merely use a
1069         variable (derived from the rule name) defined in cfg.mk to an ERE
1070         matching the exempted file names.
1071         * gnulib: Update to latest, to get maint.mk that implements this.
1072         * .x-sc_file_system: Remove file.
1073         * .x-sc_prohibit_tab_based_indentation: Likewise.
1074         * .x-sc_require_config_h: Likewise.
1075         * .x-sc_require_config_h_first: Likewise.
1076         * cfg.mk: Define variables to exempt the same files.
1077
1078 2011-03-18  Jim Meyering  <meyering@redhat.com>
1079
1080         doc: correct README-release
1081         * README-release: Remove mention of -announce mailing list.
1082         Unlike coreutils, gzip does not have its own.
1083
1084         doc: update release procedure
1085         * README-release: Resync from coreutils' file by the same name.
1086
1087 2011-01-03  Jim Meyering  <meyering@redhat.com>
1088
1089         maint: update copyright year ranges to include 2011
1090         Run "make update-copyright", so "make syntax-check" works in 2011.
1091
1092         build: update gnulib submodule to latest
1093
1094         maint: avoid failure of new test for bindtextdomain
1095         * cfg.mk (local-checks-to-skip): Add sc_bindtextdomain.
1096
1097 2010-12-02  Jim Meyering  <meyering@redhat.com>
1098
1099         maint: avoid "make syntax-check" failure due to old-NEWS modification
1100         * cfg.mk (old_NEWS_hash): Update, to reflect recent NEWS correction.
1101
1102 2010-12-01  Paul Eggert  <eggert@cs.ucla.edu>
1103
1104         * NEWS: The "gzip -f foo.gz" change occurred in 1.3.13, not 1.3.12
1105
1106 2010-11-10  Paul Eggert  <eggert@cs.ucla.edu>
1107
1108         zgrep: don't assume traditional behavior with signal numbers
1109         * zgrep.in: Don't assume the exit status is the signal number plus
1110         128, as POSIX doesn't require this.  No need to kill self; exiting
1111         with large status is enough.  Propagate all exit statuses greater
1112         than 1, not merely those in the range 129..143, as there's no need
1113         to treat that range specially (and it's not portable anyway).
1114
1115 2010-11-09  Paul Eggert  <eggert@cs.ucla.edu>
1116
1117         zgrep: fix shell portability bug with -f; fix mishandling of "-e -"
1118         * tests/zgrep-f: Check for "zgrep -e -" bug, too.
1119         * zgrep.in: Don't assume that if the shell redirects fd 6, then
1120         this redirection is visible to the subsidiary grep.  POSIX doesn't
1121         guarantee this visibility except for file descriptors 0, 1, and 2,
1122         and ksh does not support it.  Problem reported by Thomas Schulz in
1123         <http://lists.gnu.org/archive/html/bug-gzip/2010-11/msg00000.html>.
1124         Also, fix a related bug: "-e -" was mishandled.  These two bugs
1125         were introduced by commit 5b54db4546b84ec97ff57a62f8ddb98faacf77f2
1126         dated 2009-10-09.
1127         (escape): Change the convention: do not assume that a stray X
1128         is present at the end of the last line.  All uses changed.
1129         There was no longer any need for this convention, and fixing this
1130         made it a bit easier to use 'sed' in a later part of the fix.
1131
1132 2010-11-08  Paul Eggert  <eggert@cs.ucla.edu>
1133
1134         maint: fix copyright dates that were munged by a maintenance script
1135         * gunzip.in, gzexe.in, zcat.in, zcmp.in, zdiff.in, zforce.in:
1136         * zgrep.in, zless.in, zmore.in, znew.in:
1137         A script went awry when updating copyright dates in gzip's shell
1138         scripts.  It should update comments to look like "# Copyright (C)
1139         2007, 2010 Free Software Foundation, Inc." (with a set of years)
1140         and version messages to look like "Copyright (C) 2010 Free
1141         Software Foundation, Inc." (with just the most-recent year).
1142         Instead, it sometimes ignored one, sometimes the other, and
1143         typically put ranges into version messages.  Fix all this stuff by
1144         hand, using dates that I divined from the change logs (so they're
1145         a bit more accurate than script-generated dates).  We need to fix
1146         the script before it runs in 2011.
1147
1148 2010-10-23  Jim Meyering  <meyering@redhat.com>
1149
1150         maint: anchor patterns in .gitignore files
1151         * doc/.gitignore: Anchor patterns.
1152         * lib/.gitignore: Likewise.
1153         * m4/.gitignore: Likewise.
1154
1155         maint: update bootstrap and init.sh from gnulib
1156         * bootstrap: Update.
1157         * tests/init.sh: Update.
1158
1159 2010-10-23  Rob Vermaas  <rob.vermaas@gmail.com>
1160
1161         maint: update to latest gnulib; use fdutimens, not gl_futimens
1162         * gzip.c (copy_stat): Use fdutimens, not gl_futimens.
1163         * gnulib: Update to latest.
1164
1165 2010-10-23  Jim Meyering  <meyering@redhat.com>
1166
1167         maint: accommodate stricter syntax-check
1168         Avoid #if, #define and #undef of always-defined symbols.
1169         * gzip.c (ELOOP, SIGPIPE): Remove unneeded cpp directives.
1170         * tailor.h (HAVE_DIRENT_H, HAVE_FCNTL_H, HAVE_UNISTD_H, MSDOS):
1171         (O_BINARY): Likewise.
1172
1173         maint: make our use of gnulib's init.sh conform
1174         * tests/help-version: Make use of init.sh conform.
1175         * tests/helin-segv: Likewise.
1176         * tests/help-version: Likewise.
1177         * tests/hufts: Likewise.
1178         * tests/memcpy-abuse: Likewise.
1179         * tests/mixed: Likewise.
1180         * tests/null-suffix-clobber: Likewise.
1181         * tests/stdin: Likewise.
1182         * tests/trailing-nul: Likewise.
1183         * tests/zdiff: Likewise.
1184         * tests/zgrep-f: Likewise.
1185         * tests/zgrep-signal: Likewise.
1186         * tests/znew-k: Likewise.
1187
1188 2010-10-10  Jim Meyering  <meyering@redhat.com>
1189
1190         maint: describe policy on copyright year number ranges
1191         * README: Mention coreutils' long-standing policy on use of M-N
1192         ranges in copyright year lists.  Requested by Richard Stallman.
1193
1194 2010-09-15  Paul Eggert  <eggert@cs.ucla.edu>
1195
1196         zgrep: fix parsing of -Eh options
1197         * zgrep.in: Update list of single-letter options to match what's
1198         in GNU grep.  Add -h as an alias for --no-filename.  Bug reported
1199         by Vladimir Sidorenko in
1200         <http://lists.gnu.org/archive/html/bug-gzip/2010-09/msg00007.html>.
1201
1202 2010-08-17  Paul Eggert  <eggert@cs.ucla.edu>
1203
1204         gzip: fix NO_SIZE_CHECK for VMS
1205         * gzip.c (do_list): Use if, not #if.
1206         * tailor.h (NO_SIZE_CHECK) [defined(VAXC) || defined(VMS)]: Define.
1207         * zip.c (zip): Simplify conditional, which was incorrect at any rate
1208         for VMS.
1209
1210 2010-08-15  Paul Eggert  <eggert@cs.ucla.edu>
1211
1212         algorithm.doc: mention Internet RFC 1952 and modernize a bit
1213         * algorithm.doc: Update to mention header-CRC and Internet RFC 1952.
1214         Also, remove the crypto stuff, which never worked.
1215         Inspired by that same suggestion of Greg Roelofs.
1216
1217         gzip: Use 0x%04x instead of %x when printing 16-bit checksums
1218         * gzip.c (get_method): Use 0x%04x, not %x, to print 16-bit checksums.
1219         Inspired by a suggestion of Greg Roelofs in
1220         http://lists.gnu.org/archive/html/bug-gzip/2010-08/msg00004.html
1221
1222 2010-08-03  Paul Eggert  <eggert@cs.ucla.edu>
1223
1224         maint: update bootstrap
1225         * bootstrap, bootstrap.conf, tests/init.sh: Merge from gnulib.
1226
1227 2010-07-19  Paul R. Eggert  <eggert@cs.ucla.edu>
1228
1229         gzip: don't assume C99, and don't assume overlapping memcpy should work
1230         * tailor.h (NOMEMCPY): Remove.  memcpy is entitled to not work
1231         on overlapping blocks.
1232         * inflate.c (inflate_codes): Don't put decl after statement.
1233         Omit NOMEMCPY.
1234
1235         * gzip.c (get_method): don't assume size_t can be printed with %u
1236
1237 2010-07-02  Paul Eggert  <eggert@cs.ucla.edu>
1238
1239         Mention that gzip -d now handles FHCRC.
1240
1241 2010-07-02  Paul Eggert  <eggert@cs.ucla.edu>
1242
1243         Decode FHCRC flag properly, as per Internet RFC 1952.
1244         Problem reported by Greg Roelofs in:
1245         http://lists.gnu.org/archive/html/bug-gzip/2010-06/msg00003.html
1246
1247         * gzip.c (discard_input_bytes): New function.
1248         (get_method): Check header checksum, if given.  We never generate it,
1249         but other programs may.
1250         * gzip.h (HEADER_CRC): Renamed from CONTINUATION.  All uses changed.
1251         * tailor.h [defined __50SERIES]: Remove PRIMOS stuff that was obsolete
1252         anyway and would have made this patch harder to maintain.
1253         (get_char, put_char): Remove.
1254         * zip.c (zip): Use put_byte instead of the now-removed put_char.
1255
1256 2010-07-01  Paul Eggert  <eggert@cs.ucla.edu>
1257
1258         Don't assume that sizeof (long) == 4 when computing statistics.
1259         * gzip.c (get_method): Don't assume sizeof (long) == 4.
1260         * zip.c (zip): Likewise.
1261
1262         Update Info-ZIP name and coordinates (thanks to Greg Roelofs).
1263
1264 2010-05-11  Paul Eggert  <eggert@cs.ucla.edu>
1265
1266         * doc/gzip.texi (Sample): Fix backslash quoting problem.
1267         Problem reported by Ole Tange in
1268         <http://lists.gnu.org/archive/html/bug-gzip/2010-05/msg00000.html>.
1269
1270 2010-04-26  Jim Meyering  <meyering@redhat.com>
1271
1272         build: update gnulib submodule to latest
1273
1274         maint: remove primos support
1275         * Makefile.am (EXTRA_DIST): Remove all primos/ files.
1276         * primos/build.cpl: Remove file.
1277         * primos/ci.opts: Likewise.
1278         * primos/include/errno.h: Likewise.
1279         * primos/include/fcntl.h: Likewise.
1280         * primos/include/stdlib.h: Likewise.
1281         * primos/include/sysStat.h: Likewise.
1282         * primos/include/sysTypes.h: Likewise.
1283         * primos/primos.c: Likewise.
1284         * primos/readme: Likewise.
1285
1286 2010-04-08  Jim Meyering  <meyering@redhat.com>
1287
1288         build: include cfg.mk in the distribution tarball
1289         * Makefile.am (EXTRA_DIST): Add cfg.mk.
1290
1291 2010-04-07  Eric Blake  <eblake@redhat.com>
1292
1293         maint: ignore more built files
1294         * .gitignore: Add version files.
1295
1296 2010-04-07  Jim Meyering  <meyering@redhat.com>
1297
1298         tests: help-version: cross-check PATH in tests
1299         * tests/help-version: Cross-check $VERSION and --version output.
1300         * tests/Makefile.am (TESTS_ENVIRONMENT): Export VERSION=$(VERSION).
1301
1302         tests: improve help-version
1303         * tests/help-version: Use fail_, rather than echo+Exit.
1304
1305         tests: pull help-version from grep
1306
1307         build: keep --version strictly up to date
1308         Before this change, in development, gzip's --version output could lag
1309         behind reality by a couple deltas or by a "-dirty" suffix.  That would
1310         lead to spurious failure of the new --version-$VERSION PATH cross-check.
1311         * Makefile.am (version.c, version.h): New rules.
1312         (BUILT_SOURCES): Set/append.
1313         (noinst_LIBRARIES, noinst_libver_a_SOURCES): Define.
1314         (gzip_LDADD): Add libver.a.
1315         (DISTCLEANFILES): Define.
1316         * gzip.c (license): Use Version, not VERSION.
1317
1318 2010-04-06  Jim Meyering  <meyering@redhat.com>
1319
1320         tests: (portability) use st, not "status" as variable name
1321         * tests/zgrep-signal: Do not use status as a variable name,
1322         per autoconf's documentation that it is not portable to
1323         some shells.
1324
1325         tests: s/framework_failure/framework_failure_/
1326
1327         tests: update init.sh from gnulib
1328         * tests/init.sh: Update from gnulib.
1329
1330         tests: run most tests via tests/Makefile.am
1331         * Makefile.am (SUBDIRS): List tests after ".".
1332         Move most test-related things from here to ...
1333         * tests/Makefile.am: ... here.
1334         * configure.ac (AC_CONFIG_FILES): Add tests/Makefile.
1335         * tests/helin-segv: Adjust.
1336         * tests/help-version: Likewise.
1337         * tests/hufts: Likewise.
1338         * tests/memcpy-abuse: Likewise.
1339         * tests/mixed: Likewise.
1340         * tests/null-suffix-clobber: Likewise.
1341         * tests/stdin: Likewise.
1342         * tests/trailing-nul: Likewise.
1343         * tests/zdiff: Likewise.
1344         * tests/zgrep-f: Likewise.
1345         * tests/zgrep-signal: Likewise.
1346         * tests/znew-k: Likewise.
1347
1348         tests: skip tests that use grep's -f and -E options, if they don't work
1349         * tests/init.cfg (require_grep_minus_f): New function.
1350         * tests/zgrep-f: Use require_grep_minus_f.  Use path_prepend_.
1351
1352         tests: arrange for skip and failure notices to go to stderr, not .log
1353         * tests/init.cfg: New file.  Make init.sh's stderr_fileno_ match
1354         what the "exec 9>&2" we use in TESTS_ENVIRONMENT.
1355         * Makefile.am (EXTRA_DIST): Add it.
1356
1357 2010-04-06  Eric Blake  <eblake@redhat.com>
1358
1359         maint: ignore generated files
1360         * .gitignore: Ignore recent gnulib additions.
1361
1362         maint: update bootstrap
1363         * bootstrap: Use latest copy from gnulib/build-aux.
1364
1365 2010-04-05  Jim Meyering  <meyering@redhat.com>
1366
1367         build: use gnulib's lib-ignore module
1368         * bootstrap.conf (gnulib_modules): Add lib-ignore, in case it helps.
1369         * Makefile.am (AM_LDFLAGS): Define it.
1370
1371         maint: let configure-invoked cpp emit diagnostics to config.log
1372         * configure.ac: Do not discard CPP's stderr.
1373
1374         build: update gnulib submodule to latest, and adapt
1375         * cfg.mk: Update to use new _sc_search_regexp interface.  Run this:
1376         perl -pi -e 's/\b_prohibit_regexp\b/_sc_search_regexp/;'
1377         -e 's/\bmsg=/halt=/; s/\bre=/prohibit=/;' cfg.mk
1378         and then adjust backslashes so they still line up.
1379         * cfg.mk (local-checks-to-skip): Add new sc_texinfo_acronym, to skip it.
1380         * msdos/tailor.c (fcalloc): Mark a diagnostic for translation, to
1381         placate stricter syntax-check, even though no one uses this file.
1382
1383         use assembly code matcher when possible
1384         * configure.ac (ASCPPPOST): Backslash-escape "#" in AC_SUBST'd
1385         variable, to keep make from seeing it as a comment-introducer.
1386         Based on a patch by Petr Pisar.
1387         * lib/Makefile.am (match.$(OBJEXT)): Use AM_V_GEN and AM_V_at.
1388         * lib/match.c: Don't include <config.h>.
1389         It would impede configure-time assembler test.
1390         * .x-sc_require_config_h: Exempt lib/match.c from syntax-check.
1391         * .x-sc_require_config_h_first: Likewise.
1392
1393 2010-03-20  Jim Meyering  <meyering@redhat.com>
1394
1395         do not use stat.st_mtime of a non-regular file
1396         * gzip.c: Include "timespec.h".
1397         (treat_stdin): Use st_mtime only from a regular file.
1398         This matters at least on Cygwin 1.7.1-1, for which a stdin-pipe has
1399         the mtime of /dev/null, rather than the gzip-documented-for-pipes
1400         "current time".  Reported by Denis Excoffier.
1401
1402 2010-02-22  Jim Meyering  <meyering@redhat.com>
1403
1404         tests: exercise the fix for the decompression data-loss bug
1405         * tests/null-suffix-clobber: New file.
1406         * Makefile.am (TESTS): Add it.
1407
1408         gzip: fix a data-loss bug when decompressing with --suffix=''
1409         * gzip.c (main): Disallow an empty --suffix=S also with -d.
1410         Otherwise, "gzip -d -S '' F.gz" would ask if it's ok to remove the
1411         existing file, "F.gz";  if you reply "yes", you'd lose all of that data.
1412         Use of an empty suffix was already rejected in compression mode.
1413         * gzip.1 (--suffix (-S)): Do not recommend to use "gunzip -S '' *".
1414         Describe how the suffix is used when decompressing, too.
1415         * NEWS (Bug fixes): mention the fix.
1416         Reported by Ripduman Sohan.
1417
1418         tests: add ---presume-input-tty option, solely for testing
1419         * gzip.c: Include <stdbool.h>.
1420         (presume_input_tty): New global.
1421         (main): Set it.
1422         (treat_stdin, check_ofname): Use it.
1423
1424 2010-02-07  Jim Meyering  <meyering@redhat.com>
1425
1426         doc: minor adjustment to README-release
1427         * README-release: Tweak description, to sync from coreutils.
1428
1429         tests: add the help-version sanity tests from coreutils
1430         * tests/help-version: New file, from coreutils.
1431         * Makefile.am (TESTS): Add it.
1432
1433         tests: make distcheck invoke "make syntax-check" and other tests
1434         * dist-check.mk: New file, from coreutils.
1435         * cfg.mk: Include it.
1436         * Makefile.am (distcheck-hook): New rule, to make us use it.
1437
1438         zcmp: consistently indicate failure with exit status of 2
1439         * zcmp.in: Exit with status of 2 (not 1), when writing
1440         --help or --version output fails, to be more like cmp.
1441
1442 2010-02-03  Jim Meyering  <meyering@redhat.com>
1443
1444         tests: add more tests of gzip -cdf
1445         * tests/mixed: Test "gzip -cdf" for a range of small uncompressed files.
1446
1447         tests: flip and adjust mixed test, now that the bug is fixed
1448         * NEWS (Bug fixes): Mention the fix.
1449         * Makefile.am (XFAIL_TESTS): Move tests/mixed from here...
1450         (TESTS): ...to here.
1451         * tests/mixed: Comment out the currently (always?) failing part.
1452
1453 2010-02-03  Mark Adler  <madler@alumni.caltech.edu>
1454
1455         gzip -cdf now handles concatenation of gzip'd and uncompressed data
1456         * util.c (copy): Change semantics so as to honor a decremented inptr.
1457         * gzip.c (get_method): When needed (-cdf), decrement inptr rather
1458         than clearing it -- and output the first magic byte.
1459
1460 2010-02-03  Dmitry V. Levin  <ldv@altlinux.org>
1461
1462         zgrep: terminate gracefully when a pipeline is interrupted by a signal
1463         zgrep is not terminated gracefully when its grep/sed pipeline
1464         is terminated by a signal.  For example, a command like
1465         zgrep -F .TH /usr/share/man/man1/*.gz | head
1466         continues working long after the "head" process completes.
1467         Another example, a command like
1468         zgrep unmatched-pattern /usr/share/man/man1/*.gz
1469         cannot be interrupted by sending a SIGQUIT with Ctrl-\ key, it outputs
1470         zgrep: line 221: test: : integer expression expected
1471         and goes on.
1472         * zgrep.in: Terminate gracefully when the grep/sed pipeline is
1473         terminated by a signal.
1474         * tests/zgrep-signal: New test.
1475         * Makefile.am (TESTS): Add it.
1476
1477 2010-02-03  Jim Meyering  <meyering@redhat.com>
1478
1479         maint: teach "make syntax-check" the space-only indentation rule
1480         * cfg.mk (sc_prohibit_tab_based_indentation): New rule, from coreutils.
1481         (sc_prohibit_emacs__indent_tabs_mode__setting): Likewise.
1482         * bootstrap: Remove "indent-tabs-mode: nil" directive.
1483         * .x-sc_prohibit_tab_based_indentation: New file.
1484
1485 2010-02-02  Jim Meyering  <meyering@redhat.com>
1486
1487         global: convert indentation-TABs to spaces
1488         Transformed via this shell code:
1489         t=$'\t'
1490         git ls-files \
1491           | grep -vE '(^|/)((GNU)?[Mm]akefile|ChangeLog)|\.(am|mk)$' \
1492           | grep -vE 'tests/pr/|help2man' \
1493           | xargs grep -lE "^ *$t" \
1494           | xargs perl -MText::Tabs -ni -le \
1495             '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
1496
1497 2010-02-02  Dmitry V. Levin  <ldv@altlinux.org>
1498
1499         wrapper scripts: write diagnostics to stderr, not to stdout
1500         * zforce.in: In case of usage error, output short error diagnostics to
1501         stderr instead of printing help text to stdout.
1502         * zmore.in: Likewise.
1503         * znew.in: Likewise.
1504
1505 2010-02-02  Jim Meyering  <meyering@redhat.com>
1506
1507         gzip -cdf mishandles some concatenated input streams: test it
1508         * tests/mixed: Exercise "gzip -cdf" bug.
1509         * Makefile.am (XFAIL_TESTS): Add it.
1510         Mark Adler reported the bug.
1511
1512         tests: move the hufts-segv test to its own file
1513         * tests/hufts: New test.
1514         * Makefile.am (TESTS): Add tests/
1515         (check-local): Remove the hufts-segv test from this rule.
1516
1517         tests: begin moving tests into their own files
1518         * Makefile.am (TESTS): Add tests/stdin.
1519         (check-local): Move the stdin check to its own file:
1520         * tests/stdin: New script.
1521
1522         tests: remove unnecessary use of "path_prepend_ ."
1523         It is unnecessary, since Makefile.am's TESTS_ENVIRONMENT setting
1524         already adds the top build directory, and besides, is only
1525         marginally useful when running stand-alone, since it presumes
1526         that the script is being run from the top build directory.
1527         * tests/helin-segv: Remove unnecessary use of path_prepend_.
1528         * tests/memcpy-abuse: Likewise.
1529         * tests/trailing-nul: Likewise.
1530         * tests/zdiff: Likewise.
1531         * tests/zgrep-f: Likewise.
1532
1533         tests: note that znew-k test depends on length of temp file name
1534         * tests/znew-k: Tweak diagnostic, factor and add a surprising comment.
1535
1536 2010-02-01  Jim Meyering  <meyering@redhat.com>
1537
1538         build: update gnulib submodule to latest
1539
1540 2010-02-01  Dmitry V. Levin  <ldv@altlinux.org>
1541
1542         fix "znew -K" to work without use of compress utility
1543         * znew.in: Change -K option to imply -t, do not use compress(1).
1544         * znew.1: Document it.
1545         * tests/znew-k: New test.
1546         * Makefile.am (TESTS): Add it.
1547
1548 2010-01-20  Jim Meyering  <meyering@redhat.com>
1549
1550         maint: update README-release procedure
1551         * README-release: sync from coreutils.
1552
1553         post-release administrivia
1554         * NEWS: Add header line for next release.
1555         * .prev-version: Record previous version.
1556         * cfg.mk (old_NEWS_hash): Auto-update.
1557
1558         version 1.4
1559         * NEWS: Record release date.
1560
1561         tests: exercise the segfault fix
1562         * tests/helin-segv: New test.
1563         * Makefile.am (TESTS): Add it.
1564
1565         gzip -d: do not clobber stack for valid input on x86_64
1566         * unlzw.c (unlzw): Avoid integer overflow.
1567         Aki Helin reported the segfault along with an input to trigger the bug.
1568         * NEWS (Bug fixes): Mention it.
1569
1570         maint: avoid a minor "make syntax-check" failure
1571         * .x-sc_file_system: Exempt NEWS, since it includes a literal
1572         from an old diagnostic.
1573
1574         maint: remove unused file: README-alpha
1575         * README-alpha: Remove unused file.
1576
1577         build: update gnulib submodule to latest
1578
1579 2010-01-11  Yuxi Zhang  <YZhang@qnx.com>
1580
1581         gzip -d: use memcpy more often
1582         * inflate.c (inflate_codes): Use memcpy (rather than slower
1583         memcopy-like code) in more cases.
1584
1585 2010-01-11  Jim Meyering  <meyering@redhat.com>
1586
1587         build: do not override gnulib-provided AM_CFLAGS options
1588         Avoid a warning from automake:
1589         lib/Makefile.am:24: AM_CFLAGS multiply defined in condition TRUE ...
1590         lib/gnulib.mk:30: ... `AM_CFLAGS' previously defined here
1591         lib/Makefile.am:20:   `lib/gnulib.mk' included from here
1592
1593         * lib/Makefile.am (AM_CFLAGS): Append $(WARN_CFLAGS) and
1594         $(WERROR_CFLAGS), i.e., use "+=", not "=".
1595         This was introduced via 2009-12-17 commit 0341fc22,
1596         "build: with --enable-gcc-warnings, use -Werror",
1597         but fortunately is not a bug, because the definition
1598         it would have overridden was always empty.
1599
1600 2010-01-10  Jim Meyering  <meyering@redhat.com>
1601
1602         gzip -d would fail with a CRC error...
1603         ...for some inputs, and some memcpy implementations.  It is possible
1604         that an offending input has to be compressed "from FAT filesystem
1605         (MS-DOS, OS/2, NT)", since the sole reproducer no longer evokes a
1606         CRC error when uncompressed and recompressed on a GNU/Linux system.
1607         Also, using an unpatched reverse-memcpy-gzip on over 100,000 inputs
1608         on a GNU/Linux system did not turn up another reproducer.
1609         * inflate.c (inflate_codes): Don't call memcpy with overlapping regions.
1610         Properly detect when source and destination overlap.
1611         * tests/memcpy-abuse: New test, to trigger misbehavior.
1612         * Makefile.am (TESTS): Add it.
1613         * NEWS (Bug fixes): Mention it.
1614         Reported by Alain Magloire in
1615         http://thread.gmane.org/gmane.comp.gnu.gzip.bugs/307
1616
1617 2010-01-08  Jim Meyering  <meyering@redhat.com>
1618
1619         tests: switch to gnulib's init.sh test infrastructure
1620         * tests/test-lib.sh: Remove file.
1621         * tests/init.sh: New file, from gnulib.
1622         * tests/trailing-nul: Use the new file.
1623         * tests/zdiff: Likewise.
1624         * tests/zgrep-f: Likewise.
1625         * Makefile.am (EXTRA_DIST): List tests/init.sh, not test-lib.sh.
1626
1627         build: update gnulib submodule to latest
1628
1629 2010-01-03  Jim Meyering  <meyering@redhat.com>
1630
1631         maint: record update-copyright options for this package
1632         * cfg.mk: Next time, just run "make update-copyright".
1633
1634 2010-01-01  Jim Meyering  <meyering@redhat.com>
1635
1636         maint: update all FSF copyright year lists to include 2010
1637         Use this command:
1638         git ls-files |grep -vE '^(\..*|COPYING|gnulib)$' |xargs \
1639         env UPDATE_COPYRIGHT_USE_INTERVALS=1 build-aux/update-copyright
1640
1641 2009-12-31  Jim Meyering  <meyering@redhat.com>
1642
1643         maint: newer gnulib; don't hard-code my GPG key ID
1644         * cfg.mk (gpg_key_ID): Remove definition, now that maint.mk automates it.
1645         * gnulib: Update to lastest.
1646
1647 2009-12-30  Jim Meyering  <meyering@redhat.com>
1648
1649         build: update gnulib submodule to latest
1650
1651         maint: remove lots of obsolete #if...HAVE_* checks
1652         Remove many always-true cpp tests like #ifdef HAVE_UNISTD_H,
1653          #ifdef HAVE_FCNTL_H and #ifdef SSIZE_MAX.
1654         * gzip.c: As above.
1655         * gzip.h: Likewise.
1656         * inflate.c: Likewise.
1657         * tailor.h: Likewise.
1658         * unlzw.c: Likewise.
1659         * util.c: Likewise.
1660         * zip.c: Likewise.
1661
1662         build: add a syntax-check
1663         * cfg.mk (sc_prohibit_obsolete_HAVE_HEADER_H): New rule.
1664
1665         build: with --enable-gcc-warnings, use -Werror
1666         * Makefile.am (AM_CFLAGS): Enable $(WERROR_CFLAGS).
1667         * lib/Makefile.am (AM_CFLAGS): Enable both $(WARN_CFLAGS) and
1668         $(WERROR_CFLAGS).
1669
1670         build: quiet warnings from util.c
1671         * configure.ac (warnings): Add -Wno-overflow and -Wno-type-limits.
1672
1673         build: avoid warning about possibly-no-return functions
1674         * gzip.h (read_error, write_error): Mark these functions as "no-return".
1675
1676         build: avoid warning about ignored chown/fchown return value
1677         * bootstrap.conf (gnulib_modules): Add ignore-value.
1678         * gzip.c: Include "ignore-value.h".
1679         (copy_stat): Explicitly ignore chown and fchown failure
1680
1681         build: update gnulib submodule to latest
1682
1683 2009-11-20  Jim Meyering  <meyering@redhat.com>
1684
1685         build: unlzw.c: avoid warnings about unused macros
1686         * configure.ac: Turn off -Wunused-macros.
1687
1688         build: avoid warnings about unused macros
1689         * unzip.c (LOCTIM): Comment out unused macro.
1690         * deflate.c (EQUAL): Remove definition.  Use "0" at sole point of use.
1691
1692         build: util.c: avoid warnings about add_envopt
1693         * util.c (add_envopt): The parameter "env" was used for two conflicting
1694         purposes.  One use required a const char* parameter, while the other
1695         was used as an argument to free, which must not be "const".
1696         Rename the parameter and use a new local variable for the second role.
1697
1698         build: avoid many const-related warnings
1699         * gzip.c: Add "const" to many variables, to avoid compiler warnings.
1700         * util.c (add_envopt): Make 3rd parameter const
1701         (gzip_error): Make sole parameter const.
1702         * gzip.h: Update prototypes.
1703
1704         build: avoid warnings from -Wstrict-prototypes
1705         * gzip.c (main): Declare using a prototype.
1706         (progerror): Likewise.  And make parameter const.
1707
1708         build: use gnulib's fdopendir module
1709         * bootstrap.conf (gnulib_modules): Add fdopendir.
1710         * gzip.c (treat_dir): Don't depend on HAVE_FDOPENDIR.
1711         Gnulib now guarantees its availability.
1712         * configure.ac: Don't check for fdopendir here.
1713
1714         build: enable many warnings
1715         * configure.ac: Add support for --enable-gcc-warnings.
1716         * bootstrap.conf (gnulib_modules): Add manywarnings.
1717         * Makefile.am (AM_CFLAGS): Add (WARN_CFLAGS) # $(WERROR_CFLAGS)
1718
1719         maint: tweak formatting of bootstrap.conf
1720         * bootstrap.conf (gnulib_modules): Unindent list.
1721
1722         maint: cfg.mk: remove factored-out ftp host/dir definitions
1723         * cfg.mk (gnu_ftp_host-alpha, gnu_ftp_host-beta gnu_ftp_host-stable):
1724         (gnu_rel_host, url_dir_list): Remove definitions.  The defaults,
1725         now provided by maint.mk, are the same.
1726         * gnulib: Update for latest, including those maint.mk additions.
1727
1728         build: "make stable" emitted an invalid gnupload command
1729         * cfg.mk (gnu_ftp_host-stable): Rename from gnu_ftp_host-major.
1730         * README-release: Change another s/major/stable/.
1731
1732 2009-10-30  Jim Meyering  <meyering@redhat.com>
1733
1734         post-release administrivia
1735         * NEWS: Add header line for next release.
1736         * .prev-version: Record previous version.
1737         * cfg.mk (old_NEWS_hash): Auto-update.
1738
1739         version 1.3.14
1740         * NEWS: Record release date.
1741
1742         build: accommodate new syntax-check test
1743         * amiga/tailor.c (_expand_args): Change each of three uses of
1744         "exit(20)" to "exit(EXIT_FAILURE)".
1745         * sample/add.c: Include <stdlib.h>.
1746         (main): Use EXIT_FAILURE and EXIT_SUCCESS, not 1 and 0.
1747         * sample/sub.c (main): Likewise.
1748         * sample/zread.c (main): Likewise.
1749
1750         build: update gnulib submodule to latest
1751
1752         build: link with $(LIB_CLOCK_GETTIME)
1753         * Makefile.am (gzip_LDADD): Add $(LIB_CLOCK_GETTIME), now that
1754         utimens pulls in gettime.
1755         (FILES_TO_CHECK): Remove $(gzip_LDADD), now that it may contain -lrt.
1756
1757 2009-10-28  Jim Meyering  <meyering@redhat.com>
1758
1759         msdos: fix syntax in Makefile.djg
1760         * msdos/Makefile.djg (gzip): Change each of two leading 8-space
1761         sequences to a TAB.  Reported by Allan Mui.
1762
1763 2009-10-20  Jim Meyering  <meyering@redhat.com>
1764
1765         build: do not use AC_PREFIX_PROGRAM
1766         * configure.ac: Do not use "AC_PREFIX_PROGRAM(gzip)".
1767         It would induce behavior that is so surprising that it is probably
1768         universally considered to be buggy, these days.  Reported by Zube
1769         in http://thread.gmane.org/gmane.comp.gnu.gzip.bugs/273
1770
1771 2009-10-10  Jim Meyering  <meyering@redhat.com>
1772
1773         gzip: add tests for today's bug fix
1774         * tests/trailing-nul: New file.  Test for today's fix.
1775         * Makefile.am (TESTS): Add new script.
1776         * NEWS (Bug fixes): Mention it.
1777
1778 2009-10-10  Daniel Barkalow  <barkalow@iabervon.org>
1779
1780         gzip: don't fail when there is exactly one trailing NUL byte
1781         * gzip.c (get_method): Require the second byte of magic only if
1782         the first byte was nonzero.
1783
1784 2009-10-09  Jim Meyering  <meyering@redhat.com>
1785
1786         build: enable automake color- and parallel-test options
1787         * configure.ac (AM_INIT_AUTOMAKE): Enable color-tests and parallel-tests.
1788
1789         zgrep: portability improvements; exercise "-f -"
1790         * zgrep.in: Adjust loop not to use seq; it's not portable enough.
1791         Fail if we don't find a free file descriptor.
1792         (exists): New function; Use it in place of less portable "test -e".
1793         Testing for existence of /dev/fd/$fd doesn't work on Solaris 10,
1794         since all 256 always exist (as char devices), but testing for
1795         /proc/$$/fd/$fd does work, so do that instead.
1796         * Makefile.am (TESTS): Add tests/zgrep-f.
1797         * tests/zgrep-f: New test; exercise this bug.
1798         * NEWS (Bug fixes): Mention it.
1799
1800 2009-10-09  Carl Worth  <cworth@cworth.org>
1801
1802         zgrep: handle "-f -" the same way that it works with grep
1803         Before this change, echo needle|zgrep -f - haystack.gz would not work.
1804         * zgrep.in: When the pattern comes from stdin, redirect it to a
1805         different file descriptor, since we're about to use stdin.
1806
1807 2009-10-09  Jim Meyering  <meyering@redhat.com>
1808
1809         zdiff would exit 2 (error) rather than 1 for differences
1810         * zdiff.in: Save and restore cmp's exit status around a case
1811         statement that would otherwise clobber its value.
1812         * NEWS (Bug fixes): Mention it.
1813         * tests/zdiff: New test; exercise both bugs.
1814         * tests/test-lib.sh: New file.  From coreutils.
1815         * Makefile.am (EXTRA_DIST): Add tests/test-lib.sh.
1816         (TESTS): Add tests/zdiff.
1817         (TESTS_ENVIRONMENT): Define.  From coreutils.
1818         (EXTRA_DIST): Append all $(TESTS).
1819
1820         zdiff: fix malfunction when operating on two gzip'd inputs
1821         zdiff would fail to print differences in two compressed inputs
1822         * zdiff.in: Don't let cmp output mix with echo'd gzip exit
1823         status values.  Report and fix from Jörg-Volker Peetz via
1824         <http://bugs.debian.org/434275>
1825         * NEWS (Bug fixes): Mention it.
1826
1827         build: update gnulib submodule to latest
1828
1829 2009-10-07  Jim Meyering  <meyering@redhat.com>
1830
1831         build: update gnulib submodule to latest
1832
1833 2009-10-06  Jim Meyering  <meyering@redhat.com>
1834
1835         maint: clarify web-doc-update instructions
1836         * README-release: sync a tiny change from coreutils.
1837
1838 2009-10-03  Jim Meyering  <meyering@redhat.com>
1839
1840         build: update gnulib submodule to latest
1841
1842         doc: use gnu-web-doc-update module
1843         * bootstrap.conf (gnulib_modules): Add it.
1844
1845 2009-10-02  Jim Meyering  <meyering@redhat.com>
1846
1847         doc: describe release procedure
1848         * README-release: New file.
1849
1850 2009-10-01  Jim Meyering  <meyering@redhat.com>
1851
1852         maint: make cfg.mk slightly more generic
1853         * cfg.mk (url_dir_list): Don't hard-code "coreutils".  Use $(PACKAGE).
1854
1855 2009-09-30  Jim Meyering  <meyering@redhat.com>
1856
1857         post-release administrivia
1858         * NEWS: Add header line for next release.
1859         * .prev-version: Record previous version.
1860         * cfg.mk (old_NEWS_hash): Auto-update.
1861
1862         version 1.3.13
1863         * NEWS: Record release date.
1864
1865         build: update gnulib submodule to latest
1866
1867         maint: update bootstrap script
1868         * bootstrap (with_gettext): Update from coreutils.
1869
1870         maint: pull in two release-related modules from gnulib
1871         * bootstrap.conf (gnulib_modules): Add announce-gen and gnupload.
1872
1873         build: use more gnulib modules for better POSIX compliance
1874         * bootstrap.conf (gnulib_modules): Add modules exposed via
1875         make CFLAGS=-DGNULIB_POSIXCHECK 2>&1 \
1876         |perl -lne '/.* use gnulib module (\S+).*/ and print $1' \
1877         |sort |uniq -c|sort -nr
1878         Add these: calloc close fclose fprintf-posix lstat malloc
1879         perror printf-posix realloc
1880
1881 2009-09-30  Karl Berry  <karl@freefriends.org>
1882
1883         doc: update to FDL 1.3, minor clean-up
1884         * NEWS, README, TODO: Update FDL s/1.2/1.3/.
1885
1886 2009-09-28  Karl Berry  <karl@freefriends.org>
1887
1888         doc: update gzip.texi
1889         * doc/gzip.texi: FDL 1.3+
1890         Consistently (de)capitalize section names.
1891         "User's" is not correct; seems best to simplify the title.
1892         Throw in some "GNU"'s.
1893         Make direntries be what we actually want.
1894         Detabify.
1895
1896 2009-09-26  Jim Meyering  <meyering@redhat.com>
1897
1898         maint: temporarily exempt failing syntax-check tests
1899         * cfg.mk (local-checks-to-skip): Add the list of currently-failing
1900         tests, to exempt them from "make syntax-check".
1901
1902         gzip: don't use an uninitialized file descriptor
1903         gzip interprets an argument of "-" as indicating stdin, but when
1904         "-" is not the first name on the command line, it doesn't work.
1905         * gzip.c (treat_stdin): Initialize "ifd".
1906         Patch and fine description by Lasse Collin in
1907         http://www.mail-archive.com/bug-gzip@gnu.org/msg00213.html
1908         * Makefile.am (check-local): Exercise the fix.  Based on the above.
1909         * NEWS (Bug fixes): Mention this.
1910
1911         maint: use a git submodule for gnulib
1912         * .gitmodules: New file, to track gnulib.
1913         * gnulib: New file, created by running this:
1914         git submodule add git://git.sv.gnu.org/gnulib.git gnulib
1915
1916         maint: update existing copyright year lists to include 2009
1917         * bootstrap.conf (gnulib_modules): Add update-copyright.
1918
1919         maint: include <config.h> first in many files
1920
1921         maint: avoid another "make syntax-check" failure
1922         * lib/Makefile.am (match.$(OBJEXT)): Use $(ASCPPPOST), not @ASCPPPOST@.
1923
1924         maint: remove RCS $Id$ variables and comments
1925
1926         maint: change spelling in comments: s/filesystem/file system/
1927
1928         maint: don't use "the the"
1929         * msdos/doturboc.bat: s/the the/the/.
1930
1931         maint: remove trailing blanks
1932
1933         maint: remove useless if-before-free tests
1934         * gzip.c (do_exit): Remove useless if-before-free tests.
1935
1936         maint: remove useless casts to avoid "make syntax-check" failures
1937         * gzip.c (do_exit): Remove anachronistic cast.
1938         * inflate.c (huft_free): Likewise.
1939         * util.c (add_envopt): Likewise.
1940         * vms/vms.c (vms_expand_args): Likewise.
1941
1942         maint: new file: .prev-version
1943         * .prev-version: New file, to record previous version number.
1944
1945 2009-09-06  Jim Meyering  <meyering@redhat.com>
1946
1947         build: avoid spurious warnings from clang
1948         * gzip.h (gzip_error): Declare with ATTRIBUTE_NORETURN.
1949
1950         maint: update build-from-scratch infrastructure
1951         * bootstrap: Modernize.
1952         * bootstrap.conf: Modernize.
1953         * cfg.mk: New file.
1954
1955 2009-08-18  Jim Meyering  <meyering@redhat.com>
1956
1957         inflate: avoid a leak on a error path
1958         * inflate.c (inflate_dynamic): Don't leak
1959
1960         maint: ignore a few generated files
1961         * lib/.gitignore: ignore more generated files.
1962
1963         tests: add a test for just-fixed bug
1964         * tests/hufts-segv.gz: New file, from bug report.
1965         * Makefile.am (EXTRA_DIST): Add tests/hufts-segv.gz.
1966         (check-local): Exercise the bug.
1967
1968         tests: don't misinterpret a failing test as successful
1969         * Makefile.am (check-local): Exit "1" upon failure, not 0.
1970
1971 2009-08-18  Thiemo Nagel  <thiemo.nagel@ph.tum.de>
1972
1973         avoid creating an undersized buffer for the hufts table
1974         A malformed input file can cause gzip to crash with a segmentation
1975         violation or hang in an endless loop.
1976         Reported in <http://bugs.debian.org/507263>.
1977         * NEWS (Bug fixes): Mention it.
1978
1979 2009-08-18  Jim Meyering  <meyering@redhat.com>
1980
1981         avoid silent data loss e.g., on NFS, due to unchecked close of stdout
1982         * gzip.c: Include "closein.h".
1983         (main): Use atexit (close_stdin);
1984         * bootstrap.conf (gnulib_modules): Add closein.
1985         Prompted by Mark Kidwell's report and patch in
1986         http://bugs.debian.org/538187
1987         * NEWS (Bug fixes): Mention it.
1988         * */.gitignore: Update.
1989
1990         build: require automake-1.11 and produce xz-compressed tarballs, too
1991         * configure.ac: Require automake-1.11.  Use the dist-xz option.
1992
1993         build: avoid non-srcdir build failure
1994         * Makefile.am (gzip.doc.gz): Use $(srcdir)/gzip.doc, not gzip.doc.
1995         Don't redirect directly to $@.  Use $(AM_V_GEN).
1996         (gzip.doc, .in): Don't redirect directly to $@.  Use $(AM_V_GEN).
1997         * NEWS: Add template header for upcoming release.
1998
1999         build: enable git-version-gen, automake silent rules, generate ChangeLog
2000         * configure.ac (AC_INIT): Use git-version-gen.
2001         Use AM_SILENT_RULES([yes]).
2002         (AM_INIT_AUTOMAKE): Drop gnits; conflicts with git-version-gen versions.
2003         * bootstrap.conf (gnulib_modules): Use getopt-gnu
2004         Ensure ChangeLog exists, for automake.
2005         rather than obsolete "getopt" module.
2006         Add gitlog-to-changelog.
2007         Add git-version-gen.
2008         Add gnu-make, gnumakefile and maintainer-makefile.
2009         * Makefile.am (dist-hook, gen-ChangeLog): New rules, to generate
2010         ChangeLog and insert it into the distribution tarball.
2011         (EXTRA_DIST): Add ChangeLog-2007.
2012
2013         maint: retire the last VC'd ChangeLog file
2014         * ChangeLog-2007: Rename from ChangeLog.
2015         From now on, the ChangeLog file will be generated automatically
2016         from commit logs.
2017
2018         maint: rename .cvsignore files to .gitignore
2019         * .gitignore: Renamed from .cvsignore.
2020         * doc/.gitignore: Likewise.
2021         * lib/.gitignore: Likewise.
2022         * m4/.gitignore: Likewise.