99 Commits

Author SHA1 Message Date
Jim Meyering
c8e167e3e8 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 17:27:19 -08:00
Jim Meyering
50463e0899 maint: update copyright dates 2026-01-02 17:10:47 -08:00
Jim Meyering
4b82e75309 build: update gnulib to latest; and bootstrap 2026-01-02 17:09:55 -08:00
Paul Eggert
6b65e654a7 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.
2025-02-10 22:36:17 -08:00
Paul Eggert
ae9610d138 maint: update .gitignore
* lib/.gitignore, m4/.gitignore: Update to match current Gnulib.
2025-01-10 10:18:02 -08:00
Jim Meyering
98db945a34 maint: update all copyright dates via "make update-copyright" 2025-01-03 09:33:55 -08:00
Jim Meyering
0e23cd90dd build: update gnulib to latest; also update bootstrap 2024-12-13 21:31:14 -08:00
Sam Russell
46e9db301a 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-11-02 19:13:39 -07:00
Jim Meyering
d1fc732de1 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.
2024-09-09 00:19:29 -07:00
Jim Meyering
0189e16b18 build: update gnulib to latest
* lib/.gitignore: add error.h
2024-09-08 09:02:23 -07:00
Jim Meyering
34bec437e0 maint: modernize see...licenses comments
To accommodate a new syntax-check rule, ...
Adjust copyright notices that suggested to write to an old
Franklin Street address to reference the URL instead:

  git grep -l 'if not, write' |xargs \
  perl -0777 -pi -e 's{program; if not, write .*? USA\.}{program.  If not, see <https://www.gnu.org/licenses/>.}ms'

Also, run this:
  git grep -l 'License along$' | xargs \
  perl -0777 -pi -e 's{License along\n# with}{License\n# along with}ms'

to normalize a little more, changing comments like this:
  You should have received a copy of the GNU General Public License along
  with this program.  If not, see <https://www.gnu.org/licenses/>.

to this:
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <https://www.gnu.org/licenses/>.
2024-09-08 08:52:27 -07:00
Jim Meyering
4ee38e0bf4 build: update gnulib to latest, and update bootstrap and .gitignore files 2024-07-04 16:47:11 -07:00
Paul Eggert
b6de5e359f maint: update .gitignore files 2024-01-08 18:51:42 -08:00
Paul Eggert
22de20442e make update-copyright 2024-01-08 18:51:42 -08:00
Paul Eggert
21802305f0 maint: update .gitignore files 2023-10-23 14:44:11 -07:00
Jim Meyering
d826f7c04d maint: remove use gnulib's deprecated stdalign module
* bootstrap.conf (gnulib_modules): Remove deprecated stdalign.
It was not directly used.
2023-08-19 12:20:47 -07:00
Jim Meyering
54042d42c5 build: update gnulib to latest 2023-04-07 06:46:45 -07:00
Jim Meyering
7e6214bd1c maint: update copyright dates 2023-01-01 17:19:00 -08:00
Paul Eggert
f5f931aef1 gzip: use strerror, not perror
* bootstrap.conf (gnulib_modules): Use strerror, not perror.
This removes dependencies on Gnulib’s ‘threadlib’ and ‘lock’ modules,
and simplifies the mainline code.  Apparently the old code was written
before strerror was universally supported; nowadays we can use Gnulib
strerror instead.  All uses of perror changed to use strerror+fprintf.

