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.
* 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.
* 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.
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/>.
* 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.
* bootstrap.conf (gnulib_modules): Replace dosname with filename.
* gzip.c: Include filename.h, not dosname.h.
* lib/.gitignore: Remove name of dosname.h.
* 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.
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.
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.
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:
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.
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".
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.
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.
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.
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.