* src/diff.h (robust_output_style): Put DIFF_INLINE and
the function name on the same line, so that syntax-check's
naive parsing can spot this function.
* cfg.mk (_gl_TS_extern): Add DIFF_INLINE.
Following Pádraig Brady's example from coreutils, ...
* bootstrap.conf: Add an explicit requirement on m4.
Add an explicit requirement on texi2pdf which is often packaged
separately to makeinfo and induces a failure far down the
distribution phase if not present.
Replace the rsync dependency with wget,
which gnulib changed to in 2018.
Also, add an xz requirement and a version for autopoint.
* src/diff.c (PROGRAM_NAME, NONEXISTENT, UNOPENED):
Now constants, not macros.
(errno_encode, errno_decode): Now functions, rather than
macros ERRNO_ENCODE and ERRNO_DECODE. All uses changed.
* bootstrap.conf (gnulib_modules): Add extern-inline.
* src/diff.h: Use _GL_INLINE_HEADER_BEGIN and _GL_INLINE_HEADER_END.
(DIFF_INLINE): New macro.
(robust_output_style): Now an inline function, not a macro
ROBUST_OUTPUT_STYLE. All uses changed.
* src/cmp.c (main, cmp): If fstat fails, simply record the failure
and move on, instead of exiting. Modify other uses of the struct
stat to do something reasonable if the status is missing.
This fixes a TOC-TOU race with "diff3 A B C" when one
of its arguments is a directory.
* src/diff.c (no_directory): New static var.
(NO_DIRECTORY_OPTION): New constant.
(longopts): Add ---no-directory.
(main): Support it.
(compare_files): If ---no-directory is given, do not treat
directories specially.
* src/diff3.c (main): Do not check whether an argument is
a directory.
(read_diff): Pass ---no-directory to diff, so that it checks.
AC_SYS_LARGEFILE meaning has changed, need AC_SYS_YEAR2038 as well
* NEWS: mention this
* tests: add test
* bootstrap.conf: add year2038
Copyright-paperwork-exempt: yes
Problem reported by Robert Webb (bug#61193).
* NEWS: Mention this.
* src/diff.c (main): Omit stray ‘sizeof’.
* tests/ifdef: New test.
* tests/Makefile.am (TESTS): Add it.
* src/Makefile.am (LDADD, sdiff_LDADD): Add Gnulib libraries that
in theory would be needed on unusual platforms. In practice,
these are typicall empty or are duplicates of other library
arguments and so are redundant.
The idea is to defend against some adversary-in-the-middle attacks.
Also prefer git.savannah.gnu.org over its shorter alias, git.sv.gnu.org
to avoid a warning e.g., from git clone.
Also, drop any final ".git" suffix on the resulting URIs.
Inspired by Paul Eggert's nearly identical changes to coreutils.
Fix a typo I introduced in my August 2021 signal handling fixes.
Problem reported by Sam James (Bug#60457).
* src/util.c (xsigismember): Don’t assume sigismember cannot return 0.
* src/util.c (print_message_queue): This function triggers false
positive warnings from GCC12, so add pragmas to ignore that new warning
in this one function. Required when using either of these:
- gcc version 12.2.1 20221121
- gcc version 13.0.0 20221229 (experimental)