* gzip.h (WARN): Since this expands to a statement, wrap within
‘do ... while (false)’ for the usual reasons.  Helpful now that
calls to WARN are now simplified.
2022-12-27 22:31:43 -08:00
Paul Eggert
a04838d3c4 maint: more fallout from Gnulib sync
* README-hacking: Improve wording.
* autogen.sh, autopull.sh, bootstrap-funclib.sh: New files.
2022-12-26 14:50:57 -08:00
Paul Eggert
8ae183ff73 maint: stop using obsolete dosname module
* bootstrap.conf (gnulib_modules): Replace dosname with filename.
* gzip.c: Include filename.h, not dosname.h.
* lib/.gitignore: Remove name of dosname.h.
2022-12-25 16:13:10 -08:00
Paul Eggert
42efd4553d maint: stop using obsolete stdnoreturn module
* bootstrap.conf (gnulib_modules): Remove stdnoreturn.
* gzip.h: Do not include stdnoreturn.h.
All uses of noreturn replaced by _Noreturn,
at start of declaration for benefit of C23.
* lib/.gitignore, m4/.gitignore: Remove names of
stdnoreturn-related files.
2022-12-25 16:13:10 -08:00
Paul Eggert
430edacaf8 maint: update .gitignore to match Gnulib changes 2022-12-25 16:13:10 -08:00
Paul Eggert
f063aa0305 maint: update from Gnulib
* bootstrap, tests/init.sh: Copy manually from current Gnulib.
* lib/.gitignore, m4/.gitignore: Update as per current Gnulib.
2022-04-04 12:00:44 -07:00
Paul Eggert
33d3bcd924 doc: spelling fixes 2022-03-29 16:37:06 -07:00
Jim Meyering
54af561326 maint: make update-copyright 2022-01-03 10:16:37 -08:00
Paul Eggert
dc6ccb0e79 maint: update .gitignore files
* .gitignore, lib/.gitignore, m4/.gitignore:
Bring up to date.  Remove duplicates.  Sort.
2021-08-31 02:11:04 -07:00
Jim Meyering
b7ef8a9829 build: update gnulib to latest 2021-06-30 18:00:36 -07:00
Paul Eggert
34db0a240e maint: modernize .gitignore
* lib/.gitignore, m4/.gitignore: Sort and modernize
to current Gnulib.
2021-03-07 14:51:33 -08:00
Jim Meyering
7d3a3c0a12 maint: update all copyright year number ranges
Run "make update-copyright" and then...
* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
2021-01-01 17:36:52 -08:00
Ilya Leoshkevich
b7fb624e42 Update .gitignore files
On my s390x Fedora 31 machine there are a bunch of extra files copied to
lib and m4 directories.  Add them to .gitignore.
2020-09-24 16:36:48 -07:00
Jim Meyering
89181137b9 maint: update all copyright year number ranges
Run "make update-copyright" and then...
* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
2020-01-01 09:53:33 -08:00
Paul Eggert
be0c5581e3 Improve IBM Z patch
Most of this is minor changes to use GNU style and C99 constructs.
* NEWS: Mention IBM Z.
* bootstrap.conf (gnulib_modules): Add stdalign.
* dfltcc.c: Include stdalign.h, stdbool.h.
(union aligned_dfltcc_qaf_param, union aligned_dfltcc_param_v0):
New types, used for C11-style alignment.  All uses changed.
(init_param):
* gzip.c (BUFFER_ALIGNED): New macro.
(inbuf, outbuf, window): Use it, so buffers are aligned everywhere.
* gzip.h (INBUFSIZ, OUTBUFSIZE): Use big buffers everywhere,
unless SMALL_MEM.
* zip.c (SLOW, FAST): Now enums since they need not be macros:
2019-04-02 10:30:11 -07:00
Jim Meyering
a604573c68 maint: update all copyright dates via "make update-copyright"
* gnulib: Also update submodule for its copyright updates.
2019-01-01 19:01:58 -08:00
Paul Eggert
30ba4a2b69 Fix some theoretical races in signal handling
Problem reported by Johannes Przybilla (Bug#32375).
* NEWS: Mention this.
* bootstrap.conf (gnulib_modules): Add sigaction.
* gzip.c (SA_NOCLDSTOP, sigprocmask, sigset_t)
(siginterrupt) [!SA_NOCLDSTOP]: Remove; Gnulib not supplies these.
(remove_ofname): New var.
(volatile_strcpy): New function.
(create_outfile): Use it.
(install_signal_handlers, abort_gzip_signal): Assume sigaction.
(remove_output_file): New arg SIGNALS_ALREADY_BLOCKED.
All uses changed.  Avoid unnecessary (and racy) call
to sigprocmask if this new arg is set.
(abort_gzip_signal): Assume C89 or better for signal handler type.
* gzip.h (RETSIGTYPE): Remove.
* lib/.gitignore, m4/.gitignore:
Add files brought in by Gnulib sigaction module.  Sort.
2018-08-06 14:45:34 -07:00
Jim Meyering
9ef6a8ac44 maint: update gnulib to latest; also update bootstrap and init.sh 2018-07-01 07:50:06 -07:00
Jim Meyering
975508caa0 maint: update gnulib and copyright dates for 2018
* gnulib: Update to latest.
* bootstrap: Update from gnulib.
* all files: Run "make update-copyright".
2018-01-03 16:44:26 -08:00
Jim Meyering
3bd3681e0f maint: use noreturn, not ATTRIBUTE_NORETURN
Use gnulib's stdnoreturn module so we can include
<stdnoreturn.h> and the "noreturn" helper macro, thus
replacing the definition and uses of ATTRIBUTE_NORETURN.
* bootstrap.conf (gnulib_modules): Add stdnoreturn.
* gzip.h (ATTRIBUTE_NORETURN): Remove definition.
Include stdnoreturn.h and use "noreturn" for each
ATTRIBUTE_NORETURN-adorned function declaration.
* gzip.c (do_exit, try_help): Use "noreturn".
2017-11-09 20:46:03 -08:00
Paul Eggert
da8fd9fd48 maint: update .gitignore for recent Gnulib 2017-09-19 10:43:51 -07:00
Jim Meyering
9110d11ac0 maint: update gnulib and copyright dates for 2017
* gnulib: Update to latest.
* all files: Run "make update-copyright".
2017-01-01 03:40:15 -08:00
Jim Meyering
3e1af5b7ab maint: update .gitignore files to ignore more generated files 2016-10-24 17:23:01 -07:00
Jim Meyering
56eb6940af gnulib: update to latest 2016-10-02 13:00:37 -07:00
Paul Eggert
31831d686b gzip: drop mentions of Amiga, VMS
These platforms were not supported anyway, and their code was
suffering from bitrot.  This patch may also fix some file name
glitches on MS-Windowsish platforms.
* bootstrap.conf (gnulib_modules): Add dosname.
* gzip.c: Include dosname.h.
(shorten_name, treat_dir): Use last_component rather than looking
at path separators by hand.
* tailor.h: Remove sections on porting to VMS and to Amiga,
since dosname.h doesn't support these platforms anyway.
(PATH_SEP2, PATH_SEP3, STDC_HEADERS, SUFFIX_SEP, RECORD_IO)
(HAVE_CHOWN, HAVE_LSTAT, HAVE_SYS_DIR_H, direct): Remove.  All
uses removed.  Many uses replaced by calls to ISSLASH and/or
last_component.
2016-06-12 23:50:36 -07:00
Jim Meyering
d21616b9a9 gnulib: update to latest 2016-04-26 13:29:25 -07:00
Paul Eggert
a420fbafe8 Port to Oracle Solaris Studio 12.4
Problem reported by Kiyoshi KANAZAWA in: http://bugs.gnu.org/23133
* NEWS: Document this.
* configure.ac (ASMV): Do not define if NO_ASM is
anywhere in DEFS; it doesn't need to be surrounded by white space.
* lib/match.c: Do not use x86 version if __x86_64__ is defined.
2016-03-28 16:27:45 -07:00
Paul Eggert
5ef892a924 gzip: fdatasync output dir before unlinking
This follows up on the earlier patch to avoid data loss near
the system crashes.  See: http://bugs.gnu.org/22768
* bootstrap.conf (gnulib_modules): Add dirname-lgpl, fdatasync,
openat-safer, unistd-safer, unlinkat.
* gzip.c: Include stddef.h, dirname.h.
Include fcntl--.h instead of fcntl-safer.h.
(RW_USER): Remove; no longer needed.
(dfname, dfd): New static vars.
(dot): New static const.
(atdir_eq, atdir_set): New functions.
(treat_file): Also fdatasync the output directory, if !keep.
(treat_file, create_outfile, open_and_stat):
Use dir fd for unlinkat and openat, if possible.
(open_and_stat): Omit mode argument, since it was always the
same.  All callers changed.
* lib/.gitignore, m4/.gitignore: Add new gnulib files.
* tailor.h (PROTO, NO_STDIN_FSTAT, OPEN): Remove.  Remove MACOS
section, as this stuff would not work anyway now, and circa 2001
Apple stopped supporting Mac OS 9 and earlier.
* zip.c: Do not include unistd.h and fcntl.h, as this file does
not directly use any symbols defined by those headers.
2016-02-28 00:02:57 -08:00
Paul Eggert
22aac8f8a6 fsync output file before closing
Problem reported by Yanyan Jiang 蒋炎岩 in: http://bugs.gnu.org/22768
* NEWS: Document this.
* bootstrap.conf (gnulib_modules): Add fsync.
* gzip.c (treat_file): Call fsync just before closing the output.
* lib/.gitignore, m4/.gitignore: Add fsync-related gnulib files.
2016-02-22 23:22:58 -08:00
Jim Meyering
2725db1000 maint: update copyright year, bootstrap, init.sh
Run "make update-copyright" and then...

* gzip.c: Transform the copyright notice via s/2015/2016/.
* gnulib: Update to latest.
* tests/init.sh: Update from gnulib.
* bootstrap: Likewise.
2016-01-01 17:50:24 -08:00
Paul Eggert
f59030d78f maint: adjust to recent gnulib
* doc/.gitignore: Add gendocs_template_min.
* lib/.gitignore: Add assure.h.
2015-03-13 18:13:39 -07:00
Jim Meyering
3d2df61b0c maint: update copyright year ranges to include 2015; update gnulib 2015-01-01 21:43:33 -08:00