summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* maint: suppress new test's doubled-word syntax-check failureHEADmasterJim Meyering2023-05-131-0/+1
| | | | | * cfg.mk (exclude_file_name_regexp--sc_prohibit_doubled_word): Exempt the new test's use of "in in".
* build: update gnulib submodule to latestPaul Eggert2023-05-131-0/+0
|
* gnulib: fix Y2038 bug (again)Carlo Marcelo Arenas Belón2023-05-134-1/+19
| | | | | | | | | | 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
* maint: add 'diff --git' TODOPaul Eggert2023-02-241-0/+6
| | | | | | * TODO: Suggest better compatibility with 'git diff -p'. From a suggestion by Linus Torvalds <https://lkml.org/lkml/2023/2/24/797>.
* maint: update .gitignorePaul Eggert2023-02-101-11/+5
| | | | .gitignore: Update for some recent changes, and simplify.
* diff: fix bug where -D does not workPaul Eggert2023-02-104-1/+44
| | | | | | | | 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.
* build: update gnulib submodule to latestPaul Eggert2023-02-072-1/+1
|
* diff: use C23 boolPaul Eggert2023-02-053-3/+1
| | | | | * bootstrap.conf (gnulib_modules): Add stdbool. * src/die.h, src/system.h: Do not include <stdbool.h>.
* diff: prefer nullptr to NULLPaul Eggert2023-02-059-50/+52
| | | | | | | | | | | | | | | | | * 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.
* doc: update README-hackingPaul Eggert2023-02-051-4/+10
| | | | * README-hacking: Update for current bootstrap.
* maint: sync bootstrap from GnulibPaul Eggert2023-02-051-605/+1018
| | | | bootstrap: sync from Gnulib
* build: update gnulib submodule to latestPaul Eggert2023-02-052-15/+0
| | | | * lib/sh-quote.c.diff: Remove, as Gnulib now has this.
* build: add librariesPaul Eggert2023-02-051-2/+7
| | | | | | | * 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.
* doc: update HACKINGJim Meyering2023-02-041-22/+9
| | | | * HACKING: Update from grep's HACKING.
* maint: prefer https: to git:Jim Meyering2023-02-043-6/+6
| | | | | | | | 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: accommodate newer GNU make's SIGPIPE-ignoreJim Meyering2023-01-161-1/+4
| | | | | | * 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.
* maint: post-release administriviaJim Meyering2023-01-153-2/+5
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 3.9v3.9Jim Meyering2023-01-151-1/+1
| | | | * NEWS: Record release date.
* build: update gnulib to latestJim Meyering2023-01-151-0/+0
|
* tests: avoid large-subopt XPASS on systems without perlJim Meyering2023-01-052-1/+2
| | | | | | | * 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: avoid a test failure when using Solaris 11.4's old grepBruno Haible2023-01-051-1/+1
| | | | | | | * 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
* build: update gnulib to latestJim Meyering2023-01-011-0/+0
|
* maint: update copyright datesJim Meyering2023-01-0144-45/+45
|
* build: simplify GCC 12 false alarm workaroundPaul Eggert2022-12-311-16/+7
| | | | | * src/util.c (print_message_queue): Pacify GCC in a more-straightforward way.
* maint: fix assumption typoPaul Eggert2022-12-311-1/+1
| | | | | | 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.
* build: update gnulib to latestJim Meyering2022-12-301-0/+0
|
* build: temp?-disable -Wanalyzer-use-of-uninitialized-valueJim Meyering2022-12-301-1/+9
| | | | | | | | * 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)
* build: update gnulib to latestJim Meyering2022-12-111-0/+0
|
* build: update gnulib to latestJim Meyering2022-11-121-0/+0
|
* doc: mark up SEE ALSO (Bug#53976)Paul Eggert2022-02-144-4/+14
|
* tests: fix false-failure on systems without valgrindJim Meyering2022-01-241-1/+1
| | | | | * tests/init.cfg (require_valgrind_): Use exit status of subshell, not that of the "local" declaration.
* build: update gnulib submodule to latestPaul Eggert2022-01-141-0/+0
|
* maint: avoid new syntax-check failureJim Meyering2022-01-031-1/+2
| | | | | * cfg.mk (local-checks-to-skip): Add sc_indent, to skip it. Otherwise, "make syntax-check" would fail.
* maint: make update-copyrightJim Meyering2022-01-0342-42/+43
|
* build: update gnulib to latest; also bootstrap and init.shJim Meyering2022-01-033-117/+149
|
* maint: modernize README-{hacking,prereq}Paul Eggert2021-10-302-35/+81
|
* doc: copy fdl.texi into gitPaul Eggert2021-10-162-1/+505
| | | | | | | | 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.
* maint: direct dependency on time_rz nowPaul Eggert2021-10-161-0/+1
| | | | | Now that diff calls tzalloc, it depends directly on time_rz. * bootstrap.conf (gnulib_modules): Add time_rz.
* build: update gnulib submodule to latestPaul Eggert2021-10-161-0/+0
|
* diff: fix timezone bug on SolarisPaul Eggert2021-10-156-1/+32
| | | | | | | | | | | | 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.
* diff3: port better to MS-WindowsPaul Eggert2021-08-311-23/+23
| | | | | * src/diff3.c (enum diff_type): Prefix constants like ADD with "DIFF_" to avoid collisions with unwise system headers.
* maint: port better to non-POSIXPaul Eggert2021-08-301-4/+24
| | | | | | | 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.
* maint: prefer attribute.h attributesPaul Eggert2021-08-3010-42/+29
| | | | | | | | | | 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.
* build: update gnulib submodule to latestPaul Eggert2021-08-301-0/+0
|
* diff: avoid double translationPaul Eggert2021-08-301-2/+2
| | | | | * src/analyze.c (briefly_report): Do not translate here, as ‘message’ translates its format.
* diff: use variable arg list for messagesPaul Eggert2021-08-304-56/+74
| | | | | | | | | | | | | | | | | 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.
* diff: port better to MS-WindowsPaul Eggert2021-08-291-21/+15
| | | | | | | | | 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.
* diff: cleanup signal handling just before exitPaul Eggert2021-08-284-65/+127
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* diff: add integer overflow checkingPaul Eggert2021-08-221-3/+12
| | | | | * src/diff.c (option_list, main): Check for integer overflow in some unlikely and hard-to-test cases.
* maint: refactor integer overflow checkingPaul Eggert2021-08-224-29/+14
| | | | | | | | | | | | | | 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.