| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* cfg.mk (exclude_file_name_regexp--sc_prohibit_doubled_word):
Exempt the new test's use of "in in".
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
* TODO: Suggest better compatibility with 'git diff -p'.
From a suggestion by Linus Torvalds
<https://lkml.org/lkml/2023/2/24/797>.
|
|
|
|
| |
.gitignore: Update for some recent changes, and simplify.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Add stdbool.
* src/die.h, src/system.h: Do not include <stdbool.h>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* README-hacking: Update for current bootstrap.
|
|
|
|
| |
bootstrap: sync from Gnulib
|
|
|
|
| |
* lib/sh-quote.c.diff: Remove, as Gnulib now has this.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* HACKING: Update from grep's HACKING.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
|
|
|
|
| |
* NEWS: Record release date.
|
| |
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
* 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
|
| |
|
| |
|
|
|
|
|
| |
* src/util.c (print_message_queue): Pacify GCC in a
more-straightforward way.
|
|
|
|
|
|
| |
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)
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* tests/init.cfg (require_valgrind_): Use exit status of subshell,
not that of the "local" declaration.
|
| |
|
|
|
|
|
| |
* cfg.mk (local-checks-to-skip): Add sc_indent, to skip it.
Otherwise, "make syntax-check" would fail.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This pacifies this notice from ./bootstrap: “Notice from module
fdl: Don't use this module! Instead, copy the referenced license
file into your version control repository.”
* bootstrap.conf (gnulib_modules): Remove fdl.
* doc/fdl.texi: New file, taken from Gnulib.
|
|
|
|
|
| |
Now that diff calls tzalloc, it depends directly on time_rz.
* bootstrap.conf (gnulib_modules): Add time_rz.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem reported by Vladimir Marek (bug#51228).
* NEWS: Mention this.
* src/context.c (print_context_label): Pass localtz to nstrftime,
instead of always passing 0.
* src/diff.c (main) [!HAVE_TM_GMTOFF]:
Initialize localtz if time_format uses %z.
* src/diff.h (localtz): New decl.
* tests/Makefile.am (TESTS): Add timezone.
* tests/timezone: New test.
|
|
|
|
|
| |
* src/diff3.c (enum diff_type): Prefix constants like ADD with
"DIFF_" to avoid collisions with unwise system headers.
|
|
|
|
|
|
|
| |
Problem privately reported by Gisle Vanem for MS-Windows.
* src/util.c (sig, install_signal_handlers):
Don’t assume SIGTSTP, SIGALRM, SIGQUIT.
(is_tstp_index): New function, for use in SIGTSTP avoidance.
|
|
|
|
|
|
|
|
|
|
| |
Prefer the macros used in attribute.h, and _Noreturn,
to the by-hand use of __attribute__, as this is more portable.
* bootstrap.conf (gnulib_modules): Add attribute.
* src/system.h: Include attribute.h. All uses of
attributes changed to use the attribute.h macros.
Plus, use _Noreturn.
(FALLTHROUGH): Remove; attribute.h now defines this.
|
| |
|
|
|
|
|
| |
* src/analyze.c (briefly_report): Do not translate here,
as ‘message’ translates its format.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This simplifies the code by using varargs.
* bootstrap.conf (gnulib_modules): Add flexmember.
(XGETTEXT_OPTIONS): Do not flag message5.
* src/util.c: Include flexmember.h, stdarg.h.
(struct msg): New members msgid, argbytes. args is now
FLEXIBLE_ARRAY_MEMBER, and does not contain msgid.
All uses changed.
(message): Now varargs. Detect number of args by counting '%'s.
Use FLEXSIZEOF, to avoid problems on systems with buggy
allocators. Avoid redundant ‘*p = 0’ when *p is already zero
after stpcpy.
(message5): Remove; all callers changed to use ‘message’.
(print_message_queue): Abort if too many args were passed;
this cannot happen with current diffutils.
|
|
|
|
|
|
|
|
|
| |
Problem reported by Gisle Vanem (Bug#36488#30).
* src/util.c (xsigaction) [SA_NOCLDSTOP]: Remove; no longer needed.
(install_signal_handlers): If the first call to sigaction or
signal fails, do not exit; just skip the signal and continue,
in case the runtime does not support the signal even though the
corresponding SIG* macro is defined.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This should fix an unlikely signal handling bug with colored
output, and should also fix a Debian FTBFS (Fails To Build From
Source) on powerpc64le-linux. See Bug#34519 and Frédéric
Bonnard’s report in:
https://bugs.debian.org/922552#19
* bootstrap.conf (gnulib_modules): Add raise, sigprocmask.
* src/diff.c (main): Call cleanup_signal_handlers before exiting.
Don’t bother calling ‘exit’; no longer needed nowadays.
* src/util.c (sigprocmask, siginterrupt) [!SA_NOCLDSTOP]:
Define to 0 instead of empty, since the results are now used.
(sigset_t) [!SA_NOCLDSTOP]: Remove; we now rely on Gnulib.
(xsigaction) [SA_NOCLDSTOP]: New function.
(xsigaddset, xsigismember, xsignal, xsigprocmask): New functions.
(some_signals_caught): New static var.
(process_signals): Omit a conditional branch.
Don’t bother loading interrupt_signal if stop_signal_count is nonzero.
(process_signals, install_signal_handlers):
Check for failures from sigprocmask etc.
(sig, nsig): Now at top level, since multiple functions need them.
(install_signal_handlers): No need for caught_sig array;
just use caught_signals. However, set some_signals_caught.
(cleanup_signal_handlers): New function.
|
|
|
|
|
| |
* src/diff.c (option_list, main): Check for integer overflow
in some unlikely and hard-to-test cases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rely on more-modern Gnulib capabilities instead of doing
integer overflow checking by hand, in some cases.
* lib/cmpbuf.c (buffer_lcm):
* src/io.c (slurp, find_identical_ends):
Use INT_ADD_WRAPV and INT_MULTIPLY_WRAPV rather than checking
overflow by hand.
* src/diff3.c (process_diff):
* src/dir.c (dir_read):
* src/io.c (find_identical_ends, read_files):
Use xnmalloc rather than checking overflow by hand.
(read_files): Rely on xcalloc to do overflow checking.
|