2026-09-20  Jim Meyering  <meyering@meta.com>

	version 1.15
	* NEWS: Record release date.

2026-09-10  Paul Eggert  <eggert@cs.ucla.edu>

	doc: add THANKS for bug report

	gzip: avoid last_component if !USE_ATFUNCS
	Problem reported by Bryan M.
	* gzip.c (atdir_set): New arg PARENTFD.  All uses changed.
	Use the new arg to avoid passing AT_FDCWD to unlinkat when a
	parent directory was intended.
	(treat_file) [!USE_ATFUNCS]: Use ifname, not its last component.

	gzip: use unlinkat only when using openat
	This is mostly just a cleanup, but the cleanup removes a nagging
	issue on MS-Windowsish platforms with openat+unlinkat but where
	you cannot unlink a readonly file.  In this case the code used
	plain open, but used unlinkat, which is questionable.
	* gzip.c (USE_ATFUNCS): Rename from TRY_OPENING_DIRECTORIES.
	The old name was misleading, as gzip -r opens directories
	even when USE_ATFUNCS is false.  All uses changed.
	(gzip_unlinkat, unlinkat) [!USE_ATFUNCS]:
	New compatibility function and macro.
	* util.c (xunlinkat): Remove.  All uses changed to use unlinkat.

2026-09-05  Paul Eggert  <eggert@cs.ucla.edu>

	gzip: fix undefined behavior with SIGPIPE
	This problem arose due to a combination of commit
	bb78ea465787191e8987d4b8a6594f9f23a18930 dated 2013-06-11,
	which defined SIGPIPE to 0 if not already defined, with commit
	ede0a8888a4d3d0750e1651e01f198e2faab5d59 dated 2026-05-25,
	which included tailor.h before all system .h files.
	Problem and fix reported by Collin Funk (bug#81139).
	* gzip.c (handled_sig): ifdef, not if, for SIGPIPE.
	* tailor.h (SIGPIPE): Do not #define to 0, because when we later
	include <signal.h> its #define yields undefined behavior.

	maint: update .gitignore files and bootstrap

	build: configure.ac cruft removal
	* configure.ac: Do not call AC_PROG_RANLIB, as we no longer use
	its results ourselves.  Do not use AC_C_CONST or AC_TYPE_SIZE_T,
	as it’s safe to assume C89 now.  Do not check for fcntl.h,
	limits.h, memory.h, time.h, as we no longer use the corresponding
	HAVE_FCNTL_H etc. macros.  Do not check for lstat or siginterrupt,
	as we no longer use HAVE_LSTAT or HAVE_SIGINTERRUPT.  Do not use
	AC_HEADER_DIRENT, as we no longer use any symbols that it defines.

	gzip: don’t open same dir twice when recursive
	Opening it multiple times can lead to races.
	* gzip.c (treat_file, create_outfile, open_and_stat, open_input_file):
	New arg parentfd.  All uses changed.  If nonnegative, treat it as
	the parent directory file descriptor, instead of dfd or syncdfd.
	(check_ofname): New arg atfd.  All uses changed.
	(treat_dir): Do not close fd until after processing subsidiaries.
	Instead, pass it as the parent fd to subroutines.
	Report any streamsavedir failure.

	gzip: be more cautious about using AT_FDCWD
	Without this change, gzip was more vulnerable to attackers
	changing the directory hierarchy while gzip walks through it.
	* gzip.c (ATDIR_SET_ERROR): New constant.
	(atdir_set): Return it on failure, so that callers can distinguish
	failure from AT_FDCWD.  All uses changed.  Do not update the cache
	if the new call fails.
	(create_outfile, open_and_stat): Report directory failures
	instead of silently ignoring them and falling back on AT_FDCWD.

	gzip: fix race in attacker-controlled directory
	Do not let an attacker cause you to remove a victim file
	merely because they can control an ancestor directory.
	* gzip.c (remove_ofname_dfd): New var.
	(atdir_set): Do not open directories if sending to stdout,
	as we are not destructive in this case.
	(create_outfile, open_and_stat): Use atdir_set even if KEEP, as we
	need it for the output file now.
	(create_outfile): Save atfd and base, not ofname.
	(remove_output_file): Use remove_ofname_dfd, not dfd,
	because dfd is not volatile and so is unsafe in a signal handler.

	gzip: shrink critical section
	* gzip.c (remove_output_file): Move non-critical code
	out of the critical section.

	gzip: use relative unlinkat
	* gzip.c (treat_file): Simplify and pull name calculation out of
	critical section.  No need to call atdir_eq here
	(check_ofname, remove_output_file): Unlink relative to dfd
	if dfd is nonnegative.

	maint: sort THANKS
	* THANKS: Sort.

	gzip: refactor unlink calls
	This should simplify future improvements.
	* gzip.c (TRY_OPENING_DIRECTORIES) [UNLINK_READONLY_BUG]:
	Now false instead of true.
	(gzip_unlinkat, unlinkat): Remove.
	All callers changed to use xunlinkat.
	* util.c (xunlinkat): New function, replacing xunlink.
	All callers changed.

	build: avoid fdopendir module
	This further simplifies gzip and shrinks attack surface
	on older platforms.  gzip no longer needs the old code
	to save and restore working directories.
	Reverts some of commit b5f88a3a283655adfc6c03fcb61031367e6d6d88
	dated 2009-11-19 13:59:11 +0100.
	* bootstrap.conf (gnulib_modules): Remove fdopendir.
	* configure.ac: Check for fdopendir and opendir.
	* gzip.c (NO_DIR): Default to (!HAVE_FDOPENDIR && !HAVE_OPENDIR).
	(treat_dir) [!NO_DIR && !HAVE_FDOPENDIR]: Fall back on opendir.

	build: avoid openat, unlinkat modules
	Instead of using Gnulib’s openat and unlinkat modules,
	simplify gzip by not calling the functions if the
	operating system does not have them natively.
	This simplifies gzip and shrinks its attack surface.
	* bootstrap.conf (gnulib_modules): Remove openat, unlinkat.
	* configure.ac: Check for openat, unlinkat.
	* gzip.c (TRY_OPENING_DIRECTORIES): New macro,
	taken from atdir_set body.
	(gzip_openat, gzip_unlinkat, openat, unlinkat)
	[!TRY_OPENING_DIRECTORIES]: New functions and macros, that ignore
	the directory file descriptor and flags.  This simplifies later code.
	(atdir_set): Use TRY_OPENING_DIRECTORIES instead.
	(open_and_stat): Pass 0 mode to openat, in case
	TRY_OPENING_DIRECTORIES is in use.

	maint: prefer stdopen to *-safer
	This should simplify future maintenance.
	* bootstrap.conf (gnulib_modules): Replace fcntl-safer,
	openat-safer, unistd-safer with fcntl-h, openat, unistd-h.
	Add stdopen.
	* gzip.c: Include <stdopen.h>, <fcntl.h> instead of <fcntl--.h>.
	(main): Call stdopen as soon as practical.

	build: update gnulib submodule to latest

	gzip: fix flags used to open directories
	* gzip.c (dfd): Now AT_FDCWD, not -1, when negative.
	All uses changed.
	(syncdfd): New static var.
	(atdir_set): Return AT_FDCWD, not -1, when returning negative.
	All uses changed.  For dfd prefer O_PATH to O_SEARCH on GNU platforms,
	as O_SEARCH incorrectly limits gzip to readable directories there.
	Set syncdfd to a file descriptor opened with O_RDONLY,
	as GNU platforms reject fdatasync with an O_PATH descriptor,
	and even without the O_PATH change,
	FreeBSD platforms reject fdatasync with an O_SEARCH descriptor.
	(treat_file): Use syncdfd, not dfd, to sync directory.

2026-09-04  Paul Eggert  <eggert@cs.ucla.edu>

	gzip: add FIXME re comment vs confusing code
	From a question about the code by Mark Adler.

	build: work around OpenBSD i386 glitch
	Problem reported by Bruno Haible (Bug#81766).
	* configure.ac (gzip_cv_assembler): 'no' on OpenBSD i386.

2026-09-03  Jim Meyering  <meyering@meta.com>

	gzip: fix s390 build failure with -m31
	* dfltcc.c (is_dfltcc_enabled): Use the STFLE opcode rather than the
	mnemonic, as Linux does: with 'gcc -m31' the assembler's default
	machine predates z9-109, so it rejects the mnemonic.
	Reported by Bruno Haible in https://bugs.gnu.org/81766

2026-09-01  Paul Eggert  <eggert@cs.ucla.edu>

	tests: port timestamp tests to Solaris x86
	Problem reported by Bruno Haible (Bug#81766).
	* tests/timestamp: Accept test results if time_t is 32 bits but
	'touch' supports 64 bits.

2026-09-01  Jim Meyering  <meyering@meta.com>

	build: update gnulib to latest

	build: avoid failure when combining --enable-gcc-warnings and GCC16+
	* configure.ac: Add gl_WARN_ADD([-Wno-keyword-macro]), to suppress many
	new warnings like this from GCC16:
	  ./lib/config.h:2403:9: error: keyword 'restrict' defined as macro \
	    [-Werror=keyword-macro]
	  2403 | #define restrict __restrict__

2026-08-30  Jim Meyering  <meyering@meta.com>

	tests: test for the lzh-lzh fix
	* tests/lzh-lzh-ctable-abuse: New file.  Two crafted .lzh files that would
	let c_table state from the first leak into the decoding of the second.
	Result: the second file silently decodes to \x01 rather than \0.
	* tests/Makefile.am (TESTS): Add it.

2026-08-30  Jim Meyering  <meyering@meta.com>

	gzip: don’t mishandle .lzh after .lzh
	If an .lzh member ends up with all code lengths zero, make_table
	neither stores a symbol in c_table nor runs its own clearing loop, so
	decode_c decodes with whatever table the previously decompressed .lzh
	member left behind.  The member then decodes differently depending on
	what preceded it in the same process.

	* unlzh.c (huf_decode_start): Clear c_table too.
	* NEWS: Mention this.

2026-08-30  Jim Meyering  <meyering@meta.com>

	tests: test for the lzw-lzh fix
	* tests/Makefile.am (TESTS): Add it.
	* tests/lzw-lzh-abuse: New file.  Show how a poisoning .Z can
	cause a following .lzh file to silently decompress improperly.

2026-08-25  Paul Eggert  <eggert@cs.ucla.edu>

	gzip: unaligned access if __riscv_misaligned_fast
	Optimization suggested by Huang Shangcheng (Bug#81705).
	* tailor.h (UNALIGNED_OK) [__riscv_misaligned_fast]:
	Define if not already defined.

2026-08-11  Paul Eggert  <eggert@cs.ucla.edu>

	gzip: don’t mishandle .lzh after .Z (better fix)
	* unlzh.c (read_c_len): Move clearing of left and right from here ...
	(huf_decode_start): ... to here.
	Problem and fix reported by Elias Hasas.

2026-07-08  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

	maint: avoid wchar-h
	* bootstrap.conf: Avoid wchar-h. Suggested by Bruno Haible in:
	https://lists.gnu.org/r/bug-gnulib/2026-07/msg00012.html

2026-06-03  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

	build: substitute GNULIBHEADERS_OVERRIDE_WINT_T too
	Problem reported by Bruno Haible (Bug#81174).
	* configure.ac (GNULIBHEADERS_OVERRIDE_WINT_T): AC_SUBST it.

2026-05-30  Paul Eggert  <eggert@cs.ucla.edu>

	build: slim down wchar-h etc. configuration
	Since we don’t rely on Gnulib’s mbszero, uchar-h, wchar-h etc., we
	can omit some configuration bureaucracy.
	* bootstrap.conf (gnulib_tool_option_extras): Avoid mbszero too.
	(bootstrap_post_import_hook): Remove m4/locale-en.m4, m4/wint_t.m4.
	* configure.ac (gt_LOCALE_EN_UTF8, gt_TYPE_WINT_T)
	(GNULIBHEADERS_OVERRIDE_WINT_T): Define dummies.
	* lib/.gitignore, m4/.gitignore: Update.

	gzip: escape C1 controls when quoting
	Problem reported by Lasse Collin <https://bugs.gnu.org/81135#29>.
	* gzip.c: Include <locale.h>.
	(main): Start off with setlocale (LC_ALL, ""), so that multibyte
	encodings work.  From the tryB suggestion of Bruno Haible
	<https://bugs.gnu.org/81135#5> except it’s done even on native
	MS-Windows.

	build: update gnulib submodule to latest
	* configure.ac (_QUOTEARG_AVOID_UCHAR_H): New macro, replacing
	USE_C_LOCALE; needed for latest Gnulib.

2026-05-29  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2026-05-26  Paul Eggert  <eggert@cs.ucla.edu>

	gzip: don’t include <c-ctype.h>
	Problem reported by Bruno Haible (Bug#81123).
	* gzip.c: Don’t include <c-ctype.h>.

	gzexe: fix message typo in previous change
	Reported by Vincent Lefevre (Bug#79321).

2026-05-25  Paul Eggert  <eggert@cs.ucla.edu>

	gzip: tolower → c_tolower
	* tailor.h (casemap)
	[MSDOS || OS2 || WIN32 || _WIN32 || ATARI || atarist]:
	Define to c_tolower, not to tolower, since we no longer
	include <ctype.h>.

	gzip: quote oddball file names in diagnostics
	* NEWS: Mention this.
	* bootstrap.conf (gnulib_modules): Add c-ctype, quotearg.
	(gnulib_tool_option_extras): Avoid c32isprint, mbrtoc32,
	mbsinit, mbszero, uchar-h.
	* configure.ac (USE_C_LOCALE): Define.
	* gzexe.in, zdiff.in, zforce.in, zgrep.in:
	Do not send file names to stderr; it’s not worth the trouble
	to try to safely quote them in these rarely-used scripts.
	* gzip.c, util.c: Reorder includes for sanity, putting config.h
	first, then tailor.h, then our others, then Gnulib’s, then POSIX’s.
	* gzip.c, trees.c, util.c:
	Include <c-ctype.h> instead of <ctype.h>; all function uses changed.
	* gzip.c (progerror, main, treat_file, create_outfile, open_input_file)
	(make_ofname, get_method, do_list, check_ofname, copy_stat, treat_dir):
	* unlzw.c (unlzw):
	* unzip.c (check_zipfile, unzip):
	* util.c (gzip_error, warning, read_error, write_err):
	* zip.c (zip):
	Quote unusual file names in diagnostics.
	* gzip.c (progerror): Treat null argument as naming standard input,
	so that we needn’t quote it.  Argument changed.
	* lib/.gitignore, m4/.gitignore: Update.
	* tests/null-suffix-clobber: Adjust to match new quoting behavior.
	* util.c (quotef, quotef_n): New functions.
	* zip.c: Don’t include <ctype.h>; not needed.

	gzip: pacify -Wuseless-cast
	* gzip.c (treat_file, do_list):
	Use compound literal instead of cast.
	(treat_file): Use uintmax_t, not unsigned long, with a format to match.
	(get_method): Omit useless cast.

	gzip: nice_match fixes for x86
	Pacify -Wmissing-variable-declarations on x86.
	* deflate.c (static_unless_ASMV): Remove.
	(nice_match): Adjust to the removal, and make sure there is
	an external definition for nice_match if needs to be external
	for the assembly-language version.

	build: Gnulib is now -Wkeyword-macro safe
	* configure.ac: Remove gl_WARN_ADD([-Wno-keyword-macro]),
	as we fixed the Gnulib issue with ‘restrict’.

	build: update gnulib submodule to latest

2026-05-25  Jim Meyering  <meyering@meta.com>

	tests: port pipe-output and zgrep-signal to Cygwin
	* tests/zgrep-signal: Use skip_, not framework_failure_,
	when SIGPIPE is not delivered, since that is a platform
	limitation, not a test infrastructure problem.
	* tests/pipe-output: Skip the no-trap iteration on Cygwin,
	where SIGPIPE delivery is unreliable.
	* tests/Makefile.am (TESTS_ENVIRONMENT): Add host_os.
	Problem reported by Bruno Haible in
	https://lists.gnu.org/r/bug-gzip/2026-05/msg00001.html

	build: update gnulib to latest

	build: avoid new failure when combining --enable-gcc-warnings and GCC16
	* configure.ac: Add gl_WARN_ADD([-Wno-keyword-macro]), to suppress many
	new warnings like this from GCC16:
	  ./config.h:2418:9: warning: keyword 'restrict' defined as macro\
	    [-Wkeyword-macro]
	   2418 | #define restrict __restrict__

2026-05-12  Paul Eggert  <eggert@cs.ucla.edu>

	znew: stop supporting -P
	* NEWS, THANKS: Mention this.
	* znew.1, znew.in: Stop documenting -P and its bugs.
	* znew.in: Issue a warning if -P is used, and otherwise ignore it.

2026-05-09  Paul Eggert  <eggert@cs.ucla.edu>

	gzip: pacify GCC 16 -Wuseless-cast
	* gzip.h (put_byte, put_ubyte, put_short, SH):
	* trees.c (ct_init, build_bl_tree, send_all_trees)
	(flush_block):
	* unlzh.c (unlzh):
	Omit useless casts.
	* gzip.h (put_short, put_long, SH): Replace possibly-useful casts
	with compound literals.  They are “possibly-useful” because it
	depends on the type of the macro’s argument.

2026-04-28  Jim Meyering  <meyering@meta.com>

	build: update gnulib to latest

2026-04-25  Jim Meyering  <meyering@meta.com>

	doc: mention pigz and zlib in SEE ALSO
	* gzip.1 (SEE ALSO): Add pigz(1).
	Mention zlib as the library for programmatic gzip I/O.
	Prompted by Bruno Haible in https://bugs.gnu.org/79794

2026-04-25  Collin Funk  <collin.funk1@gmail.com>

	maint: assume proper behavior of tolower
	* gzip.h (tolow): Remove macro.
	* tailor.h (casemap): Use tolower instead of tolow.
	* util.c (strlwr): Likewise.

2026-04-22  Jim Meyering  <meyering@meta.com>

	tests: test for the latest fix
	* tests/zdiff-abuse: New file.
	* tests/Makefile.am (TESTS): Add it.

2026-04-22  Collin Funk  <collin.funk1@gmail.com>

	zdiff: escape arguments given to short options
	* zdiff.in: Escape $arg.
	Reported in https://bugs.gnu.org/80882
	* THANKS: Update.

2026-04-20  Paul Eggert  <eggert@cs.ucla.edu>

	zgrep: fix quoting typo
	* zgrep.in: Fix quoting typo in option parsing.
	Problem reported by Leenear (bug#80868).

2026-04-19  Paul Eggert  <eggert@cs.ucla.edu>

	tests: use $GREP not grep
	Problem reported by Bruno Haible in:
	https://bugs.gnu.org/80855#64
	* tests/pipe-output, tests/zdiff, tests/zgrep-binary:
	* tests/zgrep-context:
	Use $GREP, not grep.  Also, be consistent about unsetting
	GREP_OPTIONS, for portability to GNU grep 3.5 and earlier
	when the user unwisely set GREP_OPTIONS.

2026-04-19  Jim Meyering  <meyering@meta.com>

	tests: zgrep-abuse: skip if we cannot create the exploit input
	* tests/zgrep-abuse: Just test the creation of the exploit
	file directly.  Apparently touch'ing a "|"-afflicted file name
	works fine, but redirection fails.

2026-04-19  Bruno Haible  <bruno@clisp.org>

	build: Fix syntax error in configure (regression yesterday)
	* configure.ac: Fix typo in yesterday's commit.

2026-04-18  Jim Meyering  <meyering@meta.com>

	maint: fix a comment typo
	* tests/pipe-output: Fix comment typo: NFAIL -> MINFAIL

2026-04-18  Paul Eggert  <eggert@cs.ucla.edu>

	maint: port pipe-output to Alpine
	* tests/pipe-output: Don’t assume that the underlying
	commands cmp, diff, grep do the right thing on output errors.
	Problem reported by Bruno Haible in:
	https://bugs.gnu.org/80855#11

	maint: avoid AC_REQUIRE at top level
	* configure.ac (gzip_cv_assembler): Don’t use AC_REQUIRE at top
	level.  Instead, just check that Gnulib has set host_os as usual.

	gzip: fix diagnostic after failed write
	* gzip.c (main, finish_out): Check ferror after fflush.
	That way, if the fflush fails we get a more-precise errno.
	If ferror fails, just report EIO regardless of actual error.
	(create_outfile): Do not assume a successful sigprocmask
	leaves errno alone, when issuing a diagnostic after a failed
	write.  This fixes an unlikely bug I introduced in commit
	a979d9c4db0adbf341eb329abaf3560aa12f10fd dated 2006-12-07.
	* util.c (write_err): New function, with most of the old
	write_error’s implementation.
	(write_error): Use it.

2026-04-18  Jim Meyering  <meyering@meta.com>

	tests: avoid two cygwin test failures
	* tests/list-big: Upon failure to create the 4GiB sparse file,
	_skip the test, rather than merely using framework_failure_.
	* tests/zgrep-abuse: Add an up-front _skip test for file systems
	that reject file names containing "|".
	Reported by Bruno Haible in
	https://mail.gnu.org/r/bug-gzip/2026-04/msg00009.html

2026-04-18  Paul Eggert  <eggert@cs.ucla.edu>

	doc: add Sam James's pointer to TEXTREL issue

2026-04-18  Bruno Haible  <bruno@clisp.org>

	build: Fix broken executable on 32-bit x86 systems with musl libc
	* configure.ac (gzip_cv_assembler): Set to no on musl libc.

2026-04-17  Paul Eggert  <eggert@cs.ucla.edu>

	maint: prune lib/.gitignore some more
	* lib/.gitignore: Remove recent additions that likely crept
	in only because an old source directory was being used.
	This reverts back to what this file was a couple of days ago,
	except /glthread is also removed since recent Gnulib changes
	made it unnecessary.

2026-04-17  Jim Meyering  <meyering@meta.com>

	build: remove setlocale-null-unlocked. not needed after all
	* bootstrap.conf (gnulib_modules): Remove setlocale-null-unlocked.
	* lib/.gitignore: Update. Also add several generated file and directory names.
	* m4/.gitignore: Update.

	build: avoid new build failure due to missing setlocale.h
	* bootstrap.conf (gnulib_modules): Add setlocale-null-unlocked.
	This is not the right place to add this: the gnulib setlocale
	module probably needs an added dependency. I expect to revert
	this change once gnulib is fixed.

	maint: avoid syntax-check doubled-word false positive
	* znew.in: "if if ..." looks odd but is totally fine per POSIX.
	It triggered the "make syntax-check" doubled word failure. Adding braces
	makes it more readable to me and avoids the syntax-check failure.
	* NEWS: fix typo: s/propery/properly/
	* lib/.gitignore: Update.
	* m4/.gitignore: Likewise.

2026-04-16  Paul Eggert  <eggert@cs.ucla.edu>

	gzip: omit unnecessary fillbuf casts
	* unlzh.c: Omit unnecessary casts in calls to fillbuf.

	gzip: minor subbitbuf cleanups
	* unlzh.c (subbitbuf): Now uch, not unsigned, since it has
	at most CHAR_BIT bits.
	(fillbuf): Use simpler EOF check, that doesn’t need casts.

	gzip: fix subbitbuf junk bug
	* unlzh.c (fillbuf): Clear any high-order junk bits
	from subbitbuf.  Problem reported by Michał Majchrowicz.

	gzip: fix bitbuf << 16 bug
	(Problem reported by Michał Majchrowicz.)
	* unlzh.c (fillbuf): Avoid undefined behavior when shifting bitbuf
	left by 16.  No known practical platforms do the wrong thing here,
	so this fix is mostly for completeness.

	znew: use -C
	* znew.in: Also use -C here, when creating a temp.

	gzexe: use -C if lacking mktemp
	(Problem reported by Michał Majchrowicz.)
	* gzexe.in: If mktemp is needed but not installed,
	use ‘set -C’ to avoid a race when creating a temporary file.
	* zdiff.in: Use the same pattern here, even though the old
	code was probably OK anyway.

	gzip: replace puts loop with single printf
	* gzip.c (license_msg, help_msg):
	Now single strings instead of arrays of pointers to strings.
	This is a bit simpler (avoids need for puts loops).

2026-04-15  Paul Eggert  <eggert@cs.ucla.edu>

	gzip: use unlocked I/O
	* bootstrap.conf (gnulib_modules): Add unlocked-io.
	* gzip.c (putstring, eputstring):
	New functions.  Prefer them to printf/fprintf
	when either will do, as these can use unlocked I/O with glibc.
	* gzip.h: Include unlocked-io.h instead of stdio.h.

	maint: avoid unnecessary #include <stdio.h>
	* bits.c, deflate.c, unlzh.c:
	No need to include stdio.h, since gzip.h does.

	maint: avoid windows-once, windows-tls
	* bootstrap.conf (gnulib_tool_option_extras):
	Avoid windows-once, windows-tls; these are recent Gnulib
	additions that gzip doesn’t need, for the same reason
	it doesn’t need windows-spin.

	build: update gnulib submodule to latest

	gzip: don’t mishandle .lzh after .Z
	Problem reported by Michał Majchrowicz.
	* unlzh.c (read_c_len): Clear left and right when n == 0.

	maint: update .gitignore

2026-04-10  Paul Eggert  <eggert@cs.ucla.edu>

	maint: avoid sigprocmask-related locking
	This affects only MS-Windows; it avoids the need for some
	code that is needed only on multithreaded MS-Windows apps.
	* bootstrap.conf (gnulib_tool_option_extras):
	Avoid windows-spin instead of avoiding lock.
	* configure.ac (GNULIB_SIGPROCMASK_SINGLE_THREAD):
	Define this instead of defining GNULIB_PTHREAD_SIGMASK_SINGLE_THREAD.

	build: update gnulib submodule to latest

2026-04-05  Paul Eggert  <eggert@cs.ucla.edu>

	maint: adjust to GNULIB sigprogcmask changes
	* bootstrap.conf (gnulib_modules):
	Add sigprocmask, since gzip.c uses it directly.
	(gnulib_tool_option_extras): Also avoid threadlib,
	which would otherwise be pulled in by pthread_sigmask.
	* configure.ac (GNULIB_PTHREAD_SIGMASK_SINGLE_THREAD):
	Define this instead of defining GNULIB_SIGACTION_SINGLE_THREAD.
	The latter was a misspelling, and in the meantime Gnulib has evolved
	to use GNULIB_PTHREAD_SIGMASK_SINGLE_THREAD anyway.

	build: update gnulib submodule to latest

2026-04-01  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

	maint: avoid sigaction locking
	* configure.ac (GNULIB_SIGACTION_SINGLE_THREAD):
	Define to avoid unnecessary locking in sigaction,
	needed for the next sync from Gnulib.  See:
	https://lists.gnu.org/r/bug-gnulib/2026-04/msg00008.html

2026-03-31  Paul Eggert  <eggert@cs.ucla.edu>

	gzip: pacify Oracle Solaris Studio 12.6
	* gzip.c (create_outfile): Remove unreachable code.

	maint: update .gitignore files
	* .gitignore, lib/.gitignore, m4/.gitignore:
	Adjust to match current Gnulib.

	gzip: depend on fewer Gnulib modules
	* bootstrap.conf (gnulib_modules):
	Remove fprintf-posix and printf-posix, as we don’t need their
	fixes and they drag in too many other Gnulib modules.
	(gnulib_tool_option_extras): Avoid the ‘lock’ module.

	build: update gnulib submodule to latest

2026-03-29  Paul Eggert  <eggert@cs.ucla.edu>

	gzip: pacify -Wzero-as-null-pointer-constant
	* bootstrap.conf (gnulib_modules): Add stdcountof-h,
	which we already depended on indirectly.
	* gzip.c: Include stdcountof.h.
	(license_msg, help_msg): Do not NULL-terminate.
	All uses changed.
	(longopts): Prefer NULL to 0 in pointer contexts.
	(get_suffix, install_signal_handlers):
	Prefer countof to doing it by hand.

2026-03-28  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2026-03-27  Paul Eggert  <eggert@cs.ucla.edu>

	Avoid Gnulib modules more consistently
	* bootstrap.conf (avoided_gnulib_modules): Remove.
	All uses removed.
	(gnulib_tool_option_extras): Avoid gnulib-i18n here,
	next to the other place we’re avoiding Gnulib modules.

2026-01-02  Jim Meyering  <meyering@meta.com>

	maint: update --version copyright dates
	* gunzip.in, gzexe.in, gzip.c, zcat.in, zcmp.in, zdiff.in, zforce.in,
	zgrep.in, zless.in, zmore.in, znew.in: Also update the --version copyright
	dates (while updated by update-copyright, those didn't satisfy syntax-check)
	by running this:

	  grep -l 2025-2026 *.in gzip.c|xargs perl -pi -e 's/2025-2026/2026/'

2026-01-02  Jim Meyering  <meyering@meta.com>

	maint: update copyright dates

	build: update gnulib to latest; and bootstrap

2025-11-09  Jim Meyering  <meyering@meta.com>

	build: update gnulib to latest

2025-09-11  Paul Eggert  <eggert@cs.ucla.edu>

	build: update gnulib submodule to latest

2025-09-09  Paul Eggert  <eggert@cs.ucla.edu>

	gzip: report "-Inf%" for negative infinity
	* tests/list: Test for this.
	* util.c (display_ratio):
	Say "-%Inf%" if the compression ratio is negative infinity.
	From a suggestion by Mark Adler <https://bugs.gnu.org/79414#13>.

2025-06-17  Paul Eggert  <eggert@cs.ucla.edu>

	gzip: fix NEWS
	* NEWS: Fix as per <https://bugs.gnu.org/78799#38>.

2025-06-16  Paul Eggert  <eggert@cs.ucla.edu>

	maint: add NEWS entry re PKZIP fixes

	gzip: don’t assume EOF == -1
	Although EOF == -1 on all known platforms, POSIX and C don’t
	guarantee it.  Fix code that silently assumes this.
	* deflate.c (lm_init, fill_window):
	* gzip.c (get_method):
	* util.c (fill_inbuf):
	Don’t assume EOF == -1, or that converting EOF to unsigned
	and back to int yields -1.  Instead, statically check
	EOF-related assumptions.
	* deflate.c (fill_window): Check for more < EOF, not more != EOF.

	unzip: add regression test for recent fixes
	* tests/unzip-valid: New test, taken from Bug#78799.
	* tests/Makefile.am (TESTS): Add it.

	unzip: use GNU style in newly-added code
	* unzip.c (unzip): Use GNU style.

2025-06-16  Mark Adler  <git@madler.net>

	zip: correctly handle PKZIP data descriptors
	* unzip.c (DATSIG, L8): New macros.
	(unzip): Previously only one of the four possible data descriptors was
	handled. Check for all four when validating the uncompressed
	data with the CRC and length in the data descriptor. This also now
	checks the full eight-byte uncompressed length for zip files.

2025-06-16  Paul Eggert  <eggert@cs.ucla.edu>

	unzip: refactor loop that never loops
	* unzip.c (bad_zipfile): New static function,
	with most of the old contents of check_zipfile.
	This is clearer than the trick of having a loop that never loops.
	(check_zipfile): Use it.

	gzip: get_method 2nd arg is bool
	* gzip.c (get_method): Use bool for boolean.

2025-06-16  Mark Adler  <git@madler.net>

	zip: correctly handle PKZIP signatures and the local header
	This fixes bugs in the lack of detection of spanning signatures,
	lack of detection of empty zip files, checking the compression
	method, failure to skip over the file name and extra field in the
	SMALL_MEM case, failure to get the CRC and uncompressed length in
	the SMALL_MEM case, failure to check for invalid combinations of
	header information, the lack of detection of a Zip64 entry, and
	a possible decompression of a zip entry after a gzip member.
	* gzip.c (get_method): New arg FIRST.  All callers changed.
	* gzip.h (PKZIP_MAGIC): Now just the two-byte magic header.
	* unzip.c (SPNSIG, ONESIG, Z64SIG, ENDSIG): New macros.
	(RAND_HEAD_LEN, decrypt): Remove.  All uses removed.
	(orig_crc, orig_len): New static vars.
	(check_zipfile, unzip): Handle PKZIP signatures and the local header.

2025-06-16  Paul Eggert  <eggert@cs.ucla.edu>

	maint: use GNU style in lines just untabbed

2025-06-16  Mark Adler  <git@madler.net>

	maint: replace tabs in the source code with spaces

2025-05-30  Paul Eggert  <eggert@cs.ucla.edu>

	gzip: fix s390x build failure
	Problem reported by Jakub Martisko <https://bugs.gnu.org/78618>.
	* dfltcc.c: Include errno.h.

	gzip: fix another uninitialized read
	This can occur if you define DYNALLOC.
	Problem reported by Mohamed Maatallah <https://bugs.gnu.org/78639#13>.
	* gzip.c (get_method): Don’t memcmp more bytes than were read.
	Also, no need to do two memcmp’s now, or to check inptr.

2025-05-29  Paul Eggert  <eggert@cs.ucla.edu>

	gzip: fix uninitialized read
	Problem reported by Mohamed Maatallah <https://bugs.gnu.org/78639>.
	* unzip.c (check_zipfile):
	Don’t read past end of initialized data in the input buffer.

2025-04-27  Paul Eggert  <eggert@cs.ucla.edu>

	tests: port to Busybox od
	Problem reported by Xinjian Ma (Bug#78084).
	* tests/reference: Skip this test if od does not support -An -tx1
	as POSIX requires. Also, omit an unnecessary use of tr, since
	the $(...) already does that.

2025-04-09  Jim Meyering  <meyering@meta.com>

	maint: post-release administrivia
	* NEWS: Add header line for next release.
	* .prev-version: Record previous version.
	* cfg.mk (old_NEWS_hash): Auto-update.

	version 1.14
	* NEWS: Record release date.

2025-04-06  Jim Meyering  <meyering@meta.com>

	build: avoid test failure on systems lacking "more"
	On such systems, treat "more" as optional, just as we treat "less".
	If the primary program is not available, do not install zmore.
	Reported by Bruno Haible in http://debbugs.gnu.org/77563 and noticed
	on a 2025 x86_64 GNU/Hurd system.
	* configure.ac: Check for more/MORE just like we do for less/LESS.
	* tests/Makefile.am: Use the new variables.
	* NEWS: Mention it.

2025-03-27  Jim Meyering  <meyering@meta.com>

	maint: fix typos spotted by codespell
	Induced by running this:
	  printf '%s\n' Tye tye Ned bu nd > w
	  codespell -w --summary --count -Iw $(git ls-files|grep -v gnulib)
	Summary:
	cvignore      1
	declration    1
	endianess     1
	instad        1
	intall        2
	ouput         1
	reenabled     1
	repoducible   1
	uncompressible1
	* ChangeLog-2007: Fix typos.
	* NEWS: Likewise.
	* inflate.c: Likewise.
	* sample/sub.c: Likewise.
	* tests/reproducible: Likewise.
	Since the above changed NEWS, I must also do this:
	* cfg.mk (old_NEWS_hash): Update, to reflect recent NEWS correction.
	(exclude_file_name_regexp--sc_codespell): Ignore THANKS.
	(codespell_ignore_words_list): Exempt two false-positives.

2025-02-19  Paul Eggert  <eggert@cs.ucla.edu>

	Ignore GZIP envvar except for innocuous flags
	This is slimmed down from the originally proposed patch, which
	ignored GZIP entirely.  Thanks to Lasse Collin for thoughtful comments.
	* gzip.c (ENV_OPTION): Remove.  All uses removed.
	(main): Parse GZIP contents with error diagnostics disabled,
	and simply ignore invalid contents.  Ignore all options
	except -1 thru -9, --rsyncable, --synchronous.  Remove
	unnecessary longind local; all uses removed.
	* tests/gzip-env (GZIP): Adjust to match current behavior.
	Also test --rsyncable, --synchronous.

2025-02-10  Paul Eggert  <eggert@cs.ucla.edu>

	Fix THANKS typo

	gzip: use pclmul if available
	Suggested by Sam Russell (Bug#74192).
	* bootstrap.conf (gnulib_modules): Depend on crc-x86_64, not just crc.
	* NEWS, THANKS, lib/.gitignore, m4/.gitignore:
	Update accordingly.

	maint: update .gitignore
	* m4/.gitignore: Add init-package-version.m4.

2025-02-08  Jim Meyering  <meyering@meta.com>

	maint: continue writing base64-encoded checksums to announcement
	* cfg.mk (announce_gen_args): Set to --cksum-checksums.

2025-02-06  Paul Eggert  <eggert@cs.ucla.edu>

	gzip: prefer static_assert to verify
	* bootstrap.conf (gnulib_modules): Replace verify with assert-h.
	* deflate.c: Do not include verify.h.
	Use C23-style static_assert rather than verify.

	gzip: better fix for s390 buffer flushes
	* dfltcc.c (dfltcc_inflate): The previous patch was incorrect, as
	fill_inbuf (0) will not call flush_outbuf which is needed here.
	Problem and fix reported by Eduard Stefes in
	<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75924#13>.
	Although this patch causes the hufts test to fail, that might be
	due to a different bug in the s390 code, so let’s leave that test
	alone for now.

2025-02-02  Jim Meyering  <meyering@meta.com>

	maint: fix mistake in preceding change
	* bootstrap.conf (gnulib_modules): The deprecated realloc-gnu module
	cannot be renamed to realloc-gnu-h (which doesn't exist), but rather
	to realloc-posix. Spotted by Collin Funk.

2025-02-01  Jim Meyering  <meyering@meta.com>

	build: update gnulib to latest; and update bootstrap

	maint: reflect gnulib module renamings
	* bootstrap.conf: Some gnulib modules are now deprecated in favor of
	new names with a "-h" suffix.  Induce this change with the following:
	  re='inttypes|realloc-gnu|sys_stat'
	  perl -pi -e 's{^('"$re"')$}{$1-h}' bootstrap.conf

2025-01-29  Paul Eggert  <eggert@cs.ucla.edu>

	gzip: fix problem with s390 buffer flushes
	Problem reported by Eduard Stefes <https://bugs.gnu.org/74651>.
	* dfltcc.c (dfltcc_deflate): Flush output buffer if premature EOF.

2025-01-10  Lasse Collin  <lasse.collin@tukaani.org>

	tests: synchronous: new test
	* tests/synchronous: Test that --synchronous works. This
	failed with musl 1.2.5 before the Gnulib commit 0fb185b7cd5e
	("fcntl-h: port better to musl on GNU/Linux").
	* tests/Makefile.am (TESTS): Add it.

2025-01-10  Paul Eggert  <eggert@cs.ucla.edu>

	maint: update .gitignore
	* lib/.gitignore, m4/.gitignore: Update to match current Gnulib.

	build: update gnulib submodule to latest

2025-01-03  Jim Meyering  <meyering@meta.com>

	build: update gnulib to latest

2025-01-03  Jim Meyering  <meyering@meta.com>

	maint: update --version copyright dates
	* gunzip.in, gzexe.in, gzip.c, zcat.in, zcmp.in, zdiff.in, zforce.in,
	zgrep.in, zless.in, zmore.in, znew.in: Also update the --version copyright
	dates (while updated by update-copyright, those didn't satisfy syntax-check)
	by running this:

	grep -l 2024-2025 *.in gzip.c|xargs perl -pi -e 's/2024-2025/2025/'

2025-01-03  Jim Meyering  <meyering@meta.com>

	maint: update all copyright dates via "make update-copyright"

2024-12-13  Jim Meyering  <meyering@meta.com>

	gnulib: avoid the new gnulib-i18n module
	* bootstrap.conf (avoided_gnulib_modules): New variable.
	Use it to omit the gnulib-i18n module, since this package
	is not internationalized.

	build: update gnulib to latest; also update bootstrap

2024-11-02  Sam Russell  <sam.h.russell@gmail.com>

	maint: initialize MAINTAINERCLEANFILES
	* lib/Makefile.am (MAINTAINERCLEANFILES): Initialize to empty.
	Gnulib expects it to be set as it appends values to it, the recent
	upgrade to lib/crc.c modifies this and building fails if it isn't
	already set before gnulib.mk is included.

2024-10-17  Simon Josefsson  <simon@josefsson.org>

	maint: Drop unused sample/makecrc.c.

2024-09-22  Paul Eggert  <eggert@cs.ucla.edu>

	maint: ‘type’ → ‘command -v’
	POSIX says ‘type’ is an XSI extension, whereas ‘command -v’ is
	part of the base.  Problem reported by Clarence “Sparr” Risher in
	<https://bugs.gnu.org/73402>.
	* gzexe.in, tests/help-version, zdiff.in, zgrep.in:
	Use ‘command -v’, not ‘type’.

2024-09-11  Collin Funk  <collin.funk1@gmail.com>

	maint: update library names used by gnulib
	* Makefile.am (gzip_LDADD): Update library names according to Gnulib
	NEWS 2023-01-07.

2024-09-09  Jim Meyering  <meyering@meta.com>

	tests: reference: don't rely on od's -w option
	* tests/reference: Don't rely on od's -w option.
	Instead, use tr -d '\n' to join the output lines.
	Reported by Bruno Haible in https://bugs.gnu.org/73140

	maint: use gnulib's crc module in place of our own code
	* bootstrap.conf (gnulib_modules): Add crc.
	* util.c: Include "crc.h".
	(crc_32_tab): Delete. No longer used.
	(updcrc): Use gnulib's crc32_update.
	(crc): Initialize the global to 0, not 0xffffffffL.
	(setcrc, getcrc): Stop flipping bits. No longer needed.
	* lib/.gitignore: Add crc.c and crc.h, and sort.

	build: update gnulib to latest, for crc tweak

2024-09-08  Jim Meyering  <meyering@meta.com>

	build: update gnulib to latest
	* lib/.gitignore: add error.h

2024-09-08  Jim Meyering  <meyering@meta.com>

	maint: modernize see...licenses comments
	To accommodate a new syntax-check rule, ...
	Adjust copyright notices that suggested to write to an old
