1195 Commits

Author SHA1 Message Date
Jim Meyering
b1a657b85a version 3.10
* NEWS: Record release date.
v3.10
2023-05-21 01:50:39 -07:00
Jim Meyering
7abd180200 build: skip the sole perl-requiring test when there is no usable perl
* tests/init.cfg (require_perl_): New function, from coreutils.
* tests/large-subopt: Use it.
Reported by Bruno Haible in
https://lists.gnu.org/r/diffutils-devel/2023-05/msg00003.html
2023-05-21 00:56:38 -07:00
Jim Meyering
b079f08cc9 build: fix a new syntax-check failure
* 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.
2023-05-20 02:43:07 -07:00
Jim Meyering
55260678d9 build: modernize bootstrap prerequsite tools
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.
2023-05-20 02:27:03 -07:00
Paul Eggert
11a0695113 build: update gnulib submodule to latest
* src/analyze.c (OFFSET_MAX): New macro, needed for
latest gnulib.
2023-05-19 09:10:12 -07:00
Paul Eggert
11238b27ed diff: avoid a macro in diff.h
* src/diff.h (FILE_BUFFER): Remove.
* src/io.c (file_buffer): New static function.  All uses of
FILE_BUFFER replaced.
2023-05-19 09:10:12 -07:00
Paul Eggert
d3e3696ec7 sdiff: avoid some macros in sdiff.c
* src/sdiff.c (PROGRAM_NAME, SDIFF_BUFSIZE):
Now constants, not macros.
2023-05-19 09:10:12 -07:00
Paul Eggert
9f7c4148b3 diff3: avoid macros in diff3.c
* src/diff3.c (PROGRAM_NAME, FILE0, FILE1, FILE2, FILE3, FO, FC)
(RANGE_START, RANGE_END): Now constants, not macros.
2023-05-19 09:10:12 -07:00
Paul Eggert
36244332b8 cmp: avoid macros in cmp.c
* src/cmp.c (PROGRAM_NAME): Now a constant, not a macro.
(hard_locale_LC_MESSAGES): Now a function, not a macro.
All uses changed.
2023-05-19 09:10:12 -07:00
Paul Eggert
7d154dae52 diff: avoid macros in diff.c
* 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.
2023-05-19 09:10:12 -07:00
Paul Eggert
d9c367b164 diff: use function for robust_output_style
* 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.
2023-05-19 09:10:12 -07:00
Paul Eggert
09f7779275 cmp: don’t give up if fstat fails
* 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.
2023-05-19 09:10:12 -07:00
Paul Eggert
d08e0b47fc diff3: don’t give up if fstat fails
* src/diff3.c (read_diff): Work even if fstat fails,
e.g., due to EOVERFLOW.
2023-05-19 09:10:12 -07:00
Paul Eggert
c427f9d4b4 diff3: fix race condition involving directories
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.
2023-05-19 09:10:12 -07:00
Jim Meyering
cc36781560 maint: suppress new test's doubled-word syntax-check failure
* cfg.mk (exclude_file_name_regexp--sc_prohibit_doubled_word):
Exempt the new test's use of "in in".
2023-05-13 23:44:32 -07:00
Paul Eggert
877c120765 build: update gnulib submodule to latest 2023-05-13 22:23:57 -07:00
Carlo Marcelo Arenas Belón
13a05d1e95 gnulib: fix Y2038 bug (again)
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
2023-05-13 22:23:57 -07:00
Paul Eggert
3fa7218567 maint: add 'diff --git' TODO
* TODO: Suggest better compatibility with 'git diff -p'.
From a suggestion by Linus Torvalds
<https://lkml.org/lkml/2023/2/24/797>.
2023-02-24 12:13:12 -08:00
Paul Eggert
6351be27c3 maint: update .gitignore
.gitignore: Update for some recent changes, and simplify.
2023-02-10 15:44:38 -08:00
Paul Eggert
ba08fbbb0c diff: fix bug where -D does not work
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.
2023-02-10 15:44:38 -08:00
Paul Eggert
7e7ef707d6 build: update gnulib submodule to latest 2023-02-07 20:47:18 -08:00
Paul Eggert
7e7a21b05b diff: use C23 bool
* bootstrap.conf (gnulib_modules): Add stdbool.
* src/die.h, src/system.h: Do not include <stdbool.h>.
2023-02-05 14:01:54 -08:00
Paul Eggert
09f8e2b0a9 diff: prefer nullptr to NULL
* bootstrap.conf (gnulib_modules): Add c-nullptr.
* src/cmp.c (main):
* src/context.c (pr_context_hunk, pr_unidiff_hunk)
(mark_ignorable, find_function):
* src/diff.c (longopts, main, specify_value, specify_style)
(specify_colors_style, compare_files):
* src/diff3.c (main, process_diff):
* src/dir.c (find_dir_file_pathname):
* src/ifdef.c (scan_char_literal):
* src/sdiff.c (main):
* src/util.c (process_signals, install_signal_handlers)
(color_ext_list, color_indicator, indicator_name)
(parse_diff_color):
Prefer C23-style nullptr to NULL, as nullptr is a bit better.
2023-02-05 14:01:54 -08:00
Paul Eggert
75a38113a7 doc: update README-hacking
* README-hacking: Update for current bootstrap.
2023-02-05 14:01:54 -08:00
Paul Eggert
0e9cb995ee maint: sync bootstrap from Gnulib
bootstrap: sync from Gnulib
2023-02-05 14:01:54 -08:00
Paul Eggert
3379bf4ef4 build: update gnulib submodule to latest
* lib/sh-quote.c.diff: Remove, as Gnulib now has this.
2023-02-05 14:01:54 -08:00
Paul Eggert
8acc04a7b5 build: add libraries
* 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.
2023-02-05 14:01:54 -08:00
Jim Meyering
27a9b27d00 doc: update HACKING
* HACKING: Update from grep's HACKING.
2023-02-04 22:31:24 -08:00
Jim Meyering
86543b9630 maint: prefer https: to git:
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.
2023-02-04 21:47:04 -08:00
Jim Meyering
89f3daeaaf tests: accommodate newer GNU make's SIGPIPE-ignore
* tests/colors: Allow an exit code of not just 141 (SIGPIPE),
but also "error": 2.
Reported by Tomasz Kłoczko in http://bugs.gnu.org/59905.
2023-01-16 15:48:10 -08:00
Jim Meyering
aa13187f2a maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2023-01-15 13:25:29 -08:00
Jim Meyering
89b587f03f version 3.9
* NEWS: Record release date.
v3.9
2023-01-15 13:20:24 -08:00
Jim Meyering
555a3d7d08 build: update gnulib to latest 2023-01-15 13:09:41 -08:00
Jim Meyering
cc41598038 tests: avoid large-subopt XPASS on systems without perl
* tests/large-subopt: Use $PERL, rather than hard-coding "perl".
* bootstrap.conf (gnulib_modules): Add "perl" to the list.
Reported by Bruno Haible in
https://lists.gnu.org/r/diffutils-devel/2023-01/msg00000.html
2023-01-05 22:44:07 -08:00
Bruno Haible
f5f2a237b2 tests: avoid a test failure when using Solaris 11.4's old grep
* tests/colors (nanosecond_zeros): Use a dumbed-down grep '\.'
in place of "grep -F ." to accommodate Solaris 11.4's old versions
of grep in the default PATH. Reported here:
https://lists.gnu.org/r/diffutils-devel/2023-01/msg00001.html
2023-01-05 22:13:47 -08:00
Jim Meyering
bc732310db build: update gnulib to latest 2023-01-01 17:20:13 -08:00
Jim Meyering
47a1f46f08 maint: update copyright dates 2023-01-01 17:19:37 -08:00
Paul Eggert
28e4de2c64 build: simplify GCC 12 false alarm workaround
* src/util.c (print_message_queue): Pacify GCC in a
more-straightforward way.
2022-12-31 21:01:30 -08:00
Paul Eggert
7379990845 maint: fix assumption typo
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.
2022-12-31 21:01:29 -08:00
Jim Meyering
2d50351377 build: update gnulib to latest 2022-12-30 13:37:47 -08:00
Jim Meyering
eb3085a076 build: temp?-disable -Wanalyzer-use-of-uninitialized-value
* 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)
2022-12-30 13:32:57 -08:00
Jim Meyering
4e9063a17b build: update gnulib to latest 2022-12-11 08:56:17 -08:00
Jim Meyering
7325c07a64 build: update gnulib to latest 2022-11-12 11:26:00 -08:00
Paul Eggert
dd9deb7655 doc: mark up SEE ALSO (Bug#53976) 2022-02-14 14:06:58 -08:00
Jim Meyering
231f879462 tests: fix false-failure on systems without valgrind
* tests/init.cfg (require_valgrind_): Use exit status of subshell,
not that of the "local" declaration.
2022-01-24 17:31:06 +01:00
Paul Eggert
25904a12fe build: update gnulib submodule to latest 2022-01-14 19:51:20 -08:00
Jim Meyering
438d6e1cf8 maint: avoid new syntax-check failure
* cfg.mk (local-checks-to-skip): Add sc_indent, to skip it.
Otherwise, "make syntax-check" would fail.
2022-01-03 11:51:00 -08:00
Jim Meyering
aec523d3a4 maint: make update-copyright 2022-01-03 11:49:11 -08:00
Jim Meyering
dabf2c747d build: update gnulib to latest; also bootstrap and init.sh 2022-01-03 11:45:59 -08:00
Paul Eggert
5a4339a609 maint: modernize README-{hacking,prereq} 2021-10-30 16:30:19 -07:00