| 1 |
2025-04-08 Jim Meyering <[email protected]> |
| 2 |
|
| 3 |
version 3.12 |
| 4 |
* NEWS: Record release date. |
| 5 |
|
| 6 |
tests: cmp: increase timeout to avoid failure on a very busy-IO system |
| 7 |
* tests/cmp: Increase timeout from 0.1 to 0.4s, to avoid false-failure |
| 8 |
on a system with lots of IO congestion. Reported by Nelson Beebe |
| 9 |
in https://lists.gnu.org/r/diffutils-devel/2025-04/msg00007.html |
| 10 |
|
| 11 |
2025-04-04 Jim Meyering <[email protected]> |
| 12 |
|
| 13 |
build: update gnulib to latest; and update bootstrap |
| 14 |
|
| 15 |
2025-03-28 Jim Meyering <[email protected]> |
| 16 |
|
| 17 |
maint: ensure that new "make syntax-check"-run sc_codespell passes |
| 18 |
* cfg.mk (codespell_ignore_words_list): Ignore false-positive "words". |
| 19 |
|
| 20 |
2025-03-27 Jim Meyering <[email protected]> |
| 21 |
|
| 22 |
maint: rather than exempt "hight" as a spelling false-positive... |
| 23 |
* src/diff3.c (output_diff3): Rename lowt,hight to low_t,high_t. |
| 24 |
|
| 25 |
2025-02-28 Paul Eggert <[email protected]> |
| 26 |
|
| 27 |
tests: test for diff -y crash |
| 28 |
* tests/side-by-side-seq: New test. |
| 29 |
* tests/Makefile.am (TESTS): Add it. |
| 30 |
|
| 31 |
diff: fix allocation typo leading to crashes |
| 32 |
But reported by Nick Smallbone, with one-line fix by |
| 33 |
Collin Funk <https://bugs.gnu.org/76613>. |
| 34 |
* src/io.c (find_and_hash_each_line): Fix size computation. |
| 35 |
|
| 36 |
tests: make seq replacement more available |
| 37 |
This refactoring should let other future tests use ‘seq’. |
| 38 |
* tests/diff3 (seq): Move from here ... |
| 39 |
* tests/init.cfg: ... to here. |
| 40 |
|
| 41 |
2025-02-21 Paul Eggert <[email protected]> |
| 42 |
|
| 43 |
maint: mention bug#76452 in NEWS |
| 44 |
|
| 45 |
2025-02-21 Collin Funk <[email protected]> |
| 46 |
|
| 47 |
diff: add a test case for the recent empty file bug |
| 48 |
* tests/empty-file: New file. |
| 49 |
* tests/Makefile.am (TESTS): Add the test. |
| 50 |
|
| 51 |
2025-02-21 Paul Eggert <[email protected]> |
| 52 |
|
| 53 |
diff: don't treat empty files as a different file type |
| 54 |
Reported by Kate Deplaix <[email protected]> in |
| 55 |
<https://lists.gnu.org/r/bug-diffutils/2025-02/msg00005.html>. |
| 56 |
|
| 57 |
* src/diff.c (compare_prepped_files): Don't rely on string |
| 58 |
file type, as that might not agree with our idea of a file type. |
| 59 |
|
| 60 |
2025-02-03 Simon Josefsson <[email protected]> |
| 61 |
|
| 62 |
cmp, diff, diff3, sdiff: support gnulib-l10n |
| 63 |
* src/cmp.c (main): Call bindtextdomain for gnulib-l10n. |
| 64 |
* src/diff.c (main): Likewise. |
| 65 |
* src/diff3.c (main): Likewise. |
| 66 |
* src/sdiff.c (main): Likewise. |
| 67 |
|
| 68 |
2025-02-02 Jim Meyering <[email protected]> |
| 69 |
|
| 70 |
maint: post-release administrivia |
| 71 |
* NEWS: Add header line for next release. |
| 72 |
* .prev-version: Record previous version. |
| 73 |
* cfg.mk (old_NEWS_hash): Auto-update. |
| 74 |
|
| 75 |
version 3.11 |
| 76 |
* NEWS: Record release date. |
| 77 |
|
| 78 |
maint: continue writing base64-encoded checksums to announcement |
| 79 |
* cfg.mk (announce_gen_args): Set to --cksum-checksums. |
| 80 |
|
| 81 |
tests: avoid "make check" hang on CentOS Stream 9 with valgrind-3.19.0 |
| 82 |
* tests/init.cfg (require_timeout_): New function, from grep. |
| 83 |
(require_valgrind_): Use it, to kill -9 after 3 seconds, because the |
| 84 |
default SIGINT was insufficient. |
| 85 |
|
| 86 |
tests: avoid test failure due to inadequate Solaris 10 tr |
| 87 |
* tests/init.cfg (require_utf8_locale_): Solaris 10's /usr/bin/tr |
| 88 |
silently malfunctions with multibyte input, so attempt to find a |
| 89 |
better one, trying /usr/xpg4/bin/tr and "gtr". |
| 90 |
Failing that, skip the test. Reported by Collin Funk in |
| 91 |
https://lists.gnu.org/r/diffutils-devel/2025-02/msg00004.html |
| 92 |
|
| 93 |
maint: once again distribute .tar.gz files |
| 94 |
* configure.ac: Reenable distribution of gzip-compressed tarballs, |
| 95 |
to help reduce the size of the Guix seed, as discussed at |
| 96 |
https://lists.gnu.org/r/coreutils/2020-02/msg00042.html and |
| 97 |
https://lists.gnu.org/r/sed-devel/2020-01/msg00013.html |
| 98 |
* NEWS (Release): Mention this. |
| 99 |
Requested by Nicolas Boos |
| 100 |
|
| 101 |
2025-02-01 Jim Meyering <[email protected]> |
| 102 |
|
| 103 |
maint: reflect gnulib module renamings |
| 104 |
* bootstrap.conf: Some gnulib modules are now deprecated, in |
| 105 |
favor of new names with a "-h" suffix (and stdbool->bool). |
| 106 |
Induce this change with the following: |
| 107 |
re='inttypes|signal|stdckdint|stdint|sys_types|sys_wait|unistd' |
| 108 |
perl -pi -e 's{^('"$re"')$}{$1-h};s{^stdbool$}{bool}' bootstrap.conf |
| 109 |
Then, sort the module names. |
| 110 |
|
| 111 |
build: update gnulib to latest; and update bootstrap |
| 112 |
|
| 113 |
2025-01-05 Jim Meyering <[email protected]> |
| 114 |
|
| 115 |
doc: rewrite the "Unusual File Names" section |
| 116 |
* doc/diffutils.texi (Unusual File Names): Rewrite to reflect |
| 117 |
that file names with e.g., NL and TAB are now quoted. |
| 118 |
Reported by Matěj Cepl in <https://bugs.gnu.org/68695>. |
| 119 |
|
| 120 |
2025-01-05 Bruno Haible <[email protected]> |
| 121 |
|
| 122 |
diff: Fix failure of --no-dereference option (regression 2023-07-01) |
| 123 |
* configure.ac: Move system-related tests closer together. Define |
| 124 |
O_PATH_SUPPORTS_FSTAT if O_PATH exists and is supported by fstat(). |
| 125 |
* src/diff.c (O_PATHSEARCH): Don't use O_PATH if it is defined but not |
| 126 |
supported by fstat(). |
| 127 |
|
| 128 |
doc: reference continuous integration URLs |
| 129 |
* README-hacking (Continuous integration): New section: |
| 130 |
list the gitlab and github CI links. |
| 131 |
|
| 132 |
2025-01-03 Jim Meyering <[email protected]> |
| 133 |
|
| 134 |
maint: update all copyright dates via "make update-copyright" |
| 135 |
|
| 136 |
build: update gnulib to latest |
| 137 |
|
| 138 |
2024-10-13 Collin Funk <[email protected]> |
| 139 |
|
| 140 |
maint: use Gnulib's stat-time over our own version |
| 141 |
* bootstrap.conf (gnulib_modules): Add stat-time. |
| 142 |
* configure.ac: Remove check for the st_blksize in struct stat. |
| 143 |
* src/system.h: Include stat-time.h. |
| 144 |
(STAT_BLOCKSIZE): Remove definition. |
| 145 |
* src/analyze.c (diff_2_files): |
| 146 |
* src/cmp.c (main): |
| 147 |
* src/diff3.c (read_diff): |
| 148 |
* src/io.c (sip): Use ST_BLKSIZE instead of STAT_BLOCKSIZE. |
| 149 |
|
| 150 |
2024-09-10 Jim Meyering <[email protected]> |
| 151 |
|
| 152 |
maint: avoid old-FSF-address syntax-check failure |
| 153 |
* man/help2man: Update to help2man-1.48.5, but merging in the |
| 154 |
latest #!/usr/bin/env change. Bruno Haible reported that it |
| 155 |
failed a new gnulib syntax-check due to an old FSF mailing |
| 156 |
address in https://bugs.gnu.org/73139 |
| 157 |
|
| 158 |
2024-07-22 Bruno Haible <[email protected]> |
| 159 |
|
| 160 |
build: Fix use of perl on Guix, FreeBSD, NetBSD |
| 161 |
* man/help2man: Search for perl in $PATH. |
| 162 |
|
| 163 |
build: Generate programs' man pages in the source directory, per GCS |
| 164 |
* man/Makefile.am ($(dist_man1_MANS)): Generate the *.1 files in |
| 165 |
$(srcdir), not in the build dir. |
| 166 |
|
| 167 |
2024-07-21 Bruno Haible <[email protected]> |
| 168 |
|
| 169 |
build: Fix a build failure in a VPATH build |
| 170 |
* src/Makefile.am (cmp.$(OBJEXT) etc.): Depend on version.h. |
| 171 |
|
| 172 |
2024-07-15 Paul Eggert <[email protected]> |
| 173 |
|
| 174 |
maint: adjust to Gnulib -Wsystem-headers change |
| 175 |
* configure.ac (WERROR_CFLAGS): No need to disable |
| 176 |
-Wsystem-headers as Gnulib no longer enables it by default. |
| 177 |
|
| 178 |
build: update gnulib submodule to latest |
| 179 |
|
| 180 |
2024-07-04 Jim Meyering <[email protected]> |
| 181 |
|
| 182 |
build: update gnulib to latest; and update bootstrap |
| 183 |
|
| 184 |
2024-07-04 Collin Funk <[email protected]> |
| 185 |
|
| 186 |
maint: import tests/init.sh from Gnulib during bootstrap |
| 187 |
* bootstrap.conf (bootstrap_post_import_hook): Use gnulib-tool |
| 188 |
--copy-file to import tests/init.sh. |
| 189 |
* tests/init.sh: Remove file. |
| 190 |
* .gitignore (/tests/init.sh): Add entry. |
| 191 |
|
| 192 |
2024-06-23 Collin Funk <[email protected]> |
| 193 |
|
| 194 |
tests: don't fail when --program-transform-name is used |
| 195 |
Problem reported by Jun T <https://bugs.gnu.org/48062>. |
| 196 |
* tests/diff3: Use --diff-program=diff since --program-transform-name |
| 197 |
is applied after install. |
| 198 |
* tests/help-version (sdiff_setup, diff3_setup): Likewise. |
| 199 |
|
| 200 |
2024-06-19 Paul Eggert <[email protected]> |
| 201 |
|
| 202 |
diff: avoid memory leak with --color-palette |
| 203 |
Problem found indirectly by Coverity, reported by Wasser Mai |
| 204 |
(Bug#71535). Although the Coverity report was wrong, there was a |
| 205 |
different potential memory leak nearby. Fix the problem by |
| 206 |
modifying the string in place, avoiding the need to call malloc. |
| 207 |
* src/util.c (color_ext_list, struct color_ext_type): |
| 208 |
Remove. Not needed, as the list wasn’t used. |
| 209 |
All uses removed. |
| 210 |
(get_funky_string): Omit last argument output_count, as it’s |
| 211 |
easily calculated by caller. This lets us call this function |
| 212 |
when we don’t care about the count. |
| 213 |
(color_palette): Now char *, not char const *, since we |
| 214 |
now update through it. |
| 215 |
(set_color_palette): Likewise. |
| 216 |
(parse_diff_color): Process color palette into itself, to avoid |
| 217 |
unnecessary malloc and free calls. This pacifies Coverity, saves |
| 218 |
a bit of space in the normal case, and avoids a memory leak in |
| 219 |
some cases. Do not process the palette twice, as its memory |
| 220 |
has been modified and this function had no effect on the |
| 221 |
color indicators the second time. |
| 222 |
|
| 223 |
maint: update .gitignore to add lib/stdbit.h |
| 224 |
|
| 225 |
2024-06-11 Paul Eggert <[email protected]> |
| 226 |
|
| 227 |
diff: port to FreeBSD, NetBSD |
| 228 |
Problem reported by Bruno Haible <https://bugs.gnu.org/71486>. |
| 229 |
* src/diff.c (NOFOLLOW_SYMLINK_ERRNO): New constant. |
| 230 |
(compare_files): Use it instead of ELOOP. When it is not ELOOP, |
| 231 |
treat ELOOP as a failure in resolving the parent directory; |
| 232 |
this saves a syscall in some situation. |
| 233 |
|
| 234 |
2024-06-11 Bruno Haible <[email protected]> |
| 235 |
|
| 236 |
tests: Fix ignore-case failure on several platforms |
| 237 |
* tests/ignore-case: Don't compare 'Ⓐ' with 'ⓐ'; this doesn't work on |
| 238 |
NetBSD 10.0 and Solaris 11.4. Don't compare 'Ꞻ' with 'ꞻ'; this doesn't |
| 239 |
work on CentOS 7, macOS, and Solaris 11 OmniOS. |
| 240 |
|
| 241 |
2024-06-11 Paul Eggert <[email protected]> |
| 242 |
|
| 243 |
maint: port ‘make distcheck’ to Ubuntu 24.04 |
| 244 |
* configure.ac: Don’t use -Wsystem-headers, as <stdbit.h> |
| 245 |
uses static functions that couldn’t be called from |
| 246 |
extern inline functions if they were in user code. |
| 247 |
|
| 248 |
maint: pacify ‘make sc_tight_scope’ |
| 249 |
Problem reported by Bruno Haible <https://bugs.gnu.org/71455>. |
| 250 |
* src/system.h (same_file, stat_size): Add ‘extern’. |
| 251 |
|
| 252 |
maint: port to birthtime platforms |
| 253 |
Problem reported by Bruno Haible <https://bugs.gnu.org/71456>. |
| 254 |
* src/system.c (same_file): Fix typo on platforms with birthtime. |
| 255 |
|
| 256 |
2024-05-21 Paul Eggert <[email protected]> |
| 257 |
|
| 258 |
build: update gnulib submodule to latest |
| 259 |
|
| 260 |
2024-05-16 Paul Eggert <[email protected]> |
| 261 |
|
| 262 |
maint: adjust to Gnulib stdbit splitup |
| 263 |
* bootstrap.conf (gnulib_modules): Remove stdbit; add stdc_bit_width. |
| 264 |
|
| 265 |
build: update gnulib submodule to latest |
| 266 |
|
| 267 |
2024-05-15 Paul Eggert <[email protected]> |
| 268 |
|
| 269 |
maint: move same_file and stat_size into system.c |
| 270 |
Now that we have a system.c, there’s little point to these |
| 271 |
being extern inline functions. |
| 272 |
* src/system.c (same_file, stat_size): Move here from system.h, |
| 273 |
and make them ordinary extern functions. |
| 274 |
(proc_dev, symlink_size_ok): Now static, and private to their |
| 275 |
functions. |
| 276 |
* src/system.h (same_file, stat_size): Now just decls. |
| 277 |
|
| 278 |
build: update gnulib submodule to latest |
| 279 |
|
| 280 |
2024-05-14 Paul Eggert <[email protected]> |
| 281 |
|
| 282 |
maint: be less fancy when defining extern vars |
| 283 |
Bug reported by Bruno Haible in <https://bugs.gnu.org/70951>. |
| 284 |
I never did like the XTERN macro and its descendants, as this |
| 285 |
“extension” to C causes more confusion than it cures, so let’s |
| 286 |
just get rid of it and use plain ‘extern’. |
| 287 |
* cfg.mk (_gl_TS_extern): Remove XTERN, SYSTEM_EXTERN. |
| 288 |
* src/Makefile.am (cmp_SOURCES, diff3_SOURCES, sdiff_SOURCES) |
| 289 |
(diff_SOURCES): Add system.c. |
| 290 |
* src/cmp.c, src/diff.c, src/diff3.c, src/sdiff.c (SYSTEM_INLINE): |
| 291 |
Remove. |
| 292 |
* src/diff.c: Define vars declared in diff.h. |
| 293 |
* src/diff.h (DIFF_EXTERN): Remove. All uses removed. |
| 294 |
Just use ‘extern’ when declaring extern vars. |
| 295 |
* src/system.h (SYSTEM_EXTERN): Likewise. |
| 296 |
* src/system.c: New file. |
| 297 |
|
| 298 |
build: update gnulib submodule to latest |
| 299 |
|
| 300 |
2024-05-12 Paul Eggert <[email protected]> |
| 301 |
|
| 302 |
maint: pacify GCC 14 -Wmissing-variable-declarations |
| 303 |
* src/Makefile.am (version.c): Have it include version.h, |
| 304 |
so that it checks its own interface. |
| 305 |
* src/diff.c (DIFF_INLINE): Define this instead of GDIFF_MAIN, |
| 306 |
for consistency with SYSTEM_INLINE. |
| 307 |
* src/diff.h (DIFF_EXTERN): New macro, replacing XTERN. |
| 308 |
All uses changed. Adjust to GDIFF_MAIN→DIFF_INLINE change. |
| 309 |
* src/system.h (SYSTEM_EXTERN): Now takes an argument. |
| 310 |
All uses changed. |
| 311 |
|
| 312 |
2024-05-11 Paul Eggert <[email protected]> |
| 313 |
|
| 314 |
diff: prefer stdbit to count-leading-zeros |
| 315 |
stdbit.h is standardized in C23, so use that instead of |
| 316 |
the GNU-specific count-leading-zeros module. |
| 317 |
* bootstrap.conf (gnulib_modules): Remove count-leading-zeros. |
| 318 |
Add stdbit. |
| 319 |
* src/system.h: Include stdbit.h instead of count-leading-zeros.h. |
| 320 |
(floor_log2): Implement via stdc_bit_width instead of via |
| 321 |
count_leading_zeros_ll. |
| 322 |
|
| 323 |
maint: update bootstrap to Gnulib version |
| 324 |
|
| 325 |
build: update gnulib submodule to latest |
| 326 |
|
| 327 |
2024-05-09 Paul Eggert <[email protected]> |
| 328 |
|
| 329 |
diff: improve GCC 13.3’s static checking |
| 330 |
* src/io.c (slurp): GCC bug 110014 should be fixed in GCC 13.3. |
| 331 |
|
| 332 |
2024-02-18 Paul Eggert <[email protected]> |
| 333 |
|
| 334 |
diff: restrict scope of GCC bug 110014 workaround |
| 335 |
* src/io.c (slurp): Work around GCC bug 110014 only if GCC 13, |
| 336 |
since it’s reportedly fixed in GCC 14. |
| 337 |
|
| 338 |
2024-01-05 Jim Meyering <[email protected]> |
| 339 |
|
| 340 |
maint: make update-copyright |
| 341 |
|
| 342 |
build: update gnulib to latest; also update bootstrap |
| 343 |
|
| 344 |
build: suppress -Wmaybe-uninitialized for one function |
| 345 |
* src/sdiff.c (edit): Suppress gcc's -Wmaybe-uninitialized warning |
| 346 |
for this function. Whenever "cmd1 == 'e'", cmd2 **is** initialized. |
| 347 |
|
| 348 |
2023-09-20 Paul Eggert <[email protected]> |
| 349 |
|
| 350 |
diff: go back to C quoting for diff -c/-u headers |
| 351 |
Gleb Fotengauer-Malinovskiy reported <https://bugs/gnu/org/66095> |
| 352 |
that the recent change to quoting style broke GNU patch. |
| 353 |
* src/util.c: Include quotearg.h. |
| 354 |
(current_name): New static var, replacing the the old |
| 355 |
current_name0 and current_name1. All uses changed. |
| 356 |
(begin_output): Go back to quoting file names for C, |
| 357 |
not for the shell, when they contain troublesome characters. |
| 358 |
This is not a simple revert, as the revised code handles |
| 359 |
multi-byte characters even in non-UTF-8 locales. |
| 360 |
* tests/filename-quoting: Revert previous change to this file. |
| 361 |
|
| 362 |
build: update gnulib submodule to latest |
| 363 |
|
| 364 |
2023-09-16 Jim Meyering <[email protected]> |
| 365 |
|
| 366 |
build: avoid new build failure |
| 367 |
* src/util.c (output_1_line): Append a semicolon to "default:" |
| 368 |
label, now that the following line is a declaration. Avoids this: |
| 369 |
error: a label can only be part of a statement and a declaration is\ |
| 370 |
not a statement |
| 371 |
|
| 372 |
2023-09-16 Paul Eggert <[email protected]> |
| 373 |
|
| 374 |
maint: fix NEWS typos |
| 375 |
|
| 376 |
diff: tune when O_PATH fails with ELOOP |
| 377 |
* src/diff.c (compare_files): If openat (..., "a/b/.../e/f", |
| 378 |
O_PATH | ...) fails with ELOOP, one of a, a/b, ..., a/b/.../e |
| 379 |
must be a symlink loop; a/b/.../e/f cannot itself be a symlink loop. |
| 380 |
So in this case fail immediately rather than following up with |
| 381 |
fstatat (..., "a/b/.../e/f", ..., AT_SYMLINK_NOFOLLOW). |
| 382 |
|
| 383 |
diff: tune 'diff --no-dereference --no-file-name-case SYMLINK DIR' |
| 384 |
* src/diff.c (compare_files): If find_dir_file_pathname tells |
| 385 |
us the file type, use that info to avoid unnecessary calls |
| 386 |
to openat. |
| 387 |
* src/dir.c (find_dir_file_pathname): New arg DETYPE. All uses changed. |
| 388 |
|
| 389 |
2023-09-15 Paul Eggert <[email protected]> |
| 390 |
|
| 391 |
maint: fix comment typo |
| 392 |
|
| 393 |
2023-09-15 Gleb Fotengauer-Malinovskiy <[email protected]> (tiny change) |
| 394 |
|
| 395 |
diff: fix regression affecting the counting of diff context lines |
| 396 |
This regression was introduced on 2023-05-22 in commit |
| 397 |
v3.10-9-gda1697dcb6 ("diff: C99 decl style in context.c") during a code |
| 398 |
style change. |
| 399 |
|
| 400 |
This regression was discovered using the GNU patch testsuite: |
| 401 |
FAIL: preserve-c-function-names |
| 402 |
FAIL: reject-format |
| 403 |
|
| 404 |
* src/context.c (minus_prefix_lines): Initialize with a reversed value. |
| 405 |
|
| 406 |
2023-09-15 Paul Eggert <[email protected]> |
| 407 |
|
| 408 |
diff: publish attributes |
| 409 |
* src/diff.h (translate_line_number, find_change): |
| 410 |
Move attribute here ... |
| 411 |
* src/util.c: ... from here. |
| 412 |
|
| 413 |
2023-09-13 Paul Eggert <[email protected]> |
| 414 |
|
| 415 |
diff: respond faster to write failures |
| 416 |
* src/util.c (output_1_line): Check for signals even |
| 417 |
if there is a write failure, for faster response when |
| 418 |
hammering on /dev/full etc. |
| 419 |
|
| 420 |
maint: be clearer about when ctype is needed |
| 421 |
Include <ctype.h> and <c-ctype.h> only in modules where needed. |
| 422 |
* src/cmp.c, src/context.c, src/diff.c, src/diff3.c, src/ifdef.c: |
| 423 |
* src/sdiff.c: Include <c-ctype.h>. |
| 424 |
* src/io.c: Include <ctype.h>. |
| 425 |
* src/system.h: Do not include either <ctype.h> or <c-ctype.h>. |
| 426 |
|
| 427 |
maint: diff no longer uses isblank directly |
| 428 |
* bootstrap.conf (gnulib_modules): Remove isblank. |
| 429 |
|
| 430 |
2023-09-12 Paul Eggert <[email protected]> |
| 431 |
|
| 432 |
diff: improve util.c multi-byte handling |
| 433 |
* bootstrap.conf (gnulib_modules): Add c32isprint. |
| 434 |
* src/util.c: Include mcel.h. |
| 435 |
(output_1_line): Return immediately on output error. |
| 436 |
Scan multi-byte characters and count their widths. |
| 437 |
(analyze_hunk): Ignore multi-byte white space too. |
| 438 |
|
| 439 |
sdiff: port to odd isspace locales |
| 440 |
* src/sdiff.c (skip_white): Use c_isspace, not isspace. |
| 441 |
We are parsing diff output, and c_isspace is better here. |
| 442 |
|
| 443 |
2023-09-07 Paul Eggert <[email protected]> |
| 444 |
|
| 445 |
diff: port --no-dereference changes to non-O_PATH |
| 446 |
This fixes a recently-introduced portability bug |
| 447 |
when running on platforms like Solaris 10 that lack O_PATH. |
| 448 |
* src/diff.c (compare_files): On platforms without O_PATH, |
| 449 |
when running 'diff --no-dereference symlink dir' do not |
| 450 |
report an error merely because dir/symlink is a symbolic link |
| 451 |
and cannot be opened for reading. |
| 452 |
|
| 453 |
maint: switch to gnulib mcel |
| 454 |
Drop diffutils-specific library code that has been moved into Gnulib. |
| 455 |
* gl/lib/exclude.c, gl/lib/mbscasecmp.c, gl/lib/mcel.c: |
| 456 |
* gl/lib/mcel.h, gl/modules/mcel, gl/modules/mcel-prefer: |
| 457 |
* gl/modules/mcel-tests, gl/tests/test-mcel.c: |
| 458 |
Remove; now taken from Gnulib. |
| 459 |
|
| 460 |
build: update gnulib submodule to latest |
| 461 |
|
| 462 |
2023-08-30 Paul Eggert <[email protected]> |
| 463 |
|
| 464 |
maint: define GNULIB_MBRTOC32_REGULAR |
| 465 |
* configure.ac (GNULIB_MBRTOC32_REGULAR): Define. |
| 466 |
diffutils itself already assumes this, so it might as well |
| 467 |
assume it in Gnulib code as well. |
| 468 |
|
| 469 |
2023-08-24 Paul Eggert <[email protected]> |
| 470 |
|
| 471 |
diff: port mcel.h designated initializers to C99 |
| 472 |
* gl/lib/mcel.h (mcel_ch, mcel_err): Use C-standard notation |
| 473 |
for designated initializers, instead of a GNU extension. |
| 474 |
|
| 475 |
2023-08-22 Paul Eggert <[email protected]> |
| 476 |
|
| 477 |
maint: pacify ‘make syntax-check’ |
| 478 |
* cfg.mk: Update exclude_file_name_regexp lists. |
| 479 |
|
| 480 |
2023-08-21 Paul Eggert <[email protected]> |
| 481 |
|
| 482 |
build: update gnulib submodule to latest |
| 483 |
|
| 484 |
diff: avoid mbuiter |
| 485 |
* bootstrap.conf (avoided_gnulib_modules): |
| 486 |
Avoid mbuiter. |
| 487 |
* gl/lib/exclude.c: New file, with an mcel option. |
| 488 |
|
| 489 |
diff: modularize and tune mcel code |
| 490 |
Go back to a single mcel module, instead of trying to break it up |
| 491 |
into ucore and mcel pieces, as breaking it up hurt performance. |
| 492 |
Use gnulib-tool’s --local-dir to create diffutils-specific modules |
| 493 |
for mcel; the idea is that this will eventually migrate into Gnulib. |
| 494 |
* bootstrap.conf (avoided_gnulib_modules): Add mbuiterf. |
| 495 |
(gnulib_modules): Add mbscasecmp, mcel-prefer. |
| 496 |
(gnulib_tool_option_extras): Add --local-dir=gl to pick up new files. |
| 497 |
* cfg.mk (exclude_file_name_regexp--sc_prohibit_doubled_word): |
| 498 |
Do not exclude now-removed files lib/ucore.c, lib/ucore.h. |
| 499 |
* lib/Makefile.am: Adjust to use of modules. |
| 500 |
(noinst_HEADERS): Remove mcel.h, ucore.h. |
| 501 |
(libdiffutils_a_SOURCES): Remove mcel.c, mcel-casecmp.c, ucore.c |
| 502 |
* lib/mcel-casecmp.c, lib/ucore.c, lib/ucore.h: Remove. |
| 503 |
* lib/mcel.h: Switch to LGPLv2.1+. Do not include ucore.h. |
| 504 |
All uses of ucore_t changed back to using char32_t. |
| 505 |
Do what ucore.h used to do: include verify.h, limits.h, stddef.h, |
| 506 |
uchar.h; require config.h, define _GL_LIKELY, _GL_UNLIKELY. |
| 507 |
(MCEl_CHAR_MAX, MCEL_ERR_MIN, MCEL_ERR_MAX): New constants. |
| 508 |
(mcel_t): Switch from single ucore_t c to a char32_t ch and |
| 509 |
unsigned char err. This has significantly better performance on |
| 510 |
Fedora 38 x86-64. All uses changed. Check that unsigned char |
| 511 |
promotes to int. |
| 512 |
(mcel_ch, mcel_err, mcel_cmp, mcel_tocmp): New functions. |
| 513 |
(MCEL_ERR_SHIFT): Rename from MCEL_ENCODING_ERROR_SHIFT. |
| 514 |
All uses changed. |
| 515 |
(mcel_isbasic): Add a _GL_LIKELY to help compilers. All uses changed. |
| 516 |
(mcel_scan, mcel_scant): Simplify by using mcel_ch, mcel_err. |
| 517 |
(mcel_casecmp): Remove decl. Callers changed to use mbscasecmp. |
| 518 |
* gl/lib/mcel.c, gl/lib/mcel.h: Rename from lib/mcel.c, lib/mcel.h. |
| 519 |
* gl/lib/mbscasecmp.c: New file. |
| 520 |
* gl/modules/mcel, gl/modules/mcel-prefer, gl/modules/mcel-tests: |
| 521 |
* gl/tests/test-mcel.c: |
| 522 |
New files. |
| 523 |
* src/io.c: Revert use of ucore API. Use plain c32isspace etc. |
| 524 |
instead of ucore_is. Use .err instead of ucore_iserr. |
| 525 |
(same_ch_err): Bring back, and use it instead of ucore_cmp. |
| 526 |
* src/side.c (print_half_line): Use .err instead of ucore_iserr. |
| 527 |
|
| 528 |
diff: omit ignore_file_name_case test |
| 529 |
* src/dir.c (compare_names): Omit redundant test. |
| 530 |
|
| 531 |
2023-08-20 Paul Eggert <[email protected]> |
| 532 |
|
| 533 |
diff: fix recently-introduced file name case bug |
| 534 |
* src/diff.c (compare_files): When ignoring file name case |
| 535 |
and comparing a file f to a directory d at the top level, |
| 536 |
make sure that if we end up comparing f to d/F then |
| 537 |
don’t mistakenly try to open d/f instead. |
| 538 |
* src/dir.c (compare_collated): Do not worry about |
| 539 |
ignore_file_name_case here. |
| 540 |
(compare_names): Worry about it here instead. |
| 541 |
That way, we do the right thing with the test case. |
| 542 |
* tests/ignore-case: Test for the bug. |
| 543 |
|
| 544 |
2023-08-19 Jim Meyering <[email protected]> |
| 545 |
|
| 546 |
maint: avoid syntax-check for doubled word "TO to" in lib/ucore.h |
| 547 |
* cfg.mk (exclude_file_name_regexp--sc_prohibit_doubled_word): |
| 548 |
Also exempt lib/ucore.h. |
| 549 |
|
| 550 |
2023-08-15 Paul Eggert <[email protected]> |
| 551 |
|
| 552 |
maint: update .gitignore |
| 553 |
* .gitignore: Remove lib/charset.alias, lib/configmake.h, |
| 554 |
lib/ref-add.sed, lib/ref-del.sed. Add lib/c-file-type.c, |
| 555 |
lib/file-type.h. Sort. |
| 556 |
|
| 557 |
diff: simplify multi-byte code (mbcel -> mcel) |
| 558 |
* lib/Makefile.am: Adjust to file renamings and additions. |
| 559 |
* lib/mbcel.c, lib/mbcel.h: Split into two APIs, replacing with ... |
| 560 |
* lib/mcel.c, lib/mcel.h, lib/ucore.c, lib/ucore.h: ... these new files. |
| 561 |
* lib/mcel.h: Simplify by assuming ucore.h is included. |
| 562 |
Check that bytes have 8 bits. |
| 563 |
(MCEL_LEN_MAX, mcel_t, MCEL_INLINE, MCEL_ENCODING_ERROR_SHIFT) |
| 564 |
(mcel_scan, mcel_scant, mcel_scanz, mcel_casecmp): |
| 565 |
Rename from MBCEL_LEN_MAX, mbcel_t, MBCEL_INLINE, |
| 566 |
MBCEL_ENCODING_ERROR_SHIFT, mbcel_scan, mbcel_scanz, mbcel_scant, |
| 567 |
mbcel_casecmp. |
| 568 |
(mcel_t): New member c, replacing old members ch and err. |
| 569 |
All uses changed. |
| 570 |
(MBCEL_UCHAR_FITS, MBCEL_UCHAR_EASILY_FITS): Remove. |
| 571 |
All uses removed. No longer needed now 8-bit bytes are assumed. |
| 572 |
(MCEL_ENCODING_ERROR_SHIFT): Check that it matches UCORE_ERR_MIN. |
| 573 |
(mcel_isbasic): New function. Use it where appropriate. |
| 574 |
(mbcel_cmp, mbcel_casecmp): Remove; replaced by ucore_cmp, |
| 575 |
ucore_tocmp. All uses changed. |
| 576 |
* lib/mcel-casecmp.c: Rename from lib/mbcel-strcasecmp.c. |
| 577 |
Include mcel.h instead of mbcel.h. |
| 578 |
(mcel_casecmp): Rename from mbcel_strcasecmp. All uses changed. |
| 579 |
Assert that UCHAR_MAX <= INT_MAX, as POSIX requires, |
| 580 |
and simplify code accordingly. Use mcel rather than mbcel. |
| 581 |
* lib/ucore.h: Include verify.h. |
| 582 |
(ucore_t): New type. |
| 583 |
(UCORE_CHAR_MAX, UCORE_ERR_MIN, UCORE_ERR_MAX, UCORE_C32_SAFE): |
| 584 |
New constants. Check that information is not lost by encoding |
| 585 |
errors as integers; this is a weaker test than CHAR_BIT == 8. |
| 586 |
(ucore_iserr, ucore_is, ucore_to): New functions. |
| 587 |
(ucore_cmp, ucore_tocmp): New functions, replacing the old |
| 588 |
mbcel_cmp, mbcel_casecmp. All uses changed. |
| 589 |
* src/dir.c, src/io.c, src/side.c: Use mcel rather than mbcel. |
| 590 |
* src/io.c (same_ch_err): Remove. All uses replaced by ucore_cmp. |
| 591 |
|
| 592 |
2023-08-14 Paul Eggert <[email protected]> |
| 593 |
|
| 594 |
diff: improve symlink handling, avoiding a race |
| 595 |
* bootstrap.conf (gnulib_modules): Add c-file-type |
| 596 |
and remove file-type. |
| 597 |
* po/POTFILES.in: Add lib/c-file-type.c, remove lib/file-type.c |
| 598 |
* src/diff.c (O_PATH_DEFINED): New constant. |
| 599 |
(detype_from_mode): Remove; no longer used. |
| 600 |
(dir_p): Go back to the old way of using S_ISDIR. |
| 601 |
(compare_prepped_files): Use filetype and stat macros, not detype. |
| 602 |
Pass symlink fd and "" to careadlinkat if available, as that |
| 603 |
avoids a race. Test for dir vs file earlier, so that a missing |
| 604 |
file is treated consistently with dir/file vs file. |
| 605 |
(compare_files): New arg DETYPE replacing the old DETYPE0 and DETYPE1. |
| 606 |
All uses changed. st_size for nonexistent files is 0, not -1. |
| 607 |
Set up .filetype, not .detype, as .filetype is finer-grained. |
| 608 |
Open symlinks with O_PATH on GNU/Linux, since we can then |
| 609 |
use readlinkat on the resulting file descriptor and this |
| 610 |
avoids a race. |
| 611 |
* src/diff.h (struct file_data): Remove detype member. |
| 612 |
Add filetype member; it’s finer-grained. All uses changed. |
| 613 |
* tests/no-dereference: Add test that the previous commit failed. |
| 614 |
|
| 615 |
tests: fix comment numbering |
| 616 |
* tests/no-dereference: Omit comment numbers that didn’t correspond |
| 617 |
to test case ordering. |
| 618 |
|
| 619 |
build: update gnulib submodule to latest |
| 620 |
|
| 621 |
diff: simplify compare_files statting |
| 622 |
* src/diff.c (compare_files): Simplify the test for whether to get |
| 623 |
file status. Although this change means diff sometimes will call |
| 624 |
fstat or fstatat when not needed, these occasions are so rare that |
| 625 |
the optimization is not worth the code complexity. |
| 626 |
|
| 627 |
diff: refactor compare_files |
| 628 |
Break out a good chunk of the body of compare_files into |
| 629 |
a new function compare_prepped_files. This simplifies |
| 630 |
indenting and code slightly. |
| 631 |
* src/diff.c (compare_prepped_files): New function, taken |
| 632 |
from compare_files. |
| 633 |
(compare_files): Use it. |
| 634 |
|
| 635 |
diff: report special file major+minor |
| 636 |
* bootstrap.conf (gnulib_modules): Add sys_types, |
| 637 |
for MAJOR_IN_MKDEV and MAJOR_IN_SYSMACROS. |
| 638 |
* src/diff.c (major, minor): New macros or functions. |
| 639 |
Include <sys/mkdev.h> or <sys/sysmacros.h> for them. |
| 640 |
(compare_files): Output major and minor device numbers |
| 641 |
for special files that differ. |
| 642 |
|
| 643 |
2023-08-11 Paul Eggert <[email protected]> |
| 644 |
|
| 645 |
diff,cmp: tighten up same-file checks |
| 646 |
* src/cmp.c (main): |
| 647 |
* src/diff.c (compare_files): |
| 648 |
* src/dir.c (dir_loop): |
| 649 |
same_file returns bool, not int, so remove "0 <"s that date back |
| 650 |
to when it returned an int. Remove uses of same_file_attributes. |
| 651 |
* src/system.h (same_file): Now an inline function not a macro. |
| 652 |
Tighten up comparison rules a bit, by ignoring attributes of |
| 653 |
special files whose st_rdev are the same, and by considering |
| 654 |
any birthtime differences to be definitive. Do all the work |
| 655 |
that same_file_attributes used to do. Update commentary. |
| 656 |
(same_file_attributes): Remove. All uses removed. |
| 657 |
|
| 658 |
maint: tighten stat_size arg type |
| 659 |
* src/system.h (stat_size): Arg is now pointer to const. |
| 660 |
|
| 661 |
2023-08-08 Paul Eggert <[email protected]> |
| 662 |
|
| 663 |
cmp,diff,diff3,sdiff: quote more consistently |
| 664 |
* lib/diagnose.c, lib/diagnose.h: New files. |
| 665 |
* lib/Makefile.am (noinst_HEADERS, libdiffutils_a_SOURCES): |
| 666 |
Add them. |
| 667 |
* po/POTFILES.in: Add lib/diagnose.c. |
| 668 |
* src/analyze.c, src/cmp.c, src/diff3.c, src/dir.c: |
| 669 |
* src/sdiff.c, src/util.c: |
| 670 |
Include diagnose.h. |
| 671 |
* src/analyze.c (briefly_report, diff_2_files): |
| 672 |
* src/cmp.c (usage, main, cmp): |
| 673 |
* src/diff.c (add_regexp, summarize_regexp_list, main, compare_files): |
| 674 |
* src/diff3.c (usage, process_diff, scan_diff_line): |
| 675 |
* src/dir.c (diff_dirs): |
| 676 |
* src/sdiff.c (usage, ck_fopen, main, edit): |
| 677 |
* src/util.c (perror_with_name, begin_output): |
| 678 |
Quote file names or regexps with squote. |
| 679 |
* src/cmp.c, src/diff.c, src/diff3.c, src/dir.c, src/sdiff.c: |
| 680 |
Include quote.h. |
| 681 |
* src/cmp.c, src/diff.c, src/diff3.c, src/sdiff.c (try_help): |
| 682 |
Remove; now in diagnose.c. |
| 683 |
* src/cmp.c (specify_ignore_initial, main, cmp): |
| 684 |
* src/diff.c (main, specify_value, specify_colors_style): |
| 685 |
* src/diff3.c (main, read_diff): |
| 686 |
* src/dir.c (compare_collated): |
| 687 |
* src/sdiff.c (check_child_status, main): |
| 688 |
* src/util.c (finish_output): |
| 689 |
Quote strings with ‘quote’ or ‘quote_n’. |
| 690 |
* src/system.h (EXIT_TROUBLE): Remove; now in diagnose.h |
| 691 |
and now an enum. |
| 692 |
* src/util.c (c_escape_char, c_escape): |
| 693 |
Remove, as we now use squote. |
| 694 |
* tests/cmp, tests/filename-quoting, tests/invalid-re: |
| 695 |
Adjust to match new behavior. |
| 696 |
|
| 697 |
diff: try lseek on special files |
| 698 |
* src/diff.c (compare_files): It is OK to try lseek on special |
| 699 |
files, as failures are no-ops. Treat failures as an indication |
| 700 |
that the file position is irrelevant. |
| 701 |
|
| 702 |
cmp: lseek need not succeed on special files |
| 703 |
* src/cmp.c (main): Do not report an error if lseek returns -1, |
| 704 |
as it is OK if the file is not seekable and none of the other |
| 705 |
lseek errors seem to be relevant. This reverts my June 21 commit. |
| 706 |
|
| 707 |
diff: clarify /proc code |
| 708 |
* src/system.h (care_about_symlink_size): New macro. |
| 709 |
(stat_size): Use it. Do the simple checks (requiring no syscalls) |
| 710 |
first. Although it now makes no difference, remove the S_ISREG (mode) |
| 711 |
check from the /proc test; this is clearer as /proc files need not be |
| 712 |
regular files. |
| 713 |
|
| 714 |
diff: output symlink contents when they differ |
| 715 |
* bootstrap.conf (gnulib_modules): Add quote. |
| 716 |
* src/diff.c: Include quote.h. |
| 717 |
(compare_files): Print contents of symlinks that differ, |
| 718 |
and quote their names and contents. |
| 719 |
* src/system.h (symlink_size_ok): Remove. |
| 720 |
(stat_size): Don’t worry about symlink sizes. |
| 721 |
* tests/no-dereference: Adjust tests to match new behavior. |
| 722 |
|
| 723 |
2023-08-06 Paul Eggert <[email protected]> |
| 724 |
|
| 725 |
diff: fix some behavior on unreadable input |
| 726 |
This fixes a bug I recently introduced. |
| 727 |
* src/diff.c (compare_files): Set and use openerr to avoid |
| 728 |
the need for a doomed second attempt at openat. |
| 729 |
Don’t insist on openat succeeding before trying fstatat. |
| 730 |
Unless openat fails with ENOENT, ENOTDIR, ELOOP, EOVERFLOW, ENAMETOOLONG |
| 731 |
it’s possible for it to fail even when fstatat would succeed. |
| 732 |
ENOTDIR also means the file does not exist. |
| 733 |
However, do not worry about EBADF as that is no longer possible |
| 734 |
now that diff uses xstdopen. When checking whether a file should |
| 735 |
be considered to be nonexistent, do not require the other file |
| 736 |
desc to be UNOPENED or STDIN_FILENO; all that is needed is |
| 737 |
for the other file to not have an ENOENT or ENOTDIR failure. |
| 738 |
* src/diff.h (struct file_data): New member openerr. |
| 739 |
(OPEN_FAILED): New constant. |
| 740 |
* tests/new-file: Add a regression test to catch the bug |
| 741 |
fixed by the above. |
| 742 |
|
| 743 |
diff: fix recent -N regression |
| 744 |
* src/diff.c (compare_files): Fix recent regression, by |
| 745 |
looking at cmp.file[1 - f].err rather than cmp.file[1 - f].desc. |
| 746 |
Also, do not bother checking for EBADF, as that’s no longer |
| 747 |
possible now that diff uses xstdopen. |
| 748 |
|
| 749 |
2023-08-05 Paul Eggert <[email protected]> |
| 750 |
|
| 751 |
diff: minor errno performance tweak |
| 752 |
* src/diff.c (get_errno): New function. |
| 753 |
(compare_files): Use it. |
| 754 |
|
| 755 |
diff: prefer openat+fstat more often |
| 756 |
This closes some more races, by using openat+fstat instead |
| 757 |
of fstatat+openat which can get confused by some other process |
| 758 |
renaming files in the meantime. Not all races are closed of course. |
| 759 |
* bootstrap.conf (gnulib_modules): Add d-type. |
| 760 |
* src/diff.c (errno_encode, errno_decode): Remove, as file |
| 761 |
descriptors are no longer portmanteau variables. All uses removed. |
| 762 |
(detype_from_mode): New function. |
| 763 |
(dir_p): Use detype, not stat.st_mode. |
| 764 |
(compare_files): New args DETYPE0 and DETYPE1. All uses changed. |
| 765 |
Update detype and err as new info arrives. |
| 766 |
Adjust to desc's new use (no longer encodes errno). |
| 767 |
Do not ignore lseek failures on regular files. |
| 768 |
Prefer openat+fstat to fstatat+openat when detype shows that it's safe, |
| 769 |
and avoid both fstat and fstatat if detype suffices. |
| 770 |
Use ‘error’ with errno value rather than setting error |
| 771 |
and then calling perror_with_name. Coalesce two of these |
| 772 |
error diagnostics into one by moving an error check before |
| 773 |
the diagnostic is output. Coalesce two calls to diff_dirs. |
| 774 |
Print file type based on detype if available, |
| 775 |
in case neither fstat nor fstatat was called. |
| 776 |
* src/diff.h (enum detype): New type. |
| 777 |
(struct file_data): New slots err, detype. |
| 778 |
(NONEXISTENT, UNOPENED): Renumber so that -1 stands for open failed. |
| 779 |
* src/dir.c (HAVE_STRUCT_DIRENT_D_TYPE): Default to false. |
| 780 |
(dir_read): Return to caller the d_type, if available. |
| 781 |
(diff_dirs): Pass detype to compare_files. |
| 782 |
|
| 783 |
maint: use O_CLOEXEC on streams |
| 784 |
* bootstrap.conf (gnulib_modules): Add fopen-gnu, for the "e" flag. |
| 785 |
* src/diff3.c (main): |
| 786 |
* src/sdiff.c (main, edit): |
| 787 |
Use the "e" flag. |
| 788 |
|
| 789 |
maint: use O_CLOEXEC |
| 790 |
* src/cmp.c (main): |
| 791 |
* src/diff.c (compare_files): |
| 792 |
* src/dir.c (dir_read): |
| 793 |
Use O_CLOEXEC when opening files that need not be shared with |
| 794 |
child processes. |
| 795 |
|
| 796 |
diff: tiny tweak to compare_files performance |
| 797 |
* src/diff.c (compare_files): Compare ints, not strings. |
| 798 |
|
| 799 |
diff: simplify diff_dirs API |
| 800 |
* src/diff.c (compare_files): |
| 801 |
Now extern, not static, so that diff_dirs can call it. |
| 802 |
* src/dir.c (diff_dirs): Remove arg HANDLE_FILE, since it was |
| 803 |
always compare_files. Just call compare_files directly. |
| 804 |
All uses changed. |
| 805 |
|
| 806 |
diff: simplify diff_dirs |
| 807 |
* src/dir.c (diff_dirs): Simplify and help the compiler a bit. |
| 808 |
|
| 809 |
diff: tune errno handling |
| 810 |
* src/diff.c (errno_encode): Add dassert to help debugging, |
| 811 |
and help the compiler when not debugging. |
| 812 |
|
| 813 |
diff: avoid a race when opening files |
| 814 |
* src/diff.c (O_PATHSEARCH): New constant. |
| 815 |
(compare_files): Prefer openat+fstat to fstatat+openat, |
| 816 |
as it avoids a race and should be a bit faster. |
| 817 |
|
| 818 |
2023-08-01 Jim Meyering <[email protected]> |
| 819 |
|
| 820 |
maint: avoid new syntax-check failures |
| 821 |
* cfg.mk (_gl_TS_extern): Add SYSTEM_EXTERN to the list. |
| 822 |
* src/system.h (stat_size): Hoist function name onto the |
| 823 |
preceding line, to placate syntax-check rule. |
| 824 |
|
| 825 |
2023-07-30 Paul Eggert <[email protected]> |
| 826 |
|
| 827 |
diff: fail faster in odd --ignore-file-name-case usage |
| 828 |
* src/diff.c (compare_files): |
| 829 |
Fail faster with ‘diff --ignore-file-name case - .’. |
| 830 |
|
| 831 |
maint: be more careful about st_size |
| 832 |
* src/cmp.c (main): st_size == -2 now means the rest of |
| 833 |
the stat buf is unspecified; st_size == -1 now merely |
| 834 |
means st_size itself is unspecified. All uses changed. |
| 835 |
* src/analyze.c (diff_2_files): |
| 836 |
* src/diff.c (compare_files): |
| 837 |
Trust st_size == 0, as this is now reliable. |
| 838 |
* src/diff.c (compare_files): Don’t always trust st_size of /proc |
| 839 |
files and symlinks. |
| 840 |
* src/system.h (SYSTEM_EXTERN): New macro. |
| 841 |
(proc_dev, symlink_size_ok): New vars. |
| 842 |
(stat_size): New function. |
| 843 |
|
| 844 |
2023-07-28 Paul Eggert <[email protected]> |
| 845 |
|
| 846 |
diff: omit no-longer-safe optimization |
| 847 |
* src/diff.c (compare_files): Remove optimization for size-zero |
| 848 |
files that is no longer valid for unusual combinations like ‘touch |
| 849 |
mt; diff /proc/kmsg mt’ where one file is an empty regular file |
| 850 |
and the other is an unreadable /proc file with st_size zero but |
| 851 |
where the actual size is nonzero. |
| 852 |
|
| 853 |
2023-07-27 Paul Eggert <[email protected]> |
| 854 |
|
| 855 |
diff: tweak context timestamp buffer size |
| 856 |
* src/context.c (print_context_label): Use a more conservative |
| 857 |
upper bound for timestamp length. In practice this change |
| 858 |
makes no difference: it’s more for documentation. |
| 859 |
|
| 860 |
2023-07-25 Paul Eggert <[email protected]> |
| 861 |
|
| 862 |
diff: stop using sprintf |
| 863 |
The calls to sprintf are not needed any more, since the resulting |
| 864 |
string is now immediately passed to fprintf. |
| 865 |
* src/context.c (print_context_label): Redo to call |
| 866 |
|
| 867 |
maint: translate openat-die.c |
| 868 |
* po/POTFILES.in: Re-add lib/openat-die.c. |
| 869 |
|
| 870 |
diff3: simplify by assuming !GCC_LINT |
| 871 |
GCC's static checks no longer seem to warn about the code |
| 872 |
protected by GCC_LINT, so remove its last uses, which were in diff3. |
| 873 |
(Or perhaps it was valgrind or gcc -fsanitize=address leak |
| 874 |
checking instead? But in that case there are other false |
| 875 |
positives and we don’t worry about them either.) This code was |
| 876 |
problematic anyway when introduced (as witness the corresponding |
| 877 |
test case) and it slowed diff3 down a bit. |
| 878 |
* configure.ac (GCC_LINT): Remove. All uses removed. |
| 879 |
* src/diff3.c: Simplify by assuming !GCC_LINT. |
| 880 |
|
| 881 |
diff: simplify SIGSTOP/SIGTSTP porting |
| 882 |
* src/util.c (SIGSTOP, SIGTSTP): Default to 0. |
| 883 |
(process_signals, is_tstp_index): Simplify by using the default. |
| 884 |
(sig): Adjust to default. |
| 885 |
|
| 886 |
2023-07-25 Bruno Haible <[email protected]> |
| 887 |
|
| 888 |
maint: Fix build failures mingw 10 and MSVC 14.30 |
| 889 |
* bootstrap.conf (gnulib_modules): Add popen, pclose, readdir, |
| 890 |
readlinkat, sigaction. |
| 891 |
* configure.ac: Don't enable _FORTIFY_SOURCE on mingw. |
| 892 |
* src/util.c (process_signals): If SIGTSTP is not defined, |
| 893 |
stop_signal_count is zero, therefore disable the stop signal processing. |
| 894 |
(sig): If SIGHUP is not defined, don't list it. If SIGPIPE is not |
| 895 |
defined, don't list it. |
| 896 |
|
| 897 |
2023-07-24 Paul Eggert <[email protected]> |
| 898 |
|
| 899 |
maint: port better to MS-Windows |
| 900 |
Problem reported by Gisle Vanem <https://bugs.gnu.org/64811>. |
| 901 |
* bootstrap.conf (gnulib_modules): Add fstatat, openat. |
| 902 |
|
| 903 |
diff: compare symbolic links more efficently |
| 904 |
Also, remove dependence on xreadlink. |
| 905 |
* bootstrap.conf (gnulib_modules): Add careadlinkat. |
| 906 |
Remove xreadlink (which depends on careadlinkat). |
| 907 |
* src/diff.c: Include careadlinkat.h, not xreadlink.h. |
| 908 |
(compare_files): Don’t bother to read links if their lengths differ. |
| 909 |
Use careadlinkat instead of xreadlink so that normally malloc need |
| 910 |
not be called. |
| 911 |
|
| 912 |
2023-07-23 Paul Eggert <[email protected]> |
| 913 |
|
| 914 |
cmp: fix recent off-by-1 error |
| 915 |
* src/cmp.c (cmp): Subtract 1 from byte_number before printing, |
| 916 |
fixing an off-by-one error in the previous patch. |
| 917 |
|
| 918 |
build: update gnulib submodule to latest |
| 919 |
|
| 920 |
cmp: remove dependence on inttostr |
| 921 |
* bootstrap.conf (gnulib_modules): Remove inttostr. |
| 922 |
* src/cmp.c: Do not include inttostr.h. |
| 923 |
(cmp): Use C99-style PRIdMAX rather than Gnulib inttostr, |
| 924 |
as PRIdMAX is simpler and (thanks to Gnulib) is portable. |
| 925 |
|
| 926 |
diff: omit HAVE_STRUCT_STAT_ST_SPARE1 |
| 927 |
* src/diff.c (main): Remove reference to macro |
| 928 |
HAVE_STRUCT_STAT_ST_SPARE1, which hasn’t been defined since 2007. |
| 929 |
|
| 930 |
diff: get current time lazily, via C11 |
| 931 |
* bootstrap.conf (gnulib_modules): Remove gettime; add timespec_get. |
| 932 |
* src/context.c (print_context_label): Get current time lazily. |
| 933 |
Use C11 timespec_get rather than older Gnulib gettime function. |
| 934 |
* src/diff.c: Do not include timespec.h. |
| 935 |
(set_mtime_to_now): Remove. All uses removed. |
| 936 |
|
| 937 |
2023-07-22 Paul Eggert <[email protected]> |
| 938 |
|
| 939 |
diff: check file attributes more carefully |
| 940 |
* src/system.h: Include stat-time.h, timespec.h. |
| 941 |
* bootstrap.conf (gnulib_modules): Add timespec, for timespec_cmp. |
| 942 |
(same_file_attributes): Check birthtime and ns components too. |
| 943 |
Check attributes earlier if they are more likely to differ. |
| 944 |
|
| 945 |
2023-07-21 Paul Eggert <[email protected]> |
| 946 |
|
| 947 |
diff: don’t think mbcel_strcasecmp preserves errno |
| 948 |
* configure.ac: Do not check for strcasecoll (which doesn’t exist) |
| 949 |
or stricoll (not worth the porting hassle, as it doesn’t set errno). |
| 950 |
* src/dir.c: Always include mbcel.h, since we now always |
| 951 |
use mbcel_strcasecmp. |
| 952 |
(strcasecoll): Remove |
| 953 |
(compare_collated, diff_dirs): Do the setjump business only when |
| 954 |
not ignoring file name case, since mbcel_strcasecmp doesn’t fail |
| 955 |
and doesn’t set errno. This fixes a bug in recent changes, |
| 956 |
which incorrectly assumed mbcel_strcasecmp preserves errno. |
| 957 |
|
| 958 |
* src/dir.c: |
| 959 |
Always include mbcel.h, since we now always compile a call |
| 960 |
to mbcel_strcasecmp. |
| 961 |
(strcasecoll): Remove. It’s not worth bothering to port to |
| 962 |
Microsoft stricoll’s idiosyncrasies; mbcel_strcasecmp is good enough. |
| 963 |
And nobody ever implemented strcasecoll. |
| 964 |
|
| 965 |
2023-07-21 Paul Eggert <[email protected]> |
| 966 |
|
| 967 |
diff: simplify qsort comparison function |
| 968 |
* src/dir.c (compare_names_for_qsort): Simplify. |
| 969 |
|
| 970 |
diff: sort multi-byte file names better |
| 971 |
* bootstrap.conf (gnulib_modules): Add builtin-expect. |
| 972 |
* lib/mbcel-strcasecmp.c: New file. |
| 973 |
* lib/Makefile.am (libdiffutils_a_SOURCES): Add it. |
| 974 |
* lib/mbcel.h (MBCEL_LEN_MAX, MBCEL_ENCODING_ERROR_SHIFT) |
| 975 |
(MBCEL_UCHAR_FITS, MBCEL_UCHAR_EASILY_FITS): New constants. |
| 976 |
(_GL_LIKELY): New macro. |
| 977 |
(mbcel_scan): Use it. Simplify NetBSD code. |
| 978 |
(mbcel_scant, mbcel_scanz, mbcel_cmp, mbcel_casecmp): New functions. |
| 979 |
* src/dir.c (strcasecoll): Move defn here from system.h, |
| 980 |
since only dir.c needs it. Use mbcel_strcasecmp instead |
| 981 |
of strcasecmp. |
| 982 |
|
| 983 |
diff: remove diff_dirs ‘volatile’ |
| 984 |
* src/dir.c (diff_dirs): Omit ‘volatile’, as it’s no longer |
| 985 |
needed with the current use of setjmp. |
| 986 |
|
| 987 |
2023-07-19 Paul Eggert <[email protected]> |
| 988 |
|
| 989 |
cmp: remove IF_LINT |
| 990 |
* src/cmp.c (cmp): Redo to avoid the need for IF_LINT, while still |
| 991 |
pacifying GCC. The machine code is a bit smaller too. The price |
| 992 |
is a portmanteau variable, but it’s worth it. |
| 993 |
* src/system.h (IF_LINT): Remove. |
| 994 |
|
| 995 |
diff: simplify away an ‘IF_LINT (volatile)’ |
| 996 |
* src/dir.c (find_dir_file_pathname): Simplify. There is no |
| 997 |
longer a need for volatile or setjmp, now that dir_read does all |
| 998 |
the tricky sorting and longjmping. |
| 999 |
|
| 1000 |
diff: improve -S dir-reading performance |
| 1001 |
* src/dir.c (dir_read): New args STARTFILE and STARTFILE_ONLY, |
| 1002 |
to avoid unnecessary allocation and copying. All uses changed. |
| 1003 |
* tests/starting-file: New test. |
| 1004 |
* tests/Makefile.am (TESTS): Add it. |
| 1005 |
|
| 1006 |
diff: fix recently-introduced &noparent bug |
| 1007 |
* src/dir.c (diff_dirs, dir_loop): The ‘parent’ member is now |
| 1008 |
&noparent (instead of null) if there is no parent. Patch |
| 1009 |
a couple of uses that were missed earlier. |
| 1010 |
|
| 1011 |
2023-07-18 Paul Eggert <[email protected]> |
| 1012 |
|
| 1013 |
diff: fix mbcel bug on NetBSD |
| 1014 |
* lib/mbcel.h (mbcel_t): |
| 1015 |
Fix bug on NetBSD as I read its code incorrectly earlier. |
| 1016 |
Problem reported by Bruno Haible in: |
| 1017 |
https://lists.gnu.org/r/bug-gnulib/2023-07/msg00085.html |
| 1018 |
Mostly for documentation, use _GL_ATTRIBUTE_MAY_ALIAS to remind |
| 1019 |
compiler not to rely on strict C semantics for unions. |
| 1020 |
|
| 1021 |
maint: convert source from non-UTF-8 |
| 1022 |
* po/en.po: Convert from Latin-1 to UTF-8. |
| 1023 |
This was the only remaining file under Git control |
| 1024 |
that still used an encoding other than UTF-8. |
| 1025 |
|
| 1026 |
diff: use openat, fstatat when recursive |
| 1027 |
This should improve performance when doing recursive comparisons. |
| 1028 |
Currently there is no attempt to avoid file descriptor exhaustion, |
| 1029 |
just as previously there is no attempt to avoid file names |
| 1030 |
that provoke ENAMETOOLONG. Because of this change, ‘diff - A/B’ |
| 1031 |
now works correctly when standard input is a directory. |
| 1032 |
* .gitignore: Add lib/dirent.h. |
| 1033 |
* bootstrap.conf (gnulib_modules): Add fdopendir. |
| 1034 |
* src/diff.c (main): Initialize noparent’s desc to AT_FDCWD. |
| 1035 |
(compare_files): Use fstatat with parent directory’s file |
| 1036 |
descriptor and relative name, instead of lstat or stat. |
| 1037 |
Likewise for openat and open. |
| 1038 |
* src/diff.h (struct file_data): New member ‘dirstream’. |
| 1039 |
(struct comparison): The ‘parent’ member is now &noparent (instead |
| 1040 |
of null) if there is no parent. All uses changed. |
| 1041 |
(curr): New toplevel variable, replacing ‘files’. All uses changed. |
| 1042 |
* src/dir.c: Include dirname.h, for last_component. |
| 1043 |
(dir_read): New arg PARENTDIRFD. Arg DIR is no longer |
| 1044 |
pointer-to-const since DIR->desc and DIR->dirstream are now |
| 1045 |
updated. Use PARENTDIRFD to open the directory via |
| 1046 |
opendat+fdopendir instead of via opendir. Update new dirstream |
| 1047 |
component instead of closing the directory, since it’s now the |
| 1048 |
caller’s responsibility to close the directory because callers now |
| 1049 |
want the file descriptor. All callers changed. |
| 1050 |
(diff_dirs): First arg CMP is no longer pointer-to-const since |
| 1051 |
CMP->file is updated by dir_read. All callers changed. |
| 1052 |
(find_dir_file_pathname): First arg is now struct file_data *, |
| 1053 |
not merely a file name. All callers changed. |
| 1054 |
* tests/stdin: Test new behavior when stdin is a directory. |
| 1055 |
|
| 1056 |
maint: stop exempting lib/mbcel.h |
| 1057 |
* cfg.mk (exclude_file_name_regexp--sc_GPL_version): Remove. |
| 1058 |
|
| 1059 |
2023-07-18 Jim Meyering <[email protected]> |
| 1060 |
|
| 1061 |
maint: avoid syntax-check failure |
| 1062 |
* po/POTFILES.in: Remove openat-die.c. |
| 1063 |
It is no longer used. Reported by Bruno Haible in |
| 1064 |
https://lists.gnu.org/r/diffutils-devel/2023-07/msg00018.html |
| 1065 |
|
| 1066 |
2023-07-17 Paul Eggert <[email protected]> |
| 1067 |
|
| 1068 |
doc: document tab behavior better |
| 1069 |
* doc/diffutils.texi (Tabs): Document issues with tabs, |
| 1070 |
encoding errors, and non-ASCII characters. |
| 1071 |
|
| 1072 |
diff: remove find_reverse_change |
| 1073 |
This is a minor refactoring and simplification. |
| 1074 |
* src/context.c (find_hunk): |
| 1075 |
* src/util.c (find_change): Rename locals for clarity. |
| 1076 |
(find_reverse_change): Remove. All uses removed. |
| 1077 |
|
| 1078 |
diff: assert-related cleanup |
| 1079 |
Regularize how assertions are done by using ‘unreachable’ or a new |
| 1080 |
macro ‘dassert’, or by removing unnecessary assertions. |
| 1081 |
* src/analyze.c (diff_2_files): |
| 1082 |
* src/util.c (get_funky_string, parse_diff_color) |
| 1083 |
(set_color_context): |
| 1084 |
Prefer unreachable to abort for code where it’s easy to |
| 1085 |
see that it cannot be reached. |
| 1086 |
* src/context.c (ATTRIBUTE_PURE): |
| 1087 |
* src/util.c (print_message_queue): |
| 1088 |
Prefer ‘dassert (X);’ to ‘if (!X) abort ();’. |
| 1089 |
* src/diff.c: Do not include assert.h; system.h does that if needed. |
| 1090 |
(usage): Remove the need for an assert by using fputs and fwrite |
| 1091 |
rather than printf. This is clearer anyway. |
| 1092 |
(compare_files): Remove ‘assert’ that hardware will check. |
| 1093 |
Prefer dassert to assert. |
| 1094 |
* src/ifdef.c (do_printf_spec): |
| 1095 |
Prefer dassert to comment. |
| 1096 |
* src/system.h (dassert): New macro. Include assert.h if needed. |
| 1097 |
|
| 1098 |
maint: prefer puts to printf |
| 1099 |
* src/cmp.c (usage): |
| 1100 |
* src/util.c (begin_output): |
| 1101 |
Simplify by using puts instead of printf. |
| 1102 |
|
| 1103 |
diff: improve dir comments |
| 1104 |
* src/dir.c: Improve comments. |
| 1105 |
|
| 1106 |
diff: improve NONEXISTENT readability |
| 1107 |
* src/diff.c (NONEXISTENT, UNOPENED): Move from here ... |
| 1108 |
* src/diff.h: ... to here. |
| 1109 |
* src/dir.c (dir_read, diff_dirs): Use name for constants. |
| 1110 |
|
| 1111 |
diff: link to LIB32CONV |
| 1112 |
* src/Makefile.am (LDADD): Add LIB32CONV; needed for recent |
| 1113 |
char32_t changes on some platforms. |
| 1114 |
|
| 1115 |
diff: reindent recent changes |
| 1116 |
* src/io.c (lines_differ): A bit less indenting. |
| 1117 |
|
| 1118 |
maint: translate lib/openat-die.c |
| 1119 |
* po/POTFILES.in: Add lib/openat-die.c. |
| 1120 |
|
| 1121 |
maint: mbcel.h is LGPL 3 not 2.1 |
| 1122 |
* lib/mbcel.h: Make it LGPL 3, not 2.1, to pass "make syntax-check". |
| 1123 |
|
| 1124 |
2023-07-12 Jim Meyering <[email protected]> |
| 1125 |
|
| 1126 |
maint: avoid a new syntax-check failure |
| 1127 |
* cfg.mk (exclude_file_name_regexp--sc_GPL_version): Exempt mbcel.h, |
| 1128 |
which is GPL-2.1. Remove this exemption if/when mbcel.h moves to gnulib. |
| 1129 |
|
| 1130 |
2023-07-11 Paul Eggert <[email protected]> |
| 1131 |
|
| 1132 |
diff: tweak mbstate_t performance |
| 1133 |
* lib/mbcel.h (mbcel_scan): Improve performance when initializing |
| 1134 |
an mbstate_t. |
| 1135 |
|
| 1136 |
2023-07-10 Paul Eggert <[email protected]> |
| 1137 |
|
| 1138 |
diff: add mbcel checks, compiler advice |
| 1139 |
* lib/mbcel.h: Include limits.h, stddef.h. |
| 1140 |
Add static assertions that MB_LEN_MAX has a sane value, |
| 1141 |
as the code relies on this. Help GCC by advising |
| 1142 |
it that mbrtoc32 never returns a value between |
| 1143 |
MB_LEN_MAX + 1 and (size_t) -1 / 2 inclusive. |
| 1144 |
|
| 1145 |
2023-07-09 Paul Eggert <[email protected]> |
| 1146 |
|
| 1147 |
diff: tweak mbcel_scan performance |
| 1148 |
* lib/mbcel.h (mbcel_scan): Check top bit of size |
| 1149 |
rather than comparing it to MB_LEN_MAX, as this |
| 1150 |
typically lets the compiler generate tighter code. |
| 1151 |
|
| 1152 |
maint: fix mbcel comment |
| 1153 |
|
| 1154 |
maint: update .gitignore |
| 1155 |
|
| 1156 |
diff: count newlines for lines_differ lengths |
| 1157 |
* src/io.c (lines_differ): Line lengths now count trailing |
| 1158 |
newlines, as this is a bit simpler. Caller changed. |
| 1159 |
|
| 1160 |
diff: refactor lines_differ location |
| 1161 |
* src/io.c (lines_differ): Move here ... |
| 1162 |
* src/util.c: ... from here, since it needs to be kept consistent |
| 1163 |
with find_and_hash_each line anyway, and there is no reason to |
| 1164 |
make it an extern function. |
| 1165 |
|
| 1166 |
diff: simplify recent --side-by-side changes |
| 1167 |
* src/side.c: Include mbcel.h instead of uchar.h. |
| 1168 |
(print_half_line): Simplify by using mbcel_scan rather than |
| 1169 |
mbrtoc32. Although this removes support for hypothetical platforms, |
| 1170 |
it makes the code easier to follow and a bit more efficient. |
| 1171 |
|
| 1172 |
diff: support multi-byte comparison |
| 1173 |
* bootstrap.conf (gnulib_modules): Add c32isspace, c32tolower. |
| 1174 |
* lib/Makefile.am (noinst_HEADERS): Add mbcel.h. |
| 1175 |
(libdiffutils_a_SOURCES): Add mbcel.c |
| 1176 |
* lib/mbcel.c, lib/mbcel.h: New files. |
| 1177 |
* src/io.c: Include mbcel.h, uchar.h. |
| 1178 |
(hash): 2nd arg is now hash_value, not merely unsigned char, |
| 1179 |
since the caller might pass a char32_t now. |
| 1180 |
(find_and_hash_each_line): Support multi-byte input. |
| 1181 |
* src/util.c: Include mbcel.h, uchar.h. |
| 1182 |
(lines_differ): New args S1LEN, S2LEN, needed for mbcel_scan. |
| 1183 |
Caller changed. Support multi-byte input. |
| 1184 |
* tests/ignore-case: New file. |
| 1185 |
* tests/Makefile.am (TESTS): Add it. |
| 1186 |
* tests/ignore-tab-expansion: Add UTF-8 test. |
| 1187 |
* tests/init.cfg (require_utf8_locale_): New function. |
| 1188 |
* tests/side-by-side: Use it. Add a column-counting test. |
| 1189 |
|
| 1190 |
2023-07-06 Paul Eggert <[email protected]> |
| 1191 |
|
| 1192 |
diff: simplify recent mbrtoc32 improvement |
| 1193 |
* src/side.c (print_half_line): Simplify. Don't worry about |
| 1194 |
initializing mbstate until it's needed. Avoid int overflow if the |
| 1195 |
byte sequence represents more than INT_MAX columns. Avoid need |
| 1196 |
for separate TP1 local. |
| 1197 |
|
| 1198 |
2023-07-06 Bruno Haible <[email protected]> |
| 1199 |
|
| 1200 |
tests: Add a side-by-side output test |
| 1201 |
* tests/side-by-side: New file. |
| 1202 |
* tests/Makefile.am (TESTS): Add it. |
| 1203 |
|
| 1204 |
diff: Improve handling of mbrtoc32 result |
| 1205 |
* src/side.c (print_half_line): When mbrtoc32 has left the mbstate not |
| 1206 |
in the initial state, continue calling mbrtoc32. |
| 1207 |
|
| 1208 |
2023-07-05 Paul Eggert <[email protected]> |
| 1209 |
|
| 1210 |
diff: ignore tabs consistently with expanding them |
| 1211 |
* src/io.c (find_and_hash_each_line): |
| 1212 |
* src/util.c (lines_differ): |
| 1213 |
Treat '\0', '\a', '\b', '\f', '\r', '\v' consistently with how |
| 1214 |
side.c treats them when expanding them, e.g., backspacing from |
| 1215 |
column 1 is a no-op when counting tab columns. |
| 1216 |
* tests/ignore-tab-expansion: New test. |
| 1217 |
* tests/Makefile.am (TESTS): Add it. |
| 1218 |
|
| 1219 |
diff: don’t backspace before first column |
| 1220 |
* src/util.c (output_1_line): When expanding tabs, treat backspace |
| 1221 |
before column 1 as no-op, since that’s what most devices do. |
| 1222 |
* tests/expand-tabs: New test. |
| 1223 |
* tests/Makefile.am (TESTS): Add it. |
| 1224 |
|
| 1225 |
diff: tweak -y performance for $ @ ` \a |
| 1226 |
* src/side.c (print_half_line): Improve performance for '$', '@', |
| 1227 |
'`', and '\a' since they also are portable in practice nowadays. |
| 1228 |
|
| 1229 |
2023-07-05 Bruno Haible <[email protected]> |
| 1230 |
|
| 1231 |
diff: Fix "diff -y" output |
| 1232 |
This fixes a regression from 2023-07-04. |
| 1233 |
|
| 1234 |
* src/side.c (print_half_line): Restore the assignment to out_position. |
| 1235 |
|
| 1236 |
2023-07-04 Paul Eggert <[email protected]> |
| 1237 |
|
| 1238 |
doc: mention bug#64461 in NEWS |
| 1239 |
|
| 1240 |
2023-07-04 Bruno Haible <[email protected]> |
| 1241 |
|
| 1242 |
diff: Fix output of "diff -l -y" for non-ASCII input files |
| 1243 |
* src/side.c (print_half_line): Output the multibyte character to out, |
| 1244 |
not stdout. |
| 1245 |
|
| 1246 |
2023-07-04 Paul Eggert <[email protected]> |
| 1247 |
|
| 1248 |
diff: fix unspecified mbstate after encoding error |
| 1249 |
* src/side.c (print_half_line): Clear mbstate after encoding |
| 1250 |
error, since it’s unspecified. |
| 1251 |
|
| 1252 |
diff: optimize -y treatment of NUL |
| 1253 |
* src/side.c (print_half_line): Treat '\0' like other control |
| 1254 |
characters with print width zero. |
| 1255 |
|
| 1256 |
diff: fix unlikely intmax_t overflow |
| 1257 |
* src/side.c (print_half_line): Avoid undefined behavior if the |
| 1258 |
input column position overflows. Instead, simply stop printing. |
| 1259 |
|
| 1260 |
2023-06-28 Paul Eggert <[email protected]> |
| 1261 |
|
| 1262 |
maint: prefer ‘static_assert’ |
| 1263 |
Prefer C23-style ‘static_assert’ to traditional Gnulib ‘verify’. |
| 1264 |
* bootstrap.conf (gnulib_modules): Add assert-h. |
| 1265 |
* src/context.c, src/io.c, src/system.h: Use ‘static_assert’. |
| 1266 |
|
| 1267 |
diff: fix xpalloc-related signed integer overflow |
| 1268 |
Problem reported by Gisle Vanem <https://bugs.gnu.org/64316>. |
| 1269 |
* src/io.c (find_and_hash_each_line): |
| 1270 |
Rely on xpalloc to check for integer overflow instead |
| 1271 |
of trying to do it ourselves incorrectly, with old code |
| 1272 |
that predated the use of xpalloc. |
| 1273 |
* src/system.h: Verify that LIN_MAX == IDX_MAX, |
| 1274 |
since the code now relies on this. |
| 1275 |
* tests/Makefile.am (TESTS): Add bug-64316. |
| 1276 |
* tests/bug-64316: New file |
| 1277 |
|
| 1278 |
diff: tweak mbrtoc32 use |
| 1279 |
* src/side.c (print_half_line): Use more-intuitive |
| 1280 |
way to test whether mbrtoc32 found a non-null character. |
| 1281 |
|
| 1282 |
2023-06-27 Paul Eggert <[email protected]> |
| 1283 |
|
| 1284 |
diff: fix xpalloc typo |
| 1285 |
Problem reported by Gisle Vanem (Bug#64316). |
| 1286 |
* src/dir.c (dir_read): Also set local var cache. |
| 1287 |
|
| 1288 |
2023-06-26 Paul Eggert <[email protected]> |
| 1289 |
|
| 1290 |
maint: pacify "make syntax-check" |
| 1291 |
|
| 1292 |
cmp: make -bl locale-independent again |
| 1293 |
* src/cmp.c (sprintc): Use c_isprint, not isprint, fixing a bug I |
| 1294 |
introduced in 2004. |
| 1295 |
* tests/cmp: Test for the bug. |
| 1296 |
|
| 1297 |
diff: omit c-ctype.h double-include |
| 1298 |
* src/context.c: Don’t include c-ctype.h, |
| 1299 |
as system.h does that for us. |
| 1300 |
|
| 1301 |
maint: omit unneeded 0 args to ‘open’ |
| 1302 |
* src/cmp.c (main): |
| 1303 |
* src/diff.c (compare_files): Omit third arg 0 to ‘open’. |
| 1304 |
This was never necessary, and I suspect was put in only to pacify |
| 1305 |
no-longer-relevant compilers. |
| 1306 |
|
| 1307 |
diff: avoid ‘if (... = ...)’ |
| 1308 |
* src/diff.c (compare_files): |
| 1309 |
* src/ifdef.c (format_group, print_ifdef_lines): |
| 1310 |
* src/io.c (find_and_hash_each_line): |
| 1311 |
Don’t put assignments into ‘if (...)’, of ‘switch (...)’, |
| 1312 |
as per GNU coding standards. |
| 1313 |
|
| 1314 |
cmp: tune 'cmp A B >/dev/null' |
| 1315 |
* src/cmp.c (main): Also optimize 'cmp A B >/dev/null' |
| 1316 |
when A and B are regular files with different nonzero sizes. |
| 1317 |
* tests/cmp: Test this. |
| 1318 |
|
| 1319 |
cmp: support -n N with huge N |
| 1320 |
* src/cmp.c (bytes): Use INTMAX_MAX, not -1, for “infinity”. |
| 1321 |
This simplifies the code and is not a value that can be exhausted |
| 1322 |
these days. |
| 1323 |
(main, cmp): Treat very large -n values as “infinity”. |
| 1324 |
* tests/cmp: Test this. |
| 1325 |
|
| 1326 |
cmp: avoid syscall when !S_ISCHR (stdout) |
| 1327 |
* src/cmp.c (main): Avoid a 'stat' call in the common case when |
| 1328 |
standard output is not a character special device. This is valid |
| 1329 |
because /dev/null is a character special device. |
| 1330 |
|
| 1331 |
2023-06-25 Paul Eggert <[email protected]> |
| 1332 |
|
| 1333 |
cmp: improve offset width calculation |
| 1334 |
* src/cmp.c (cmp): When calculating the offset width, |
| 1335 |
Don’t attempt to squeeze a file position into an int |
| 1336 |
as that might trap or yield the wrong answer. |
| 1337 |
Also, treat “negative” file sizes as zero; this can |
| 1338 |
happen if the initial file offset is past EOF. |
| 1339 |
|
| 1340 |
cmp: work around lseek bugs |
| 1341 |
* src/cmp.c (ignore_initial): Now an array of intmax_t not off_t. |
| 1342 |
This allows cmp -i N to work better on platforms where intmax_t |
| 1343 |
is wider than off_t, N fits in the former and not the latter, |
| 1344 |
and the input is not a regular file. All uses changed. |
| 1345 |
(cmp): Instead of seeking to file end when -i N is huge, |
| 1346 |
simply pretend that we read zero bytes. This avoids some |
| 1347 |
kernel lseek bugs. |
| 1348 |
|
| 1349 |
cmp: do not try to read 2**64 - 1 bytes |
| 1350 |
* src/cmp.c (cmp): Do not store a negative value into |
| 1351 |
bytes_to_read, as that causes block_read to be passed |
| 1352 |
SIZE_MAX as the buffer size. |
| 1353 |
|
| 1354 |
2023-06-25 Jim Meyering <[email protected]> |
| 1355 |
|
| 1356 |
cmp: avoid new tests/cmp failure |
| 1357 |
* src/cmp.c (file_position): Set position to EOF by calling lseek |
| 1358 |
with an offset of 0 and SEEK_END, rather than a SEEK_CURR-relative |
| 1359 |
offset of the maximum off_t value. The latter would evoke failure on |
| 1360 |
fedora 38/glibc-2.37/linux 6.2.15-300.fc38.x86_64: |
| 1361 |
lseek(3, 9223372036854775807, SEEK_CUR) = -1 EINVAL |
| 1362 |
The failing test was this (which must now exit 0, but did not): |
| 1363 |
echo a>a;echo b>b; src/cmp -i 99999999999999999999 a b |
| 1364 |
|
| 1365 |
2023-06-24 Jim Meyering <[email protected]> |
| 1366 |
|
| 1367 |
maint: avoid syntax-check failure |
| 1368 |
* NEWS (Bug fixes): Move the two new items from the section |
| 1369 |
for already-relesed 3.10 into the section for the next release. |
| 1370 |
|
| 1371 |
2023-06-24 Bruno Haible <[email protected]> |
| 1372 |
|
| 1373 |
build: Ensure that makeinfo ≥ 6.8 checks the @menu structure |
| 1374 |
See <https://lists.gnu.org/r/bug-texinfo/2023-06/msg00015.html>. |
| 1375 |
|
| 1376 |
* doc/Makefile.am (MAKEINFO): New variable. |
| 1377 |
* cfg.mk (_makefile_at_at_check_exceptions): New variable. |
| 1378 |
|
| 1379 |
2023-06-24 Paul Eggert <[email protected]> |
| 1380 |
|
| 1381 |
cmp: handle huge -i N with regular files |
| 1382 |
* NEWS: Document this. |
| 1383 |
* src/cmp.c (specify_ignore_initial): |
| 1384 |
If the value exceeds TYPE_MAXIMUM (off_t), set the correspnding |
| 1385 |
ignore_initial value to -1 instead of reporting an error. |
| 1386 |
(main, cmp, file_position): All uses changed. Hence a huge value |
| 1387 |
will always do the right thing with regular files, which cannot |
| 1388 |
contain more than TYPE_MAXIMUM (off_t) bytes. There still may be |
| 1389 |
EOVERFLOW failures reported for non-regular files, though, as |
| 1390 |
these can be larger. |
| 1391 |
* tests/cmp: Test cmp -i N when N cannot fit into 64 bits. |
| 1392 |
|
| 1393 |
cmp: work around Linux tmpfs bug |
| 1394 |
* lib/cmpbuf.c: Include inttypes.h, for TYPE_MAXIMUM. |
| 1395 |
(block_read): Work around Linux 6.3.8 tmpfs bug. |
| 1396 |
|
| 1397 |
cmp: be more robust if lseek fails |
| 1398 |
* src/cmp.c (main, cmp): If lseek fails, |
| 1399 |
don’t assume the file position is -1. |
| 1400 |
|
| 1401 |
cmp: fix -s bug when comparing /proc files |
| 1402 |
* NEWS: Mention this. |
| 1403 |
* src/cmp.c (main, cmp): Do not trust st_size == 0, as it may |
| 1404 |
be a /proc file. |
| 1405 |
* tests/brief-vs-stat-zero-kernel-lies: Also test cmp -s. |
| 1406 |
|
| 1407 |
2023-06-20 Paul Eggert <[email protected]> |
| 1408 |
|
| 1409 |
doc: mention new SI prefixes |
| 1410 |
* doc/diffutils.texi (cmp Options): Update for new SI prefixes R and Q. |
| 1411 |
Simplify the intro to be more like coreutils. |
| 1412 |
|
| 1413 |
maint: prefer c_isdigit to ISDIGIT |
| 1414 |
c_isdigit is a function supplied by Gnulib, which should |
| 1415 |
be a bit better than our own macro. |
| 1416 |
* bootstrap.conf (gnulib_modules): Add c-ctype. |
| 1417 |
* src/system.h (ISDIGIT): Remove. All calls replaced by c_isdigit. |
| 1418 |
Include <c-ctype.h>, for c_isdigit. |
| 1419 |
|
| 1420 |
maint: omit -Wstack-pointer |
| 1421 |
* configure.ac (WERROR_CFLAGS): Do not use -Wstack-protector. |
| 1422 |
It is not a correctness warning, and it causes a false |
| 1423 |
positive on Ubuntu 23.04 x86-64. |
| 1424 |
|
| 1425 |
2023-06-06 Jim Meyering <[email protected]> |
| 1426 |
|
| 1427 |
build: update gnulib to latest (for maint.mk syntax-check fix) |
| 1428 |
|
| 1429 |
maint: avoid new tight-scope syntax-check failure |
| 1430 |
* src/system.h (floor_log2): Declare with "SYSTEM_INLINE int" |
| 1431 |
on the same line as the function name, to accommodate the |
| 1432 |
tight-scope syntax-check rule. |
| 1433 |
* cfg.mk (_gl_TS_extern): Add SYSTEM_INLINE to the regexp. |
| 1434 |
|
| 1435 |
2023-06-06 Paul Eggert <[email protected]> |
| 1436 |
|
| 1437 |
build: update gnulib submodule to latest |
| 1438 |
|
| 1439 |
maint: update .gitignore |
| 1440 |
* .gitignore: Add *.rej (for 'patch'), lib/error.c. |
| 1441 |
|
| 1442 |
maint: sync bootstrap from Gnulib |
| 1443 |
* bootstrap, tests/init.sh: Copy from Gnulib. |
| 1444 |
|
| 1445 |
diff: switch from wchar_t to char32_t |
| 1446 |
Prefer C11-style char32_t to wchar_t, as char32_t works better on |
| 1447 |
platforms where wchar_t is only 16 bits. |
| 1448 |
* .gitignore: Add lib/uchar.h. |
| 1449 |
* bootstrap.conf (gnulib_modules): Add c32width, mbrtoc32. |
| 1450 |
Remove mbrtowc. Sort. |
| 1451 |
* src/side.c: Include uchar.h instead of wchar.h. |
| 1452 |
(print_half_line): Use c32width and mbrtowc instead of |
| 1453 |
wcwidth and mbrtowc. |
| 1454 |
|
| 1455 |
maint: tell Gnulib diffutils is single-threaded |
| 1456 |
* configure.ac (GNULIB_EXCLUDE_SINGLE_THREAD) |
| 1457 |
(GNULIB_MBRTOWC_SINGLE_THREAD, GNULIB_REGEX_SINGLE_THREAD) |
| 1458 |
(GNULIB_WCHAR_SINGLE_LOCALE): |
| 1459 |
Define, to improve performance a bit in Gnulib. |
| 1460 |
Diffutils is single-threaded and sets locales first. |
| 1461 |
|
| 1462 |
2023-06-03 Paul Eggert <[email protected]> |
| 1463 |
|
| 1464 |
maint: use similar style for parsing options |
| 1465 |
This refactors and reindents option-parsing so that the code looks |
| 1466 |
similar in all three main programs. |
| 1467 |
* src/cmp.c, src/diff3.c, src/sdiff.c (shortopts): New constant. |
| 1468 |
(main): Use it. |
| 1469 |
* src/diff.c (main): Put local inside loop. |
| 1470 |
|
| 1471 |
maint: go back from ‘die’ to ‘error’ |
| 1472 |
* src/Makefile.am (noinst_HEADERS): Remove die.h. |
| 1473 |
* src/die.h: Remove. All uses of ‘die’ replaced with ‘error’, |
| 1474 |
and all includes of die.h removed. |
| 1475 |
This reverts commit 2016-10-16T15:43:[email protected], |
| 1476 |
which is no longer needed now that the Gnulib ‘error’ |
| 1477 |
module arranges for static checking to work with ‘error’. |
| 1478 |
|
| 1479 |
diff: bool, not char, for changed vector |
| 1480 |
* src/diff.h (struct file_data.changed): Now bool instead of char. |
| 1481 |
This shrinks the size of the code generated on GCC x86-64 by 1.6%. |
| 1482 |
Formerly this was char because bool’s size is greater than 1 |
| 1483 |
on some platforms, but those platforms are no longer of so |
| 1484 |
much importance that it’s worth pessimizing on common platforms. |
| 1485 |
All uses changed. |
| 1486 |
|
| 1487 |
maint: be more specific about 0 and 1 |
| 1488 |
* src/analyze.c (NOTE_DELETE, NOTE_INSERT) |
| 1489 |
(discard_confusing_lines, shift_boundaries) |
| 1490 |
(build_reverse_script, build_script, diff_2_files): |
| 1491 |
* src/cmp.c (specify_comparison_type, option_help_msgid, main): |
| 1492 |
* src/diff.c (main, option_help_msgid): |
| 1493 |
* src/diff3.c (main, option_help_msgid, make_3way_diff) |
| 1494 |
(using_to_diff3_block, create_diff3_block, process_diff): |
| 1495 |
* src/dir.c (dir_read): |
| 1496 |
* src/ifdef.c (format_ifdef, format_group, print_ifdef_lines) |
| 1497 |
(do_printf_spec, scan_char_literal): |
| 1498 |
* src/io.c (binary_file_p): |
| 1499 |
* src/sdiff.c (option_help_msgid, lf_snarf, main, trapsigs) |
| 1500 |
(untrapsig): |
| 1501 |
* src/util.c (message, setup_output, begin_output) |
| 1502 |
(finish_output, lines_differ, print_script, print_1_line_nl) |
| 1503 |
(change_letter, analyze_hunk): |
| 1504 |
Prefer more-specific constants like true, false and nullptr |
| 1505 |
to the less-specific 1 and 0. |
| 1506 |
|
| 1507 |
maint: switch from propername to propername-lite |
| 1508 |
* bootstrap.conf (gnulib_modules): Replace propername with |
| 1509 |
propername-lite. |
| 1510 |
* src/Makefile.am (LDADD): Remove $(LIBICONV). Sort. |
| 1511 |
* src/cmp.c, src/diff.c, src/diff3.c, src/sdiff.c (AUTHORS): |
| 1512 |
Use proper_name_lite and gettext instead of proper_name_utf8 and |
| 1513 |
proper_name. |
| 1514 |
|
| 1515 |
maint: modernize GCC warnings, AC_INIT |
| 1516 |
* configure.ac: Pass new args to AC_INIT. |
| 1517 |
(gl_GCC_VERSION_IFELSE): New macro, taken from coreutils. |
| 1518 |
Modernize GCC warnings to agree more with coreutils. |
| 1519 |
|
| 1520 |
maint: remove AM_PROG_CC_C_O cruft |
| 1521 |
* bootstrap.conf (buildreq): Require Automake 1.14 instead of 1.12.2, |
| 1522 |
since AM_PROG_CC_C_O is obsolete as of 1.14. |
| 1523 |
* configure.ac: Don’t use obsolescent AM_PROG_CC_C_O. |
| 1524 |
|
| 1525 |
diff: remove CLOSEDIR_VOID cruft |
| 1526 |
* configure.ac: Don’t use AC_FUNC_CLOSEDIR_VOID; it’s obsolescent. |
| 1527 |
* src/dir.c (dir_read): Simplify by assuming !CLOSEDIR_VOID. |
| 1528 |
|
| 1529 |
diff: don’t limit contexts arbitrarily |
| 1530 |
* src/context.c (find_hunk): |
| 1531 |
Check for overflow when computing non-ignorable threshold. |
| 1532 |
* src/diff.c (main): Limit ‘context’ to LIN_MAX since it is a lin. |
| 1533 |
* src/system.h (CONTEXT_MAX): Remove. |
| 1534 |
|
| 1535 |
diff: calculate log2 faster in io.c |
| 1536 |
* src/io.c (find_identical_ends): Use floor_log2 instead |
| 1537 |
of computing log base 2 by hand. |
| 1538 |
|
| 1539 |
maint: improve floor_log2 comment |
| 1540 |
* src/system.h: Document floor_log2 (0). |
| 1541 |
|
| 1542 |
maint: use same-inode |
| 1543 |
* bootstrap.conf (gnulib_modules): Add same-inode. |
| 1544 |
* src/system.h: Include <same-inode.h>. |
| 1545 |
(same_file): Use SAME_INODE instead of reinventing it. |
| 1546 |
|
| 1547 |
maint: test that cmpbuf.h is self-contained |
| 1548 |
* lib/cmpbuf.c: Include cmpbuf.h before all files but config.h. |
| 1549 |
|
| 1550 |
maint: rely on Gnulib SSIZE_MAX |
| 1551 |
* lib/cmpbuf.c (SSIZE_MAX): Remove, as Gnulib now supplies it. |
| 1552 |
|
| 1553 |
maint: coalesce duplicate MIN, MAX |
| 1554 |
* bootstrap.conf (gnulib_modules): Add minmax. |
| 1555 |
* lib/cmpbuf.c, src/system.h: Include minmax.h. |
| 1556 |
(MIN, MAX): Remove. |
| 1557 |
|
| 1558 |
maint: depend directly on intprops |
| 1559 |
* bootstrap.conf (gnulib_modules): Add intprops, since |
| 1560 |
we are including intprops.h. |
| 1561 |
|
| 1562 |
build: update gnulib submodule to latest |
| 1563 |
|
| 1564 |
2023-05-30 Paul Eggert <[email protected]> |
| 1565 |
|
| 1566 |
maint: even safer word type |
| 1567 |
* src/system.h (word): Change from ‘void *’ to ‘struct incomplete *’ |
| 1568 |
since that’s even less likely to be misused. |
| 1569 |
|
| 1570 |
maint: omit ‘register’ |
| 1571 |
The ‘register’ keyword is no longer needed for optimization. |
| 1572 |
With GCC 13.1 x86-64 compiled with -O2, omitting ‘register’ did not |
| 1573 |
change the generated code. |
| 1574 |
|
| 1575 |
diff: fix unlikely integer overflow |
| 1576 |
* src/analyze.c (discard_confusing_lines): |
| 1577 |
Avoid theoretical possibility of integer overflow. |
| 1578 |
|
| 1579 |
2023-05-30 Paul Eggert <[email protected]> |
| 1580 |
|
| 1581 |
maint: prefer ‘*const’ to ‘* const’ |
| 1582 |
Prefer declarations like ‘char *const *x;’ to ‘char * const *x;’, |
| 1583 |
for consistency between ‘*const’ and ‘*x’, and to highlight the |
| 1584 |
fact that the ‘const’ belongs to the preceding ‘*’ not to the |
| 1585 |
following ‘*’. |
| 1586 |
|
| 1587 |
Similarly for ‘* volatile’. |
| 1588 |
|
| 1589 |
2023-05-30 Paul Eggert <[email protected]> |
| 1590 |
|
| 1591 |
scripts: sync git-hooks from coreutils |
| 1592 |
|
| 1593 |
maint: calculate log base 2 more efficiently |
| 1594 |
* bootstrap.conf (gnulib_modules): Add count-leading-zeros. |
| 1595 |
* src/analyze.c (discard_confusing_lines, diff_2_files): |
| 1596 |
* src/io.c (read_files): |
| 1597 |
Prefer floor_log2 to doing it by hand. |
| 1598 |
* src/cmp.c, src/diff.c, src/diff3.c, src/sdiff.c: |
| 1599 |
Define SYSTEM_INLINE, for system.h. |
| 1600 |
* src/system.h: Include count-leading-zeros.h. |
| 1601 |
(SYSTEM_INLINE): New macro. |
| 1602 |
(LIN_MAX): Verify that it does not exceed IDX_MAX, so that |
| 1603 |
floor_log2 is safe to use for lin values too. |
| 1604 |
(floor_log2): New inline function. |
| 1605 |
|
| 1606 |
maint: use xpalloc |
| 1607 |
* bootstrap.conf (gnulib_modules): Add ialloc, to document |
| 1608 |
the now-direct dependency. |
| 1609 |
* src/diff.c (add_regexp): |
| 1610 |
* src/diff3.c (read_diff): |
| 1611 |
* src/dir.c (dir_read): |
| 1612 |
* src/io.c (slurp, find_and_hash_each_line, find_identical_ends): |
| 1613 |
* src/sdiff.c (diffarg): |
| 1614 |
Prefer xpalloc to doing it by hand. |
| 1615 |
* src/io.c: Include ialloc.h, for irealloc. |
| 1616 |
(equivs_alloc): Now idx_t, not lin, for xpalloc. |
| 1617 |
(sip): Don’t bother subtracting 2 * sizeof (word) from the |
| 1618 |
buffer_lcm upper bound, as later code works anyway now. |
| 1619 |
(slurp): Simplify buffer allocation so that xpalloc can be used. |
| 1620 |
Use irealloc for speculative reallocation, since the code could |
| 1621 |
work anyway if the irealloc fails. Use current->eof to check |
| 1622 |
for EOF, rather than the less-intuitive buffer size checks. |
| 1623 |
|
| 1624 |
maint: prefer signed sizes for allocation |
| 1625 |
* src/analyze.c (discard_confusing_lines, diff_2_files): |
| 1626 |
* src/cmp.c (main): |
| 1627 |
* src/diff.c (main, add_regexp): |
| 1628 |
* src/diff3.c (read_diff): |
| 1629 |
* src/dir.c (dir_read): |
| 1630 |
* src/io.c (slurp, find_and_hash_each_line, find_identical_ends): |
| 1631 |
* src/sdiff.c (lf_init, diffarg): Prefer ximalloc to xmalloc, etc. |
| 1632 |
Also prefer letting the xmalloc.c functions multiply (with |
| 1633 |
overflow checking) than doing it by hand (without). |
| 1634 |
|
| 1635 |
diff: prefer signed types in util.c |
| 1636 |
* src/util.c (struct msg, message, struct bin_str) |
| 1637 |
(get_funky_string, c_escape, lines_differ, output_1_line) |
| 1638 |
(analyze_hunk): |
| 1639 |
Prefer signed types to size_t. |
| 1640 |
|
| 1641 |
sdiff: prefer signed types |
| 1642 |
* src/sdiff.c (ck_fread, ck_fwrite, expand_name, lf_refill) |
| 1643 |
(lf_snarf, diffarg, edit): |
| 1644 |
Prefer idx_t to size_t. |
| 1645 |
|
| 1646 |
diff: prefer signed types in io.c |
| 1647 |
* src/io.c (struct equivclass, nbuckets) |
| 1648 |
(find_and_hash_each_line, guess_lines, read_files): |
| 1649 |
Prefer idx_t to size_t. |
| 1650 |
|
| 1651 |
diff: prefer signed types in ifdef.c |
| 1652 |
* src/ifdef.c (do_printf_spec): |
| 1653 |
Prefer idx_t to size_t. |
| 1654 |
|
| 1655 |
diff: prefer signed types in dir.c |
| 1656 |
* src/dir.c (struct dirdata, dir_read): |
| 1657 |
Prefer idx_t to size_t. |
| 1658 |
|
| 1659 |
diff: prefer signed types in diff.c |
| 1660 |
* src/diff.c (struct regexp_list, option_list, main, add_regexp): |
| 1661 |
Prefer idx_t to size_t. |
| 1662 |
|
| 1663 |
diff3: prefer signed types |
| 1664 |
* src/diff3.c (struct diff_block, struct diff3_block) |
| 1665 |
(copy_stringlist, create_diff3_block, compare_line_list) |
| 1666 |
(read_diff, scan_diff_line, output_diff3, process_diff): |
| 1667 |
Prefer idx_t to size_t. |
| 1668 |
|
| 1669 |
maint: use safer type for ‘word’ |
| 1670 |
* src/system.h (word): Change it from size_t to void *, |
| 1671 |
so that uses aren’t tempted to treat it as an integer. |
| 1672 |
|
| 1673 |
diff: prefer signed types in diff.h |
| 1674 |
* src/diff.h (struct file_data): |
| 1675 |
Prefer idx_t to size_t. All uses changed. |
| 1676 |
|
| 1677 |
diff: prefer signed types in context.c |
| 1678 |
* src/context.c (find_function): |
| 1679 |
Prefer idx_t to size_t. |
| 1680 |
|
| 1681 |
cmp: prefer signed types |
| 1682 |
* src/cmp.c (buf_size, words_per_buffer, cmp, count_newlines): |
| 1683 |
Prefer idx_t to size_t. |
| 1684 |
|
| 1685 |
diff: prefer signed types in analyze.c |
| 1686 |
* src/analyze.c (discard_confusing_lines, diff_2_files): |
| 1687 |
Prefer signed types to size_t. |
| 1688 |
|
| 1689 |
diff: use intmax_t for column widths |
| 1690 |
Don’t represent column widths and tab stops as size_t, since they |
| 1691 |
are not object sizes. Instead, use intmax_t. This is better than |
| 1692 |
uintmax_t since gcc -fsanitize=undefined can catch overflows. |
| 1693 |
* src/diff.c (main): |
| 1694 |
* src/diff.h (tabsize, sdiff_half_width, sdiff_column2_offset): |
| 1695 |
* src/io.c (find_and_hash_each_line): |
| 1696 |
* src/side.c (tab_from_to, print_half_line, print_1sdiff_line): |
| 1697 |
* src/util.c (lines_differ, output_1_line): |
| 1698 |
Use intmax_t for column numbers, not size_t. |
| 1699 |
* src/io.c (find_and_hash_each_line): Count only columns since the |
| 1700 |
last tab stop, to avoid signed integer overflow. (The old code |
| 1701 |
had this possibility on odd but valid platforms where SIZE_MAX <= |
| 1702 |
INT_MAX.) |
| 1703 |
* src/util.c (lines_differ, output_1_line): Use a separate counter |
| 1704 |
for tab stops, so that the column count counts only columns since |
| 1705 |
the last tab stop. This avoids integer overflow when tabsize is |
| 1706 |
large. (The old code mishandled this situation.) |
| 1707 |
|
| 1708 |
maint: update cmpbuf.c comment |
| 1709 |
Update comment to refer to FreeBSD 13, which is current, |
| 1710 |
instead of to Tru64 which is not. |
| 1711 |
|
| 1712 |
maint: check for unlikely st_blksize overflow |
| 1713 |
Prefer idx_t to size_t in lib/cmpbuf.c and related buffer-size code. |
| 1714 |
Because POSIX says blksize_t can be wider than idx_t, |
| 1715 |
check for overflow when copying the former to the latter. |
| 1716 |
* bootstrap.conf (gnulib_modules): Add idx. |
| 1717 |
* lib/cmpbuf.c (block_read, buffer_lcm): |
| 1718 |
Prefer idx_t to size_t. All uses changed. |
| 1719 |
* lib/cmpbuf.c (block_read): Return ptrdiff_t instead of size_t. |
| 1720 |
All uses changed. |
| 1721 |
(buffer_lcm): Help the compiler by checking for negative args, |
| 1722 |
even though they are not allowed. |
| 1723 |
* lib/cmpbuf.h: Include idx.h and stddef.h, for idx_t and ptrdiff_t, |
| 1724 |
so that this include file is self-contained. |
| 1725 |
* src/analyze.c (diff_2_files): |
| 1726 |
* src/cmp.c (main): |
| 1727 |
* src/diff.c, src/io.c: Do not include stdckdint.h here, |
| 1728 |
since system.h now does that. |
| 1729 |
* src/diff3.c (read_diff): |
| 1730 |
* src/io.c (sip): |
| 1731 |
Protect against negative STAT_BLOCKSIZE, or STAT_BLOCKSIZE |
| 1732 |
outside idx_t range. |
| 1733 |
* src/system.h: Include stdckdint.h, idx.h. |
| 1734 |
|
| 1735 |
2023-05-24 Paul Eggert <[email protected]> |
| 1736 |
|
| 1737 |
build: update gnulib submodule to latest |
| 1738 |
|
| 1739 |
2023-05-22 Paul Eggert <[email protected]> |
| 1740 |
|
| 1741 |
maint: C99 for cmpbuf.c |
| 1742 |
* lib/cmpbuf.c (buffer_lcm): |
| 1743 |
Put decls closer to uses. |
| 1744 |
|
| 1745 |
diff: C99 style for util.c |
| 1746 |
* src/util.c (get_funky_string, parse_diff_color, begin_output) |
| 1747 |
(finish_output, lines_differ, print_script, output_1_line) |
| 1748 |
(analyze_hunk): |
| 1749 |
Put decls closer to uses. |
| 1750 |
|
| 1751 |
diff: C99 style for side.c |
| 1752 |
* src/side.c (tab_from_to, print_sdiff_hunk): |
| 1753 |
Put decls closer to uses. |
| 1754 |
|
| 1755 |
diff: C99 style for sdiff.c |
| 1756 |
* src/sdiff.c (usage, main, trapsigs, untrapsig, flush_line) |
| 1757 |
(edit, interact): |
| 1758 |
Put decls closer to uses. |
| 1759 |
|
| 1760 |
diff: C99 style for normal.c |
| 1761 |
* src/normal.c (print_normal_hunk): |
| 1762 |
Put decls closer to uses. |
| 1763 |
|
| 1764 |
diff: C99 style for io.c |
| 1765 |
* src/io.c (sip, slurp, find_and_hash_each_line) |
| 1766 |
(find_identical_ends, read_files): |
| 1767 |
Put decls closer to uses. |
| 1768 |
|
| 1769 |
diff: C99 decl style in ifdef.c |
| 1770 |
* src/ifdef.c (format_ifdef, format_group, print_ifdef_lines) |
| 1771 |
(do_printf_spec, scan_char_literal): |
| 1772 |
Put decls closer to uses. |
| 1773 |
|
| 1774 |
diff: C99 decl style in ed.c |
| 1775 |
* src/ed.c (print_ed_hunk, pr_forward_ed_hunk, print_rcs_hunk): |
| 1776 |
Put decls closer to uses. |
| 1777 |
|
| 1778 |
diff: C99 decl style in dir.c |
| 1779 |
* src/dir.c (dir_read, diff_dirs, find_dir_file_pathname): |
| 1780 |
Put decls closer to uses. |
| 1781 |
|
| 1782 |
diff: C99 decl style in diff.c |
| 1783 |
* src/diff.c (option_list, main, usage, compare_files): |
| 1784 |
Put decls closer to uses. |
| 1785 |
|
| 1786 |
diff3: C99 decl style |
| 1787 |
* src/diff3.c (main, usage, make_3way_diff) |
| 1788 |
(using_to_diff3_block, create_diff3_block, process_diff) |
| 1789 |
(process_diff_control, read_diff, output_diff3, dotlines) |
| 1790 |
(output_diff3_edscript, output_diff3_merge) |
| 1791 |
(reverse_diff3_blocklist): |
| 1792 |
Put decls closer to uses. |
| 1793 |
|
| 1794 |
diff: C99 decl style in context.c |
| 1795 |
* src/context.c (print_context_script, pr_context_hunk) |
| 1796 |
(pr_unidiff_hunk, mark_ignorable): |
| 1797 |
Put decls closer to uses. |
| 1798 |
|
| 1799 |
cmp: C99 decl style in cmp.c |
| 1800 |
* src/cmp.c (usage, main, cmp, count_newlines): |
| 1801 |
Put decls closer to uses. |
| 1802 |
|
| 1803 |
diff: C99 decl style in analyze.c |
| 1804 |
* src/analyze.c (discard_confusing_lines, shift_boundaries) |
| 1805 |
(diff_2_files): Assume C99 decls after statements. |
| 1806 |
|
| 1807 |
sdiff: remove an IF_LINT |
| 1808 |
* src/sdiff.c (edit): Remove an IF_LINT, which no longer seems |
| 1809 |
to be needed with current GCC. |
| 1810 |
|
| 1811 |
sdiff: prefer functions to macros |
| 1812 |
* src/sdiff.c (sighandler): New type. |
| 1813 |
(signal_handler) [!HAVE_SIGACTION]: |
| 1814 |
(initial_handler): Now static functions, not macros. |
| 1815 |
|
| 1816 |
diff: prefer functions in io.c |
| 1817 |
* src/io.c (HASH_VALUE_WIDTH): New constant. |
| 1818 |
(rol, hash): New static functions, replacing ... |
| 1819 |
(ROL, HASH): ... these macros. All uses changed. |
| 1820 |
|
| 1821 |
diff: prefer function to DIR_P macro |
| 1822 |
* src/diff.c (dir_p): New static function, replacing ... |
| 1823 |
(DIR_P): ... this macro. All uses changed. |
| 1824 |
|
| 1825 |
2023-05-21 Jim Meyering <[email protected]> |
| 1826 |
|
| 1827 |
maint: prefer ckd_add, ckd_mul to INT_ADD_WRAPV, INT_MULTIPLY_WRAPV |
| 1828 |
* bootstrap.conf (gnulib_modules): Add stdckdint. |
| 1829 |
* lib/cmpbuf.c: Use ckd_mul rather than INT_MULTIPLY_WRAPV. |
| 1830 |
Include stdckdint.h, not "intprops.h". |
| 1831 |
* src/diff.c: Similar, but for both ckd_add and ckd_mul. |
| 1832 |
* src/io.c: Likewise for ckd_add. |
| 1833 |
|
| 1834 |
2023-05-21 Jim Meyering <[email protected]> |
| 1835 |
|
| 1836 |
maint: post-release administrivia |
| 1837 |
* NEWS: Add header line for next release. |
| 1838 |
* .prev-version: Record previous version. |
| 1839 |
* cfg.mk (old_NEWS_hash): Auto-update. |
| 1840 |
|
| 1841 |
version 3.10 |
| 1842 |
* NEWS: Record release date. |
| 1843 |
|
| 1844 |
2023-05-21 Jim Meyering <[email protected]> |
| 1845 |
|
| 1846 |
build: skip the sole perl-requiring test when there is no usable perl |
| 1847 |
* tests/init.cfg (require_perl_): New function, from coreutils. |
| 1848 |
* tests/large-subopt: Use it. |
| 1849 |
Reported by Bruno Haible in |
| 1850 |
https://lists.gnu.org/r/diffutils-devel/2023-05/msg00003.html |
| 1851 |
|
| 1852 |
2023-05-20 Jim Meyering <[email protected]> |
| 1853 |
|
| 1854 |
build: fix a new syntax-check failure |
| 1855 |
* src/diff.h (robust_output_style): Put DIFF_INLINE and |
| 1856 |
the function name on the same line, so that syntax-check's |
| 1857 |
naive parsing can spot this function. |
| 1858 |
* cfg.mk (_gl_TS_extern): Add DIFF_INLINE. |
| 1859 |
|
| 1860 |
build: modernize bootstrap prerequsite tools |
| 1861 |
Following Pádraig Brady's example from coreutils, ... |
| 1862 |
* bootstrap.conf: Add an explicit requirement on m4. |
| 1863 |
Add an explicit requirement on texi2pdf which is often packaged |
| 1864 |
separately to makeinfo and induces a failure far down the |
| 1865 |
distribution phase if not present. |
| 1866 |
Replace the rsync dependency with wget, |
| 1867 |
which gnulib changed to in 2018. |
| 1868 |
Also, add an xz requirement and a version for autopoint. |
| 1869 |
|
| 1870 |
2023-05-19 Paul Eggert <[email protected]> |
| 1871 |
|
| 1872 |
build: update gnulib submodule to latest |
| 1873 |
* src/analyze.c (OFFSET_MAX): New macro, needed for |
| 1874 |
latest gnulib. |
| 1875 |
|
| 1876 |
diff: avoid a macro in diff.h |
| 1877 |
* src/diff.h (FILE_BUFFER): Remove. |
| 1878 |
* src/io.c (file_buffer): New static function. All uses of |
| 1879 |
FILE_BUFFER replaced. |
| 1880 |
|
| 1881 |
sdiff: avoid some macros in sdiff.c |
| 1882 |
* src/sdiff.c (PROGRAM_NAME, SDIFF_BUFSIZE): |
| 1883 |
Now constants, not macros. |
| 1884 |
|
| 1885 |
diff3: avoid macros in diff3.c |
| 1886 |
* src/diff3.c (PROGRAM_NAME, FILE0, FILE1, FILE2, FILE3, FO, FC) |
| 1887 |
(RANGE_START, RANGE_END): Now constants, not macros. |
| 1888 |
|
| 1889 |
cmp: avoid macros in cmp.c |
| 1890 |
* src/cmp.c (PROGRAM_NAME): Now a constant, not a macro. |
| 1891 |
(hard_locale_LC_MESSAGES): Now a function, not a macro. |
| 1892 |
All uses changed. |
| 1893 |
|
| 1894 |
diff: avoid macros in diff.c |
| 1895 |
* src/diff.c (PROGRAM_NAME, NONEXISTENT, UNOPENED): |
| 1896 |
Now constants, not macros. |
| 1897 |
(errno_encode, errno_decode): Now functions, rather than |
| 1898 |
macros ERRNO_ENCODE and ERRNO_DECODE. All uses changed. |
| 1899 |
|
| 1900 |
diff: use function for robust_output_style |
| 1901 |
* bootstrap.conf (gnulib_modules): Add extern-inline. |
| 1902 |
* src/diff.h: Use _GL_INLINE_HEADER_BEGIN and _GL_INLINE_HEADER_END. |
| 1903 |
(DIFF_INLINE): New macro. |
| 1904 |
(robust_output_style): Now an inline function, not a macro |
| 1905 |
ROBUST_OUTPUT_STYLE. All uses changed. |
| 1906 |
|
| 1907 |
cmp: don’t give up if fstat fails |
| 1908 |
* src/cmp.c (main, cmp): If fstat fails, simply record the failure |
| 1909 |
and move on, instead of exiting. Modify other uses of the struct |
| 1910 |
stat to do something reasonable if the status is missing. |
| 1911 |
|
| 1912 |
diff3: don’t give up if fstat fails |
| 1913 |
* src/diff3.c (read_diff): Work even if fstat fails, |
| 1914 |
e.g., due to EOVERFLOW. |
| 1915 |
|
| 1916 |
diff3: fix race condition involving directories |
| 1917 |
This fixes a TOC-TOU race with "diff3 A B C" when one |
| 1918 |
of its arguments is a directory. |
| 1919 |
* src/diff.c (no_directory): New static var. |
| 1920 |
(NO_DIRECTORY_OPTION): New constant. |
| 1921 |
(longopts): Add ---no-directory. |
| 1922 |
(main): Support it. |
| 1923 |
(compare_files): If ---no-directory is given, do not treat |
| 1924 |
directories specially. |
| 1925 |
* src/diff3.c (main): Do not check whether an argument is |
| 1926 |
a directory. |
| 1927 |
(read_diff): Pass ---no-directory to diff, so that it checks. |
| 1928 |
|
| 1929 |
2023-05-13 Jim Meyering <[email protected]> |
| 1930 |
|
| 1931 |
maint: suppress new test's doubled-word syntax-check failure |
| 1932 |
* cfg.mk (exclude_file_name_regexp--sc_prohibit_doubled_word): |
| 1933 |
Exempt the new test's use of "in in". |
| 1934 |
|
| 1935 |
2023-05-13 Paul Eggert <[email protected]> |
| 1936 |
|
| 1937 |
build: update gnulib submodule to latest |
| 1938 |
|
| 1939 |
2023-05-13 Carlo Marcelo Arenas Belón <[email protected]> (tiny change) |
| 1940 |
|
| 1941 |
gnulib: fix Y2038 bug (again) |
| 1942 |
AC_SYS_LARGEFILE meaning has changed, need AC_SYS_YEAR2038 as well |
| 1943 |
|
| 1944 |
* NEWS: mention this |
| 1945 |
* tests: add test |
| 1946 |
* bootstrap.conf: add year2038 |
| 1947 |
|
| 1948 |
2023-02-24 Paul Eggert <[email protected]> |
| 1949 |
|
| 1950 |
maint: add 'diff --git' TODO |
| 1951 |
* TODO: Suggest better compatibility with 'git diff -p'. |
| 1952 |
From a suggestion by Linus Torvalds |
| 1953 |
<https://lkml.org/lkml/2023/2/24/797>. |
| 1954 |
|
| 1955 |
2023-02-10 Paul Eggert <[email protected]> |
| 1956 |
|
| 1957 |
maint: update .gitignore |
| 1958 |
.gitignore: Update for some recent changes, and simplify. |
| 1959 |
|
| 1960 |
diff: fix bug where -D does not work |
| 1961 |
Problem reported by Robert Webb (bug#61193). |
| 1962 |
* NEWS: Mention this. |
| 1963 |
* src/diff.c (main): Omit stray ‘sizeof’. |
| 1964 |
* tests/ifdef: New test. |
| 1965 |
* tests/Makefile.am (TESTS): Add it. |
| 1966 |
|
| 1967 |
2023-02-07 Paul Eggert <[email protected]> |
| 1968 |
|
| 1969 |
build: update gnulib submodule to latest |
| 1970 |
|
| 1971 |
2023-02-05 Paul Eggert <[email protected]> |
| 1972 |
|
| 1973 |
diff: use C23 bool |
| 1974 |
* bootstrap.conf (gnulib_modules): Add stdbool. |
| 1975 |
* src/die.h, src/system.h: Do not include <stdbool.h>. |
| 1976 |
|
| 1977 |
diff: prefer nullptr to NULL |
| 1978 |
* bootstrap.conf (gnulib_modules): Add c-nullptr. |
| 1979 |
* src/cmp.c (main): |
| 1980 |
* src/context.c (pr_context_hunk, pr_unidiff_hunk) |
| 1981 |
(mark_ignorable, find_function): |
| 1982 |
* src/diff.c (longopts, main, specify_value, specify_style) |
| 1983 |
(specify_colors_style, compare_files): |
| 1984 |
* src/diff3.c (main, process_diff): |
| 1985 |
* src/dir.c (find_dir_file_pathname): |
| 1986 |
* src/ifdef.c (scan_char_literal): |
| 1987 |
* src/sdiff.c (main): |
| 1988 |
* src/util.c (process_signals, install_signal_handlers) |
| 1989 |
(color_ext_list, color_indicator, indicator_name) |
| 1990 |
(parse_diff_color): |
| 1991 |
Prefer C23-style nullptr to NULL, as nullptr is a bit better. |
| 1992 |
|
| 1993 |
doc: update README-hacking |
| 1994 |
* README-hacking: Update for current bootstrap. |
| 1995 |
|
| 1996 |
maint: sync bootstrap from Gnulib |
| 1997 |
bootstrap: sync from Gnulib |
| 1998 |
|
| 1999 |
build: update gnulib submodule to latest |
| 2000 |
* lib/sh-quote.c.diff: Remove, as Gnulib now has this. |
| 2001 |
|
| 2002 |
build: add libraries |
| 2003 |
* src/Makefile.am (LDADD, sdiff_LDADD): Add Gnulib libraries that |
| 2004 |
in theory would be needed on unusual platforms. In practice, |
| 2005 |
these are typicall empty or are duplicates of other library |
| 2006 |
arguments and so are redundant. |
| 2007 |
|
| 2008 |
2023-02-04 Jim Meyering <[email protected]> |
| 2009 |
|
| 2010 |
doc: update HACKING |
| 2011 |
* HACKING: Update from grep's HACKING. |
| 2012 |
|
| 2013 |
2023-02-04 Jim Meyering <[email protected]> |
| 2014 |
|
| 2015 |
maint: prefer https: to git: |
| 2016 |
The idea is to defend against some adversary-in-the-middle attacks. |
| 2017 |
Also prefer git.savannah.gnu.org over its shorter alias, git.sv.gnu.org |
| 2018 |
to avoid a warning e.g., from git clone. |
| 2019 |
Also, drop any final ".git" suffix on the resulting URIs. |
| 2020 |
Inspired by Paul Eggert's nearly identical changes to coreutils. |
| 2021 |
|
| 2022 |
2023-01-16 Jim Meyering <[email protected]> |
| 2023 |
|
| 2024 |
tests: accommodate newer GNU make's SIGPIPE-ignore |
| 2025 |
* tests/colors: Allow an exit code of not just 141 (SIGPIPE), |
| 2026 |
but also "error": 2. |
| 2027 |
Reported by Tomasz Kłoczko in http://bugs.gnu.org/59905. |
| 2028 |
|
| 2029 |
2023-01-15 Jim Meyering <[email protected]> |
| 2030 |
|
| 2031 |
maint: post-release administrivia |
| 2032 |
* NEWS: Add header line for next release. |
| 2033 |
* .prev-version: Record previous version. |
| 2034 |
* cfg.mk (old_NEWS_hash): Auto-update. |
| 2035 |
|
| 2036 |
version 3.9 |
| 2037 |
* NEWS: Record release date. |
| 2038 |
|
| 2039 |
build: update gnulib to latest |
| 2040 |
|
| 2041 |
2023-01-05 Jim Meyering <[email protected]> |
| 2042 |
|
| 2043 |
tests: avoid large-subopt XPASS on systems without perl |
| 2044 |
* tests/large-subopt: Use $PERL, rather than hard-coding "perl". |
| 2045 |
* bootstrap.conf (gnulib_modules): Add "perl" to the list. |
| 2046 |
Reported by Bruno Haible in |
| 2047 |
https://lists.gnu.org/r/diffutils-devel/2023-01/msg00000.html |
| 2048 |
|
| 2049 |
2023-01-05 Bruno Haible <[email protected]> |
| 2050 |
|
| 2051 |
tests: avoid a test failure when using Solaris 11.4's old grep |
| 2052 |
* tests/colors (nanosecond_zeros): Use a dumbed-down grep '\.' |
| 2053 |
in place of "grep -F ." to accommodate Solaris 11.4's old versions |
| 2054 |
of grep in the default PATH. Reported here: |
| 2055 |
https://lists.gnu.org/r/diffutils-devel/2023-01/msg00001.html |
| 2056 |
|
| 2057 |
2023-01-01 Jim Meyering <[email protected]> |
| 2058 |
|
| 2059 |
build: update gnulib to latest |
| 2060 |
|
| 2061 |
maint: update copyright dates |
| 2062 |
|
| 2063 |
2022-12-31 Paul Eggert <[email protected]> |
| 2064 |
|
| 2065 |
build: simplify GCC 12 false alarm workaround |
| 2066 |
* src/util.c (print_message_queue): Pacify GCC in a |
| 2067 |
more-straightforward way. |
| 2068 |
|
| 2069 |
maint: fix assumption typo |
| 2070 |
Fix a typo I introduced in my August 2021 signal handling fixes. |
| 2071 |
Problem reported by Sam James (Bug#60457). |
| 2072 |
* src/util.c (xsigismember): Don’t assume sigismember cannot return 0. |
| 2073 |
|
| 2074 |
2022-12-30 Jim Meyering <[email protected]> |
| 2075 |
|
| 2076 |
build: update gnulib to latest |
| 2077 |
|
| 2078 |
build: temp?-disable -Wanalyzer-use-of-uninitialized-value |
| 2079 |
* src/util.c (print_message_queue): This function triggers false |
| 2080 |
positive warnings from GCC12, so add pragmas to ignore that new warning |
| 2081 |
in this one function. Required when using either of these: |
| 2082 |
- gcc version 12.2.1 20221121 |
| 2083 |
- gcc version 13.0.0 20221229 (experimental) |
| 2084 |
|
| 2085 |
2022-12-11 Jim Meyering <[email protected]> |
| 2086 |
|
| 2087 |
build: update gnulib to latest |
| 2088 |
|
| 2089 |
2022-11-12 Jim Meyering <[email protected]> |
| 2090 |
|
| 2091 |
build: update gnulib to latest |
| 2092 |
|
| 2093 |
2022-02-14 Paul Eggert <[email protected]> |
| 2094 |
|
| 2095 |
doc: mark up SEE ALSO (Bug#53976) |
| 2096 |
|
| 2097 |
2022-01-24 Jim Meyering <[email protected]> |
| 2098 |
|
| 2099 |
tests: fix false-failure on systems without valgrind |
| 2100 |
* tests/init.cfg (require_valgrind_): Use exit status of subshell, |
| 2101 |
not that of the "local" declaration. |
| 2102 |
|
| 2103 |
2022-01-14 Paul Eggert <[email protected]> |
| 2104 |
|
| 2105 |
build: update gnulib submodule to latest |
| 2106 |
|
| 2107 |
2022-01-03 Jim Meyering <[email protected]> |
| 2108 |
|
| 2109 |
maint: avoid new syntax-check failure |
| 2110 |
* cfg.mk (local-checks-to-skip): Add sc_indent, to skip it. |
| 2111 |
Otherwise, "make syntax-check" would fail. |
| 2112 |
|
| 2113 |
maint: make update-copyright |
| 2114 |
|
| 2115 |
build: update gnulib to latest; also bootstrap and init.sh |
| 2116 |
|
| 2117 |
2021-10-30 Paul Eggert <[email protected]> |
| 2118 |
|
| 2119 |
maint: modernize README-{hacking,prereq} |
| 2120 |
|
| 2121 |
2021-10-16 Paul Eggert <[email protected]> |
| 2122 |
|
| 2123 |
doc: copy fdl.texi into git |
| 2124 |
This pacifies this notice from ./bootstrap: “Notice from module |
| 2125 |
fdl: Don't use this module! Instead, copy the referenced license |
| 2126 |
file into your version control repository.” |
| 2127 |
* bootstrap.conf (gnulib_modules): Remove fdl. |
| 2128 |
* doc/fdl.texi: New file, taken from Gnulib. |
| 2129 |
|
| 2130 |
maint: direct dependency on time_rz now |
| 2131 |
Now that diff calls tzalloc, it depends directly on time_rz. |
| 2132 |
* bootstrap.conf (gnulib_modules): Add time_rz. |
| 2133 |
|
| 2134 |
build: update gnulib submodule to latest |
| 2135 |
|
| 2136 |
2021-10-15 Paul Eggert <[email protected]> |
| 2137 |
|
| 2138 |
diff: fix timezone bug on Solaris |
| 2139 |
Problem reported by Vladimir Marek (bug#51228). |
| 2140 |
* NEWS: Mention this. |
| 2141 |
* src/context.c (print_context_label): Pass localtz to nstrftime, |
| 2142 |
instead of always passing 0. |
| 2143 |
* src/diff.c (main) [!HAVE_TM_GMTOFF]: |
| 2144 |
Initialize localtz if time_format uses %z. |
| 2145 |
* src/diff.h (localtz): New decl. |
| 2146 |
* tests/Makefile.am (TESTS): Add timezone. |
| 2147 |
* tests/timezone: New test. |
| 2148 |
|
| 2149 |
2021-08-31 Paul Eggert <[email protected]> |
| 2150 |
|
| 2151 |
diff3: port better to MS-Windows |
| 2152 |
* src/diff3.c (enum diff_type): Prefix constants like ADD with |
| 2153 |
"DIFF_" to avoid collisions with unwise system headers. |
| 2154 |
|
| 2155 |
2021-08-30 Paul Eggert <[email protected]> |
| 2156 |
|
| 2157 |
maint: port better to non-POSIX |
| 2158 |
Problem privately reported by Gisle Vanem for MS-Windows. |
| 2159 |
* src/util.c (sig, install_signal_handlers): |
| 2160 |
Don’t assume SIGTSTP, SIGALRM, SIGQUIT. |
| 2161 |
(is_tstp_index): New function, for use in SIGTSTP avoidance. |
| 2162 |
|
| 2163 |
maint: prefer attribute.h attributes |
| 2164 |
Prefer the macros used in attribute.h, and _Noreturn, |
| 2165 |
to the by-hand use of __attribute__, as this is more portable. |
| 2166 |
* bootstrap.conf (gnulib_modules): Add attribute. |
| 2167 |
* src/system.h: Include attribute.h. All uses of |
| 2168 |
attributes changed to use the attribute.h macros. |
| 2169 |
Plus, use _Noreturn. |
| 2170 |
(FALLTHROUGH): Remove; attribute.h now defines this. |
| 2171 |
|
| 2172 |
build: update gnulib submodule to latest |
| 2173 |
|
| 2174 |
diff: avoid double translation |
| 2175 |
* src/analyze.c (briefly_report): Do not translate here, |
| 2176 |
as ‘message’ translates its format. |
| 2177 |
|
| 2178 |
diff: use variable arg list for messages |
| 2179 |
This simplifies the code by using varargs. |
| 2180 |
* bootstrap.conf (gnulib_modules): Add flexmember. |
| 2181 |
(XGETTEXT_OPTIONS): Do not flag message5. |
| 2182 |
* src/util.c: Include flexmember.h, stdarg.h. |
| 2183 |
(struct msg): New members msgid, argbytes. args is now |
| 2184 |
FLEXIBLE_ARRAY_MEMBER, and does not contain msgid. |
| 2185 |
All uses changed. |
| 2186 |
(message): Now varargs. Detect number of args by counting '%'s. |
| 2187 |
Use FLEXSIZEOF, to avoid problems on systems with buggy |
| 2188 |
allocators. Avoid redundant ‘*p = 0’ when *p is already zero |
| 2189 |
after stpcpy. |
| 2190 |
(message5): Remove; all callers changed to use ‘message’. |
| 2191 |
(print_message_queue): Abort if too many args were passed; |
| 2192 |
this cannot happen with current diffutils. |
| 2193 |
|
| 2194 |
2021-08-29 Paul Eggert <[email protected]> |
| 2195 |
|
| 2196 |
diff: port better to MS-Windows |
| 2197 |
Problem reported by Gisle Vanem (Bug#36488#30). |
| 2198 |
* src/util.c (xsigaction) [SA_NOCLDSTOP]: Remove; no longer needed. |
| 2199 |
(install_signal_handlers): If the first call to sigaction or |
| 2200 |
signal fails, do not exit; just skip the signal and continue, |
| 2201 |
in case the runtime does not support the signal even though the |
| 2202 |
corresponding SIG* macro is defined. |
| 2203 |
|
| 2204 |
2021-08-28 Paul Eggert <[email protected]> |
| 2205 |
|
| 2206 |
diff: cleanup signal handling just before exit |
| 2207 |
This should fix an unlikely signal handling bug with colored |
| 2208 |
output, and should also fix a Debian FTBFS (Fails To Build From |
| 2209 |
Source) on powerpc64le-linux. See Bug#34519 and Frédéric |
| 2210 |
Bonnard’s report in: |
| 2211 |
https://bugs.debian.org/922552#19 |
| 2212 |
* bootstrap.conf (gnulib_modules): Add raise, sigprocmask. |
| 2213 |
* src/diff.c (main): Call cleanup_signal_handlers before exiting. |
| 2214 |
Don’t bother calling ‘exit’; no longer needed nowadays. |
| 2215 |
* src/util.c (sigprocmask, siginterrupt) [!SA_NOCLDSTOP]: |
| 2216 |
Define to 0 instead of empty, since the results are now used. |
| 2217 |
(sigset_t) [!SA_NOCLDSTOP]: Remove; we now rely on Gnulib. |
| 2218 |
(xsigaction) [SA_NOCLDSTOP]: New function. |
| 2219 |
(xsigaddset, xsigismember, xsignal, xsigprocmask): New functions. |
| 2220 |
(some_signals_caught): New static var. |
| 2221 |
(process_signals): Omit a conditional branch. |
| 2222 |
Don’t bother loading interrupt_signal if stop_signal_count is nonzero. |
| 2223 |
(process_signals, install_signal_handlers): |
| 2224 |
Check for failures from sigprocmask etc. |
| 2225 |
(sig, nsig): Now at top level, since multiple functions need them. |
| 2226 |
(install_signal_handlers): No need for caught_sig array; |
| 2227 |
just use caught_signals. However, set some_signals_caught. |
| 2228 |
(cleanup_signal_handlers): New function. |
| 2229 |
|
| 2230 |
2021-08-22 Paul Eggert <[email protected]> |
| 2231 |
|
| 2232 |
diff: add integer overflow checking |
| 2233 |
* src/diff.c (option_list, main): Check for integer overflow |
| 2234 |
in some unlikely and hard-to-test cases. |
| 2235 |
|
| 2236 |
maint: refactor integer overflow checking |
| 2237 |
Rely on more-modern Gnulib capabilities instead of doing |
| 2238 |
integer overflow checking by hand, in some cases. |
| 2239 |
* lib/cmpbuf.c (buffer_lcm): |
| 2240 |
* src/io.c (slurp, find_identical_ends): |
| 2241 |
Use INT_ADD_WRAPV and INT_MULTIPLY_WRAPV rather than checking |
| 2242 |
overflow by hand. |
| 2243 |
* src/diff3.c (process_diff): |
| 2244 |
* src/dir.c (dir_read): |
| 2245 |
* src/io.c (find_identical_ends, read_files): |
| 2246 |
Use xnmalloc rather than checking overflow by hand. |
| 2247 |
(read_files): Rely on xcalloc to do overflow checking. |
| 2248 |
|
| 2249 |
diff: avoid sprintf %s |
| 2250 |
sprintf fails if the result contains more than INT_MAX bytes, |
| 2251 |
so rework the code to avoid usage of sprintf %s where the |
| 2252 |
string might be longer than that. |
| 2253 |
* bootstrap.conf (gnulib_modules): Remove xvasprintf. |
| 2254 |
* src/diff.c (specify_style): |
| 2255 |
* src/util.c (begin_output): |
| 2256 |
Rewrite to avoid sprintf %s. |
| 2257 |
* src/util.c: Do not include xvasprintf.h. |
| 2258 |
(concat): Remove, as it uses sprintf %s. All uses rewritten. |
| 2259 |
|
| 2260 |
diff: use mempcpy |
| 2261 |
* bootstrap.conf (gnulib_modules): Add mempcpy, stpcpy. |
| 2262 |
* src/ifdef.c (do_printf_spec): |
| 2263 |
* src/sdiff.c (expand_name, lf_snarf, temporary_file): |
| 2264 |
* src/util.c (message5): |
| 2265 |
Prefer mempcpy to memcpy plus manual size-updating. |
| 2266 |
Prefer stpcpy to mempcpy plus manual size-spec. |
| 2267 |
|
| 2268 |
sdiff: fix unlikely memory leak |
| 2269 |
* src/sdiff.c (temporary_file): Fix memory leak when mkstemp fails. |
| 2270 |
Don’t assume temporary file name length fits in ‘int’. |
| 2271 |
|
| 2272 |
diff3: simplify process_diff |
| 2273 |
* src/diff3.c (process_diff): Remove LAST_BLOCK arg, since callers |
| 2274 |
no longer needed it. All callers changed. This removes an |
| 2275 |
unnecessary initialization of bptr to NULL. |
| 2276 |
|
| 2277 |
maint: modernize IF_LINT for GCC 11.2.1 |
| 2278 |
* src/cmp.c (cmp): |
| 2279 |
* src/dir.c (find_dir_file_pathname): |
| 2280 |
* src/sdiff.c (edit): |
| 2281 |
Mention which GCC bug this IF_LINT works around. |
| 2282 |
* src/diff3.c (process_diff): |
| 2283 |
Always initialize to NULL, to avoid problems on mostly-theoretical |
| 2284 |
hosts where accessing uninitialized variables traps. The next |
| 2285 |
patch will have a better fix for this. |
| 2286 |
* src/ifdef.c (do_printf_spec): |
| 2287 |
No need for IF_LINT in GCC 11.2.1. |
| 2288 |
|
| 2289 |
maint: lint → GCC_LINT |
| 2290 |
‘lint’ is for traditional lint and perhaps some other tools; |
| 2291 |
‘GCC_LINT’ is targeted more for what we do. |
| 2292 |
Gnulib accepts either, but we might as well be more accurate. |
| 2293 |
* configure.ac (GCC_LINT): Define this instead of ‘lint’. |
| 2294 |
All uses changed. |
| 2295 |
|
| 2296 |
diff: remove printint |
| 2297 |
* src/system.h (printint): Remove. All uses removed. This type |
| 2298 |
was only for porting to pre-C89 hosts, and is no longer needed. |
| 2299 |
|
| 2300 |
diff: remove INT_MAX limit on -F/-p searches |
| 2301 |
* src/context.c (find_function): Don’t limit function-line |
| 2302 |
searches to INT_MAX bytes, removing a FIXME. |
| 2303 |
|
| 2304 |
maint: .gitignore updates |
| 2305 |
* .gitignore: Remove lib/unused-parameter.h. Add all of m4, since |
| 2306 |
no files there need to be committed; this lets us remove |
| 2307 |
m4/.gitignore and m4/gnulib-cache.m4. Add *.orig, *.patch, .Tpo, |
| 2308 |
/*.diff, lib/*/ (which lets us remove /lib/sys/), lib/ctype.h, |
| 2309 |
lib/errno.h, lib/float.h, lib/fnmatch.h, lib/getopt-cdefs.h, |
| 2310 |
lib/getopt.h, lib/limits.h, lib/sigsegv.h, lib/stdalign.h, |
| 2311 |
lib/stdarg.h, lib/stdbool.h, lib/stddef.h, lib/stdint.h, |
| 2312 |
lib/stdopen.[ch], vc-dwim-log-*. Add slashes to autom4te.cache, |
| 2313 |
build-aux. Remove redundant initial slashes from patterns that |
| 2314 |
also have internal slashes. Remove plain ABOUT-NLS, since |
| 2315 |
/ABOUT-NLS suffices. Sort using LC_ALL=C. |
| 2316 |
|
| 2317 |
maint: omit unused function if not debugging |
| 2318 |
* src/util.c (debug_script): Compile only if DEBUG. |
| 2319 |
|
| 2320 |
maint: remove prepargs |
| 2321 |
* lib/Makefile.am (noinst_HEADERS): Remove prepargs.h. |
| 2322 |
(libdiffutils_a_SOURCES): Remove prepargs.c. |
| 2323 |
* lib/prepargs.c, lib/prepargs.h: Remove. Hasn’t been |
| 2324 |
needed for many years. |
| 2325 |
* src/diff.c: Do not include prepargs.h. |
| 2326 |
|
| 2327 |
maint: zalloc → xzalloc |
| 2328 |
* src/util.c (zalloc): Remove. All uses replaced |
| 2329 |
by xzalloc, which means the same thing. |
| 2330 |
|
| 2331 |
2021-08-22 Paul Eggert <[email protected]> |
| 2332 |
|
| 2333 |
diff3: suppress -fanalyzer alarms |
| 2334 |
* src/diff3.c: Add pragma to suppress -Wanalyzer-null-dereference |
| 2335 |
alarms. |
| 2336 |
|
| 2337 |
* src/diff.h (find_dir_file_pathname): Add malloc-related |
| 2338 |
attributes, to pacify gcc -Wsuggest-attribute=malloc. |
| 2339 |
|
| 2340 |
2021-08-22 Paul Eggert <[email protected]> |
| 2341 |
|
| 2342 |
maint: remove January workaround for Gnulib issue |
| 2343 |
* configure.ac: Don’t add -Wno-analyzer-null-argument, since |
| 2344 |
the issue is now fixed in Gnulib. |
| 2345 |
|
| 2346 |
build: update gnulib submodule to latest |
| 2347 |
|
| 2348 |
2021-08-01 Paul Eggert <[email protected]> |
| 2349 |
|
| 2350 |
maint: remove stray init.cfg |
| 2351 |
* init.cfg: Remove. I guess this file was a stray, since it was a |
| 2352 |
copy of tests/init.cfg when it was checked in, and it hasn’t been |
| 2353 |
maintained since. |
| 2354 |
|
| 2355 |
tests: port to valgrind 3.16.0 + GCC 11.2 |
| 2356 |
* tests/init.cfg (stderr_fileno_): Reject valgrind if it reports a |
| 2357 |
"Serious error" on a trival use of ‘diff’. Without this patch, on |
| 2358 |
RHEL 8.4 when I compile diffutils with a GCC 11.2.0 that I built |
| 2359 |
myself, ‘valgrind diff’ spits out messages like WARNING: Serious |
| 2360 |
error when reading debug info / When reading debug info from diff: |
| 2361 |
Ignoring non-Dwarf2/3/4 block in .debug_info’ and this causes the |
| 2362 |
strip-trailing-cr test to fail. I guess valgrind complains |
| 2363 |
because the valgrind version 3.16.0 that came with RHEL 8.4 cannot |
| 2364 |
grok the debug entries generated by GCC 11.2.0. |
| 2365 |
|
| 2366 |
2021-08-01 Jim Meyering <[email protected]> |
| 2367 |
|
| 2368 |
maint: post-release administrivia |
| 2369 |
* NEWS: Add header line for next release. |
| 2370 |
* .prev-version: Record previous version. |
| 2371 |
* cfg.mk (old_NEWS_hash): Auto-update. |
| 2372 |
|
| 2373 |
version 3.8 |
| 2374 |
* NEWS: Record release date. |
| 2375 |
|
| 2376 |
build: update gnulib to latest |
| 2377 |
|
| 2378 |
2021-07-31 Jim Meyering <[email protected]> |
| 2379 |
|
| 2380 |
cmp: avoid reading uninitialized memory |
| 2381 |
[This *is* useful, so reapply. ] |
| 2382 |
When comparing buffers a word at a time, cmp could read up to |
| 2383 |
sizeof (word) - 1 uninitialized bytes. |
| 2384 |
* src/cmp.c (cmp): Set not just a single guaranteed-differing |
| 2385 |
sentinel byte just beyond any final read byte, but also ensure |
| 2386 |
that any following bytes are defined, if those may be read via |
| 2387 |
block_compare's word-at-a-time comparison. Reported by Bruno Haible |
| 2388 |
in https://lists.gnu.org/r/diffutils-devel/2021-07/msg00003.html |
| 2389 |
|
| 2390 |
2021-07-28 Bruno Haible <[email protected]> |
| 2391 |
|
| 2392 |
cmp: avoid reading uninitialized memory |
| 2393 |
One or both of the sentinel bytes were copies of uninitialized values. |
| 2394 |
* src/cmp.c (cmp): Use arbitrary initialized values for the |
| 2395 |
sentinel bytes. |
| 2396 |
|
| 2397 |
2021-07-28 Jim Meyering <[email protected]> |
| 2398 |
|
| 2399 |
cmp: revert preceding change |
| 2400 |
It did not solve the problem. The next patch does. |
| 2401 |
|
| 2402 |
2021-07-27 Jim Meyering <[email protected]> |
| 2403 |
|
| 2404 |
cmp: avoid reading uninitialized memory |
| 2405 |
When comparing buffers a word at a time, cmp could read up to |
| 2406 |
sizeof (word) - 1 uninitialized bytes. |
| 2407 |
* src/cmp.c (cmp): Set not just a single guaranteed-differing |
| 2408 |
sentinel byte just beyond any final read byte, but also ensure |
| 2409 |
that any following bytes are defined, if those may be read via |
| 2410 |
block_compare's word-at-a-time comparison. Reported by Bruno Haible |
| 2411 |
in https://lists.gnu.org/r/diffutils-devel/2021-07/msg00003.html |
| 2412 |
|
| 2413 |
2021-07-19 Paul Eggert <[email protected]> |
| 2414 |
|
| 2415 |
build: update gnulib submodule to latest |
| 2416 |
|
| 2417 |
2021-05-21 Paul Eggert <[email protected]> |
| 2418 |
|
| 2419 |
diff: better --color help |
| 2420 |
* src/diff.c (option_help_msgid): Reword --color help without |
| 2421 |
using the confusing word “default”. Problem reported |
| 2422 |
by Peter Oliver (Bug#48532). |
| 2423 |
|
| 2424 |
2021-05-20 Paul Eggert <[email protected]> |
| 2425 |
|
| 2426 |
doc: fix URL in HACKING |
| 2427 |
|
| 2428 |
2021-03-24 Paul Eggert <[email protected]> |
| 2429 |
|
| 2430 |
diff: pacify compiler re style |
| 2431 |
* src/diff.c (usage): Prefer &"string"[N] to "string" + N. |
| 2432 |
Some compilers complain about the latter, as they worry C++ |
| 2433 |
refugees will think it’s string concatnation. |
| 2434 |
|
| 2435 |
diff3: avoid signed int overflow |
| 2436 |
* src/diff3.c (main): Avoid signed integer overflow in the very |
| 2437 |
unlikely case of more than INT_MAX incompatible options. Instead, |
| 2438 |
use one bit to record the presence of each type of incompatible |
| 2439 |
option, and report an error if more than one bit is set. |
| 2440 |
|
| 2441 |
maint: don’t bother with -Wno-return-local-addr |
| 2442 |
* configure.ac (WERROR_CFLAGS): Don’t bother with |
| 2443 |
-Wno-return-local-addr as it doesn’t seem to work. |
| 2444 |
Anyway, it’s no longer needed on Ubuntu 20.10. |
| 2445 |
|
| 2446 |
maint: disable -Wstack-protector |
| 2447 |
* configure.ac (WERROR_CFLAGS): Disable -Wstack-protector, as it |
| 2448 |
has a false alarm with lib/vasnprintf.c on Ubuntu 20.10 and it’s |
| 2449 |
not worth working around. Coreutils already disables it. |
| 2450 |
|
| 2451 |
diff: plug memory leak in ifdef.c |
| 2452 |
Problem reported by Than (Bug#47362). |
| 2453 |
Fix the bug by using xmalloca instead of vararrays. |
| 2454 |
* bootstrap.conf (gnulib_modules): Add xmalloca; remove vararrays. |
| 2455 |
* configure.ac: Remove AC_C_VARARRAYS. |
| 2456 |
* src/ifdef.c: Include xmalloca.h instead of xalloc.h. |
| 2457 |
(do_printf_spec): Use xmalloca instead of an xmalloc |
| 2458 |
that lacks a corresponding ‘free’ if HAVE_C_VARARRAYS |
| 2459 |
due to a typo in 2017-05-18T05:51:[email protected]. |
| 2460 |
|
| 2461 |
build: update gnulib submodule to latest |
| 2462 |
|
| 2463 |
2021-01-02 Paul Eggert <[email protected]> |
| 2464 |
|
| 2465 |
maint: work around GCC -Wreturn-local-addr bug |
| 2466 |
* configure.ac: Do not use -Wreturn-local-addr in Gnulib, |
| 2467 |
to suppress a false alarm in vasnprintf.c. |
| 2468 |
|
| 2469 |
2021-01-01 Jim Meyering <[email protected]> |
| 2470 |
|
| 2471 |
maint: update all copyright year number ranges |
| 2472 |
Run "make update-copyright" and then... |
| 2473 |
* gnulib: Update to latest with copyright year adjusted. |
| 2474 |
* tests/init.sh: Sync with gnulib to pick up copyright year. |
| 2475 |
* bootstrap: Likewise. |
| 2476 |
|
| 2477 |
2020-12-05 Jim Meyering <[email protected]> |
| 2478 |
|
| 2479 |
build: require autoconf-2.64 |
| 2480 |
* configure.ac: Require 2.64, up from 2.63, to align with gnulib. |
| 2481 |
|
| 2482 |
2020-03-15 Jim Meyering <[email protected]> |
| 2483 |
|
| 2484 |
build: update gnulib to latest |
| 2485 |
|
| 2486 |
doc: adjust formatting to make apropos (man -k) work better |
| 2487 |
* man/Makefile.am $(dist_man1_MANS): Adjust sed substitution |
| 2488 |
to also remove the space after "GNU". This avoids the single |
| 2489 |
leading space on each man page title line. I'm guessing that |
| 2490 |
interfered with indexing/searching, causing "man -k diff3" to |
| 2491 |
print this: diff3 (1) - (unknown subject). |
| 2492 |
Reported by Dan Jacobon in http://bugs.gnu.org/39769. |
| 2493 |
|
| 2494 |
2020-01-19 Jim Meyering <[email protected]> |
| 2495 |
|
| 2496 |
doc: correct an ancient "At present" |
| 2497 |
* doc/diffutils.texi (Unified Format): Correct the now |
| 2498 |
seriously outdated "At present" (referring to early 1990s) |
| 2499 |
statement to be more of a historical note. |
| 2500 |
Reported by Roland Illig in http://bugs.gnu.org/39184. |
| 2501 |
|
| 2502 |
2020-01-05 Jim Meyering <[email protected]> |
| 2503 |
|
| 2504 |
doc: use program name, not "GNU", in the nroff/man header |
| 2505 |
* man/Makefile.am (dist_man1_MANS): Elide "GNU " prefix |
| 2506 |
from the generated prog+one-line-summary, so that help2man |
| 2507 |
uses the program name rather than "GNU" as the nroff "name". |
| 2508 |
Reported by Dan Jacobson in http://bugs.gnu.org/38574. |
| 2509 |
|
| 2510 |
2020-01-01 Jim Meyering <[email protected]> |
| 2511 |
|
| 2512 |
maint: update all copyright year number ranges |
| 2513 |
Run "make update-copyright" and then... |
| 2514 |
* gnulib: Update to latest with copyright year adjusted. |
| 2515 |
* tests/init.sh: Sync with gnulib to pick up copyright year. |
| 2516 |
* bootstrap: Likewise. |
| 2517 |
|
| 2518 |
2019-12-29 Jim Meyering <[email protected]> |
| 2519 |
|
| 2520 |
maint: avoid gnulib-tool deprecation warnings, and build failure |
| 2521 |
* bootstrap.conf (gnulib_modules): Use getopt-gnu, rather than |
| 2522 |
obsolete "getopt" module. Use nstrftime in place of strftime. |
| 2523 |
(avoided_gnulib_modules): Do not avoid the "lock" module. That |
| 2524 |
would lead to a build failure due to "glthread/lock.h not found". |
| 2525 |
|
| 2526 |
maint: avoid syntax-check failure |
| 2527 |
* po/POTFILES.in: Add argmatch.h; remove xstrtol-error.c |
| 2528 |
|
| 2529 |
maint: disable two and reenable many warning options |
| 2530 |
* configure.ac (GNULIB_WARN_CFLAGS): Disable -Wduplicated-branches |
| 2531 |
and -Wreturn-local-addr, due to a couple of false-positive warnings. |
| 2532 |
(WARN_CFLAGS): Reenable many warnings that now (with recent gcc) |
| 2533 |
provoke no false positive. |
| 2534 |
|
| 2535 |
maint: avoid gnulib's lock-tests module |
| 2536 |
* bootstrap.conf (avoided_gnulib_modules): Also --avoid=lock-tests |
| 2537 |
to avoid gnulib-related build failure. |
| 2538 |
|
| 2539 |
2019-12-23 Jim Meyering <[email protected]> |
| 2540 |
|
| 2541 |
build: update gnulib to latest |
| 2542 |
* gnulib: Update submodule to latest. |
| 2543 |
* bootstrap: Copy from gnulib. |
| 2544 |
* tests/init.sh: Likewise. |
| 2545 |
|
| 2546 |
2019-12-20 Jim Meyering <[email protected]> |
| 2547 |
|
| 2548 |
maint: tweak bootstrap.conf |
| 2549 |
* bootstrap.conf (buildreq): Require at least autoconf 2.62, |
| 2550 |
up from 2.61, just as grep and coreutils do. |
| 2551 |
(bootstrap_post_import_hook): "Copy pkg-config's pkg.m4 ...", |
| 2552 |
copied from grep's bootstrap.conf. |
| 2553 |
(avoided_gnulib_modules): Pull this definition to the top. |
| 2554 |
Formatting. |
| 2555 |
|
| 2556 |
2019-10-01 Dave Odell <[email protected]> (tiny change) |
| 2557 |
|
| 2558 |
cmp: add test case for Bug#37558 |
| 2559 |
* tests/cmp: New test case (Bug#37558). |
| 2560 |
|
| 2561 |
2019-10-01 Paul Eggert <[email protected]> |
| 2562 |
|
| 2563 |
cmp: fix -l width bug |
| 2564 |
Problem reported by Dave Odell (Bug#37558). |
| 2565 |
* src/cmp.c (cmp): Treat negative ‘bytes’ as infinite, fixing a |
| 2566 |
bug introduced in the 2019-08-27 patch that fixed Bug#35256. |
| 2567 |
|
| 2568 |
2019-08-27 Paul Eggert <[email protected]> |
| 2569 |
|
| 2570 |
diff: don’t mistreat -N in arg as a large number |
| 2571 |
Problem reported by alec (Bug#35256). |
| 2572 |
* NEWS: Mention the fix. |
| 2573 |
* bootstrap.conf (gnulib_modules): Use strtoimax and xstrtoimax, |
| 2574 |
not strtoumax and strtoumax. |
| 2575 |
* src/cmp.c (bytes): Now signed, with -1 representing no limit. |
| 2576 |
All uses changed. |
| 2577 |
* src/cmp.c (specify_ignore_initial, main): |
| 2578 |
* src/diff.c (main): |
| 2579 |
* src/ifdef.c (format_group): |
| 2580 |
* src/sdiff.c (interact): |
| 2581 |
Use strtoimax, not strtoumax. |
| 2582 |
|
| 2583 |
build: update gnulib submodule to latest |
| 2584 |
|
| 2585 |
2019-07-19 Paul Eggert <[email protected]> |
| 2586 |
|
| 2587 |
maint: ignore ‘configure’ temporaries |
| 2588 |
* .gitignore: Ignore confdefs*, conftest*. |
| 2589 |
|
| 2590 |
maint: avoid Gnulib setlocale module |
| 2591 |
Problem reported for MS-Windows by Richard Gering (Bug#34376). |
| 2592 |
Diffutils doesn’t need any of the Gnulib fixes for setlocale. |
| 2593 |
* bootstrap.conf (gnulib_tool_option_extras): |
| 2594 |
Avoid the setlocale module. |
| 2595 |
|
| 2596 |
2019-05-24 KO Myung-Hun <[email protected]> |
| 2597 |
|
| 2598 |
tests: init.cfg: use $PATH_SEPARATOR not ':' |
| 2599 |
On OS/2, a path separator is semi-colon ';' not colon ':'. |
| 2600 |
* tests/init.cfg: Replace ':' with $PATH_SEPARATOR. |
| 2601 |
|
| 2602 |
2019-01-20 Jim Meyering <[email protected]> |
| 2603 |
|
| 2604 |
build: ensure no VLA is used |
| 2605 |
Cause developer builds to fail for any use of a VLA. |
| 2606 |
VLAs (variable length arrays) limit portability. |
| 2607 |
* configure.ac (nw): Remove -Wvla from the list of disabled warnings, |
| 2608 |
thus enabling the warning when configured with --enable-gcc-warnings. |
| 2609 |
(GNULIB_NO_VLA) Define, disabling use of VLAs in gnulib. This commit |
| 2610 |
is functionally equivalent to coreutils' v8.30-44-gd26dece5d. |
| 2611 |
|
| 2612 |
build: update gnulib to latest |
| 2613 |
* gnulib: Update to latest. |
| 2614 |
* po/POTFILES.in: Add lib/xstdopen.c. |
| 2615 |
|
| 2616 |
2019-01-06 Paul Eggert <[email protected]> |
| 2617 |
|
| 2618 |
diff: use xstdopen, not stdopen |
| 2619 |
* bootstrap.conf (gnulib_modules): |
| 2620 |
* src/cmp.c, src/diff.c, src/diff3.c, src/sdiff.c (main): |
| 2621 |
Use xstdopen, not stdopen. |
| 2622 |
|
| 2623 |
build: update gnulib submodule to latest |
| 2624 |
|
| 2625 |
2019-01-05 Jim Meyering <[email protected]> |
| 2626 |
|
| 2627 |
maint: convert all TABs to equivalent spaces in indentation |
| 2628 |
Using this file, |
| 2629 |
|
| 2630 |
cat > leading-blank.exempt <<\EOF |
| 2631 |
(\.gitmodules|help2man|pre-commit)$ |
| 2632 |
(?:^|\/)ChangeLog[^/]*$ |
| 2633 |
(?:^|\/)(?:GNU)?[Mm]akefile[^/]*$ |
| 2634 |
\.(?:am|mk)$ |
| 2635 |
EOF |
| 2636 |
|
| 2637 |
run the following command to convert all non-conforming leading white |
| 2638 |
space to be all spaces: |
| 2639 |
|
| 2640 |
git ls-files \ |
| 2641 |
| pcregrep -vf leading-blank.exempt \ |
| 2642 |
| xargs pcregrep -l '^ *\t' \ |
| 2643 |
| xargs perl -MText::Tabs -ni -le \ |
| 2644 |
'$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_' |
| 2645 |
|
| 2646 |
Since that changed old NEWS, I also ran "make update-NEWS-hash" |
| 2647 |
to update the old_NEWS_hash value in cfg.mk. |
| 2648 |
|
| 2649 |
2019-01-05 Paul Eggert <[email protected]> |
| 2650 |
|
| 2651 |
diff: fix cmp, diff3, sdiff with stdin closed |
| 2652 |
* NEWS: Mention this. |
| 2653 |
* src/cmp.c, src/diff3.c, src/sdiff.c: Include stdopen.h. |
| 2654 |
(main): Call stdopen early. |
| 2655 |
* src/cmp.c (main): Simplify now that we need not worry about |
| 2656 |
stdin being closed. |
| 2657 |
* src/diff.c (main): Translate stdopen diagnostic. |
| 2658 |
|
| 2659 |
diff: remove unportable ‘diff -N - f <&-’ feature |
| 2660 |
* NEWS: Mention this. |
| 2661 |
* bootstrap.conf (gnulib_modules): Add stdopen. |
| 2662 |
* doc/diffutils.texi (Comparing Directories): |
| 2663 |
Do not document behavior if stdin is closed. |
| 2664 |
* src/diff.c: Include stdopen.h. |
| 2665 |
(main): Call stdopen early. |
| 2666 |
(compare_files) [__hpux]: Remove recently-introduced |
| 2667 |
special case for HP-UX exec with stdin closed. |
| 2668 |
* tests/new-file: Remove tests of the removed feature. |
| 2669 |
|
| 2670 |
build: update gnulib submodule to latest |
| 2671 |
|
| 2672 |
2019-01-03 Bruno Haible <[email protected]> |
| 2673 |
|
| 2674 |
diff: recognize file descriptors closed by the parent process on HP-UX |
| 2675 |
* src/diff.c (compare_files): Use fcntl to distinguish a file |
| 2676 |
descriptor closed by the parent process from a file descriptor |
| 2677 |
that references /dev/null. |
| 2678 |
|
| 2679 |
2019-01-01 Jim Meyering <[email protected]> |
| 2680 |
|
| 2681 |
maint: update all copyright dates via "make update-copyright" |
| 2682 |
* gnulib: Also update submodule for its copyright updates. |
| 2683 |
|
| 2684 |
2018-12-31 Jim Meyering <[email protected]> |
| 2685 |
|
| 2686 |
maint: post-release administrivia |
| 2687 |
* NEWS: Add header line for next release. |
| 2688 |
* .prev-version: Record previous version. |
| 2689 |
* cfg.mk (old_NEWS_hash): Auto-update. |
| 2690 |
|
| 2691 |
version 3.7 |
| 2692 |
* NEWS: Record release date. |
| 2693 |
|
| 2694 |
maint: distribute new file, init.cfg |
| 2695 |
Otherwise, strip-trailing-cr would fail on a system without valgrind. |
| 2696 |
* tests/Makefile.am (EXTRA_DIST): Include init.cfg. |
| 2697 |
|
| 2698 |
2018-12-30 Dennis Lambe Jr <[email protected]> |
| 2699 |
|
| 2700 |
diff: adjust ANSI escapes for compatibility with less -R |
| 2701 |
GNU less can display ANSI-colored text with the -R flag, but this |
| 2702 |
support has some limitations. One of them is that if an escape |
| 2703 |
sequence starts on one line and ends on a different line, only the |
| 2704 |
first line will be colored in less. |
| 2705 |
|
| 2706 |
As a result, when diff creates colored output with multi-line deletes |
| 2707 |
or adds, less will only color the first line. |
| 2708 |
|
| 2709 |
This change resets ANSI color to the default at the end of |
| 2710 |
each line and restarts it at the beginning of the next. It patches |
| 2711 |
normal and context mode. Side-by-side already worked in my testing. |
| 2712 |
* src/context.c (print_context_label, pr_context_hunk): As above. |
| 2713 |
(pr_unidiff_hunk, print_context_header): Likewise. |
| 2714 |
* src/normal.c (print_normal_hunk): Likewise. |
| 2715 |
* tests/colors: Adjust existing tests to accommodate this. |
| 2716 |
* NEWS (Improvements): Mention it. |
| 2717 |
Proposed in http://bugs.gnu.org/31105 |
| 2718 |
|
| 2719 |
2018-12-29 Jim Meyering <[email protected]> |
| 2720 |
|
| 2721 |
tests: fix colors test on systems lacking fractional timestamp support |
| 2722 |
* tests/colors: The .NNNNNNNNN suffix is not printed on some systems. |
| 2723 |
Adapt the test to accommodate those systems. |
| 2724 |
|
| 2725 |
tests: strip-trailing-cr: avoid failure with ASAN |
| 2726 |
Valgrind cannot operate on an ASAN-compiled binary. |
| 2727 |
* tests/strip-trailing-cr (valgrind): Define as no-op when diff |
| 2728 |
was compiled with sanitizer support. |
| 2729 |
|
| 2730 |
2018-12-28 Jim Meyering <[email protected]> |
| 2731 |
|
| 2732 |
tests: add test for --strip-trailing-cr UMR bug |
| 2733 |
* tests/strip-trailing-cr: New file. Test for today's bug fix. |
| 2734 |
* tests/Makefile.am (TESTS): Add it. |
| 2735 |
|
| 2736 |
tests: import test infrastructure from coreutils |
| 2737 |
* tests/init.cfg: New file, for require_valgrind_ definition (from coreutils). |
| 2738 |
* tests/Makefile.am (PATH): Don't set stderr_fileno_ here, since it is |
| 2739 |
now initialized in init.cfg. |
| 2740 |
|
| 2741 |
2018-12-28 Paul Eggert <[email protected]> |
| 2742 |
Jim Meyering <[email protected]> |
| 2743 |
|
| 2744 |
diff: fix UMR with --strip-trailing-cr |
| 2745 |
Problem reported by Hongxu Chen (Bug#31935). |
| 2746 |
* src/io.c (prepare_text): Strip trailing CR before |
| 2747 |
doing the rest of the analysis. |
| 2748 |
* NEWS: Mention the fix. |
| 2749 |
|
| 2750 |
2018-12-28 Bruno Haible <[email protected]> |
| 2751 |
|
| 2752 |
tests: colors: avoid test failure on AIX 7 |
| 2753 |
* tests/colors: Splice the argument into the printf format string. |
| 2754 |
|
| 2755 |
2018-12-27 Bruno Haible <address@hidden> |
| 2756 |
|
| 2757 |
maint: don't use an undocumented Autoconf macro |
| 2758 |
* configure.ac: Use AC_CONFIG_HEADERS instead of AC_CONFIG_HEADER. |
| 2759 |
|
| 2760 |
2018-12-23 Jim Meyering <[email protected]> |
| 2761 |
|
| 2762 |
build: avoid build failure with --enable-gcc-warnings and latest gcc |
| 2763 |
* src/diff.c (usage): Assert that each line length is no longer than |
| 2764 |
the minimum required size of 4095. This lets newer gcc (currently |
| 2765 |
9.0.0 20181219) infer that it need not issue this warning: |
| 2766 |
diff.c:1012:19: error: '%.*s' directive output between 0 and 2147483647 |
| 2767 |
bytes may exceed minimum required size of 4095 |
| 2768 |
[-Werror=format-overflow=] |
| 2769 |
1012 | printf (" %.*s", msglen, msg); |
| 2770 |
|
| 2771 |
build: update gnulib to latest; and bootstrap and init.sh |
| 2772 |
|
| 2773 |
build: make the autoconf-2.63 requirement explicit |
| 2774 |
* configure.ac: AC_PREREQ: Require 2.63, not 2.59. And quote properly. |
| 2775 |
Autoconf-2.63 has been required for some time via gnulib. |
| 2776 |
This merely makes it explicit. |
| 2777 |
|
| 2778 |
2018-12-20 Jim Meyering <[email protected]> |
| 2779 |
|
| 2780 |
maint: use https: in gnu mirror URL prefix, not http |
| 2781 |
This appears in the generated release announcement message. |
| 2782 |
* cfg.mk (url_dir_list): Use https: prefix, not http:. |
| 2783 |
|
| 2784 |
2018-07-24 Paul Eggert <[email protected]> |
| 2785 |
|
| 2786 |
cmp: fix bug in -b diagnostic |
| 2787 |
Problem reported by mancha (Bug#32249). |
| 2788 |
* src/cmp.c (count_newlines): Restore old value of sentinel. |
| 2789 |
* tests/cmp: Test for the bug. |
| 2790 |
|
| 2791 |
build: update gnulib submodule to latest |
| 2792 |
|
| 2793 |
2018-05-14 Paul Eggert <[email protected]> |
| 2794 |
|
| 2795 |
doc: prepend "GNU" to NAME in man pages |
| 2796 |
Requested by RMS. |
| 2797 |
* src/cmp.c, src/diff.c, src/diff3.c, src/sdiff.c: |
| 2798 |
Prepend "GNU" to first comment, so that the man page says "GNU". |
| 2799 |
|
| 2800 |
2018-04-20 Paul Eggert <[email protected]> |
| 2801 |
|
| 2802 |
sdiff: port to mingw |
| 2803 |
Problem reported by Ross Burton (Bug#31218). |
| 2804 |
* src/sdiff.c (checksigs): Use ‘raise’, not ‘kill’. |
| 2805 |
|
| 2806 |
2018-03-23 Paul Eggert <[email protected]> |
| 2807 |
|
| 2808 |
build: update gnulib submodule to latest |
| 2809 |
|
| 2810 |
2018-01-14 Jim Meyering <[email protected]> |
| 2811 |
|
| 2812 |
tests: fix quoting error in previous change |
| 2813 |
* tests/colors: Double-quote $PATH. |
| 2814 |
|
| 2815 |
2018-01-06 Jim Meyering <[email protected]> |
| 2816 |
|
| 2817 |
tests: port tests/colors to some env-munging shell |
| 2818 |
* tests/colors: Also set PATH="$PATH" in env invocation. |
| 2819 |
|
| 2820 |
maint: update gnulib and copyright dates for 2018 |
| 2821 |
* gnulib: Update to latest. |
| 2822 |
* all files: Run "make update-copyright". |
| 2823 |
* bootstrap: Update from gnulib. |
| 2824 |
|
| 2825 |
maint: suppress gcc's new -Wcast-function-type in gnulib |
| 2826 |
* configure.ac (WERROR_CFLAGS): Suppress gcc's new -Wcast-function-type |
| 2827 |
warning in gnulib, because it would trigger on this: |
| 2828 |
sig-handler.h:47:12: error: cast between incompatible function types\ |
| 2829 |
from 'void (* const)(int, siginfo_t *, void *)' \ |
| 2830 |
{aka 'void (* const)(int, struct <anonymous> *, void *)'} \ |
| 2831 |
to 'void (*)(int)' [-Werror=cast-function-type] |
| 2832 |
return (sa_handler_t) a->sa_sigaction; |
| 2833 |
|
| 2834 |
2017-10-22 Jim Meyering <[email protected]> |
| 2835 |
|
| 2836 |
tests: add expected-failing test for minor subopimality |
| 2837 |
In some unusual cases, diff -u prints suboptimal output. |
| 2838 |
* tests/large-subopt: New test script. |
| 2839 |
* tests/Makefile.am (TESTS): Add it. |
| 2840 |
(XFAIL_TESTS): Add it here, too, to record that this test is |
| 2841 |
currently expected to fail. |
| 2842 |
* tests/large-subopt.in1, tests/large-subopt.in2: Inputs derived from |
| 2843 |
those in http://bugs.gnu.org/28796 |
| 2844 |
|
| 2845 |
2017-09-23 Jim Meyering <[email protected]> |
| 2846 |
|
| 2847 |
gnulib: update to latest |
| 2848 |
|
| 2849 |
2017-05-21 Jim Meyering <[email protected]> |
| 2850 |
|
| 2851 |
maint: make the announcement template Cc the devel- list |
| 2852 |
* cfg.mk (announcement_Cc_): Define. |
| 2853 |
|
| 2854 |
maint: post-release administrivia |
| 2855 |
* NEWS: Add header line for next release. |
| 2856 |
* .prev-version: Record previous version. |
| 2857 |
* cfg.mk (old_NEWS_hash): Auto-update. |
| 2858 |
|
| 2859 |
version 3.6 |
| 2860 |
* NEWS: Record release date. |
| 2861 |
|
| 2862 |
2017-05-19 Jim Meyering <[email protected]> |
| 2863 |
|
| 2864 |
gnulib: update to latest |
| 2865 |
|
| 2866 |
2017-05-18 Jim Meyering <[email protected]> |
| 2867 |
|
| 2868 |
maint: update to work with GCC7's -Werror=implicit-fallthrough= |
| 2869 |
* src/system.h (FALLTHROUGH): Define. |
| 2870 |
Use new FALLTHROUGH macro in place of comments |
| 2871 |
* src/cmp.c: FIXME |
| 2872 |
* src/diff3.c: FIXME |
| 2873 |
* src/ifdef.c: FIXME |
| 2874 |
* src/sdiff.c: FIXME |
| 2875 |
* src/side.c: FIXME |
| 2876 |
* src/util.c: FIXME |
| 2877 |
|
| 2878 |
gnulib: update to latest |
| 2879 |
|
| 2880 |
2017-05-09 Jim Meyering <[email protected]> |
| 2881 |
|
| 2882 |
tests: new-file: closed-stdin: also ensure stdout was empty |
| 2883 |
* tests/new-file: Also require that "out" be empty. |
| 2884 |
|
| 2885 |
2017-05-06 Jim Meyering <[email protected]> |
| 2886 |
|
| 2887 |
maint: stop using @acronym{...} in texinfo sources |
| 2888 |
* doc/diffutils.texi: Remove all uses of @acronym{...}, |
| 2889 |
per recommendation by Karl Berry. |
| 2890 |
* cfg.mk (local-checks-to-skip): Remove exemption, enabling |
| 2891 |
the @acronym{-prohibiting syntax-check rule. |
| 2892 |
|
| 2893 |
2017-05-05 Paul Eggert <[email protected]> |
| 2894 |
|
| 2895 |
cmp: improve EOF diagnostic |
| 2896 |
This improves on yesterday's change, following up on a |
| 2897 |
remark by Jim Meyering (Bug#22816#21). |
| 2898 |
* doc/diffutils.texi (Invoking cmp, cmp Options): Follow POSIX more |
| 2899 |
closely in the documentation of the information appended to the EOF |
| 2900 |
diagnostic. |
| 2901 |
* src/cmp.c (cmp): Be more specific about the shorter file's length |
| 2902 |
and fix some off-by-1 issues in reporting line counts. |
| 2903 |
* tests/cmp: Adjust to match new behavior. |
| 2904 |
Don't assume internal details about stdio buffering. |
| 2905 |
|
| 2906 |
2017-05-04 Benno Schulenberg <[email protected]> |
| 2907 |
|
| 2908 |
diff: describe each --help option with a single string |
| 2909 |
* src/diff.c: To ease translating, fuse four description pieces |
| 2910 |
into two whole ones. Also reword and rewrap one of them to fit |
| 2911 |
within eighty characters. |
| 2912 |
|
| 2913 |
2017-05-04 Paul Eggert <[email protected]> |
| 2914 |
|
| 2915 |
cmp: report prefix length when one file is shorter |
| 2916 |
Requested by Dan Jacobson (Bug#22816). |
| 2917 |
* NEWS: |
| 2918 |
* doc/diffutils.texi (Invoking cmp, cmp Options): Document this. |
| 2919 |
* src/cmp.c (cmp): Implement it. |
| 2920 |
* tests/Makefile.am (TESTS): Add cmp. |
| 2921 |
* tests/cmp: New file. |
| 2922 |
|
| 2923 |
2017-05-02 Jim Meyering <[email protected]> |
| 2924 |
|
| 2925 |
tests: add test for latest fix |
| 2926 |
* NEWS (Bug fixes): Describe it. |
| 2927 |
* tests/invalid-re: New test for just-fixed bug. |
| 2928 |
* tests/Makefile.am (TESTS): Add it. |
| 2929 |
|
| 2930 |
gnulib: update to latest |
| 2931 |
|
| 2932 |
2017-04-27 Paul Eggert <[email protected]> |
| 2933 |
|
| 2934 |
diff: don't crash if regexp is invalid |
| 2935 |
Problem reported by Marcel Böhme in: |
| 2936 |
http://lists.gnu.org/archive/html/bug-diffutils/2017-04/msg00002.html |
| 2937 |
* src/diff.c (add_regexp): Exit if re_compile_pattern fails. |
| 2938 |
|
| 2939 |
2017-03-24 julama <[email protected]> |
| 2940 |
|
| 2941 |
tests: avoid false failure for unreadable /proc/cmdline |
| 2942 |
* tests/brief-vs-stat-zero-kernel-lies: Use "test -r" rather than |
| 2943 |
just "test -f". This avoids a false test failure on a linux system |
| 2944 |
with grsecurity and its GRKERNSEC_PROC_USER option enabled, for which |
| 2945 |
/proc/cmdline is unreadable. Reported in https://bugs.gnu.org/26155 |
| 2946 |
|
| 2947 |
2017-02-01 Jim Meyering <[email protected]> |
| 2948 |
|
| 2949 |
tests: avoid false failure with some shells on debian, freebsd |
| 2950 |
* tests/colors: Move the TERM=dumb setting into the code run by |
| 2951 |
"returns_", since some shells do not propagate envvar setting through |
| 2952 |
to a use of a function like this. That would cause this test to fail |
| 2953 |
because results were colorized when they should not have been. |
| 2954 |
Reported by Nelson Beebe. |
| 2955 |
|
| 2956 |
2017-01-31 Jim Meyering <[email protected]> |
| 2957 |
|
| 2958 |
maint: add "introduced in 3.4" in latest NEWS entry |
| 2959 |
* NEWS: Update. Also, thanks to Nelson Beebe for reporting this. |
| 2960 |
|
| 2961 |
diff: avoid UMR with ---presume-output-tty |
| 2962 |
* src/diff.c (main): Always define presume_output_tty. |
| 2963 |
Otherwise, it would be read uninitialized. |
| 2964 |
Introduced in v3.3-45-g17e2698 |
| 2965 |
* NEWS (Bug fixes): Mention it. |
| 2966 |
|
| 2967 |
gnulib: update to latest; and update bootstrap and init.sh |
| 2968 |
|
| 2969 |
maint: change "time stamp" to "timestamp" globally |
| 2970 |
This avoids a new syntax-check failure. |
| 2971 |
* ChangeLog-2008: Perform that change. |
| 2972 |
* doc/diffutils.texi: Likewise. |
| 2973 |
* NEWS: Likewise. |
| 2974 |
* cfg.mk: Update the old news hash accordingly. |
| 2975 |
|
| 2976 |
2017-01-01 Jim Meyering <[email protected]> |
| 2977 |
|
| 2978 |
maint: update gnulib and copyright dates for 2017 |
| 2979 |
* gnulib: Update to latest. |
| 2980 |
* all files: Run "make update-copyright". |
| 2981 |
|
| 2982 |
2016-11-08 Jim Meyering <[email protected]> |
| 2983 |
|
| 2984 |
tests: use "returns_" rather than explicit comparison with "$?" |
| 2985 |
* tests/colors: Use "returns_ 1" rather than testing $? = 1 |
| 2986 |
* tests/basic: Likewise. |
| 2987 |
* tests/binary: Likewise. |
| 2988 |
* tests/filename-quoting: Likewise. |
| 2989 |
* tests/function-line-vs-leading-space: Likewise. |
| 2990 |
* tests/ignore-matching-lines: Likewise. |
| 2991 |
* tests/label-vs-func: Likewise. |
| 2992 |
* tests/new-file: Likewise. |
| 2993 |
* tests/no-dereference: Likewise. |
| 2994 |
* tests/no-newline-at-eof: Likewise. |
| 2995 |
* tests/stdin: Likewise. |
| 2996 |
|
| 2997 |
2016-10-25 Paul Eggert <[email protected]> |
| 2998 |
|
| 2999 |
diff: fix big performance degradation in 3.4 |
| 3000 |
* NEWS, doc/diffutils.texi (Overview): Document this. |
| 3001 |
* src/analyze.c (diff_2_files): Restore too_expensive heuristic, |
| 3002 |
but this time with a floor that is 16 times the old floor. This |
| 3003 |
should fix Bug#16848, by generating good-quality output for its |
| 3004 |
test case, while not introducing Bug#24715, by running nearly as |
| 3005 |
fast as diff-3.3 for that test case. |
| 3006 |
|
| 3007 |
build: update gnulib submodule to latest |
| 3008 |
|
| 3009 |
2016-10-16 Jim Meyering <[email protected]> |
| 3010 |
|
| 3011 |
maint: use die rather than error |
| 3012 |
Use "die (N, ..." rather than "error (N, ..." whenever N is a nonzero |
| 3013 |
constant. That lets the compiler know that control never goes beyond |
| 3014 |
that point, and thus makes unnecessary the occasional following |
| 3015 |
"abort ();" or "break;" statement we have historically added to inform |
| 3016 |
static analysis tools of this aspect of "error" semantics. |
| 3017 |
* src/die.h: New file. |
| 3018 |
* src/Makefile.am (noinst_HEADERS): Add it. |
| 3019 |
* src/cmp.c: Use die in place of error whenever the first |
| 3020 |
argument is a nonzero constant. Also remove any immediately- |
| 3021 |
following call to abort, and include "die.h". |
| 3022 |
* src/diff.c: Likewise. |
| 3023 |
* src/diff3.c: Likewise. |
| 3024 |
* src/sdiff.c: Likewise. |
| 3025 |
* src/util.c: Likewise. |
| 3026 |
|
| 3027 |
2016-10-02 Jim Meyering <[email protected]> |
| 3028 |
|
| 3029 |
gnulib: update to latest |
| 3030 |
|
| 3031 |
build: avoid GCC 7's new warnings |
| 3032 |
* src/util.c (get_funky_string): Adjust comment so that GCC 7's |
| 3033 |
-Wimplicit-fallthrough recognizes it. |
| 3034 |
* src/diff3.c (main): Cast boolean MERGE to "int" to avoid this: |
| 3035 |
diff3.c:341:25: error: '~' on a boolean expression \ |
| 3036 |
[-Werror=bool-operation] |
| 3037 |
|
| 3038 |
2016-08-30 Jim Meyering <[email protected]> |
| 3039 |
|
| 3040 |
gnulib: update to latest |
| 3041 |
|
| 3042 |
2016-08-29 Jim Meyering <[email protected]> |
| 3043 |
|
| 3044 |
gnulib: update to latest, to port to upcoming GCC 7 |
| 3045 |
This fixes compilation errors when using gcc-7-to-be that were |
| 3046 |
due to missing backslashes in gnulib's intprops.h and an API |
| 3047 |
change in functions like __builtin_add_overflow. This ports |
| 3048 |
to GCC 7's newer built-in overflow-checking functions. |
| 3049 |
|
| 3050 |
2016-08-28 Paul Eggert <[email protected]> |
| 3051 |
|
| 3052 |
diff: don't assume ptrdiff_t <= long long int |
| 3053 |
* src/system.h (printint, pI): Port to (theoretical) platforms |
| 3054 |
where ptrdiff_t is wider than long long int (Bug#24311). |
| 3055 |
|
| 3056 |
2016-08-27 Paul Eggert <[email protected]> |
| 3057 |
|
| 3058 |
diff: port line numbers to mingw64 |
| 3059 |
Problem reported by Peter Rosin (Bug#24311). |
| 3060 |
* src/system.h (printint, pI): New typedef and macro. |
| 3061 |
All uses of 'long int' and "%l" in printf format replaced by |
| 3062 |
'printint' and "%"pI respectively. |
| 3063 |
* src/ifdef.c (do_printf_spec): Don't assume pI is length 1. |
| 3064 |
|
| 3065 |
2016-08-20 Jim Meyering <[email protected]> |
| 3066 |
|
| 3067 |
maint: post-release administrivia |
| 3068 |
* NEWS: Add header line for next release. |
| 3069 |
* .prev-version: Record previous version. |
| 3070 |
* cfg.mk (old_NEWS_hash): Auto-update. |
| 3071 |
|
| 3072 |
version 3.5 |
| 3073 |
* NEWS: Record release date. |
| 3074 |
|
| 3075 |
2016-08-16 Jim Meyering <[email protected]> |
| 3076 |
|
| 3077 |
build: arrange to build with -fno-common, when possible |
| 3078 |
* configure.ac (WERROR_CFLAGS): Add -fno-common, when possible. |
| 3079 |
This would have prevented the duplicate definition of |
| 3080 |
presume_output_tty that was fixed in v3.4-10-gc2dc91f. |
| 3081 |
|
| 3082 |
2016-08-16 Hanno Böck <[email protected]> |
| 3083 |
|
| 3084 |
diff: avoid duplicate definition of presume_output_tty |
| 3085 |
* src/util.c (presume_output_tty): Remove this definition. |
| 3086 |
The other is in diff.h. Reported in https://bugs.gnu.org/24248 |
| 3087 |
|
| 3088 |
2016-08-14 Jim Meyering <[email protected]> |
| 3089 |
|
| 3090 |
gnulib: update to latest |
| 3091 |
|
| 3092 |
tests: diff3: work around missing seq on some systems |
| 3093 |
* tests/diff3 (seq): Provide a seq replacement function, |
| 3094 |
since at least AIX, SunOS 5.10, OpenBSD-5.8 lack it. |
| 3095 |
Reported by Assaf Gordon in https://bugs.gnu.org/24227#8 |
| 3096 |
|
| 3097 |
2016-08-13 Jim Meyering <[email protected]> |
| 3098 |
|
| 3099 |
diff3: fix leaks, for real |
| 3100 |
* src/diff3.c (struct diff_block)[lint]: Add member, n2. |
| 3101 |
(free_diff_block, next_to_n2): New functions. |
| 3102 |
* tests/diff3: Add more test coverage. |
| 3103 |
|
| 3104 |
maint: require that commit messages be of a certain form |
| 3105 |
* bootstrap.conf (bootstrap_epilogue): Merge from coreutils, so that |
| 3106 |
a local commit hook will now help enforce consistent commit messages. |
| 3107 |
* Makefile.am (check-git-hook-script-sync): New rule, largely copied |
| 3108 |
from coreutils. |
| 3109 |
* scripts/git-hooks/commit-msg: New file, from coreutils, but |
| 3110 |
with adapted list of program names. |
| 3111 |
* scripts/git-hooks/applypatch-msg: New file, from git. |
| 3112 |
* scripts/git-hooks/pre-applypatch: Likewise. |
| 3113 |
* scripts/git-hooks/pre-commit: Likewise. |
| 3114 |
|
| 3115 |
2016-08-13 Bastian Beischer <[email protected]> |
| 3116 |
|
| 3117 |
diff3: fix heap use-after-free; add minimal diff3 test coverage |
| 3118 |
Commit v3.3-42-g3b74a90, "FIXME: src/diff3: plug a leak" added an |
| 3119 |
invalid use of free, leading to use-after-free in nearly any invocation |
| 3120 |
of diff3. Revert that commit. |
| 3121 |
* NEWS (Bug fixes): Mention it. |
| 3122 |
* tests/diff3: New file, to add minimal test coverage. |
| 3123 |
* tests/Makefile.am (TESTS): Add it. |
| 3124 |
Reported by Bastian Beischer in http://bugs.gnu.org/24210 |
| 3125 |
|
| 3126 |
2016-08-13 Jim Meyering <[email protected]> |
| 3127 |
|
| 3128 |
build: ignore texinfo build artifacts |
| 3129 |
* .gitignore: Ignore texinfo artifacts in doc/. |
| 3130 |
|
| 3131 |
maint: diff3: remove an unreachable statement |
| 3132 |
* src/diff3.c (main): Remove unreachable "return" after exit from main. |
| 3133 |
|
| 3134 |
2016-08-08 Jim Meyering <[email protected]> |
| 3135 |
|
| 3136 |
diff: disable colorization for TERM=dumb |
| 3137 |
* src/diff.c (main): With --color or --color=auto, when TERM is |
| 3138 |
"dumb", disable colorization. Suggested by Daniel Colascione. |
| 3139 |
* NEWS (Bug fixes): Mention it. |
| 3140 |
* tests/colors: Add a test that would fail without this change, |
| 3141 |
yet passes with it. |
| 3142 |
|
| 3143 |
maint: post-release administrivia |
| 3144 |
* NEWS: Add header line for next release. |
| 3145 |
* .prev-version: Record previous version. |
| 3146 |
* cfg.mk (old_NEWS_hash): Auto-update. |
| 3147 |
|
| 3148 |
version 3.4 |
| 3149 |
* NEWS: Record release date. |
| 3150 |
|
| 3151 |
2016-08-06 Jim Meyering <[email protected]> |
| 3152 |
|
| 3153 |
gnulib: update to latest |
| 3154 |
|
| 3155 |
tests: tweak built_programs definition |
| 3156 |
* tests/Makefile.am (built_programs): Adjust to work around what |
| 3157 |
may be a problem due to interaction between Solaris 10's /bin/sh |
| 3158 |
and an old version of GNU make. Reported by Dagobert Michelsen |
| 3159 |
in https https://bugs.gnu.org/24137. |
| 3160 |
|
| 3161 |
2016-08-02 Jim Meyering <[email protected]> |
| 3162 |
|
| 3163 |
gnulib: update to latest |
| 3164 |
|
| 3165 |
tests: skip a /proc/self-dependent test on the Hurd |
| 3166 |
* tests/brief-vs-stat-zero-kernel-lies: The Hurd's /proc/self |
| 3167 |
is not useful, so detect that and skip the test that requires it. |
| 3168 |
Reported by Assaf Gordon in https://debbugs.gnu.org/24121#29 |
| 3169 |
|
| 3170 |
2016-08-01 Jim Meyering <[email protected]> |
| 3171 |
|
| 3172 |
tests/colors: fix portability problem with touch --date |
| 3173 |
* tests/colors (epoch): Don't use GNU touch's --date=$epoch option. |
| 3174 |
Use the portable -t 197001010000.00. |
| 3175 |
Reported by Assaf Gordon in https://debbugs.gnu.org/24121#8 |
| 3176 |
|
| 3177 |
build: Solaris 9: avoid link failure due to isblank use |
| 3178 |
* bootstrap.conf (gnulib_modules): Add isblank, to avoid a link |
| 3179 |
error on Solaris 9 Sparc. Reported by Dagobert Michelsen. |
| 3180 |
|
| 3181 |
test: improve test infrastructure |
| 3182 |
* tests/envvar-check: New file, copied from grep, with the addition |
| 3183 |
of the EDITOR and GREP_OPTIONS envvar names. |
| 3184 |
* tests/Makefile.am (EXTRA_DIST): Add it. |
| 3185 |
(TESTS_ENVIRONMENT): Revamp, to be more like that of grep. |
| 3186 |
|
| 3187 |
2016-07-31 Jim Meyering <[email protected]> |
| 3188 |
|
| 3189 |
maint: remove gl/lib/reg*.c.diff; no longer needed |
| 3190 |
* gl/lib/regcomp.c.diff: Remove file, now that gnulib's |
| 3191 |
regcomp.c compiles regex.c with -Wno-unused-parameter. |
| 3192 |
* gl/lib/regex_internal.c.diff: This file induced a change to ensure |
| 3193 |
that the "Idx" type was unsigned and to remove a few "VAR < 0" |
| 3194 |
comparisons. These days, it is probably fine to stay in sync with |
| 3195 |
gnulib/glibc's copies |
| 3196 |
of these files, so remove these patches, too. |
| 3197 |
* gl/lib/regexec.c.diff: Likewise. |
| 3198 |
Prompted by a report by Assaf Gordon and a suggestion from Paul Eggert. |
| 3199 |
|
| 3200 |
tests: colors: fix a portability problem and work around a shell bug |
| 3201 |
* tests/colors (e): Fix a portability bug: use printf '\033' |
| 3202 |
rather than '\e' to generate the required byte sequence, since |
| 3203 |
for some shells (at least dash 0.5.8), the latter doesn't work. |
| 3204 |
Work around a shell bug whereby "local tab=$(printf '\t')" |
| 3205 |
would result in an empty value for "$tab": hoist each "tab" |
| 3206 |
definition up/out of its function to global scope. |
| 3207 |
Reported by Assaf Gordon in http://debbugs.gnu.org/24116#8 |
| 3208 |
|
| 3209 |
2016-07-23 Jim Meyering <[email protected]> |
| 3210 |
|
| 3211 |
gnulib: update to latest; and tests/init.sh |
| 3212 |
* gnulib: Update to latest. |
| 3213 |
* init.sh: Update from gnulib. |
| 3214 |
|
| 3215 |
2016-05-30 Jim Meyering <[email protected]> |
| 3216 |
|
| 3217 |
maint: arrange for "make distcheck" to work with unreleased automake |
| 3218 |
* dist-check.mk (my-distcheck): Remove all .deps directories |
| 3219 |
before performing the recursive comparison. |
| 3220 |
|
| 3221 |
2016-05-24 Glenn Morris <[email protected]> |
| 3222 |
|
| 3223 |
doc: fix a reference to emacs' emerge node |
| 3224 |
* doc/diffutils.texi (Interactive Merging): Correct a reference to |
| 3225 |
emacs' emerge node: s/emerge/Emerge/. |
| 3226 |
This addresses http://debbugs.gnu.org/23613 |
| 3227 |
|
| 3228 |
2016-04-30 Jim Meyering <[email protected]> |
| 3229 |
|
| 3230 |
maint: arrange for better URLs in generated announcement message |
| 3231 |
* cfg.mk (url_dir_list): Define. I had been correcting the generated |
| 3232 |
URLs by hand, just before the announcement. This is better. |
| 3233 |
|
| 3234 |
2016-03-15 Jim Meyering <[email protected]> |
| 3235 |
|
| 3236 |
maint: don't ignore gitlog-to-changelog failure |
| 3237 |
* Makefile.am (gen-ChangeLog): Don't ignore failure of |
| 3238 |
gitlog-to-changelog. This syncs to coreutils' copy of this rule. |
| 3239 |
|
| 3240 |
2016-03-06 Giuseppe Scrivano <[email protected]> |
| 3241 |
|
| 3242 |
diff: --color: fix an infinite recursion bug |
| 3243 |
* src/diff.h (presume_output_tty): New extern variable. |
| 3244 |
* src/diff.c (PRESUME_OUTPUT_TTY_OPTION): New enum. |
| 3245 |
(group_format_option): Add '-presume-output-tty'. |
| 3246 |
(main): Handle PRESUME_OUTPUT_TTY_OPTION. |
| 3247 |
* src/util.c: New variable `presume_output_tty'. |
| 3248 |
(check_color_output): Handle presume_output_tty. |
| 3249 |
(set_color_context): Call process_signals only when color_context is |
| 3250 |
not RESET_CONTEXT. |
| 3251 |
* tests/colors: Check that diff doesn't crash when interrupted |
| 3252 |
in the middle of a color sequence. |
| 3253 |
|
| 3254 |
Reported by Gisle Vanem in http://debbugs.gnu.org/22067 |
| 3255 |
|
| 3256 |
2016-01-31 Jim Meyering <[email protected]> |
| 3257 |
|
| 3258 |
maint: update prereq version of gettext |
| 3259 |
* configure.ac: Increase designated gettext version to 0.19.2 |
| 3260 |
* bootstrap.conf (buildreq): Likewise. |
| 3261 |
Remove now-unnecessary code to remove gettext-provided files. |
| 3262 |
|
| 3263 |
gnulib: update to latest |
| 3264 |
|
| 3265 |
2016-01-01 Jim Meyering <[email protected]> |
| 3266 |
|
| 3267 |
FIXME: src/diff3: plug a leak |
| 3268 |
|
| 3269 |
2016-01-01 Jim Meyering <[email protected]> |
| 3270 |
|
| 3271 |
maint: update copyright year, bootstrap, init.sh |
| 3272 |
Run "make update-copyright" and then... |
| 3273 |
|
| 3274 |
* gnulib: Update to latest. |
| 3275 |
* tests/init.sh: Update from gnulib. |
| 3276 |
* bootstrap: Likewise. |
| 3277 |
|
| 3278 |
2015-12-06 Jim Meyering <[email protected]> |
| 3279 |
|
| 3280 |
diff --brief no longer mistakenly reports diff. with 0-sized /proc/ files |
| 3281 |
Normally, it is safe to assume two regular files are different when |
| 3282 |
their st_size values are different. However, that assumption may |
| 3283 |
be invalid if either value is zero, as happens with files on Linux |
| 3284 |
/proc and /sys file systems. Since skipping this optimization will |
| 3285 |
usually cost very little (one read syscall, to read zero bytes), |
| 3286 |
it is fine to accommodate those unusual files. |
| 3287 |
* src/analyze.c (diff_2_files): Do not assume regular files differ |
| 3288 |
just because their st_size values differ when one or more is 0. |
| 3289 |
* src/diff.c (compare_files): Likewise. |
| 3290 |
* tests/brief-vs-proc-stat-zero: New test. |
| 3291 |
* tests/Makefile.am: Add it. |
| 3292 |
* NEWS (Bug fixes): Describe it. |
| 3293 |
Reported by Stephan Müller in http://debbugs.gnu.org/21942 |
| 3294 |
|
| 3295 |
tests: arrange to print any skipped-test explanation to tty, too |
| 3296 |
I noticed that when a test was skipped, the reason was not printed. |
| 3297 |
This fixes it. In coreutils, this variable is set in init.cfg, |
| 3298 |
but there is no point in putting the definition so far from the |
| 3299 |
code that chooses the file descriptor number in tests/Makefile.am. |
| 3300 |
* tests/Makefile.am (TESTS_ENVIRONMENT) [stderr_fileno_]: Define |
| 3301 |
here (to 9), right next to the companion "9>&2". |
| 3302 |
|
| 3303 |
2015-11-29 Jim Meyering <[email protected]> |
| 3304 |
|
| 3305 |
build: add gperf to the list of required programs |
| 3306 |
* bootstrap.conf (buildreq): Add gperf to the list. |
| 3307 |
Reported by Stephan Müller in http://debbugs.gnu.org/21945 |
| 3308 |
|
| 3309 |
2015-11-29 Giuseppe Scrivano <[email protected]> |
| 3310 |
|
| 3311 |
tests: Add tests for --color and --palette |
| 3312 |
* tests/colors: New file. |
| 3313 |
* tests/Makefile.am (TESTS): Add colors. |
| 3314 |
|
| 3315 |
doc: mention --color and --palette in NEWS |
| 3316 |
|
| 3317 |
diff: add --palette |
| 3318 |
* bootstrap (gnulib_modules): Add 'argmatch'. |
| 3319 |
* doc/diffutils.texi: Add documentation for --palette |
| 3320 |
* src/diff.h (set_color_palette): New prototype. |
| 3321 |
* src/diff.c (set_color_palette): New function. |
| 3322 |
(color_palette): New variable. |
| 3323 |
* src/utils.c: Include "argmatch.h". |
| 3324 |
(struct bin_str): New struct. |
| 3325 |
(struct color_ext_type): New struct. |
| 3326 |
(color_indicator): New array. |
| 3327 |
(indicator_name): New array. |
| 3328 |
(indicator_no): New enum. |
| 3329 |
(parse_state): New enum. |
| 3330 |
(put_indicator): New function. |
| 3331 |
(get_funky_string): New function. Copied from coreutils ls. |
| 3332 |
(parse_diff_color): New function. Copied from coreutils ls |
| 3333 |
"parse_ls_color" function. |
| 3334 |
(set_color_context): Use put_indicator instead of directly |
| 3335 |
outputting the sequence. |
| 3336 |
* po/POTFILES.in: Add 'lib/argmatch.c' |
| 3337 |
|
| 3338 |
diff: add support for --color |
| 3339 |
* doc/diffutils.texi (diff Options): Add documentation for --color. |
| 3340 |
Copied from coreutils ls --color. |
| 3341 |
* src/context.c (pr_unidiff_hunk): Set the color context. |
| 3342 |
(print_context_header): Likewise. |
| 3343 |
(pr_context_hunk): Likewise. |
| 3344 |
* src/diff.h (enum colors_style): New enum to record when to use colors. |
| 3345 |
(colors_style): New variable to memorize the argument value. |
| 3346 |
(set_color_context): Add function definition. |
| 3347 |
* src/diff.c: : Define COLOR_OPTION. |
| 3348 |
(specify_colors_style): New function. |
| 3349 |
(longopts): Add --color. |
| 3350 |
(main): Handle --color argument. |
| 3351 |
(option_help_msgid): Add usage string for --color. |
| 3352 |
* src/normal.c (print_normal_hunk): Set the color context. |
| 3353 |
* src/side.c (print_1sdiff_line): Likewise. |
| 3354 |
* src/util.c (print_1_line_nl): New function. |
| 3355 |
(print_1_line): Make it a wrapper of 'print_1_line_nl'. |
| 3356 |
(colors_enabled): New boolean variable. |
| 3357 |
(begin_output): Call check_color_output once the output file is |
| 3358 |
configured. |
| 3359 |
(output_1_line): Periodically call `process_signals'. |
| 3360 |
(caught_signals): New sigset_t. |
| 3361 |
(colors_enabled): New boolean variable. |
| 3362 |
(interrupt_signal): New sig_atomic_t. |
| 3363 |
(stop_signal_count): New sig_atomic_t. |
| 3364 |
(check_color_output): New function. |
| 3365 |
(install_signal_handlers): Likewise. Copied from coreutils ls. |
| 3366 |
(process_signals): Likewise. Copied from coreutils ls. |
| 3367 |
(set_color_context): New function. |
| 3368 |
(sighandler): Likewise. Copied from coreutils ls. |
| 3369 |
(stophandler): Likewise. Copied from coreutils ls. |
| 3370 |
|
| 3371 |
2015-09-24 Andreas Grünbacher <[email protected]> |
| 3372 |
|
| 3373 |
diff: Improve help text of option --label |
| 3374 |
* src/diff.c (option_help_msgid): Improve help text of option --label. |
| 3375 |
|
| 3376 |
2015-09-01 Jim Meyering <[email protected]> |
| 3377 |
|
| 3378 |
build: correct man-page generation rule |
| 3379 |
The PATH was set incorrectly, so that the diff used by |
| 3380 |
help2man was the one from $PATH, rather than the just-built |
| 3381 |
one. |
| 3382 |
* man/Makefile.am (bin_dir): New variable, to... |
| 3383 |
(dist_man1_MANS): ...prepend ../src to PATH, not just "..". |
| 3384 |
Also, add a test to ensure that each $(bin_dir)/$$base is |
| 3385 |
executable, so this doesn't happen again. |
| 3386 |
In http://debbugs.gnu.org/21023, Rodrigo Valiña |
| 3387 |
Gutiérrez reported that diff.1 from the diffutils-3.3 tarball |
| 3388 |
contained no description of the then-new --no-dereference option. |
| 3389 |
|
| 3390 |
2015-07-10 Jim Meyering <[email protected]> |
| 3391 |
|
| 3392 |
doc: --no-dereference: improve wording/description |
| 3393 |
* doc/diffutils.texi (Comparing Directories): Correct grammar. |
| 3394 |
(diff Options) [--no-dereference]: Say a little more. |
| 3395 |
|
| 3396 |
2015-01-01 Jim Meyering <[email protected]> |
| 3397 |
|
| 3398 |
maint: update copyright year ranges to include 2015; update gnulib |
| 3399 |
|
| 3400 |
2014-12-12 KO Myung-Hun <[email protected]> |
| 3401 |
|
| 3402 |
diff: skip test if seek is not possible on OS/2 kLIBC |
| 3403 |
This fixes the problem that 'diff - file' and 'cat file | diff - file' |
| 3404 |
fail due to a seek failure with a message 'diff.exe: -: Invalid seek', |
| 3405 |
because seek does not work on stdin and a pipe on OS/2 kLIBC. |
| 3406 |
|
| 3407 |
* src/io.c (sip): Set skip_test to true if seek is not possible on |
| 3408 |
OS/2 kLIBC. |
| 3409 |
|
| 3410 |
2014-12-09 Jim Meyering <[email protected]> |
| 3411 |
|
| 3412 |
gnulib: update to latest |
| 3413 |
|
| 3414 |
2014-12-09 KO Myung-Hun <[email protected]> |
| 3415 |
|
| 3416 |
build: double-quote use of $PATH |
| 3417 |
* man/Makefile.am (dist_man1_MANS): On OS/2, PATH_SEPARATOR is ';', |
| 3418 |
but unquoted, that is interpreted as the shell's statement |
| 3419 |
terminator. Quote it. |
| 3420 |
|
| 3421 |
2014-10-27 Paul Eggert <[email protected]> |
| 3422 |
|
| 3423 |
diff: fix integer overflow problem with --tabsize |
| 3424 |
Reported by Tobias Stoeckmann in: http://bugs.gnu.org/18857 |
| 3425 |
* src/diff.c (main): Don't overflow if INTMAX_MAX / 2 < tabsize. |
| 3426 |
* tests/bignum: New file, to test for this bug. |
| 3427 |
* tests/Makefile.am (TESTS): Add it. |
| 3428 |
|
| 3429 |
2014-09-03 Paul Eggert <[email protected]> |
| 3430 |
|
| 3431 |
doc: mention diff -B fix in NEWS |
| 3432 |
|
| 3433 |
diff: fix bug with diff -B and incomplete lines |
| 3434 |
Reported by Navin Kabra via Eric Blake in: |
| 3435 |
http://bugs.gnu.org/18402 |
| 3436 |
* src/util.c (analyze_hunk): Don't mishandle incomplete |
| 3437 |
lines at end of file. |
| 3438 |
* tests/no-newline-at-eof: Test for the bug. |
| 3439 |
|
| 3440 |
diff: fix performance bug with prefix computation |
| 3441 |
* src/io.c (find_identical_ends): Fix performance bug: |
| 3442 |
the test for when the prefix was needed messed up by |
| 3443 |
the 2002-02-28 integer-overflow fixes, causing performance to be |
| 3444 |
worse than it needed to be. |
| 3445 |
|
| 3446 |
2014-08-23 Jim Meyering <[email protected]> |
| 3447 |
|
| 3448 |
gnulib: update to latest, as well as bootstrap |
| 3449 |
|
| 3450 |
maint: update copyright year range in texinfo documentation |
| 3451 |
* doc/diffutils.texi: Update copyright. |
| 3452 |
|
| 3453 |
2014-04-15 Jim Meyering <[email protected]> |
| 3454 |
|
| 3455 |
maint: update bug-reporting address |
| 3456 |
* README: Change bug-gnu-utils@... to [email protected]. |
| 3457 |
* doc/diffutils.texi: Likewise. |
| 3458 |
Reported by Jamie Landeg Jones. |
| 3459 |
|
| 3460 |
2014-03-26 Paul Eggert <[email protected]> |
| 3461 |
|
| 3462 |
diff: fix two "..." typos in --help output |
| 3463 |
* src/diff.c (option_help_msgid): Remove two "..." typos (Bug#17102). |
| 3464 |
|
| 3465 |
2014-03-25 Paul Eggert <[email protected]> |
| 3466 |
|
| 3467 |
doc: improve documentation about reading and stdin |
| 3468 |
See Bug#17075. |
| 3469 |
* doc/diffutils.texi (Comparison): Say that files need not be read. |
| 3470 |
(Invoking diff): Remove confusing remark about 'diff - -'. |
| 3471 |
It's not that useful, and it's not portable anyway. |
| 3472 |
|
| 3473 |
2014-02-24 Paul Eggert <[email protected]> |
| 3474 |
|
| 3475 |
diff, sdiff: minor integer overflow fixes |
| 3476 |
* src/context.c (find_hunk): |
| 3477 |
Simplify, now that 2 * context + 1 cannot overflow. |
| 3478 |
* src/diff.c (main): |
| 3479 |
* src/sdiff.c (interact): |
| 3480 |
Don't rely on undefined behavior on signed integer overflow. |
| 3481 |
* src/diff.c (main): Don't let contexts exceed CONTEXT_MAX. |
| 3482 |
* src/system.h (CONTEXT_MAX): New macro. |
| 3483 |
|
| 3484 |
diff: fix bug with -I and overlapping hunks |
| 3485 |
Problem reported by Vincent Lefevre in <http://bugs.gnu.org/16864>. |
| 3486 |
* src/context.c (find_hunk): Threshold is CONTEXT only if |
| 3487 |
the second change is ignorable. |
| 3488 |
* tests/ignore-matching-lines: New test. |
| 3489 |
* tests/Makefile.am (TESTS): Add it. |
| 3490 |
|
| 3491 |
2014-02-23 Paul Eggert <[email protected]> |
| 3492 |
|
| 3493 |
diff: remove TOO_EXPENSIVE heuristic |
| 3494 |
Problem reported by Vincent Lefevre in <http://bugs.gnu.org/16848>. |
| 3495 |
The simplest solution is to remove the TOO_EXPENSIVE heuristic |
| 3496 |
that I added to GNU diff in 1993. Although appropriate for |
| 3497 |
circa-1993 hardware, these days the heuristic seems to be more |
| 3498 |
trouble than it's worth. |
| 3499 |
* NEWS: Document this. |
| 3500 |
* doc/diffutils.texi (Overview): Modernize citations. |
| 3501 |
Remove mention of TOO_EXPENSIVE heuristic. |
| 3502 |
* src/analyze.c (diff_2_files): Adjust to TOO_EXPENSIVE-related |
| 3503 |
API changes in gnulib's diffseq module. |
| 3504 |
|
| 3505 |
build: update gnulib submodule to latest |
| 3506 |
|
| 3507 |
2014-01-31 Paul Eggert <[email protected]> |
| 3508 |
|
| 3509 |
diff: exit with status 1, not 2, when binary files differ |
| 3510 |
Problem reported by Vincent Lefevre in <http://bugs.gnu.org/16608>. |
| 3511 |
* NEWS: |
| 3512 |
* doc/diffutils.texi (Binary, Invoking diff): Document this. |
| 3513 |
* src/analyze.c (briefly_report): Return void, not int. |
| 3514 |
All uses changed. Do not futz with exit status. Simplify. |
| 3515 |
* tests/binary: Adjust to match new behavior. |
| 3516 |
|
| 3517 |
2013-09-26 Paul Eggert <[email protected]> |
| 3518 |
|
| 3519 |
build: omit -Wsuggest-attribute=pure for lib |
| 3520 |
* configure.ac (WARN_CFLAGS): Omit -Wsuggest-attribute=pure |
| 3521 |
when compiling the lib subdirectory. Reported for Fedora 19 |
| 3522 |
by Eric Blake in <http://bugs.gnu.org/15463>. |
| 3523 |
|
| 3524 |
2013-08-22 Paul Eggert <[email protected]> |
| 3525 |
|
| 3526 |
cmp, diff, sdiff: tune by using rawmemchr |
| 3527 |
On my platform (AMD Phenom II X4 910e, Fedora 17 x86-64), this sped up |
| 3528 |
'cmp -n 8GiB /dev/full /dev/zero' by a factor of 3.8, and |
| 3529 |
'cmp -sn 8GiB /dev/full /dev/zero' by a factor of 1.8. |
| 3530 |
* bootstrap.conf (gnulib_modules): Add rawmemchr. |
| 3531 |
* src/cmp.c (cmp): Optimize the common case where buffers are the same, |
| 3532 |
by using count_newlines rather than block_compare_and_count. |
| 3533 |
(block_compare_and_count): Remove. |
| 3534 |
(count_newlines): New function. |
| 3535 |
* src/cmp.c (count_newlines): |
| 3536 |
* src/io.c (prepare_text): |
| 3537 |
* src/sdiff.c (lf_copy, lf_skip, lf_snarf): |
| 3538 |
Use rawmemchr instead of memchr, for speed. |
| 3539 |
|
| 3540 |
2013-08-12 Paul Eggert <[email protected]> |
| 3541 |
|
| 3542 |
cmp: tune 'cmp a b' for GCC x86 |
| 3543 |
Performance problem reported by David Balažic in: |
| 3544 |
http://lists.gnu.org/archive/html/bug-diffutils/2013-08/msg00013.html |
| 3545 |
* src/system.h (word): Make it size_t, not uintmax_t. |
| 3546 |
This sped up plain cmp 90% on my tests (GCC 4.8.1, x86). |
| 3547 |
|
| 3548 |
2013-07-06 Paul Eggert <[email protected]> |
| 3549 |
|
| 3550 |
build: update gnulib submodule to latest |
| 3551 |
|
| 3552 |
2013-05-06 Stefano Lattarini <[email protected]> |
| 3553 |
|
| 3554 |
build: enable 'subdir-objects' automake option |
| 3555 |
The future major Automake version (2.0, ETA at least one year from now) |
| 3556 |
might enable that option unconditionally, so better get prepared in due |
| 3557 |
time. |
| 3558 |
|
| 3559 |
* configure.ac (AM_INIT_AUTOMAKE): Adjust. |
| 3560 |
(AM_PROG_CC_C_O): New, required by Automake up to 1.13.x when the |
| 3561 |
'subdir-objects' is in use. |
| 3562 |
|
| 3563 |
2013-04-28 Paul Eggert <[email protected]> |
| 3564 |
|
| 3565 |
build: update gnulib submodule to latest |
| 3566 |
|
| 3567 |
2013-04-03 Paul Eggert <[email protected]> |
| 3568 |
|
| 3569 |
diff: fix bug with Asian file names |
| 3570 |
Problem reported by Errembault Philippe in: |
| 3571 |
http://lists.gnu.org/archive/html/bug-diffutils/2013-03/msg00012.html |
| 3572 |
* NEWS: Document this. |
| 3573 |
* src/dir.c (compare_names): Fall back on file_name_cmp if |
| 3574 |
compare_collated returns 0, unless ignoring file name case. |
| 3575 |
(diff_dirs): Don't bother with the O(N**2) stuff unless ignoring |
| 3576 |
file name case. |
| 3577 |
* tests/Makefile.am (TESTS): Add strcoll-0-names. |
| 3578 |
* tests/strcoll-0-names: New file. |
| 3579 |
|
| 3580 |
diff: remove unnecessary decl |
| 3581 |
* src/dir.c (compare_names_for_qsort): Remove declaration. |
| 3582 |
Not needed now that we assume C89. |
| 3583 |
|
| 3584 |
diff: tune compare_names_for_qsort |
| 3585 |
* src/dir.c (compare_collated): New function. |
| 3586 |
(compare_names): Use it. |
| 3587 |
(compare_names_for_qsort): Use it. This is a bit more efficient |
| 3588 |
as it can avoid a double invocation of file_name_cmp when |
| 3589 |
file_name_cmp returns zero. |
| 3590 |
|
| 3591 |
2013-03-30 Jim Meyering <[email protected]> |
| 3592 |
|
| 3593 |
doc: mention new option, --no-dereference in 3.3's NEWS |
| 3594 |
* NEWS (New feeatures): Update 3.3's news to mention --no-dereference. |
| 3595 |
Reported by Denis Excoffier. |
| 3596 |
* Makefile.am (old_NEWS_hash): Update, since this modifies old, and |
| 3597 |
normally-immutable NEWS. |
| 3598 |
|
| 3599 |
2013-03-26 Paul Eggert <[email protected]> |
| 3600 |
|
| 3601 |
tests: port to Solaris 10 /bin/sh |
| 3602 |
* tests/Makefile.am (TESTS_ENVIRONMENT): |
| 3603 |
Use "FOO=val; export FOO" rather than "export FOO=val", |
| 3604 |
as the latter form doesn't work with Solaris /bin/sh. |
| 3605 |
Problem found when trying to run "make check" on Solaris 10. |
| 3606 |
|
| 3607 |
2013-03-24 Jim Meyering <[email protected]> |
| 3608 |
|
| 3609 |
maint: post-release administrivia |
| 3610 |
* NEWS: Add header line for next release. |
| 3611 |
* .prev-version: Record previous version. |
| 3612 |
* cfg.mk (old_NEWS_hash): Auto-update. |
| 3613 |
|
| 3614 |
version 3.3 |
| 3615 |
* NEWS: Record release date. |
| 3616 |
|
| 3617 |
2013-03-23 Paul Eggert <[email protected]> |
| 3618 |
|
| 3619 |
doc: fix menu typo |
| 3620 |
* doc/diffutils.texi (Comparing Three Files): Fix out-of-order menu. |
| 3621 |
Bug caught by Texinfo 5.0. |
| 3622 |
|
| 3623 |
maint: update build procedure to recent gettext etc. |
| 3624 |
* bootstrap.conf (gnulib_modules): Add vararrays. |
| 3625 |
(needed_gnulib_files, unnecessary_gettext_files): New vars. |
| 3626 |
(bootstrap_post_import_hook): New function, to implement these vars. |
| 3627 |
(excluded_files): Remove; 'bootstrap' no longer supports this. |
| 3628 |
Its function is now performed by unnecessary_gettext_files. |
| 3629 |
(buildreq): Update automake to 1.12.2, to avoid CVE-2012-3386. |
| 3630 |
* configure.ac (AM_GNU_GETTEXT_VERSION): Bump from 0.17 to 0.18.2, |
| 3631 |
to lessen the probability that we'll have outlandishly old files |
| 3632 |
during a build. |
| 3633 |
* m4/vararrays.m4: Remove from repository, as we now use the |
| 3634 |
gnulib version. |
| 3635 |
|
| 3636 |
2013-03-21 Jim Meyering <[email protected]> |
| 3637 |
|
| 3638 |
build: update gnulib to latest and adapt; update bootstrap, too |
| 3639 |
Blindly updating to the latest from gnulib, bootstrap would |
| 3640 |
fail due to failure of our local patches to apply. Hence, |
| 3641 |
these first two updates. |
| 3642 |
* gl/lib/regex_internal.c.diff: Update offsets, so this patch |
| 3643 |
applies to the latest from gnulib. |
| 3644 |
* gl/lib/regex_internal.h.diff: Remove file. No longer needed. |
| 3645 |
* bootstrap: Update from gnulib. |
| 3646 |
|
| 3647 |
2013-01-06 Paul Eggert <[email protected]> |
| 3648 |
|
| 3649 |
tests: port to hosts lacking fmt, make -C |
| 3650 |
* tests/Makefile.am (built_programs): Don't assume fmt works. |
| 3651 |
Don't rely on 'make -C', either. |
| 3652 |
|
| 3653 |
maint: update .gitignore for recent gnulib |
| 3654 |
* .gitignore: Add tests/*.trs and several *.h and *.sed files in lib, |
| 3655 |
|
| 3656 |
2013-01-04 Jim Meyering <[email protected]> |
| 3657 |
|
| 3658 |
build: update gnulib submodule to latest |
| 3659 |
|
| 3660 |
maint: update all copyright year number ranges |
| 3661 |
Run "make update-copyright". |
| 3662 |
|
| 3663 |
2012-10-23 Eric Blake <[email protected]> |
| 3664 |
|
| 3665 |
build: default to --enable-gcc-warnings in a git tree |
| 3666 |
Anyone building from cloned sources can be assumed to have a new |
| 3667 |
enough environment, such that enabling gcc warnings by default will |
| 3668 |
be useful. Tarballs still default to no warnings, and the default |
| 3669 |
can still be overridden with --disable-gcc-warnings. |
| 3670 |
* configure.ac (gl_gcc_warnings): Set default based on environment. |
| 3671 |
|
| 3672 |
2012-10-03 Paul Eggert <[email protected]> |
| 3673 |
|
| 3674 |
* doc/diffutils.texi (cmp Options): Document -l format better. |
| 3675 |
|
| 3676 |
2012-09-10 Jim Meyering <[email protected]> |
| 3677 |
|
| 3678 |
maint: use xasprintf in place of xmalloc+sprintf |
| 3679 |
* bootstrap.conf (gnulib_modules): Add gnulib's xvasprintf module. |
| 3680 |
* src/util.c: Include "xvasprintf.h". |
| 3681 |
(begin_output): Use xasprintf in place of xmalloc+sprintf. |
| 3682 |
|
| 3683 |
2012-09-10 Andreas Gruenbacher <[email protected]> |
| 3684 |
|
| 3685 |
diff: encode file names with special characters |
| 3686 |
* src/util.c (c_escape_char): New function. |
| 3687 |
(c_escape): New function. |
| 3688 |
(begin_output): Escape file names when needed. |
| 3689 |
* src/context.c (print_context_header): New names parameter. |
| 3690 |
(print_context_label): New name parameter. |
| 3691 |
* src/diff.h (print_context_header): Change prototype. |
| 3692 |
* tests/filename-quoting: New file. |
| 3693 |
* NEWS: Document this change. |
| 3694 |
|
| 3695 |
2012-08-30 Paul Eggert <[email protected]> |
| 3696 |
|
| 3697 |
diff: silence GCC warning instead of slowing down |
| 3698 |
* src/dir.c (find_dir_file_pathname): Use 'IF_LINT (volatile)' to |
| 3699 |
silence the gcc warning, rather than using 'volatile', as the |
| 3700 |
warning appears to be bogus. |
| 3701 |
|
| 3702 |
2012-08-28 Jim Meyering <[email protected]> |
| 3703 |
|
| 3704 |
diff: avoid possible longjmp-triggered misbehavior |
| 3705 |
* src/dir.c (find_dir_file_pathname): gcc 4.8.0 20120825 reported |
| 3706 |
that a local variable's value might be clobbered. Declare "match" |
| 3707 |
to be volatile. |
| 3708 |
|
| 3709 |
build: update gnulib, bootstrap and init.sh to latest |
| 3710 |
|
| 3711 |
maint: avoid new syntax-check failure due to @xref use |
| 3712 |
* doc/diffutils.texi: Change several "; @xref{..." to ". @xref{...", |
| 3713 |
since @xref should start a sentence. |
| 3714 |
|
| 3715 |
2012-05-15 Paul Eggert <[email protected]> |
| 3716 |
|
| 3717 |
maint: remove ms subdirectory |
| 3718 |
diffutils is now designed to build with Cygwin or MinGW. |
| 3719 |
The old DJGPP stuff probably doesn't work anyway. |
| 3720 |
* Makefile.am (SUBDIRS): Remove ms. |
| 3721 |
* NEWS: Document this. |
| 3722 |
* configure.ac (AC_CONFIG_FILES): Remove ms/Makefile. |
| 3723 |
* ms/Makefile.am, ms/README, ms/config.bat, ms/config.sed: |
| 3724 |
* ms/config.site: Remove. |
| 3725 |
|
| 3726 |
2012-05-14 Paul Eggert <[email protected]> |
| 3727 |
|
| 3728 |
maint: update bootstrap from gnulib |
| 3729 |
* bootstrap: Update from gnulib. |
| 3730 |
|
| 3731 |
main: port subcommands to mingw |
| 3732 |
Problem reported by Eli Zaretskii in |
| 3733 |
<http://lists.gnu.org/archive/html/bug-gnu-utils/2012-05/msg00013.html>. |
| 3734 |
Approach suggested by Bruno Haible as option (4) in |
| 3735 |
<http://lists.gnu.org/archive/html/bug-gnu-utils/2012-05/msg00036.html>. |
| 3736 |
* bootstrap.conf (gnulib_modules): Add system-quote. |
| 3737 |
* src/diff3.c, src/sdiff.c, src/util.c: |
| 3738 |
Include <system-quote.h>, not <sh-quote.h>. |
| 3739 |
* src/diff3.c (read_diff): |
| 3740 |
* src/sdiff.c (main, edit): |
| 3741 |
* src/util.c (begin_output): |
| 3742 |
Use system_quote_argv, for portability to Mingw. |
| 3743 |
* src/sdiff.c (NUM_SIGS, handler_index_of_SIGINT): Now enum |
| 3744 |
values, not macros; this is cleaner and avoids a GCC warning if |
| 3745 |
!HAVE_WORKING_VFORK. |
| 3746 |
* src/util.c (begin_output) [! HAVE_WORKING_FORK]: Do not use -f, |
| 3747 |
for consistency with the HAVE_WORKING_FORK code. |
| 3748 |
|
| 3749 |
maint: update bootstrap from gnulib |
| 3750 |
* bootstrap: Update from gnulib. |
| 3751 |
|
| 3752 |
maint: m4/gnulib-cache.m4 is not under version control |
| 3753 |
This is like what coreutils does, and suppresses 'git status' chatter. |
| 3754 |
* .gitignore: Add /m4/gnulib-cache.m4. |
| 3755 |
|
| 3756 |
Use binary mode when testing for binary files. |
| 3757 |
This reverts the 2006-01-05 change and modernizes to the current API. |
| 3758 |
Idea suggested by Eli Zaretskii in: |
| 3759 |
http://lists.gnu.org/archive/html/bug-gnu-utils/2012-05/msg00066.html |
| 3760 |
* src/cmp.c (main): |
| 3761 |
* src/diff.c (main, compare_files): |
| 3762 |
Use set_binary_mode rather than SET_BINARY. |
| 3763 |
* src/diff.c (compare_files): Omit unnecessary use of O_BINARY. |
| 3764 |
* src/io.c (sip): Sample unknown files in binary mode, to see |
| 3765 |
whether they are binary. |
| 3766 |
(read_files): Read binary files in binary mode. |
| 3767 |
|
| 3768 |
build: update gnulib submodule to latest |
| 3769 |
|
| 3770 |
2012-05-13 Stefano Lattarini <[email protected]> |
| 3771 |
|
| 3772 |
build: omit obsolete AM_PROG_CC_STDC macro |
| 3773 |
The Automake-provided macro 'AM_PROG_CC_STDC' has been superseded by |
| 3774 |
the Autoconf-provided one 'AC_PROG_CC' since October 2002, and will |
| 3775 |
be removed in the next major automake version. |
| 3776 |
* configure.ac (AM_PROG_CC_STDC): Drop it. |
| 3777 |
|
| 3778 |
2012-05-05 Jim Meyering <[email protected]> |
| 3779 |
|
| 3780 |
diff: fix a typo that was always disabling the same_special_file macro |
| 3781 |
* src/system.h (same_special_file): Correct cpp guard expression: |
| 3782 |
s/HAVE_ST_RDEV/HAVE_STRUCT_STAT_ST_RDEV/. Reported by Eli Zaretskii. |
| 3783 |
|
| 3784 |
2012-04-17 Jim Meyering <[email protected]> |
| 3785 |
|
| 3786 |
maint: update bootstrap from gnulib |
| 3787 |
* bootstrap: Update from gnulib. |
| 3788 |
|
| 3789 |
2012-03-07 Eric Blake <[email protected]> |
| 3790 |
|
| 3791 |
usage: improve wording of --ignore-matching-lines |
| 3792 |
* src/diff.c (option_help_msgid): Tweak wording. |
| 3793 |
|
| 3794 |
2012-03-04 Paul Eggert <[email protected]> |
| 3795 |
|
| 3796 |
doc: explain -I RE better in --help output |
| 3797 |
* src/diff.c, src/sdiff.c (option_help_msgid): For -I RE, |
| 3798 |
change "whose lines all match" to "all whose lines match" to avoid |
| 3799 |
unintended interpretation. Reported by Danijel Tasov in |
| 3800 |
<http://bugs.debian.org/648411>. |
| 3801 |
|
| 3802 |
2012-02-12 Paul Eggert <[email protected]> |
| 3803 |
|
| 3804 |
sdiff: remove dependency on sigprocmask |
| 3805 |
* bootstrap.conf (gnulib_modules): Remove sigprocmask. |
| 3806 |
* src/sdiff.c (temporary_file): No need to invoke sigprocmask |
| 3807 |
here, since the signal handler merely sets a flag. |
| 3808 |
|
| 3809 |
2012-02-04 Paul Eggert <[email protected]> |
| 3810 |
|
| 3811 |
diff: -N, --unidirectional-new-file now compare to "-" too |
| 3812 |
* NEWS: Document this. |
| 3813 |
* doc/diffutils.texi (Comparing Directories): Likewise. |
| 3814 |
Also, document that these options work at the top level. |
| 3815 |
* src/diff.c (compare_files): Treat EBADF like ENOENT, to handle |
| 3816 |
the case where "-" is closed. Allow the other file to be |
| 3817 |
STDIN_FILENO, in case it's "-". |
| 3818 |
* tests/Makefile.am (TESTS): Add new-file. |
| 3819 |
* tests/new-file: New file. |
| 3820 |
|
| 3821 |
2012-01-25 Paul Eggert <[email protected]> |
| 3822 |
|
| 3823 |
maint: quote 'like this' or "like this", not `like this' |
| 3824 |
This is in response to a recent change in the GNU coding standards, |
| 3825 |
which now suggest quoting 'like this' or "like this", instead of |
| 3826 |
`like this' or ``like this''. |
| 3827 |
* HACKING, NEWS, README, README-hacking, TODO, doc/diagmeet.note: |
| 3828 |
* doc/diffutils.texi, ms/config.bat, ms/config.site: |
| 3829 |
* src/analyze.c, src/cmp.c, src/context.c, src/diff.c: |
| 3830 |
* src/diff.h, src/diff3.c, src/dir.c, src/ifdef.c, src/io.c: |
| 3831 |
* src/sdiff.c, src/side.c, src/system.h, src/util.c: |
| 3832 |
* tests/help-version: |
| 3833 |
Quote 'like this' or "like this" in commentary. |
| 3834 |
* cfg.mk (old_NEWS_hash): Adjust to reflect new NEWS quoting. |
| 3835 |
* man/help2man: Update to 1.40.4 version, with quoting fixed as above. |
| 3836 |
* po/en.po: Remove translation involving `, as it's no longer needed. |
| 3837 |
* src/cmp.c (try_help, specify_ignore_initial, usage, main): |
| 3838 |
* src/diff.c (main, try_help, option_help_msgid, specify_value) |
| 3839 |
(compare_files): |
| 3840 |
* src/diff3.c (main, try_help, option_help_msgid, usage) |
| 3841 |
(read_diff): |
| 3842 |
* src/dir.c (compare_names): |
| 3843 |
* src/sdiff.c (try_help, usage, check_child_status, main): |
| 3844 |
* src/util.c (finish_output): |
| 3845 |
* tests/help-version: |
| 3846 |
Quote 'like this' in output. |
| 3847 |
|
| 3848 |
build: update gnulib submodule to latest |
| 3849 |
|
| 3850 |
2012-01-12 Jim Meyering <[email protected]> |
| 3851 |
|
| 3852 |
build: accommodate newer bootstrap from gnulib |
| 3853 |
* bootstrap.conf (gnulib_tool_option_extras): Add both --symlink |
| 3854 |
and --makefile-name=gnulib.mk. Also remove now-obsolete $bt/ prefix. |
| 3855 |
* bootstrap: Update from gnulib. |
| 3856 |
* tests/init.sh: Update from gnulib. |
| 3857 |
* lib/Makefile.am: Initialize numerous variables, so that |
| 3858 |
generated code in gnulib.mk may use += to append to them. |
| 3859 |
|
| 3860 |
maint: avoid new syntax-check failure |
| 3861 |
* src/diff.c (compare_files): Use STREQ, not strcmp. |
| 3862 |
|
| 3863 |
2012-01-08 Bruno Haible <[email protected]> |
| 3864 |
|
| 3865 |
New option --no-dereference. |
| 3866 |
* src/diff.h (no_dereference_symlinks): New variable. |
| 3867 |
* src/diff.c: Include xreadlink.h. |
| 3868 |
(longopts): Add --no-dereference option. |
| 3869 |
(main): Accept --no-dereference option. |
| 3870 |
(option_help_msgid): Mention the --no-dereference option. |
| 3871 |
(compare_files): If no_dereference_symlinks is true, use lstat() |
| 3872 |
instead of stat(). Compare symbolic links by comparing their values. |
| 3873 |
* bootstrap.conf (gnulib_modules): Add lstat, stat, xreadlink. |
| 3874 |
* doc/diffutils.texi (Comparing Directories, diff Options): Mention the |
| 3875 |
--no-dereference option. |
| 3876 |
* tests/no-dereference: New file. |
| 3877 |
* tests/Makefile.am (TESTS): Add it. |
| 3878 |
|
| 3879 |
2012-01-01 Jim Meyering <[email protected]> |
| 3880 |
|
| 3881 |
maint: update all copyright year number ranges |
| 3882 |
Run "make update-copyright". |
| 3883 |
|
| 3884 |
2011-12-14 Jim Meyering <[email protected]> |
| 3885 |
|
| 3886 |
build: update to latest gnulib and adapt |
| 3887 |
* tests/binary: Reverse arguments to compare to avoid failure of |
| 3888 |
new syntax-check rule. |
| 3889 |
* configure.ac: Use -Wno-format-nonliteral. |
| 3890 |
Mark functions as pure of const, per recommendations enabled by |
| 3891 |
new gcc -W options. Use _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST. |
| 3892 |
* lib/cmpbuf.h (buffer_lcm, block_compare): |
| 3893 |
Apply pure and/or const attributes. |
| 3894 |
* src/cmp.c (block_compare): Likewise. |
| 3895 |
* src/context.c (find_hunk): Likewise. |
| 3896 |
* src/diff.h (lines_differ): Likewise. |
| 3897 |
* src/diff3.c (skipwhite): Likewise. |
| 3898 |
* src/dir.c (dir_loop): Likewise. |
| 3899 |
* src/util.c (find_change, find_reverse_change): Likewise. |
| 3900 |
(translate_line_number): Likewise. |
| 3901 |
|
| 3902 |
build: stop distributing gzip'd releases; xz is enough |
| 3903 |
* configure.ac (AM_INIT_AUTOMAKE): Add no-dist-gzip. |
| 3904 |
|
| 3905 |
2011-11-29 Jim Meyering <[email protected]> |
| 3906 |
|
| 3907 |
tests: use "compare exp out", not "compare out exp" |
| 3908 |
Likewise, when an empty file is expected, use "compare /dev/null out", |
| 3909 |
not "compare out /dev/null". I.e., specify the expected/desired contents |
| 3910 |
via the first file name. Prompted by a suggestion from Bruno Haible |
| 3911 |
in http://thread.gmane.org/gmane.comp.gnu.grep.bugs/4020/focus=29154 |
| 3912 |
|
| 3913 |
Run these commands: |
| 3914 |
|
| 3915 |
git grep -l -E 'compare [^ ]+ exp' \ |
| 3916 |
|xargs perl -pi -e 's/\b(compare) (\S+) (exp\S*)/$1 $3 $2/' |
| 3917 |
git grep -l -E 'compare [^ ]+ /dev/null' \ |
| 3918 |
|xargs perl -pi -e 's,\b(compare) (\S+) (/dev/null),$1 $3 $2,' |
| 3919 |
|
| 3920 |
But manually convert this one: |
| 3921 |
|
| 3922 |
-compare out exp-$(echo $opt|tr ' ' _) |
| 3923 |
+compare exp-$(echo $opt|tr ' ' _) out |
| 3924 |
|
| 3925 |
and avoid an inappropriate change to cfg.mk. |
| 3926 |
|
| 3927 |
2011-10-12 Stefano Lattarini <[email protected]> |
| 3928 |
|
| 3929 |
tests: use more portable fd redirection in TESTS_ENVIRONMENT |
| 3930 |
* tests/Makefile.am (TESTS_ENVIRONMENT): Redirection with `exec 9>&2' |
| 3931 |
is not portable to various Korn shells, and to (at least) HP-UX 11 |
| 3932 |
/bin/sh. Use a more portable idiom. |
| 3933 |
See http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/22488 for |
| 3934 |
lots of discussion. |
| 3935 |
|
| 3936 |
2011-10-11 Stefano Lattarini <[email protected]> |
| 3937 |
|
| 3938 |
tests: make test runner a script, not a shell function |
| 3939 |
All the test scripts in the diffutils testsuite are shell scripts, |
| 3940 |
so the current definition of TESTS_ENVIRONMENT, which adaptively |
| 3941 |
run tests using either perl or the shell depending on their kind, |
| 3942 |
is an overkill. |
| 3943 |
|
| 3944 |
Moreover, this change is required in order for the testsuite to |
| 3945 |
continue to work with the new testsuite harness that is planned |
| 3946 |
to be introduced in Automake 1.12 (which, as of the writing date, |
| 3947 |
is still under development and in late alpha state). |
| 3948 |
|
| 3949 |
See also related discussion on bug-coreutils: |
| 3950 |
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8887> |
| 3951 |
|
| 3952 |
* tests/Makefile.am (TESTS_ENVIRONMENT): Remove definition of the |
| 3953 |
`shell_or_perl_' shell function, which is not required anymore. |
| 3954 |
(LOG_COMPILER): New, define to `$(SHELL)'. |
| 3955 |
* tests/binary: Make executable. |
| 3956 |
* tests/colliding-file-names: Likewise. |
| 3957 |
* tests/excess-slash: Likewise. |
| 3958 |
* tests/no-newline-at-eof: Likewise. |
| 3959 |
|
| 3960 |
2011-10-04 Claudio Bley <[email protected]> |
| 3961 |
|
| 3962 |
portability: use SET_BINARY rather than xfreopen (NULL, ... |
| 3963 |
* src/diff.c: Include binary-io.h, not xfreopen.h. |
| 3964 |
(main): Use SET_BINARY (...) rather than xfreopen (NULL, X, ...), |
| 3965 |
because the latter doesn't work on MinGW and crashes using MSVC. |
| 3966 |
* src/cmp.c (main): Likewise. |
| 3967 |
|
| 3968 |
2011-10-04 Jim Meyering <[email protected]> |
| 3969 |
|
| 3970 |
build: update gnulib submodule to latest |
| 3971 |
|
| 3972 |
2011-09-02 Jim Meyering <[email protected]> |
| 3973 |
|
| 3974 |
post-release administrivia |
| 3975 |
* NEWS: Add header line for next release. |
| 3976 |
* .prev-version: Record previous version. |
| 3977 |
* cfg.mk (old_NEWS_hash): Auto-update. |
| 3978 |
|
| 3979 |
version 3.2 |
| 3980 |
* NEWS: Record release date. |
| 3981 |
|
| 3982 |
build: update bootstrap and tests/init.sh from gnulib |
| 3983 |
* bootstrap: Update from gnulib. |
| 3984 |
* tests/init.sh: Likewise. |
| 3985 |
|
| 3986 |
build: update gnulib submodule to latest |
| 3987 |
|
| 3988 |
2011-09-01 Jim Meyering <[email protected]> |
| 3989 |
|
| 3990 |
doc: diffutils' texi-derived doc may now be in debian's "main" section |
| 3991 |
* NEWS (Packaging): Mention the "no front/back-cover" change. |
| 3992 |
|
| 3993 |
2011-08-14 Jim Meyering <[email protected]> |
| 3994 |
|
| 3995 |
maint: avoid new "make sytnax-check" failure. |
| 3996 |
* src/diff.h (find_dir_file_pathname): Mark declaration with "extern" |
| 3997 |
keyword, in order to placate the tight-scope syntax check. |
| 3998 |
|
| 3999 |
2011-08-14 Paul Eggert <[email protected]> |
| 4000 |
|
| 4001 |
* src/io.c (find_and_hash_each_line): Refactor for brevity. |
| 4002 |
|
| 4003 |
2011-08-14 Roland McGrath <[email protected]> |
| 4004 |
|
| 4005 |
diff, sdiff: new option --ignore-trailing-space (-Z) |
| 4006 |
Derived from Roland McGrath's patch (dated June 2004!) in: |
| 4007 |
http://lists.gnu.org/archive/html/bug-gnu-utils/2004-07/msg00000.html |
| 4008 |
* NEWS: |
| 4009 |
* doc/diffutils.texi (White Space, Blank Lines) |
| 4010 |
(sdiff Option Summary, diff Options, sdiff Options): Document -Z. |
| 4011 |
* src/diff.h (IGNORE_TRAILING_SPACE) |
| 4012 |
(IGNORE_TAB_EXPANSION_AND_TRAILING_SPACE): New constants, for -Z. |
| 4013 |
* src/diff.c (shortopts, longopts, main, option_help_msgid): |
| 4014 |
* src/sdiff.c (longopts, option_help_msgid, main): |
| 4015 |
* src/io.c (find_and_hash_each_line): |
| 4016 |
* src/util.c (lines_differ, analyze_hunk): Support -Z. |
| 4017 |
|
| 4018 |
2011-08-13 Paul Eggert <[email protected]> |
| 4019 |
|
| 4020 |
* bootstrap.conf (gnulib_modules): Remove timegm. |
| 4021 |
This fixes a problem noted by Andreas Schwab in: |
| 4022 |
http://lists.gnu.org/archive/html/bug-diffutils/2011-08/msg00035.html |
| 4023 |
|
| 4024 |
2011-08-13 Tim Waugh <[email protected]> |
| 4025 |
|
| 4026 |
diff: --ignore-file-name-case now applies at top level too |
| 4027 |
Derived from Tim Waugh's patch in: |
| 4028 |
http://lists.gnu.org/archive/html/bug-diffutils/2011-08/msg00034.html |
| 4029 |
* NEWS, doc/diffutils.texi (diff Options): Document this. |
| 4030 |
* src/diff.c (compare_files): Implement this, by using |
| 4031 |
find_dir_file_pathname. |
| 4032 |
* src/diff.h (find_dir_file_pathname): New decl. |
| 4033 |
* src/dir.c: Include filenamecat.h. |
| 4034 |
(find_dir_file_pathname): New function. |
| 4035 |
|
| 4036 |
2011-08-13 Paul Eggert <[email protected]> |
| 4037 |
|
| 4038 |
* .gitignore: Add lib/unistr, lib/unused-parameter.h. |
| 4039 |
|
| 4040 |
2011-08-10 Jim Meyering <[email protected]> |
| 4041 |
|
| 4042 |
post-release administrivia |
| 4043 |
* NEWS: Add header line for next release. |
| 4044 |
* .prev-version: Record previous version. |
| 4045 |
* cfg.mk (old_NEWS_hash): Auto-update. |
| 4046 |
|
| 4047 |
version 3.1 |
| 4048 |
* NEWS: Record release date. |
| 4049 |
|
| 4050 |
build: use largefile module and update to latest gnulib |
| 4051 |
* configure.ac: Remove AC_SYS_LARGEFILE, subsumed by ... |
| 4052 |
* bootstrap.conf (gnulib_modules): ...this. Use largefile module. |
| 4053 |
* gnulib: Update to latest. |
| 4054 |
|
| 4055 |
2011-08-08 Santiago Vila <[email protected]> |
| 4056 |
|
| 4057 |
doc: insert comma in --help line for --ignore-space-change (-b) |
| 4058 |
* src/diff.c (option_help_msgid): Insert omitted comma between |
| 4059 |
"-b" and "--ignore-space-change". (tiny change) |
| 4060 |
|
| 4061 |
2011-08-04 Jim Meyering <[email protected]> |
| 4062 |
|
| 4063 |
doc: relax restriction on front-cover and back-cover texts |
| 4064 |
* doc/diffutils.texi (copying): Relax restriction on front-cover |
| 4065 |
and back-cover texts (just as m4 did here: |
| 4066 |
http://git.savannah.gnu.org/cgit/m4.git/commit?id=ee1e92ec). |
| 4067 |
Reported by Santiago Vila. Fix suggested by Eric Blake. |
| 4068 |
|
| 4069 |
2011-08-03 Jim Meyering <[email protected]> |
| 4070 |
|
| 4071 |
tests: update init.sh from gnulib |
| 4072 |
* tests/init.sh: Update from gnulib. |
| 4073 |
|
| 4074 |
build: update gnulib submodule to latest |
| 4075 |
|
| 4076 |
2011-07-03 Jim Meyering <[email protected]> |
| 4077 |
|
| 4078 |
maint: remove inclusion of unused header, for "make syntax-check" |
| 4079 |
* src/diff3.c: Don't include <inttostr.h>. Not used. |
| 4080 |
* src/context.c: Likewise. |
| 4081 |
|
| 4082 |
2011-06-19 Jim Meyering <[email protected]> |
| 4083 |
|
| 4084 |
build: don't require perl when building from a tarball |
| 4085 |
But do ensure -- in all other circumstances -- that the man/*.1 |
| 4086 |
files are rebuilt whenever the version number changes. |
| 4087 |
* configure.ac (SRC_VERSION_C): Define. |
| 4088 |
* man/Makefile.am (dist_man1_MANS): Rename from $(man1_MANS), |
| 4089 |
so that we distribute those pesky man/*.1 files. |
| 4090 |
(EXTRA_DIST): Reflect name change. |
| 4091 |
(MAINTAINERCLEANFILES): Define this, not DISTCLEANFILES, |
| 4092 |
now that these generated files are distributed. |
| 4093 |
($(dist_man1_MANS)): Depend on $(SRC_VERSION_C), so we get the |
| 4094 |
full dependency when not building from a tarball. |
| 4095 |
|
| 4096 |
2011-06-13 Jim Meyering <[email protected]> |
| 4097 |
|
| 4098 |
doc: do not distribute generated man/*.1 man files |
| 4099 |
* man/help2man: New file. |
| 4100 |
* man/Makefile.am: Use $(srcdir)/help2man. |
| 4101 |
Convert $(dist_man1_MANS) to $(man1_MANS), to tell automake |
| 4102 |
not to distribute the generated man/*.1 files. Now they're |
| 4103 |
generated at build-from-tarball time. |
| 4104 |
($(man1_MANS)): Depend on version.c, so that man pages are |
| 4105 |
regenerated whenever the version string changes. |
| 4106 |
|
| 4107 |
build: ccache works better without embedded version strings |
| 4108 |
* src/Makefile.am: Generate version.c and version.h and put the |
| 4109 |
new symbol in a tiny library to be used by each program. |
| 4110 |
(LDADD): Add the new library. |
| 4111 |
* src/cmp.c (main): Use Version, not PACKAGE_VERSION, so the .o |
| 4112 |
file does not change with each commit-derived version increment. |
| 4113 |
* src/diff.c (main): Likewise. |
| 4114 |
* src/diff3.c (main): Likewise. |
| 4115 |
* src/sdiff.c (main): Likewise. |
| 4116 |
* src/system.h: Include "version.h". |
| 4117 |
* .gitignore: Add version.[ch] |
| 4118 |
|
| 4119 |
2011-06-12 Jim Meyering <[email protected]> |
| 4120 |
|
| 4121 |
doc: ensure each program has a man/*.x file: add "SEE ALSO" references |
| 4122 |
* man/cmp.x: New file. |
| 4123 |
* man/diff3.x: New file. |
| 4124 |
* man/sdiff.x: New file. |
| 4125 |
* man/diff.x: Add xrefs to the other three programs, and to patch. |
| 4126 |
* man/Makefile.am (EXTRA_DIST): List new files. |
| 4127 |
(cmp.1, diff3.1, sdiff.1): Depend on each .x file. |
| 4128 |
|
| 4129 |
doc: rename diff.texi to diffutils.texi |
| 4130 |
This makes the .texi basename the same as the package name, |
| 4131 |
which is consistent with most other GNU packages. |
| 4132 |
* doc/diffutils.texi: Rename from... |
| 4133 |
* doc/diff.texi: ...removed. |
| 4134 |
* doc/Makefile.am (info_TEXINFOS): Reflect name change. |
| 4135 |
(diffutils_TEXINFOS): Likewise. |
| 4136 |
* cfg.mk (gendocs_options_): Remove this customization. It is no |
| 4137 |
longer needed, now that the .texi name matches that of the package. |
| 4138 |
* man/Makefile.am ($(dist_man1_MANS)): Remove now-unnecessary sed |
| 4139 |
filter. |
| 4140 |
* README: Update references to diffutils.texi etc. here, too. |
| 4141 |
* .gitignore: Update here, too. |
| 4142 |
Suggested by Karl Berry. |
| 4143 |
|
| 4144 |
2011-06-08 Karl Berry <[email protected]> |
| 4145 |
|
| 4146 |
cmp, diff, diff3, sdiff: edit and align --help text. |
| 4147 |
* cmp.c (option_help_msgid, usage), |
| 4148 |
* diff.c (option_help_msgid, usage), |
| 4149 |
* diff3.c (option_help_msgid, usage), |
| 4150 |
* sdiff.c (option_help_msgid, usage): align descriptions in the --help |
| 4151 |
output and slightly edit content. |
| 4152 |
|
| 4153 |
2011-05-27 Paul Eggert <[email protected]> |
| 4154 |
|
| 4155 |
diff: don't use locales after local-specific sorting fails |
| 4156 |
* src/dir.c (compare_names): Don't invoke strcasecmp if |
| 4157 |
locale-specific sorting fails, because POSIX.1-2008 says strcasecmp |
| 4158 |
has unspecified behavior outside the POSIX locale. See: |
| 4159 |
http://lists.gnu.org/archive/html/bug-diffutils/2011-05/msg00008.html |
| 4160 |
|
| 4161 |
bootstrap: Avoid multithreading. |
| 4162 |
* bootstrap.conf (gnulib_tool_option_extras): |
| 4163 |
Add "--avoid=localename --avoid=lock", because we don't want to |
| 4164 |
bring in the multithreading code that recent gnulib changes would |
| 4165 |
otherwise bring in. |
| 4166 |
(excluded_files): Remove m4/lock.m4; no longer needed, now that |
| 4167 |
we use --avoid=lock. |
| 4168 |
|
| 4169 |
build: update gnulib submodule to latest |
| 4170 |
|
| 4171 |
2011-05-23 Karl Berry <[email protected]> |
| 4172 |
|
| 4173 |
maint: update README-hacking |
| 4174 |
* README-hacking: Update a la coreutils for git, etc. |
| 4175 |
|
| 4176 |
2011-05-23 Jim Meyering <[email protected]> |
| 4177 |
|
| 4178 |
maint: update gnulib to latest with accompanying tight-scope tweaks |
| 4179 |
* cfg.mk: Include $(srcdir)/dist-check.mk using "-include", |
| 4180 |
to accommodate the new sc_tight_scope rule. |
| 4181 |
(_gl_TS_extern): Define, to tell gnulib's tight_scope rule that |
| 4182 |
headers here mark externs with "XTERN". |
| 4183 |
* gnulib: Update to latest. |
| 4184 |
|
| 4185 |
2011-05-18 Jim Meyering <[email protected]> |
| 4186 |
|
| 4187 |
maint: use gnulib's new readme-release module |
| 4188 |
* bootstrap.conf (gnulib_modules): Add readme-release. |
| 4189 |
(bootstrap_epilogue): Add the recommended perl one-liner. |
| 4190 |
* README-release: Remove file; it is now generated from gnulib. |
| 4191 |
* .gitignore: Add it. |
| 4192 |
|
| 4193 |
build: update gnulib submodule to latest |
| 4194 |
|
| 4195 |
maint: prepare for the tight-scope check |
| 4196 |
* src/diff.h: Mark function declarations with "extern" in |
| 4197 |
preparation for the tight-scope check. |
| 4198 |
(ignore_white_space): Separate enum decl from declaration |
| 4199 |
of this variable. |
| 4200 |
* src/Makefile.am (diff_SOURCES): Move diff.h from here to ... |
| 4201 |
(noinst_HEADERS): ...here. |
| 4202 |
For convenience, since the tight-scope rule uses $(noinst_HEADERS). |
| 4203 |
|
| 4204 |
maint: don't use now-removed gnulib "exit" module |
| 4205 |
* bootstrap.conf (gnulib_modules): Remove "exit" module. |
| 4206 |
It no longer exists. |
| 4207 |
|
| 4208 |
2011-03-26 Jim Meyering <[email protected]> |
| 4209 |
|
| 4210 |
build: update gnulib submodule to latest |
| 4211 |
|
| 4212 |
* .x-sc_space_tab: Remove file. Instead, ... |
| 4213 |
* cfg.mk (exclude_file_name_regexp--sc_space_tab): ...define this. |
| 4214 |
|
| 4215 |
maint: fix typo in unused rule |
| 4216 |
* cfg.mk (config-save): Fix typo: add leading "_" in variable name. |
| 4217 |
|
| 4218 |
2011-03-18 Jim Meyering <[email protected]> |
| 4219 |
|
| 4220 |
doc: add a reference to wdiff(1) from diff.1 |
| 4221 |
* man/diff.x: New file, to add "SEE ALSO" reference to wdiff(1). |
| 4222 |
* man/Makefile.am (diff.1): Depend on diff.x. |
| 4223 |
($(dist_man1_MANS)): Tell help2man to include diff.x. |
| 4224 |
(EXTRA_DIST): Add diff.x. |
| 4225 |
Suggestion from Dan Jacobson in http://bugs.debian.org/613319 |
| 4226 |
|
| 4227 |
2011-03-18 Eric Blake <[email protected]> |
| 4228 |
|
| 4229 |
docs: info should mention -L |
| 4230 |
* doc/diff.texi (diff Options): Document -L. |
| 4231 |
|
| 4232 |
docs: diff --help should mention -L |
| 4233 |
* src/diff.c (option_help_msgid): Document -L. |
| 4234 |
|
| 4235 |
2011-02-15 Jim Meyering <[email protected]> |
| 4236 |
|
| 4237 |
doc: speak of the --test (-a) option, not "the -a or --test option" |
| 4238 |
Convert using this command: |
| 4239 |
perl -pi -e \ |
| 4240 |
's/(\@option{-.}) or (\@option{--.*?}) option/$2 ($1) option/' \ |
| 4241 |
doc/diff.texi |
| 4242 |
Then convert some more with this: |
| 4243 |
perl -pi -e \ |
| 4244 |
's/the (\@option{-.}) or (\@option{--.*?})$/the $2 ($1)/' \ |
| 4245 |
doc/diff.texi |
| 4246 |
Then convert more manually. |
| 4247 |
|
| 4248 |
Suggested by Dan Jacobson |
| 4249 |
|
| 4250 |
2011-01-24 Jim Meyering <[email protected]> |
| 4251 |
|
| 4252 |
maint: remove all uses of vfork: use fork instead |
| 4253 |
Our use of vfork now provokes warnings from gcc-4.6.0. |
| 4254 |
Also, vfork is no longer even specified by POSIX.1-2008. |
| 4255 |
* src/diff3.c (read_diff): Change each use of vfork to "fork". |
| 4256 |
Remove #ifdef'd code. |
| 4257 |
* src/util.c (begin_output, finish_output): Likewise. |
| 4258 |
* src/sdiff.c (cleanup, main, edit): Likewise. |
| 4259 |
(handler_index_of_SIGPIPE): Remove now-unused definition. |
| 4260 |
* src/system.h: Don't include <vfork.h>. |
| 4261 |
(vfork): Remove definition. |
| 4262 |
* ms/config.site: Remove reference to vfork cache variable. |
| 4263 |
|
| 4264 |
tests: avoid newer but less-portable tail option syntax |
| 4265 |
* tests/function-line-vs-leading-space: Use sed -n '3,$p' rather than |
| 4266 |
tail -n+3. Older versions of tail do not accept that newer syntax. |
| 4267 |
Reported by Sudhakara Peram. |
| 4268 |
|
| 4269 |
tests: fix an erroneous test |
| 4270 |
On most systems, like-named files were compared, by luck. |
| 4271 |
However, on others, different-named files would be compared |
| 4272 |
since their names were being treated as equal -- but they had |
| 4273 |
different content, so the test would fail. |
| 4274 |
* tests/colliding-file-names: Use different sets of file names |
| 4275 |
in d1 and d2 so that they cannot accidentally match. |
| 4276 |
Put the same line in each test file. This is required |
| 4277 |
when files named e.g., abc and ABC are compared. |
| 4278 |
This test was failing on a NixOS 86_64-darwin system. |
| 4279 |
|
| 4280 |
build: update gnulib submodule to latest |
| 4281 |
|
| 4282 |
tests: fix typo that silently disabled all tests |
| 4283 |
* tests/Makefile.am (TESTS): Fix typo: s/jESTS/TESTS/ |
| 4284 |
|
| 4285 |
2011-01-23 Jim Meyering <[email protected]> |
| 4286 |
|
| 4287 |
build: update gnulib submodule to latest |
| 4288 |
|
| 4289 |
maint: avoid new syntax-check failure |
| 4290 |
* src/diff.c (specify_value): Use !STREQ(...), not strcmp(...) != 0. |
| 4291 |
* src/diff3.c (main): Likewise. |
| 4292 |
|
| 4293 |
2011-01-03 Jim Meyering <[email protected]> |
| 4294 |
|
| 4295 |
maint: update copyright year ranges to include 2011 |
| 4296 |
Run "make update-copyright", so "make syntax-check" works in 2011. |
| 4297 |
|
| 4298 |
build: update gnulib submodule to latest |
| 4299 |
|
| 4300 |
2010-12-16 Paul Eggert <[email protected]> |
| 4301 |
|
| 4302 |
bootstrap: adjust to recent gnulib changes |
| 4303 |
* bootstrap.conf (excluded_files): Do not exclude m4/size_max.m4 |
| 4304 |
and m4/xsize.m4 when using an external gettext, since they are |
| 4305 |
now needed by other gnulib modules. |
| 4306 |
|
| 4307 |
2010-12-16 Jim Meyering <[email protected]> |
| 4308 |
|
| 4309 |
doc: add contributor guidelines: HACKING |
| 4310 |
* HACKING: New file, copied 99% from the one in grep's repository. |
| 4311 |
|
| 4312 |
2010-10-09 Jim Meyering <[email protected]> |
| 4313 |
|
| 4314 |
maint: describe policy on copyright year number ranges |
| 4315 |
* README: Mention coreutils' long-standing policy on use of M-N |
| 4316 |
ranges in copyright year lists. Requested by Richard Stallman. |
| 4317 |
|
| 4318 |
2010-09-04 Jim Meyering <[email protected]> |
| 4319 |
|
| 4320 |
maint: adjust init.sh use to conform |
| 4321 |
* tests/help-version: Use one line: "${srcdir=.}/init.sh"; ... |
| 4322 |
* tests/basic: Likewise. |
| 4323 |
* tests/binary: Likewise. |
| 4324 |
* tests/colliding-file-names: Likewise. |
| 4325 |
* tests/excess-slash: Likewise. |
| 4326 |
* tests/function-line-vs-leading-space: Likewise. |
| 4327 |
* tests/help-version: Likewise. |
| 4328 |
* tests/label-vs-func: Likewise. |
| 4329 |
* tests/no-newline-at-eof: Likewise. |
| 4330 |
* tests/stdin: Likewise. |
| 4331 |
|
| 4332 |
maint: avoid shadowing warning |
| 4333 |
* src/dir.c (diff_dirs): Rename shadowed local cmp to "c". |
| 4334 |
|
| 4335 |
2010-09-03 Jim Meyering <[email protected]> |
| 4336 |
|
| 4337 |
build: use gettext-h, not gettext |
| 4338 |
* bootstrap.conf (gnulib_modules): Use gettext-h, not gettext. |
| 4339 |
The latter is overkill for a package that uses |
| 4340 |
AM_GNU_GETTEXT([external]... |
| 4341 |
|
| 4342 |
build: update build/test tools from gnulib |
| 4343 |
* bootstrap: Update from gnulib. |
| 4344 |
* tests/init.sh: Likewise. |
| 4345 |
|
| 4346 |
build: update gnulib submodule to latest |
| 4347 |
|
| 4348 |
2010-08-14 Jim Meyering <[email protected]> |
| 4349 |
|
| 4350 |
diff -r: avoid printing excess slashes in concatenated file names |
| 4351 |
* bootstrap.conf (gnulib_modules): Add filenamecat. |
| 4352 |
* src/diff.c: Include "filenamecat.h". |
| 4353 |
(compare_files): Use file_name_concat, rather than dir_file_pathname. |
| 4354 |
* src/util.c (dir_file_pathname): Remove now-unused function. |
| 4355 |
* src/diff.h: Remove its declaration. |
| 4356 |
* tests/excess-slash: New script to test for this. |
| 4357 |
* tests/Makefile.am (TESTS): Add it. |
| 4358 |
Forwarded by Santiago Vila from <bugs.debian.org/586301a>, |
| 4359 |
reported by Jari Aalto. |
| 4360 |
|
| 4361 |
2010-08-12 Paul Eggert <[email protected]> |
| 4362 |
|
| 4363 |
diff: avoid spurious diffs when two distinct dir entries compare equal |
| 4364 |
Problem reported by Christoph Anton Mitterer in: |
| 4365 |
http://lists.gnu.org/archive/html/bug-diffutils/2010-08/msg00000.html |
| 4366 |
|
| 4367 |
* NEWS: Mention this bug fix. |
| 4368 |
* src/dir.c (compare_names_for_qsort): Fall back on file_name_cmp |
| 4369 |
if two distinct entries in the same directory compare equal. |
| 4370 |
(diff_dirs): Prefer a file_name_cmp match when available. |
| 4371 |
* tests/Makefile.am (TESTS): New test colliding-file-names. |
| 4372 |
* tests/colliding-file-names: New file. |
| 4373 |
|
| 4374 |
2010-05-09 Jim Meyering <[email protected]> |
| 4375 |
|
| 4376 |
build: update gnulib submodule to latest |
| 4377 |
|
| 4378 |
build: don't define macros that gnulib provides |
| 4379 |
* bootstrap.conf (gnulib_modules): Add signal, stdint. |
| 4380 |
* lib/cmpbuf.c (SA_RESTART, SA_INTERRUPT): Remove definitions. |
| 4381 |
(SIZE_MAX, PTRDIFF_MAX): Likewise. |
| 4382 |
Include <stdint.h>. |
| 4383 |
* src/system.h (WEXITSTATUS, WIFEXITED): Remove definitions. |
| 4384 |
(SA_RESTART, SA_INTERRUPT): Likewise. |
| 4385 |
|
| 4386 |
build: rely on gnulib's sigprocmask module |
| 4387 |
* src/sdiff.c: Remove #if-!HAVE_SIGPROCMASK-guarded code. |
| 4388 |
* bootstrap.conf (gnulib_modules): Add sigprocmask. |
| 4389 |
|
| 4390 |
2010-05-04 Jim Meyering <[email protected]> |
| 4391 |
|
| 4392 |
doc: README-release: don't mention To:, Cc:, etc announcement headers, |
| 4393 |
now that those are supplied automatically via gnulib's maint.mk. |
| 4394 |
* README-release: sync with coreutils. |
| 4395 |
|
| 4396 |
maint: teach web-doc-generating code how to do its job |
| 4397 |
* cfg.mk (gendocs_options): Define, so that gendocs.sh knows |
| 4398 |
the name of our texinfo source file. |
| 4399 |
* gnulib: Update to latest, for new gnu-web-doc-update and maint.mk. |
| 4400 |
|
| 4401 |
2010-05-03 Jim Meyering <[email protected]> |
| 4402 |
|
| 4403 |
doc: update release procedure |
| 4404 |
* README-release: Rearrange slightly: post the announcement to |
| 4405 |
Savannah first, so you can include a link to that post in the email. |
| 4406 |
Sync a few details from coreutils' README-release. |
| 4407 |
|
| 4408 |
post-release administrivia |
| 4409 |
* NEWS: Add header line for next release. |
| 4410 |
* .prev-version: Record previous version. |
| 4411 |
* cfg.mk (old_NEWS_hash): Auto-update. |
| 4412 |
|
| 4413 |
version 3.0 |
| 4414 |
* NEWS: Record release date. |
| 4415 |
|
| 4416 |
build: update gnulib submodule to latest |
| 4417 |
|
| 4418 |
2010-04-30 Jim Meyering <[email protected]> |
| 4419 |
|
| 4420 |
build: use gnulib's sys_wait module |
| 4421 |
* bootstrap.conf (gnulib_modules): Use gnulib's sys_wait module, |
| 4422 |
now that we assume its presence. |
| 4423 |
|
| 4424 |
build: update gnulib submodule to latest |
| 4425 |
* bootstrap: Also update from gnulib. |
| 4426 |
* tests/init.sh: Likewise |
| 4427 |
|
| 4428 |
maint: remove now-useless #if HAVE_HEADER_H guards |
| 4429 |
* src/system.h: Include <sys/wait.h> unconditionally, |
| 4430 |
now that gnulib guarantees its presence. |
| 4431 |
* lib/cmpbuf.c: Likewise for <unistd.h> and <inttypes.h>. |
| 4432 |
|
| 4433 |
2010-04-16 Jim Meyering <[email protected]> |
| 4434 |
|
| 4435 |
tests: use original no-newline-at-eof test, but with -U1, not -U2 |
| 4436 |
* tests/no-newline-at-eof: Revert to the smaller test, but with |
| 4437 |
-U1 rather than -U2, since that actually triggers the bug. |
| 4438 |
|
| 4439 |
2010-04-16 Paul Eggert <[email protected]> |
| 4440 |
|
| 4441 |
Followon improvements for the fix for Debian bug 577832. |
| 4442 |
* src/io.c (find_and_hash_each_line): Omit the inserted newline in |
| 4443 |
a simpler way. |
| 4444 |
* tests/no-newline-at-eof: Fix the test case so that it rejects |
| 4445 |
the old, buggy behavior. |
| 4446 |
|
| 4447 |
2010-04-16 Jim Meyering <[email protected]> |
| 4448 |
|
| 4449 |
build: update gnulib submodule to latest |
| 4450 |
|
| 4451 |
tests: test for the no-newline-at-EOF bug |
| 4452 |
* tests/no-newline-at-eof: New file. |
| 4453 |
* tests/Makefile.am (TESTS): Add it. |
| 4454 |
|
| 4455 |
2010-04-16 Jim Meyering <[email protected]> |
| 4456 |
|
| 4457 |
diff: fix a regression when at least one input lacks a newline-at-EOF, |
| 4458 |
and the final hunk plus context-length aligns exactly with the end |
| 4459 |
of the newline-lacking file. Diff would fail to output the required |
| 4460 |
"\ No newline at end of file" line, thus rendering the output invalid. |
| 4461 |
This bug appears to have been introduced by 2006-05-07 |
| 4462 |
commit 58d0483b, "(find_identical_ends): Fix huge performance bug...", |
| 4463 |
at least to the extent that reverting that change fixes the bug. |
| 4464 |
Considering the stated effect of that change and lack of metrics, |
| 4465 |
reverting it is not an option, so here we take a more direct approach. |
| 4466 |
|
| 4467 |
Given these inputs, |
| 4468 |
|
| 4469 |
printf '\n1'>a; printf '\n0\n\n1'>b |
| 4470 |
|
| 4471 |
and running diff like this: |
| 4472 |
|
| 4473 |
./diff -U1 a b |
| 4474 |
|
| 4475 |
for input file "b", the pointer, files[1].linbuf[4][-1], to |
| 4476 |
the last byte on the final line was mistakenly pointing at the |
| 4477 |
sentinel newline at EOF, rather than at the preceding byte. |
| 4478 |
|
| 4479 |
(gdb) p files[1].linbuf[4][-1] |
| 4480 |
$3 = 10 '\n' |
| 4481 |
|
| 4482 |
Thus, this test in the final print_1_line call: |
| 4483 |
|
| 4484 |
if ((!line_flag || line_flag[0]) && limit[-1] != '\n') |
| 4485 |
fprintf (out, "\n\\ %s\n", _("No newline at end of file")); |
| 4486 |
|
| 4487 |
would fail, because limit[-1] (which is files[1].linbuf[4][-1]) |
| 4488 |
was mistakenly '\n', rather than the desired '1'. |
| 4489 |
|
| 4490 |
My first thought was simply to adjust the final linbuf[line] setting, |
| 4491 |
at the end of io.c's find_and_hash_each_line function function: |
| 4492 |
|
| 4493 |
if (p == bufend) |
| 4494 |
- break; |
| 4495 |
+ { |
| 4496 |
+ if (current->missing_newline) |
| 4497 |
+ --linbuf[line]; |
| 4498 |
+ break; |
| 4499 |
+ } |
| 4500 |
|
| 4501 |
But that would make diff misbehave with this input |
| 4502 |
(same as above, but with a newline appended to "a"), |
| 4503 |
|
| 4504 |
printf '\n1\n'>a; printf '\n0\n\n1'>b |
| 4505 |
./diff -U1 a b |
| 4506 |
|
| 4507 |
due to the block (100 lines above) that is triggered in that case |
| 4508 |
(but not in the both-files-missing-newline case): |
| 4509 |
|
| 4510 |
if (p == bufend |
| 4511 |
&& current->missing_newline |
| 4512 |
&& ROBUST_OUTPUT_STYLE (output_style)) |
| 4513 |
{ |
| 4514 |
/* This line is incomplete. If this is significant, |
| 4515 |
put the line into buckets[-1]. */ |
| 4516 |
if (ignore_white_space < IGNORE_SPACE_CHANGE) |
| 4517 |
bucket = &buckets[-1]; |
| 4518 |
|
| 4519 |
/* Omit the inserted newline when computing linbuf later. */ |
| 4520 |
p--; |
| 4521 |
bufend = suffix_begin = p; |
| 4522 |
} |
| 4523 |
|
| 4524 |
Note how "p" is decremented and "bufend" adjusted. |
| 4525 |
When that happens, we certainly don't want to decrement |
| 4526 |
"bufend" yet again. |
| 4527 |
|
| 4528 |
Since there is no other way to determine at the end whether "bufend" |
| 4529 |
was already decremented, add a new variable to serve as witness. |
| 4530 |
|
| 4531 |
* NEWS (Bug fixes): Mention it. |
| 4532 |
Reported by Timo Juhani Lindfors in http://bugs.debian.org/577832. |
| 4533 |
Forwarded by Santiago Vila. |
| 4534 |
|
| 4535 |
2010-04-16 Jim Meyering <[email protected]> |
| 4536 |
|
| 4537 |
tests: update init.sh from gnulib |
| 4538 |
* tests/init.sh: Update from gnulib. |
| 4539 |
|
| 4540 |
2010-04-08 Jim Meyering <[email protected]> |
| 4541 |
|
| 4542 |
build: include cfg.mk and dist-check.mk in the distribution tarball |
| 4543 |
* Makefile.am (EXTRA_DIST): Add cfg.mk and dist-check.mk. |
| 4544 |
|
| 4545 |
maint: update to latest gnulib |
| 4546 |
* cfg.mk (sc_cross_check_PATH_usage_in_tests): Remove rule, |
| 4547 |
now that it's in gnulib's maint.mk. |
| 4548 |
* gnulib: Update to latest. |
| 4549 |
|
| 4550 |
2010-04-07 Jim Meyering <[email protected]> |
| 4551 |
|
| 4552 |
tests: make new PATH-crosschecking syntax-check tighter |
| 4553 |
* cfg.mk (sc_cross_check_PATH_usage_in_tests): Use grep's -x (match |
| 4554 |
entire line) option with -F. |
| 4555 |
|
| 4556 |
tests: pull latest help-version from gzip |
| 4557 |
* tests/help-version: Update from gzip. |
| 4558 |
* Makefile.am (TESTS_ENVIRONMENT): Export VERSION, |
| 4559 |
as required for this new help-version script. |
| 4560 |
|
| 4561 |
tests: add syntax-check rule to verify that tests use proper PATH |
| 4562 |
* cfg.mk (sc_cross_check_PATH_usage_in_tests): New rule, that is |
| 4563 |
useful only in conjunction with the help-version script. |
| 4564 |
|
| 4565 |
tests: use path_prepend_ consistently; remove unnecessary VERBOSE check |
| 4566 |
* tests/basic: Likewise. |
| 4567 |
* tests/binary: Likewise. |
| 4568 |
* tests/function-line-vs-leading-space: Likewise. |
| 4569 |
* tests/label-vs-func: Likewise. |
| 4570 |
* tests/stdin: Likewise. |
| 4571 |
|
| 4572 |
2010-04-06 Eric Blake <[email protected]> |
| 4573 |
|
| 4574 |
maint: ignore generated files |
| 4575 |
* .gitignore: Ignore recent gnulib additions. |
| 4576 |
|
| 4577 |
maint: update to latest bootstrap |
| 4578 |
* bootstrap: Copy from gnulib/build-aux. |
| 4579 |
|
| 4580 |
2010-04-05 Jim Meyering <[email protected]> |
| 4581 |
|
| 4582 |
tests: get latest init.sh from gnulib |
| 4583 |
* tests/init.sh: Update from gnulib. |
| 4584 |
|
| 4585 |
build: update gnulib submodule to latest; adapt |
| 4586 |
* cfg.mk (local-checks-to-skip): Add new sc_texinfo_acronym, to skip it. |
| 4587 |
|
| 4588 |
diff -F/-p: don't depend on locale-specific white-space definition |
| 4589 |
* src/context.c: Include "c-ctype.h". |
| 4590 |
Use c_isspace, not isspace. |
| 4591 |
|
| 4592 |
2010-03-18 Jim Meyering <[email protected]> |
| 4593 |
|
| 4594 |
tests: exercise new behavior of -F RE |
| 4595 |
* tests/function-line-vs-leading-space: New file. |
| 4596 |
* tests/Makefile.am (TESTS): Add it. |
| 4597 |
|
| 4598 |
2010-03-18 Yannick Moy <[email protected]> |
| 4599 |
|
| 4600 |
with -F or -p, emit better function lines: no leading white space |
| 4601 |
* src/diff.c (print_context_function): For languages like Ada |
| 4602 |
that allow local functions and procedures, the plain context |
| 4603 |
function line may start with enough blank characters that the |
| 4604 |
function name does not get completely printed in the 40 |
| 4605 |
characters limit. This patch solves this problem by removing |
| 4606 |
these useless initial blank characters. |
| 4607 |
* NEWS (Changes in behavior): Mention this change. |
| 4608 |
|
| 4609 |
2010-03-17 Jim Meyering <[email protected]> |
| 4610 |
|
| 4611 |
build: don't require a specific version of help2man |
| 4612 |
* bootstrap.conf (buildreq): Bootstrap can't deal with it, |
| 4613 |
perhaps because the command name contains a digit. |
| 4614 |
|
| 4615 |
build: make bootstrap ensure that help2man is available |
| 4616 |
* bootstrap.conf (buildreq): Add help2man. |
| 4617 |
|
| 4618 |
2010-02-23 Jim Meyering <[email protected]> |
| 4619 |
|
| 4620 |
tests: test for the "Binary files A and B differ" diagnostic |
| 4621 |
* tests/binary: New script. |
| 4622 |
* tests/Makefile.am (TESTS): Add it. |
| 4623 |
|
| 4624 |
revert 2002 change that removed "Binary " from "files A and B differ" |
| 4625 |
With this change, "printf '\0'|diff - /dev/null" now prints |
| 4626 |
"Binary files - and /dev/null differ" once again. |
| 4627 |
This reverts 2002-06-28 commit a352f0980, |
| 4628 |
"(briefly_report): Don't say "Binary files differ", ...". |
| 4629 |
* src/analyze.c (briefly_report): Do include the "Binary " prefix |
| 4630 |
in the diagnostic, when !brief. |
| 4631 |
* NEWS (Changes in behavior): Mention the diagnostic change. |
| 4632 |
Reported by Andreas Hoenen in http://bugs.debian.org/570064. |
| 4633 |
|
| 4634 |
2010-02-14 Juan Manuel Guerrero <[email protected]> |
| 4635 |
|
| 4636 |
avoid compilation failure on systems lacking both fork and vfork |
| 4637 |
* src/sdiff.c [!HAVE_WORKING_FORK && !HAVE_WORKING_VFORK] (main): |
| 4638 |
Pass the right number of arguments to shell_quote_copy. |
| 4639 |
* src/util.c [!HAVE_WORKING_FORK && !HAVE_WORKING_VFORK] (begin_output): |
| 4640 |
Likewise. |
| 4641 |
|
| 4642 |
2010-02-11 Jim Meyering <[email protected]> |
| 4643 |
|
| 4644 |
post-release administrivia |
| 4645 |
* NEWS: Add header line for next release. |
| 4646 |
* .prev-version: Record previous version. |
| 4647 |
* cfg.mk (old_NEWS_hash): Auto-update. |
| 4648 |
|
| 4649 |
version 2.9 |
| 4650 |
* NEWS: Record release date. |
| 4651 |
|
| 4652 |
doc: document the release procedure |
| 4653 |
* README-release: New file. |
| 4654 |
|
| 4655 |
2010-02-10 Jim Meyering <[email protected]> |
| 4656 |
|
| 4657 |
maint: change use of "|" to more maintainable "||" (no semantic change) |
| 4658 |
* src/analyze.c (diff_2_files): Using the "||" operator happens to |
| 4659 |
be equivalent to using "|" in this case. It is also clearer and |
| 4660 |
less prone to inadvertent bug introduction, in case the variable, |
| 4661 |
"changes" were ever to take on a value not in {0,1}. |
| 4662 |
Patch by Tim Waugh, via Mike Frysinger. |
| 4663 |
|
| 4664 |
portability: avoid "diff - ..." failure at least on *BSD and Solaris |
| 4665 |
The new "stdin" test was failing on many types of systems. |
| 4666 |
* src/diff.c (compare_files): Guard use of xfreopen (NULL, "rb", ... |
| 4667 |
also with O_BINARY, so as to avoid this unnecessary call on |
| 4668 |
systems where it's not needed (on some it fails with "Bad address". |
| 4669 |
|
| 4670 |
2010-02-09 Jim Meyering <[email protected]> |
| 4671 |
|
| 4672 |
tests: honor VERBOSE |
| 4673 |
* tests/basic: Enable "set -x" if $VERBOSE. |
| 4674 |
* tests/help-version: Likewise. |
| 4675 |
* tests/label-vs-func: Likewise. |
| 4676 |
* tests/stdin: Likewise. |
| 4677 |
|
| 4678 |
2010-02-04 Jim Meyering <[email protected]> |
| 4679 |
|
| 4680 |
build: update gnulib submodule to latest |
| 4681 |
|
| 4682 |
sync with gnulib |
| 4683 |
* gl/lib/regcomp.c.diff: Adjust to apply to the latest in gnulib. |
| 4684 |
* gnulib: Update submodule to latest. |
| 4685 |
|
| 4686 |
2010-02-04 Jim Meyering <[email protected]> |
| 4687 |
|
| 4688 |
build: do not override gnulib-provided AM_CFLAGS options |
| 4689 |
Avoid a warning from automake: |
| 4690 |
lib/Makefile.am:23: AM_CFLAGS multiply defined in condition TRUE ... |
| 4691 |
lib/gnulib.mk:30: ... `AM_CFLAGS' previously defined here |
| 4692 |
lib/Makefile.am:18: `lib/gnulib.mk' included from here |
| 4693 |
|
| 4694 |
* lib/Makefile.am (AM_CFLAGS): Append $(WARN_CFLAGS) and |
| 4695 |
$(WERROR_CFLAGS), i.e., use "+=", not "=". |
| 4696 |
This was introduced via 2009-12-17 commit e58efa5b |
| 4697 |
"build: enable warnings and -Werror.", |
| 4698 |
but fortunately is not a bug, because the definition |
| 4699 |
it would have overridden was always empty. |
| 4700 |
|
| 4701 |
2010-01-17 Jim Meyering <[email protected]> |
| 4702 |
|
| 4703 |
maint: add to .gitignore |
| 4704 |
* .gitignore: Ignore more. |
| 4705 |
|
| 4706 |
2010-01-15 Jim Meyering <[email protected]> |
| 4707 |
|
| 4708 |
doc: add to TODO |
| 4709 |
* TODO: Add an item, suggested by Dan Jacobson. |
| 4710 |
|
| 4711 |
2010-01-13 Jim Meyering <[email protected]> |
| 4712 |
|
| 4713 |
tests: ensure that an argument of "-" is treated as standard input |
| 4714 |
* tests/stdin: New test. |
| 4715 |
* tests/Makefile.am (TESTS): Add it. |
| 4716 |
|
| 4717 |
2010-01-10 Jim Meyering <[email protected]> |
| 4718 |
|
| 4719 |
tests: now "make distcheck" runs more tests, incl. syntax-check |
| 4720 |
* cfg.mk: Include dist-check.mk, from coreutils. |
| 4721 |
* Makefile.am (distcheck-hook): Define rule, to hook to... |
| 4722 |
* dist-check.mk: New file. |
| 4723 |
|
| 4724 |
2010-01-09 Jim Meyering <[email protected]> |
| 4725 |
|
| 4726 |
build: update gnulib to latest, for fixed syntax-check rule |
| 4727 |
|
| 4728 |
maint: record updated NEWS hash |
| 4729 |
* cfg.mk (old_NEWS_hash): Update to account for GFDL change. |
| 4730 |
|
| 4731 |
build: update gnulib submodule to latest |
| 4732 |
|
| 4733 |
tests: add a test of basic functionality |
| 4734 |
* tests/basic: Start adding tests. |
| 4735 |
* tests/Makefile.am (TESTS): Add it. |
| 4736 |
|
| 4737 |
maint: udpate GFDL license to 1.3 |
| 4738 |
* doc/diff.texi: Update to use GFDL version 1.3. |
| 4739 |
|
| 4740 |
2010-01-04 Eric Blake <[email protected]> |
| 4741 |
|
| 4742 |
build: allow compilation on cygwin |
| 4743 |
* src/Makefile.am (cmp_LDADD): Move LIBICONV... |
| 4744 |
(LDADD): ...into global flags, since all programs need it. |
| 4745 |
|
| 4746 |
2010-01-03 Jim Meyering <[email protected]> |
| 4747 |
|
| 4748 |
maint: record update-copyright options for this package |
| 4749 |
* cfg.mk: Next time, just run "make update-copyright". |
| 4750 |
|
| 4751 |
tests: prepend ../src, not "." to PATH |
| 4752 |
* tests/help-version: Correct PATH. |
| 4753 |
|
| 4754 |
2010-01-01 Jim Meyering <[email protected]> |
| 4755 |
|
| 4756 |
maint: update all FSF copyright year lists to include 2010 |
| 4757 |
Use this command: |
| 4758 |
git ls-files |grep -vE '^(\..*|COPYING|gnulib)$' |xargs \ |
| 4759 |
env UPDATE_COPYRIGHT_USE_INTERVALS=1 build-aux/update-copyright |
| 4760 |
|
| 4761 |
2009-12-31 Jim Meyering <[email protected]> |
| 4762 |
|
| 4763 |
maint: newer gnulib; don't hard-code my GPG key ID |
| 4764 |
* cfg.mk (gpg_key_ID): Remove definition, now that maint.mk automates it. |
| 4765 |
* gnulib: Update to latest. |
| 4766 |
|
| 4767 |
tests: exercise diff -p's function-name matching |
| 4768 |
* tests/label-vs-func: New file. |
| 4769 |
* tests/Makefile.am (TESTS): Add label-vs-func. |
| 4770 |
Reported by Simon Arlott <[email protected]> |
| 4771 |
http://article.gmane.org/gmane.linux.kernel.janitors/14260 |
| 4772 |
|
| 4773 |
tests: use gnulib's init.sh |
| 4774 |
* tests/Makefile.am (EXTRA_DIST): Add init.sh. |
| 4775 |
Remove test-lib.sh. |
| 4776 |
* tests/init.sh: New file. |
| 4777 |
* tests/test-lib.sh: Remove file. |
| 4778 |
* tests/help-version: Use init.sh, not test-lib.sh. |
| 4779 |
|
| 4780 |
2009-11-28 Jim Meyering <[email protected]> |
| 4781 |
|
| 4782 |
maint: don't let trailing spaces in diffs perturb make syntax-check |
| 4783 |
* .x-sc_space_tab: New file. |
| 4784 |
|
| 4785 |
2009-11-22 Jim Meyering <[email protected]> |
| 4786 |
|
| 4787 |
build: enable warnings and -Werror. |
| 4788 |
* src/Makefile.am (AM_CFLAGS): Enable warnings and -Werror. |
| 4789 |
Set to this: $(WARN_CFLAGS) $(WERROR_CFLAGS) |
| 4790 |
* lib/Makefile.am (AM_CFLAGS): Similarly, but use this: |
| 4791 |
$(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS) |
| 4792 |
* configure.ac (GNULIB_WARN_CFLAGS): Don't turn off -Wuninitialized. |
| 4793 |
|
| 4794 |
build: avoid a warning from gnulib's sh-quote.c |
| 4795 |
* gl/lib/sh-quote.c.diff: New file, to avoid a warning. |
| 4796 |
|
| 4797 |
maint: avoid warnings via patched versions of gnulib's regex functions |
| 4798 |
* gl/lib/regcomp.c.diff: New file. |
| 4799 |
* gl/lib/regex_internal.c.diff: Likewise. |
| 4800 |
* gl/lib/regex_internal.h.diff: Likewise. |
| 4801 |
* gl/lib/regexec.c.diff: Likewise. |
| 4802 |
|
| 4803 |
build: update gnulib submodule to latest |
| 4804 |
|
| 4805 |
2009-11-20 Eric Blake <[email protected]> |
| 4806 |
|
| 4807 |
build: ignore more files |
| 4808 |
* .gitignore: Add config.cache, *.exe. |
| 4809 |
|
| 4810 |
2009-11-20 Eric Blake <[email protected]> |
| 4811 |
|
| 4812 |
build: fix test run on cygwin |
| 4813 |
This, plus a gnulib update for xalloc-die-tests, are necessary |
| 4814 |
for make check to pass on cygwin. |
| 4815 |
|
| 4816 |
* tests/Makefile.am (built_programs): Ignore $(EXEEXT). |
| 4817 |
* src/Makefile.am (paths.h): Add missing dependency. |
| 4818 |
|
| 4819 |
2009-11-20 Jim Meyering <[email protected]> |
| 4820 |
|
| 4821 |
maint: remove vestiges of nanosleep |
| 4822 |
* src/Makefile.am (LDADD): Remove $(LIB_NANOSLEEP), now |
| 4823 |
that we no longer use the nanosleep module. |
| 4824 |
Spotted by Eric Blake. |
| 4825 |
|
| 4826 |
maint: don't pull in gnulib's nanosleep unnecessarily |
| 4827 |
* bootstrap.conf (gnulib_modules): Remove nanosleep. Not needed. |
| 4828 |
Spotted by Eric Blake. |
| 4829 |
|
| 4830 |
maint: cfg.mk: remove factored-out ftp host/dir definitions |
| 4831 |
* cfg.mk (gnu_ftp_host-alpha, gnu_ftp_host-beta gnu_ftp_host-stable): |
| 4832 |
(gnu_rel_host, url_dir_list): Remove definitions. The defaults, |
| 4833 |
now provided by maint.mk, are the same. |
| 4834 |
* gnulib: Update for latest, including those maint.mk additions. |
| 4835 |
|
| 4836 |
build: link with now-required libraries |
| 4837 |
* src/Makefile.am (LDADD): Add gnulib-required libraries. |
| 4838 |
(cmp_LDADD): Add $(LIBICONV), for cmp's use of proper_name_utf8. |
| 4839 |
|
| 4840 |
maint: lib/xfreopen.c contains translatable strings |
| 4841 |
* po/POTFILES.in: Add lib/xfreopen.c. |
| 4842 |
|
| 4843 |
maint: remove hard-coded macro definitions provided by intprops.h |
| 4844 |
* lib/cmpbuf.c: Include "intprops.h" rather than open-coding macros |
| 4845 |
like TYPE_SIGNED and TYPE_MINIMUM. |
| 4846 |
|
| 4847 |
maint: add gnulib's announce-gen module |
| 4848 |
* bootstrap.conf (gnulib_modules): Add announce-gen |
| 4849 |
|
| 4850 |
build: suppress warnings about bindtextdomain and textdomain |
| 4851 |
* src/system.h (bindtextdomain, textdomain) [!ENABLE_NLS]: Define away. |
| 4852 |
|
| 4853 |
build: use more gnulib modules |
| 4854 |
* bootstrap.conf (gnulib_modules): Add mktime, nanosleep, strptime |
| 4855 |
and timegm. |
| 4856 |
|
| 4857 |
use xfreopen rather than freopen |
| 4858 |
* src/cmp.c: Include "xfreopen.h". |
| 4859 |
Use xfreopen in place of freopen. |
| 4860 |
* src/diff.c Likewise, and... |
| 4861 |
(main): Set exit_failure to EXIT_TROUBLE, rather than to 2. |
| 4862 |
* src/diff3.c: Likewise. |
| 4863 |
* bootstrap.conf (gnulib_modules): Add xfreopen. |
| 4864 |
|
| 4865 |
build: enable many warnings |
| 4866 |
* configure.ac: Add support for --enable-gcc-warnings. |
| 4867 |
* bootstrap.conf (gnulib_modules): Add manywarnings. |
| 4868 |
* Makefile.am (AM_CFLAGS): Add $(WARN_CFLAGS) $(WERROR_CFLAGS) |
| 4869 |
|
| 4870 |
build: update gnulib submodule to latest |
| 4871 |
|
| 4872 |
maint: add an assertion to suppress clang-detected warning |
| 4873 |
The clang static analyzer reported that a NULL parent could be |
| 4874 |
dereferenced. However, that cannot happen, because for all callers, |
| 4875 |
the parameter, parent, is always non-NULL at that point. |
| 4876 |
* src/diff.c: Include <assert.h>. |
| 4877 |
Assert that parent is not NULL. |
| 4878 |
|
| 4879 |
maint: remove dead assignment from diff3.c |
| 4880 |
* src/diff3.c (make_3way_diff): Remove dead assignment. |
| 4881 |
|
| 4882 |
2009-11-17 Jim Meyering <[email protected]> |
| 4883 |
|
| 4884 |
build: update gnulib submodule to latest |
| 4885 |
|
| 4886 |
maint: hide build commands behind $(AM_V_GEN) |
| 4887 |
* src/Makefile.am (paths.h): Use $(AM_V_GEN), and split a long line. |
| 4888 |
* man/Makefile.am ($(dist_man1_MANS)): Use $(AM_V_GEN) here, too. |
| 4889 |
|
| 4890 |
2009-11-16 Jim Meyering <[email protected]> |
| 4891 |
|
| 4892 |
build: let automake generate better man-installation rules |
| 4893 |
* man/Makefile.am (dist_man1_MANS): Rename from dist_man_MANS, |
| 4894 |
to enable better automake-generated installation rules. |
| 4895 |
|
| 4896 |
admin: ignore all of gnulib-tests |
| 4897 |
* .gitignore: Add gnulib-tests |
| 4898 |
|
| 4899 |
2009-11-16 Eric Blake <[email protected]> |
| 4900 |
|
| 4901 |
build: avoid link failure when libsigsegv is used |
| 4902 |
* src/Makefile.am (LDADD): Link against LIBSIGSEGV. |
| 4903 |
|
| 4904 |
2009-11-16 Jim Meyering <[email protected]> |
| 4905 |
|
| 4906 |
maint: define/use PROGRAM_NAME and AUTHORS; use propername module |
| 4907 |
* bootstrap.conf (gnulib_modules): Add propername. |
| 4908 |
* src/cmp.c (PROGRAM_NAME, AUTHORS): Define. |
| 4909 |
(main): Use them in use of version_etc. |
| 4910 |
* src/diff.c (PROGRAM_NAME, AUTHORS, main): Likewise. |
| 4911 |
* src/diff3.c (PROGRAM_NAME, AUTHORS, main): Likewise. |
| 4912 |
* src/sdiff.c (PROGRAM_NAME, AUTHORS, main): Likewise. |
| 4913 |
* src/system.h: Include "propername.h". |
| 4914 |
|
| 4915 |
maint: no longer define *_FILENO constants |
| 4916 |
* src/system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): |
| 4917 |
Remove definitions. Now guaranteed by gnulib. |
| 4918 |
|
| 4919 |
maint: [email protected] is the new bug-reporting address |
| 4920 |
* configure.ac (AC_INIT): Use bug-diffutils@..., not bug-gnu-utils |
| 4921 |
as the bug-reporting address. |
| 4922 |
* NEWS (Administrivia): Mention this. |
| 4923 |
* src/cmp.c (usage): Remove hard-coded address. |
| 4924 |
Instead, use gnulib's emit_bug_reporting_address function. |
| 4925 |
* src/diff.c (usage, option_help_msgid): Likewise. |
| 4926 |
* src/diff3.c (usage): Likewise. |
| 4927 |
* src/sdiff.c (usage): Likewise. |
| 4928 |
|
| 4929 |
sdiff, diff3: exec diff, not $(bindir)/diff |
| 4930 |
* src/Makefile.am (paths.h): Emit a definition of DEFAULT_DIFF_PROGRAM |
| 4931 |
that is simply "diff" (or whatever $(transform) would convert that to, |
| 4932 |
e.g., "gdiff"). This makes it so that tests can work without first |
| 4933 |
installing diff, and so that the binaries do not hard-code $(prefix). |
| 4934 |
* NEWS (Changes in behavior): Mention this. |
| 4935 |
|
| 4936 |
2009-11-14 Jim Meyering <[email protected]> |
| 4937 |
|
| 4938 |
tests: add the first script; hook up gnulib-tests |
| 4939 |
* configure.ac (AC_CONFIG_FILES): Add tests/Makefile and |
| 4940 |
gnulib-tests/Makefile. |
| 4941 |
* tests/help-version: New file, from coreutils. |
| 4942 |
* tests/test-lib.sh: Likewise. |
| 4943 |
* tests/Makefile.am: New file, from gzip. |
| 4944 |
* Makefile.am (SUBDIRS): Add tests and gnulib-tests. |
| 4945 |
* tests/t-local.sh: New, empty(for now) file. |
| 4946 |
|
| 4947 |
2009-11-13 Jim Meyering <[email protected]> |
| 4948 |
|
| 4949 |
build: require gettext-0.17 |
| 4950 |
* configure.ac: Require gettext-0.17; it was released two years ago. |
| 4951 |
|
| 4952 |
build: correct gettext configure-time support |
| 4953 |
* configure.ac: Use AM_GNU_GETTEXT([external], [need-ngettext]), |
| 4954 |
rather than AM_GNU_GETTEXT([external], [need-formatstring-macros]). |
| 4955 |
Reported by Martin Jacobs in |
| 4956 |
http://thread.gmane.org/gmane.comp.parsers.bison.bugs/3181 |
| 4957 |
|
| 4958 |
2009-11-12 Jim Meyering <[email protected]> |
| 4959 |
|
| 4960 |
build: generalize autoheader check |
| 4961 |
* bootstrap: Look for AC_CONFIG_HEADER as well as AC_CONFIG_HEADERS. |
| 4962 |
|
| 4963 |
2009-11-11 Jim Meyering <[email protected]> |
| 4964 |
|
| 4965 |
maint: use a git submodule for gnulib |
| 4966 |
* .gitmodules: New file, to track gnulib. |
| 4967 |
* gnulib: New file, created by running this: |
| 4968 |
git submodule add git://git.sv.gnu.org/gnulib.git gnulib |
| 4969 |
|
| 4970 |
maint: tell git what it can ignore |
| 4971 |
* .gitignore: Ignore generated files. |