98fade3c3ff1961373bf9cfbbb99de732440d309
[platform/upstream/diffutils.git] / ChangeLog
1 2018-12-31  Jim Meyering  <meyering@fb.com>
2
3         version 3.7
4         * NEWS: Record release date.
5
6         maint: distribute new file, init.cfg
7         Otherwise, strip-trailing-cr would fail on a system without valgrind.
8         * tests/Makefile.am (EXTRA_DIST): Include init.cfg.
9
10 2018-12-30  Dennis Lambe Jr  <malsyned@malsyned.net>
11
12         diff: adjust ANSI escapes for compatibility with less -R
13         GNU less can display ANSI-colored text with the -R flag, but this
14         support has some limitations. One of them is that if an escape
15         sequence starts on one line and ends on a different line, only the
16         first line will be colored in less.
17
18         As a result, when diff creates colored output with multi-line deletes
19         or adds, less will only color the first line.
20
21         This change resets ANSI color to the default at the end of
22         each line and restarts it at the beginning of the next. It patches
23         normal and context mode. Side-by-side already worked in my testing.
24         * src/context.c (print_context_label, pr_context_hunk): As above.
25         (pr_unidiff_hunk, print_context_header): Likewise.
26         * src/normal.c (print_normal_hunk): Likewise.
27         * tests/colors: Adjust existing tests to accommodate this.
28         * NEWS (Improvements): Mention it.
29         Proposed in http://bugs.gnu.org/31105
30
31 2018-12-29  Jim Meyering  <meyering@fb.com>
32
33         tests: fix colors test on systems lacking fractional timestamp support
34         * tests/colors: The .NNNNNNNNN suffix is not printed on some systems.
35         Adapt the test to accommodate those systems.
36
37         tests: strip-trailing-cr: avoid failure with ASAN
38         Valgrind cannot operate on an ASAN-compiled binary.
39         * tests/strip-trailing-cr (valgrind): Define as no-op when diff
40         was compiled with sanitizer support.
41
42 2018-12-28  Jim Meyering  <meyering@fb.com>
43
44         tests: add test for --strip-trailing-cr UMR bug
45         * tests/strip-trailing-cr: New file. Test for today's bug fix.
46         * tests/Makefile.am (TESTS): Add it.
47
48         tests: import test infrastructure from coreutils
49         * tests/init.cfg: New file, for require_valgrind_ definition (from coreutils).
50         * tests/Makefile.am (PATH): Don't set stderr_fileno_ here, since it is
51         now initialized in init.cfg.
52
53 2018-12-28  Paul Eggert  <eggert@cs.ucla.edu>
54             Jim Meyering  <jim@meyering.net>
55
56         diff: fix UMR with --strip-trailing-cr
57         Problem reported by Hongxu Chen (Bug#31935).
58         * src/io.c (prepare_text): Strip trailing CR before
59         doing the rest of the analysis.
60         * NEWS: Mention the fix.
61
62 2018-12-28  Bruno Haible  <bruno@clisp.org>
63
64         tests: colors: avoid test failure on AIX 7
65         * tests/colors: Splice the argument into the printf format string.
66
67 2018-12-27  Bruno Haible  <address@hidden>
68
69         maint: don't use an undocumented Autoconf macro
70         * configure.ac: Use AC_CONFIG_HEADERS instead of AC_CONFIG_HEADER.
71
72 2018-12-23  Jim Meyering  <meyering@fb.com>
73
74         build: avoid build failure with --enable-gcc-warnings and latest gcc
75         * src/diff.c (usage): Assert that each line length is no longer than
76         the minimum required size of 4095.  This lets newer gcc (currently
77         9.0.0 20181219) infer that it need not issue this warning:
78         diff.c:1012:19: error: '%.*s' directive output between 0 and 2147483647
79         bytes may exceed minimum required size of 4095
80         [-Werror=format-overflow=]
81         1012 |        printf ("  %.*s", msglen, msg);
82
83         build: update gnulib to latest; and bootstrap and init.sh
84
85         build: make the autoconf-2.63 requirement explicit
86         * configure.ac: AC_PREREQ: Require 2.63, not 2.59. And quote properly.
87         Autoconf-2.63 has been required for some time via gnulib.
88         This merely makes it explicit.
89
90 2018-12-20  Jim Meyering  <meyering@fb.com>
91
92         maint: use https: in gnu mirror URL prefix, not http
93         This appears in the generated release announcement message.
94         * cfg.mk (url_dir_list): Use https: prefix, not http:.
95
96 2018-07-24  Paul Eggert  <eggert@cs.ucla.edu>
97
98         cmp: fix bug in -b diagnostic
99         Problem reported by mancha (Bug#32249).
100         * src/cmp.c (count_newlines): Restore old value of sentinel.
101         * tests/cmp: Test for the bug.
102
103         build: update gnulib submodule to latest
104
105 2018-05-14  Paul Eggert  <eggert@cs.ucla.edu>
106
107         doc: prepend "GNU" to NAME in man pages
108         Requested by RMS.
109         * src/cmp.c, src/diff.c, src/diff3.c, src/sdiff.c:
110         Prepend "GNU" to first comment, so that the man page says "GNU".
111
112 2018-04-20  Paul Eggert  <eggert@cs.ucla.edu>
113
114         sdiff: port to mingw
115         Problem reported by Ross Burton (Bug#31218).
116         * src/sdiff.c (checksigs): Use ‘raise’, not ‘kill’.
117
118 2018-03-23  Paul Eggert  <eggert@cs.ucla.edu>
119
120         build: update gnulib submodule to latest
121
122 2018-01-14  Jim Meyering  <meyering@fb.com>
123
124         tests: fix quoting error in previous change
125         * tests/colors: Double-quote $PATH.
126
127 2018-01-06  Jim Meyering  <meyering@fb.com>
128
129         tests: port tests/colors to some env-munging shell
130         * tests/colors: Also set PATH="$PATH" in env invocation.
131
132         maint: update gnulib and copyright dates for 2018
133         * gnulib: Update to latest.
134         * all files: Run "make update-copyright".
135         * bootstrap: Update from gnulib.
136
137         maint: suppress gcc's new -Wcast-function-type in gnulib
138         * configure.ac (WERROR_CFLAGS): Suppress gcc's new -Wcast-function-type
139         warning in gnulib, because it would trigger on this:
140         sig-handler.h:47:12: error: cast between incompatible function types\
141           from 'void (* const)(int,  siginfo_t *, void *)' \
142           {aka 'void (* const)(int,  struct <anonymous> *, void *)'} \
143           to 'void (*)(int)' [-Werror=cast-function-type]
144         return (sa_handler_t) a->sa_sigaction;
145
146 2017-10-22  Jim Meyering  <meyering@fb.com>
147
148         tests: add expected-failing test for minor subopimality
149         In some unusual cases, diff -u prints suboptimal output.
150         * tests/large-subopt: New test script.
151         * tests/Makefile.am (TESTS): Add it.
152         (XFAIL_TESTS): Add it here, too, to record that this test is
153         currently expected to fail.
154         * tests/large-subopt.in1, tests/large-subopt.in2: Inputs derived from
155         those in http://bugs.gnu.org/28796
156
157 2017-09-23  Jim Meyering  <meyering@fb.com>
158
159         gnulib: update to latest
160
161 2017-05-21  Jim Meyering  <meyering@fb.com>
162
163         maint: make the announcement template Cc the devel- list
164         * cfg.mk (announcement_Cc_): Define.
165
166         maint: post-release administrivia
167         * NEWS: Add header line for next release.
168         * .prev-version: Record previous version.
169         * cfg.mk (old_NEWS_hash): Auto-update.
170
171         version 3.6
172         * NEWS: Record release date.
173
174 2017-05-19  Jim Meyering  <meyering@fb.com>
175
176         gnulib: update to latest
177
178 2017-05-18  Jim Meyering  <meyering@fb.com>
179
180         maint: update to work with GCC7's -Werror=implicit-fallthrough=
181         * src/system.h (FALLTHROUGH): Define.
182         Use new FALLTHROUGH macro in place of comments
183         * src/cmp.c: FIXME
184         * src/diff3.c: FIXME
185         * src/ifdef.c: FIXME
186         * src/sdiff.c: FIXME
187         * src/side.c: FIXME
188         * src/util.c: FIXME
189
190         gnulib: update to latest
191
192 2017-05-09  Jim Meyering  <meyering@fb.com>
193
194         tests: new-file: closed-stdin: also ensure stdout was empty
195         * tests/new-file: Also require that "out" be empty.
196
197 2017-05-06  Jim Meyering  <meyering@fb.com>
198
199         maint: stop using @acronym{...} in texinfo sources
200         * doc/diffutils.texi: Remove all uses of @acronym{...},
201         per recommendation by Karl Berry.
202         * cfg.mk (local-checks-to-skip): Remove exemption, enabling
203         the @acronym{-prohibiting syntax-check rule.
204
205 2017-05-05  Paul Eggert  <eggert@cs.ucla.edu>
206
207         cmp: improve EOF diagnostic
208         This improves on yesterday's change, following up on a
209         remark by Jim Meyering (Bug#22816#21).
210         * doc/diffutils.texi (Invoking cmp, cmp Options): Follow POSIX more
211         closely in the documentation of the information appended to the EOF
212         diagnostic.
213         * src/cmp.c (cmp): Be more specific about the shorter file's length
214         and fix some off-by-1 issues in reporting line counts.
215         * tests/cmp: Adjust to match new behavior.
216         Don't assume internal details about stdio buffering.
217
218 2017-05-04  Benno Schulenberg  <bensberg@justemail.net>
219
220         diff: describe each --help option with a single string
221         * src/diff.c: To ease translating, fuse four description pieces
222         into two whole ones.  Also reword and rewrap one of them to fit
223         within eighty characters.
224
225 2017-05-04  Paul Eggert  <eggert@cs.ucla.edu>
226
227         cmp: report prefix length when one file is shorter
228         Requested by Dan Jacobson (Bug#22816).
229         * NEWS:
230         * doc/diffutils.texi (Invoking cmp, cmp Options): Document this.
231         * src/cmp.c (cmp): Implement it.
232         * tests/Makefile.am (TESTS): Add cmp.
233         * tests/cmp: New file.
234
235 2017-05-02  Jim Meyering  <meyering@fb.com>
236
237         tests: add test for latest fix
238         * NEWS (Bug fixes): Describe it.
239         * tests/invalid-re: New test for just-fixed bug.
240         * tests/Makefile.am (TESTS): Add it.
241
242         gnulib: update to latest
243
244 2017-04-27  Paul Eggert  <eggert@cs.ucla.edu>
245
246         diff: don't crash if regexp is invalid
247         Problem reported by Marcel Böhme in:
248         http://lists.gnu.org/archive/html/bug-diffutils/2017-04/msg00002.html
249         * src/diff.c (add_regexp): Exit if re_compile_pattern fails.
250
251 2017-03-24  julama  <julama@fake-box.com>
252
253         tests: avoid false failure for unreadable /proc/cmdline
254         * tests/brief-vs-stat-zero-kernel-lies: Use "test -r" rather than
255         just "test -f".  This avoids a false test failure on a linux system
256         with grsecurity and its GRKERNSEC_PROC_USER option enabled, for which
257         /proc/cmdline is unreadable.  Reported in https://bugs.gnu.org/26155
258
259 2017-02-01  Jim Meyering  <meyering@fb.com>
260
261         tests: avoid false failure with some shells on debian, freebsd
262         * tests/colors: Move the TERM=dumb setting into the code run by
263         "returns_", since some shells do not propagate envvar setting through
264         to a use of a function like this.  That would cause this test to fail
265         because results were colorized when they should not have been.
266         Reported by Nelson Beebe.
267
268 2017-01-31  Jim Meyering  <meyering@fb.com>
269
270         maint: add "introduced in 3.4" in latest NEWS entry
271         * NEWS: Update.  Also, thanks to Nelson Beebe for reporting this.
272
273         diff: avoid UMR with ---presume-output-tty
274         * src/diff.c (main): Always define presume_output_tty.
275         Otherwise, it would be read uninitialized.
276         Introduced in v3.3-45-g17e2698
277         * NEWS (Bug fixes): Mention it.
278
279         gnulib: update to latest; and update bootstrap and init.sh
280
281         maint: change "time stamp" to "timestamp" globally
282         This avoids a new syntax-check failure.
283         * ChangeLog-2008: Perform that change.
284         * doc/diffutils.texi: Likewise.
285         * NEWS: Likewise.
286         * cfg.mk: Update the old news hash accordingly.
287
288 2017-01-01  Jim Meyering  <meyering@fb.com>
289
290         maint: update gnulib and copyright dates for 2017
291         * gnulib: Update to latest.
292         * all files: Run "make update-copyright".
293
294 2016-11-08  Jim Meyering  <meyering@fb.com>
295
296         tests: use "returns_" rather than explicit comparison with "$?"
297         * tests/colors: Use "returns_ 1" rather than testing $? = 1
298         * tests/basic: Likewise.
299         * tests/binary: Likewise.
300         * tests/filename-quoting: Likewise.
301         * tests/function-line-vs-leading-space: Likewise.
302         * tests/ignore-matching-lines: Likewise.
303         * tests/label-vs-func: Likewise.
304         * tests/new-file: Likewise.
305         * tests/no-dereference: Likewise.
306         * tests/no-newline-at-eof: Likewise.
307         * tests/stdin: Likewise.
308
309 2016-10-25  Paul Eggert  <eggert@cs.ucla.edu>
310
311         diff: fix big performance degradation in 3.4
312         * NEWS, doc/diffutils.texi (Overview): Document this.
313         * src/analyze.c (diff_2_files): Restore too_expensive heuristic,
314         but this time with a floor that is 16 times the old floor.  This
315         should fix Bug#16848, by generating good-quality output for its
316         test case, while not introducing Bug#24715, by running nearly as
317         fast as diff-3.3 for that test case.
318
319         build: update gnulib submodule to latest
320
321 2016-10-16  Jim Meyering  <meyering@fb.com>
322
323         maint: use die rather than error
324         Use "die (N, ..." rather than "error (N, ..." whenever N is a nonzero
325         constant.  That lets the compiler know that control never goes beyond
326         that point, and thus makes unnecessary the occasional following
327         "abort ();" or "break;" statement we have historically added to inform
328         static analysis tools of this aspect of "error" semantics.
329         * src/die.h: New file.
330         * src/Makefile.am (noinst_HEADERS): Add it.
331         * src/cmp.c: Use die in place of error whenever the first
332         argument is a nonzero constant.  Also remove any immediately-
333         following call to abort, and include "die.h".
334         * src/diff.c: Likewise.
335         * src/diff3.c: Likewise.
336         * src/sdiff.c: Likewise.
337         * src/util.c: Likewise.
338
339 2016-10-02  Jim Meyering  <meyering@fb.com>
340
341         gnulib: update to latest
342
343         build: avoid GCC 7's new warnings
344         * src/util.c (get_funky_string): Adjust comment so that GCC 7's
345         -Wimplicit-fallthrough recognizes it.
346         * src/diff3.c (main): Cast boolean MERGE to "int" to avoid this:
347         diff3.c:341:25: error: '~' on a boolean expression \
348         [-Werror=bool-operation]
349
350 2016-08-30  Jim Meyering  <meyering@fb.com>
351
352         gnulib: update to latest
353
354 2016-08-29  Jim Meyering  <meyering@fb.com>
355
356         gnulib: update to latest, to port to upcoming GCC 7
357         This fixes compilation errors when using gcc-7-to-be that were
358         due to missing backslashes in gnulib's intprops.h and an API
359         change in functions like __builtin_add_overflow.  This ports
360         to GCC 7's newer built-in overflow-checking functions.
361
362 2016-08-28  Paul Eggert  <eggert@cs.ucla.edu>
363
364         diff: don't assume ptrdiff_t <= long long int
365         * src/system.h (printint, pI): Port to (theoretical) platforms
366         where ptrdiff_t is wider than long long int (Bug#24311).
367
368 2016-08-27  Paul Eggert  <eggert@cs.ucla.edu>
369
370         diff: port line numbers to mingw64
371         Problem reported by Peter Rosin (Bug#24311).
372         * src/system.h (printint, pI): New typedef and macro.
373         All uses of 'long int' and "%l" in printf format replaced by
374         'printint' and "%"pI respectively.
375         * src/ifdef.c (do_printf_spec): Don't assume pI is length 1.
376
377 2016-08-20  Jim Meyering  <meyering@fb.com>
378
379         maint: post-release administrivia
380         * NEWS: Add header line for next release.
381         * .prev-version: Record previous version.
382         * cfg.mk (old_NEWS_hash): Auto-update.
383
384         version 3.5
385         * NEWS: Record release date.
386
387 2016-08-16  Jim Meyering  <meyering@fb.com>
388
389         build: arrange to build with -fno-common, when possible
390         * configure.ac (WERROR_CFLAGS): Add -fno-common, when possible.
391         This would have prevented the duplicate definition of
392         presume_output_tty that was fixed in v3.4-10-gc2dc91f.
393
394 2016-08-16  Hanno Böck  <hanno@hboeck.de>
395
396         diff: avoid duplicate definition of presume_output_tty
397         * src/util.c (presume_output_tty): Remove this definition.
398         The other is in diff.h.  Reported in https://bugs.gnu.org/24248
399
400 2016-08-14  Jim Meyering  <meyering@fb.com>
401
402         gnulib: update to latest
403
404         tests: diff3: work around missing seq on some systems
405         * tests/diff3 (seq): Provide a seq replacement function,
406         since at least AIX, SunOS 5.10, OpenBSD-5.8 lack it.
407         Reported by Assaf Gordon in https://bugs.gnu.org/24227#8
408
409 2016-08-13  Jim Meyering  <meyering@fb.com>
410
411         diff3: fix leaks, for real
412         * src/diff3.c (struct diff_block)[lint]: Add member, n2.
413         (free_diff_block, next_to_n2): New functions.
414         * tests/diff3: Add more test coverage.
415
416         maint: require that commit messages be of a certain form
417         * bootstrap.conf (bootstrap_epilogue): Merge from coreutils, so that
418         a local commit hook will now help enforce consistent commit messages.
419         * Makefile.am (check-git-hook-script-sync): New rule, largely copied
420         from coreutils.
421         * scripts/git-hooks/commit-msg: New file, from coreutils, but
422         with adapted list of program names.
423         * scripts/git-hooks/applypatch-msg: New file, from git.
424         * scripts/git-hooks/pre-applypatch: Likewise.
425         * scripts/git-hooks/pre-commit: Likewise.
426
427 2016-08-13  Bastian Beischer  <bastian.beischer@rwth-aachen.de>
428
429         diff3: fix heap use-after-free; add minimal diff3 test coverage
430         Commit v3.3-42-g3b74a90, "FIXME: src/diff3: plug a leak" added an
431         invalid use of free, leading to use-after-free in nearly any invocation
432         of diff3.  Revert that commit.
433         * NEWS (Bug fixes): Mention it.
434         * tests/diff3: New file, to add minimal test coverage.
435         * tests/Makefile.am (TESTS): Add it.
436         Reported by Bastian Beischer in http://bugs.gnu.org/24210
437
438 2016-08-13  Jim Meyering  <meyering@fb.com>
439
440         build: ignore texinfo build artifacts
441         * .gitignore: Ignore texinfo artifacts in doc/.
442
443         maint: diff3: remove an unreachable statement
444         * src/diff3.c (main): Remove unreachable "return" after exit from main.
445
446 2016-08-08  Jim Meyering  <meyering@fb.com>
447
448         diff: disable colorization for TERM=dumb
449         * src/diff.c (main): With --color or --color=auto, when TERM is
450         "dumb", disable colorization.  Suggested by Daniel Colascione.
451         * NEWS (Bug fixes): Mention it.
452         * tests/colors: Add a test that would fail without this change,
453         yet passes with it.
454
455         maint: post-release administrivia
456         * NEWS: Add header line for next release.
457         * .prev-version: Record previous version.
458         * cfg.mk (old_NEWS_hash): Auto-update.
459
460         version 3.4
461         * NEWS: Record release date.
462
463 2016-08-06  Jim Meyering  <meyering@fb.com>
464
465         gnulib: update to latest
466
467         tests: tweak built_programs definition
468         * tests/Makefile.am (built_programs): Adjust to work around what
469         may be a problem due to interaction between Solaris 10's /bin/sh
470         and an old version of GNU make. Reported by Dagobert Michelsen
471         in https https://bugs.gnu.org/24137.
472
473 2016-08-02  Jim Meyering  <meyering@fb.com>
474
475         gnulib: update to latest
476
477         tests: skip a /proc/self-dependent test on the Hurd
478         * tests/brief-vs-stat-zero-kernel-lies: The Hurd's /proc/self
479         is not useful, so detect that and skip the test that requires it.
480         Reported by Assaf Gordon in https://debbugs.gnu.org/24121#29
481
482 2016-08-01  Jim Meyering  <meyering@fb.com>
483
484         tests/colors: fix portability problem with touch --date
485         * tests/colors (epoch): Don't use GNU touch's --date=$epoch option.
486         Use the portable -t 197001010000.00.
487         Reported by Assaf Gordon in https://debbugs.gnu.org/24121#8
488
489         build: Solaris 9: avoid link failure due to isblank use
490         * bootstrap.conf (gnulib_modules): Add isblank, to avoid a link
491         error on Solaris 9 Sparc.  Reported by Dagobert Michelsen.
492
493         test: improve test infrastructure
494         * tests/envvar-check: New file, copied from grep, with the addition
495         of the EDITOR and GREP_OPTIONS envvar names.
496         * tests/Makefile.am (EXTRA_DIST): Add it.
497         (TESTS_ENVIRONMENT): Revamp, to be more like that of grep.
498
499 2016-07-31  Jim Meyering  <meyering@fb.com>
500
501         maint: remove gl/lib/reg*.c.diff; no longer needed
502         * gl/lib/regcomp.c.diff: Remove file, now that gnulib's
503         regcomp.c compiles regex.c with -Wno-unused-parameter.
504         * gl/lib/regex_internal.c.diff: This file induced a change to ensure
505         that the "Idx" type was unsigned and to remove a few "VAR < 0"
506         comparisons.  These days, it is probably fine to stay in sync with
507         gnulib/glibc's copies
508         of these files, so remove these patches, too.
509         * gl/lib/regexec.c.diff: Likewise.
510         Prompted by a report by Assaf Gordon and a suggestion from Paul Eggert.
511
512         tests: colors: fix a portability problem and work around a shell bug
513         * tests/colors (e): Fix a portability bug: use printf '\033'
514         rather than '\e' to generate the required byte sequence, since
515         for some shells (at least dash 0.5.8), the latter doesn't work.
516         Work around a shell bug whereby "local tab=$(printf '\t')"
517         would result in an empty value for "$tab": hoist each "tab"
518         definition up/out of its function to global scope.
519         Reported by Assaf Gordon in http://debbugs.gnu.org/24116#8
520
521 2016-07-23  Jim Meyering  <meyering@fb.com>
522
523         gnulib: update to latest; and tests/init.sh
524         * gnulib: Update to latest.
525         * init.sh: Update from gnulib.
526
527 2016-05-30  Jim Meyering  <meyering@fb.com>
528
529         maint: arrange for "make distcheck" to work with unreleased automake
530         * dist-check.mk (my-distcheck): Remove all .deps directories
531         before performing the recursive comparison.
532
533 2016-05-24  Glenn Morris  <rgm@gnu.org>
534
535         doc: fix a reference to emacs' emerge node
536         * doc/diffutils.texi (Interactive Merging): Correct a reference to
537         emacs' emerge node: s/emerge/Emerge/.
538         This addresses http://debbugs.gnu.org/23613
539
540 2016-04-30  Jim Meyering  <meyering@fb.com>
541
542         maint: arrange for better URLs in generated announcement message
543         * cfg.mk (url_dir_list): Define.  I had been correcting the generated
544         URLs by hand, just before the announcement.  This is better.
545
546 2016-03-15  Jim Meyering  <meyering@fb.com>
547
548         maint: don't ignore gitlog-to-changelog failure
549         * Makefile.am (gen-ChangeLog): Don't ignore failure of
550         gitlog-to-changelog. This syncs to coreutils' copy of this rule.
551
552 2016-03-06  Giuseppe Scrivano  <gscrivano@gnu.org>
553
554         diff: --color: fix an infinite recursion bug
555         * src/diff.h (presume_output_tty): New extern variable.
556         * src/diff.c (PRESUME_OUTPUT_TTY_OPTION): New enum.
557         (group_format_option): Add '-presume-output-tty'.
558         (main): Handle PRESUME_OUTPUT_TTY_OPTION.
559         * src/util.c: New variable `presume_output_tty'.
560         (check_color_output): Handle presume_output_tty.
561         (set_color_context): Call process_signals only when color_context is
562         not RESET_CONTEXT.
563         * tests/colors: Check that diff doesn't crash when interrupted
564         in the middle of a color sequence.
565
566         Reported by Gisle Vanem in http://debbugs.gnu.org/22067
567
568 2016-01-31  Jim Meyering  <meyering@fb.com>
569
570         maint: update prereq version of gettext
571         * configure.ac: Increase designated gettext version to 0.19.2
572         * bootstrap.conf (buildreq): Likewise.
573         Remove now-unnecessary code to remove gettext-provided files.
574
575         gnulib: update to latest
576
577 2016-01-01  Jim Meyering  <meyering@fb.com>
578
579         FIXME: src/diff3: plug a leak
580
581 2016-01-01  Jim Meyering  <meyering@fb.com>
582
583         maint: update copyright year, bootstrap, init.sh
584         Run "make update-copyright" and then...
585
586         * gnulib: Update to latest.
587         * tests/init.sh: Update from gnulib.
588         * bootstrap: Likewise.
589
590 2015-12-06  Jim Meyering  <meyering@fb.com>
591
592         diff --brief no longer mistakenly reports diff. with 0-sized /proc/ files
593         Normally, it is safe to assume two regular files are different when
594         their st_size values are different.  However, that assumption may
595         be invalid if either value is zero, as happens with files on Linux
596         /proc and /sys file systems. Since skipping this optimization will
597         usually cost very little (one read syscall, to read zero bytes),
598         it is fine to accommodate those unusual files.
599         * src/analyze.c (diff_2_files): Do not assume regular files differ
600         just because their st_size values differ when one or more is 0.
601         * src/diff.c (compare_files): Likewise.
602         * tests/brief-vs-proc-stat-zero: New test.
603         * tests/Makefile.am: Add it.
604         * NEWS (Bug fixes): Describe it.
605         Reported by Stephan Müller in http://debbugs.gnu.org/21942
606
607         tests: arrange to print any skipped-test explanation to tty, too
608         I noticed that when a test was skipped, the reason was not printed.
609         This fixes it.  In coreutils, this variable is set in init.cfg,
610         but there is no point in putting the definition so far from the
611         code that chooses the file descriptor number in tests/Makefile.am.
612         * tests/Makefile.am (TESTS_ENVIRONMENT) [stderr_fileno_]: Define
613         here (to 9), right next to the companion "9>&2".
614
615 2015-11-29  Jim Meyering  <meyering@fb.com>
616
617         build: add gperf to the list of required programs
618         * bootstrap.conf (buildreq): Add gperf to the list.
619         Reported by Stephan Müller in http://debbugs.gnu.org/21945
620
621 2015-11-29  Giuseppe Scrivano  <gscrivano@gnu.org>
622
623         tests: Add tests for --color and --palette
624         * tests/colors: New file.
625         * tests/Makefile.am (TESTS): Add colors.
626
627         doc: mention --color and --palette in NEWS
628
629         diff: add --palette
630         * bootstrap (gnulib_modules): Add 'argmatch'.
631         * doc/diffutils.texi: Add documentation for --palette
632         * src/diff.h (set_color_palette): New prototype.
633         * src/diff.c (set_color_palette): New function.
634         (color_palette): New variable.
635         * src/utils.c: Include "argmatch.h".
636         (struct bin_str): New struct.
637         (struct color_ext_type): New struct.
638         (color_indicator): New array.
639         (indicator_name): New array.
640         (indicator_no): New enum.
641         (parse_state): New enum.
642         (put_indicator): New function.
643         (get_funky_string): New function. Copied from coreutils ls.
644         (parse_diff_color):  New function. Copied from coreutils ls
645         "parse_ls_color" function.
646         (set_color_context): Use put_indicator instead of directly
647         outputting the sequence.
648         * po/POTFILES.in: Add 'lib/argmatch.c'
649
650         diff: add support for --color
651         * doc/diffutils.texi (diff Options): Add documentation for --color.
652         Copied from coreutils ls --color.
653         * src/context.c (pr_unidiff_hunk): Set the color context.
654         (print_context_header): Likewise.
655         (pr_context_hunk): Likewise.
656         * src/diff.h (enum colors_style): New enum to record when to use colors.
657         (colors_style): New variable to memorize the argument value.
658         (set_color_context): Add function definition.
659         * src/diff.c: : Define COLOR_OPTION.
660         (specify_colors_style): New function.
661         (longopts): Add --color.
662         (main): Handle --color argument.
663         (option_help_msgid): Add usage string for --color.
664         * src/normal.c (print_normal_hunk): Set the color context.
665         * src/side.c (print_1sdiff_line): Likewise.
666         * src/util.c (print_1_line_nl): New function.
667         (print_1_line): Make it a wrapper of 'print_1_line_nl'.
668         (colors_enabled): New boolean variable.
669         (begin_output): Call check_color_output once the output file is
670         configured.
671         (output_1_line): Periodically call `process_signals'.
672         (caught_signals): New sigset_t.
673         (colors_enabled): New boolean variable.
674         (interrupt_signal): New sig_atomic_t.
675         (stop_signal_count): New sig_atomic_t.
676         (check_color_output): New function.
677         (install_signal_handlers): Likewise. Copied from coreutils ls.
678         (process_signals): Likewise.  Copied from coreutils ls.
679         (set_color_context): New function.
680         (sighandler): Likewise.  Copied from coreutils ls.
681         (stophandler): Likewise.  Copied from coreutils ls.
682
683 2015-09-24  Andreas Grünbacher  <agruen@gnu.org>
684
685         diff: Improve help text of option --label
686         * src/diff.c (option_help_msgid): Improve help text of option --label.
687
688 2015-09-01  Jim Meyering  <meyering@fb.com>
689
690         build: correct man-page generation rule
691         The PATH was set incorrectly, so that the diff used by
692         help2man was the one from $PATH, rather than the just-built
693         one.
694         * man/Makefile.am (bin_dir): New variable, to...
695         (dist_man1_MANS): ...prepend ../src to PATH, not just "..".
696         Also, add a test to ensure that each $(bin_dir)/$$base is
697         executable, so this doesn't happen again.
698         In http://debbugs.gnu.org/21023, Rodrigo Valiña
699         Gutiérrez reported that diff.1 from the diffutils-3.3 tarball
700         contained no description of the then-new --no-dereference option.
701
702 2015-07-10  Jim Meyering  <meyering@fb.com>
703
704         doc: --no-dereference: improve wording/description
705         * doc/diffutils.texi (Comparing Directories): Correct grammar.
706         (diff Options) [--no-dereference]: Say a little more.
707
708 2015-01-01  Jim Meyering  <meyering@fb.com>
709
710         maint: update copyright year ranges to include 2015; update gnulib
711
712 2014-12-12  KO Myung-Hun  <komh@chollian.net>
713
714         diff: skip test if seek is not possible on OS/2 kLIBC
715         This fixes the problem that 'diff - file' and 'cat file | diff - file'
716         fail due to a seek failure with a message 'diff.exe: -: Invalid seek',
717         because seek does not work on stdin and a pipe on OS/2 kLIBC.
718
719         * src/io.c (sip): Set skip_test to true if seek is not possible on
720         OS/2 kLIBC.
721
722 2014-12-09  Jim Meyering  <meyering@fb.com>
723
724         gnulib: update to latest
725
726 2014-12-09  KO Myung-Hun  <komh78@gmail.com>
727
728         build: double-quote use of $PATH
729         * man/Makefile.am (dist_man1_MANS): On OS/2, PATH_SEPARATOR is ';',
730         but unquoted, that is interpreted as the shell's statement
731         terminator.  Quote it.
732
733 2014-10-27  Paul Eggert  <eggert@cs.ucla.edu>
734
735         diff: fix integer overflow problem with --tabsize
736         Reported by Tobias Stoeckmann in: http://bugs.gnu.org/18857
737         * src/diff.c (main): Don't overflow if INTMAX_MAX / 2 < tabsize.
738         * tests/bignum: New file, to test for this bug.
739         * tests/Makefile.am (TESTS): Add it.
740
741 2014-09-03  Paul Eggert  <eggert@cs.ucla.edu>
742
743         doc: mention diff -B fix in NEWS
744
745         diff: fix bug with diff -B and incomplete lines
746         Reported by Navin Kabra via Eric Blake in:
747         http://bugs.gnu.org/18402
748         * src/util.c (analyze_hunk): Don't mishandle incomplete
749         lines at end of file.
750         * tests/no-newline-at-eof: Test for the bug.
751
752         diff: fix performance bug with prefix computation
753         * src/io.c (find_identical_ends): Fix performance bug:
754         the test for when the prefix was needed messed up by
755         the 2002-02-28 integer-overflow fixes, causing performance to be
756         worse than it needed to be.
757
758 2014-08-23  Jim Meyering  <meyering@fb.com>
759
760         gnulib: update to latest, as well as bootstrap
761
762         maint: update copyright year range in texinfo documentation
763         * doc/diffutils.texi: Update copyright.
764
765 2014-04-15  Jim Meyering  <meyering@fb.com>
766
767         maint: update bug-reporting address
768         * README: Change bug-gnu-utils@... to bug-diffutils@gnu.org.
769         * doc/diffutils.texi: Likewise.
770         Reported by Jamie Landeg Jones.
771
772 2014-03-26  Paul Eggert  <eggert@penguin.cs.ucla.edu>
773
774         diff: fix two "..." typos in --help output
775         * src/diff.c (option_help_msgid): Remove two "..." typos (Bug#17102).
776
777 2014-03-25  Paul Eggert  <eggert@cs.ucla.edu>
778
779         doc: improve documentation about reading and stdin
780         See Bug#17075.
781         * doc/diffutils.texi (Comparison): Say that files need not be read.
782         (Invoking diff): Remove confusing remark about 'diff - -'.
783         It's not that useful, and it's not portable anyway.
784
785 2014-02-24  Paul Eggert  <eggert@cs.ucla.edu>
786
787         diff, sdiff: minor integer overflow fixes
788         * src/context.c (find_hunk):
789         Simplify, now that 2 * context + 1 cannot overflow.
790         * src/diff.c (main):
791         * src/sdiff.c (interact):
792         Don't rely on undefined behavior on signed integer overflow.
793         * src/diff.c (main): Don't let contexts exceed CONTEXT_MAX.
794         * src/system.h (CONTEXT_MAX): New macro.
795
796         diff: fix bug with -I and overlapping hunks
797         Problem reported by Vincent Lefevre in <http://bugs.gnu.org/16864>.
798         * src/context.c (find_hunk): Threshold is CONTEXT only if
799         the second change is ignorable.
800         * tests/ignore-matching-lines: New test.
801         * tests/Makefile.am (TESTS): Add it.
802
803 2014-02-23  Paul Eggert  <eggert@cs.ucla.edu>
804
805         diff: remove TOO_EXPENSIVE heuristic
806         Problem reported by Vincent Lefevre in <http://bugs.gnu.org/16848>.
807         The simplest solution is to remove the TOO_EXPENSIVE heuristic
808         that I added to GNU diff in 1993.  Although appropriate for
809         circa-1993 hardware, these days the heuristic seems to be more
810         trouble than it's worth.
811         * NEWS: Document this.
812         * doc/diffutils.texi (Overview): Modernize citations.
813         Remove mention of TOO_EXPENSIVE heuristic.
814         * src/analyze.c (diff_2_files): Adjust to TOO_EXPENSIVE-related
815         API changes in gnulib's diffseq module.
816
817         build: update gnulib submodule to latest
818
819 2014-01-31  Paul Eggert  <eggert@cs.ucla.edu>
820
821         diff: exit with status 1, not 2, when binary files differ
822         Problem reported by Vincent Lefevre in <http://bugs.gnu.org/16608>.
823         * NEWS:
824         * doc/diffutils.texi (Binary, Invoking diff): Document this.
825         * src/analyze.c (briefly_report): Return void, not int.
826         All uses changed.  Do not futz with exit status.  Simplify.
827         * tests/binary: Adjust to match new behavior.
828
829 2013-09-26  Paul Eggert  <eggert@cs.ucla.edu>
830
831         build: omit -Wsuggest-attribute=pure for lib
832         * configure.ac (WARN_CFLAGS): Omit -Wsuggest-attribute=pure
833         when compiling the lib subdirectory.  Reported for Fedora 19
834         by Eric Blake in <http://bugs.gnu.org/15463>.
835
836 2013-08-22  Paul Eggert  <eggert@cs.ucla.edu>
837
838         cmp, diff, sdiff: tune by using rawmemchr
839         On my platform (AMD Phenom II X4 910e, Fedora 17 x86-64), this sped up
840         'cmp -n 8GiB /dev/full /dev/zero' by a factor of 3.8, and
841         'cmp -sn 8GiB /dev/full /dev/zero' by a factor of 1.8.
842         * bootstrap.conf (gnulib_modules): Add rawmemchr.
843         * src/cmp.c (cmp): Optimize the common case where buffers are the same,
844         by using count_newlines rather than block_compare_and_count.
845         (block_compare_and_count): Remove.
846         (count_newlines): New function.
847         * src/cmp.c (count_newlines):
848         * src/io.c (prepare_text):
849         * src/sdiff.c (lf_copy, lf_skip, lf_snarf):
850         Use rawmemchr instead of memchr, for speed.
851
852 2013-08-12  Paul Eggert  <eggert@cs.ucla.edu>
853
854         cmp: tune 'cmp a b' for GCC x86
855         Performance problem reported by David Balažic in:
856         http://lists.gnu.org/archive/html/bug-diffutils/2013-08/msg00013.html
857         * src/system.h (word): Make it size_t, not uintmax_t.
858         This sped up plain cmp 90% on my tests (GCC 4.8.1, x86).
859
860 2013-07-06  Paul Eggert  <eggert@cs.ucla.edu>
861
862         build: update gnulib submodule to latest
863
864 2013-05-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
865
866         build: enable 'subdir-objects' automake option
867         The future major Automake version (2.0, ETA at least one year from now)
868         might enable that option unconditionally, so better get prepared in due
869         time.
870
871         * configure.ac (AM_INIT_AUTOMAKE): Adjust.
872         (AM_PROG_CC_C_O): New, required by Automake up to 1.13.x when the
873         'subdir-objects' is in use.
874
875 2013-04-28  Paul Eggert  <eggert@cs.ucla.edu>
876
877         build: update gnulib submodule to latest
878
879 2013-04-03  Paul Eggert  <eggert@cs.ucla.edu>
880
881         diff: fix bug with Asian file names
882         Problem reported by Errembault Philippe in:
883         http://lists.gnu.org/archive/html/bug-diffutils/2013-03/msg00012.html
884         * NEWS: Document this.
885         * src/dir.c (compare_names): Fall back on file_name_cmp if
886         compare_collated returns 0, unless ignoring file name case.
887         (diff_dirs): Don't bother with the O(N**2) stuff unless ignoring
888         file name case.
889         * tests/Makefile.am (TESTS): Add strcoll-0-names.
890         * tests/strcoll-0-names: New file.
891
892         diff: remove unnecessary decl
893         * src/dir.c (compare_names_for_qsort): Remove declaration.
894         Not needed now that we assume C89.
895
896         diff: tune compare_names_for_qsort
897         * src/dir.c (compare_collated): New function.
898         (compare_names): Use it.
899         (compare_names_for_qsort): Use it.  This is a bit more efficient
900         as it can avoid a double invocation of file_name_cmp when
901         file_name_cmp returns zero.
902
903 2013-03-30  Jim Meyering  <meyering@fb.com>
904
905         doc: mention new option, --no-dereference in 3.3's NEWS
906         * NEWS (New feeatures): Update 3.3's news to mention --no-dereference.
907         Reported by Denis Excoffier.
908         * Makefile.am (old_NEWS_hash): Update, since this modifies old, and
909         normally-immutable NEWS.
910
911 2013-03-26  Paul Eggert  <eggert@cs.ucla.edu>
912
913         tests: port to Solaris 10 /bin/sh
914         * tests/Makefile.am (TESTS_ENVIRONMENT):
915         Use "FOO=val; export FOO" rather than "export FOO=val",
916         as the latter form doesn't work with Solaris /bin/sh.
917         Problem found when trying to run "make check" on Solaris 10.
918
919 2013-03-24  Jim Meyering  <meyering@fb.com>
920
921         maint: post-release administrivia
922         * NEWS: Add header line for next release.
923         * .prev-version: Record previous version.
924         * cfg.mk (old_NEWS_hash): Auto-update.
925
926         version 3.3
927         * NEWS: Record release date.
928
929 2013-03-23  Paul Eggert  <eggert@cs.ucla.edu>
930
931         doc: fix menu typo
932         * doc/diffutils.texi (Comparing Three Files): Fix out-of-order menu.
933         Bug caught by Texinfo 5.0.
934
935         maint: update build procedure to recent gettext etc.
936         * bootstrap.conf (gnulib_modules): Add vararrays.
937         (needed_gnulib_files, unnecessary_gettext_files): New vars.
938         (bootstrap_post_import_hook): New function, to implement these vars.
939         (excluded_files): Remove; 'bootstrap' no longer supports this.
940         Its function is now performed by unnecessary_gettext_files.
941         (buildreq): Update automake to 1.12.2, to avoid CVE-2012-3386.
942         * configure.ac (AM_GNU_GETTEXT_VERSION): Bump from 0.17 to 0.18.2,
943         to lessen the probability that we'll have outlandishly old files
944         during a build.
945         * m4/vararrays.m4: Remove from repository, as we now use the
946         gnulib version.
947
948 2013-03-21  Jim Meyering  <jim@meyering.net>
949
950         build: update gnulib to latest and adapt; update bootstrap, too
951         Blindly updating to the latest from gnulib, bootstrap would
952         fail due to failure of our local patches to apply.  Hence,
953         these first two updates.
954         * gl/lib/regex_internal.c.diff: Update offsets, so this patch
955         applies to the latest from gnulib.
956         * gl/lib/regex_internal.h.diff: Remove file.  No longer needed.
957         * bootstrap: Update from gnulib.
958
959 2013-01-06  Paul Eggert  <eggert@cs.ucla.edu>
960
961         tests: port to hosts lacking fmt, make -C
962         * tests/Makefile.am (built_programs): Don't assume fmt works.
963         Don't rely on 'make -C', either.
964
965         maint: update .gitignore for recent gnulib
966         * .gitignore: Add tests/*.trs and several *.h and *.sed files in lib,
967
968 2013-01-04  Jim Meyering  <jim@meyering.net>
969
970         build: update gnulib submodule to latest
971
972         maint: update all copyright year number ranges
973         Run "make update-copyright".
974
975 2012-10-23  Eric Blake  <eblake@redhat.com>
976
977         build: default to --enable-gcc-warnings in a git tree
978         Anyone building from cloned sources can be assumed to have a new
979         enough environment, such that enabling gcc warnings by default will
980         be useful.  Tarballs still default to no warnings, and the default
981         can still be overridden with --disable-gcc-warnings.
982         * configure.ac (gl_gcc_warnings): Set default based on environment.
983
984 2012-10-03  Paul Eggert  <eggert@cs.ucla.edu>
985
986         * doc/diffutils.texi (cmp Options): Document -l format better.
987
988 2012-09-10  Jim Meyering  <meyering@redhat.com>
989
990         maint: use xasprintf in place of xmalloc+sprintf
991         * bootstrap.conf (gnulib_modules): Add gnulib's xvasprintf module.
992         * src/util.c: Include "xvasprintf.h".
993         (begin_output): Use xasprintf in place of xmalloc+sprintf.
994
995 2012-09-10  Andreas Gruenbacher  <agruen@gnu.org>
996
997         diff: encode file names with special characters
998         * src/util.c (c_escape_char): New function.
999         (c_escape): New function.
1000         (begin_output): Escape file names when needed.
1001         * src/context.c (print_context_header): New names parameter.
1002         (print_context_label): New name parameter.
1003         * src/diff.h (print_context_header): Change prototype.
1004         * tests/filename-quoting: New file.
1005         * NEWS: Document this change.
1006
1007 2012-08-30  Paul Eggert  <eggert@cs.ucla.edu>
1008
1009         diff: silence GCC warning instead of slowing down
1010         * src/dir.c (find_dir_file_pathname): Use 'IF_LINT (volatile)' to
1011         silence the gcc warning, rather than using 'volatile', as the
1012         warning appears to be bogus.
1013
1014 2012-08-28  Jim Meyering  <meyering@redhat.com>
1015
1016         diff: avoid possible longjmp-triggered misbehavior
1017         * src/dir.c (find_dir_file_pathname): gcc 4.8.0 20120825 reported
1018         that a local variable's value might be clobbered.  Declare "match"
1019         to be volatile.
1020
1021         build: update gnulib, bootstrap and init.sh to latest
1022
1023         maint: avoid new syntax-check failure due to @xref use
1024         * doc/diffutils.texi: Change several "; @xref{..." to ".  @xref{...",
1025         since @xref should start a sentence.
1026
1027 2012-05-15  Paul Eggert  <eggert@cs.ucla.edu>
1028
1029         maint: remove ms subdirectory
1030         diffutils is now designed to build with Cygwin or MinGW.
1031         The old DJGPP stuff probably doesn't work anyway.
1032         * Makefile.am (SUBDIRS): Remove ms.
1033         * NEWS: Document this.
1034         * configure.ac (AC_CONFIG_FILES): Remove ms/Makefile.
1035         * ms/Makefile.am, ms/README, ms/config.bat, ms/config.sed:
1036         * ms/config.site: Remove.
1037
1038 2012-05-14  Paul Eggert  <eggert@cs.ucla.edu>
1039
1040         maint: update bootstrap from gnulib
1041         * bootstrap: Update from gnulib.
1042
1043         main: port subcommands to mingw
1044         Problem reported by Eli Zaretskii in
1045         <http://lists.gnu.org/archive/html/bug-gnu-utils/2012-05/msg00013.html>.
1046         Approach suggested by Bruno Haible as option (4) in
1047         <http://lists.gnu.org/archive/html/bug-gnu-utils/2012-05/msg00036.html>.
1048         * bootstrap.conf (gnulib_modules): Add system-quote.
1049         * src/diff3.c, src/sdiff.c, src/util.c:
1050         Include <system-quote.h>, not <sh-quote.h>.
1051         * src/diff3.c (read_diff):
1052         * src/sdiff.c (main, edit):
1053         * src/util.c (begin_output):
1054         Use system_quote_argv, for portability to Mingw.
1055         * src/sdiff.c (NUM_SIGS, handler_index_of_SIGINT): Now enum
1056         values, not macros; this is cleaner and avoids a GCC warning if
1057         !HAVE_WORKING_VFORK.
1058         * src/util.c (begin_output) [! HAVE_WORKING_FORK]: Do not use -f,
1059         for consistency with the HAVE_WORKING_FORK code.
1060
1061         maint: update bootstrap from gnulib
1062         * bootstrap: Update from gnulib.
1063
1064         maint: m4/gnulib-cache.m4 is not under version control
1065         This is like what coreutils does, and suppresses 'git status' chatter.
1066         * .gitignore: Add /m4/gnulib-cache.m4.
1067
1068         Use binary mode when testing for binary files.
1069         This reverts the 2006-01-05 change and modernizes to the current API.
1070         Idea suggested by Eli Zaretskii in:
1071         http://lists.gnu.org/archive/html/bug-gnu-utils/2012-05/msg00066.html
1072         * src/cmp.c (main):
1073         * src/diff.c (main, compare_files):
1074         Use set_binary_mode rather than SET_BINARY.
1075         * src/diff.c (compare_files): Omit unnecessary use of O_BINARY.
1076         * src/io.c (sip): Sample unknown files in binary mode, to see
1077         whether they are binary.
1078         (read_files): Read binary files in binary mode.
1079
1080         build: update gnulib submodule to latest
1081
1082 2012-05-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
1083
1084         build: omit obsolete AM_PROG_CC_STDC macro
1085         The Automake-provided macro 'AM_PROG_CC_STDC' has been superseded by
1086         the Autoconf-provided one 'AC_PROG_CC' since October 2002, and will
1087         be removed in the next major automake version.
1088         * configure.ac (AM_PROG_CC_STDC): Drop it.
1089
1090 2012-05-05  Jim Meyering  <meyering@redhat.com>
1091
1092         diff: fix a typo that was always disabling the same_special_file macro
1093         * src/system.h (same_special_file): Correct cpp guard expression:
1094         s/HAVE_ST_RDEV/HAVE_STRUCT_STAT_ST_RDEV/.  Reported by Eli Zaretskii.
1095
1096 2012-04-17  Jim Meyering  <meyering@redhat.com>
1097
1098         maint: update bootstrap from gnulib
1099         * bootstrap: Update from gnulib.
1100
1101 2012-03-07  Eric Blake  <eblake@redhat.com>
1102
1103         usage: improve wording of --ignore-matching-lines
1104         * src/diff.c (option_help_msgid): Tweak wording.
1105
1106 2012-03-04  Paul Eggert  <eggert@cs.ucla.edu>
1107
1108         doc: explain -I RE better in --help output
1109         * src/diff.c, src/sdiff.c (option_help_msgid): For -I RE,
1110         change "whose lines all match" to "all whose lines match" to avoid
1111         unintended interpretation.  Reported by Danijel Tasov in
1112         <http://bugs.debian.org/648411>.
1113
1114 2012-02-12  Paul Eggert  <eggert@cs.ucla.edu>
1115
1116         sdiff: remove dependency on sigprocmask
1117         * bootstrap.conf (gnulib_modules): Remove sigprocmask.
1118         * src/sdiff.c (temporary_file): No need to invoke sigprocmask
1119         here, since the signal handler merely sets a flag.
1120
1121 2012-02-04  Paul Eggert  <eggert@cs.ucla.edu>
1122
1123         diff: -N, --unidirectional-new-file now compare to "-" too
1124         * NEWS: Document this.
1125         * doc/diffutils.texi (Comparing Directories): Likewise.
1126         Also, document that these options work at the top level.
1127         * src/diff.c (compare_files): Treat EBADF like ENOENT, to handle
1128         the case where "-" is closed.  Allow the other file to be
1129         STDIN_FILENO, in case it's "-".
1130         * tests/Makefile.am (TESTS): Add new-file.
1131         * tests/new-file: New file.
1132
1133 2012-01-25  Paul Eggert  <eggert@cs.ucla.edu>
1134
1135         maint: quote 'like this' or "like this", not `like this'
1136         This is in response to a recent change in the GNU coding standards,
1137         which now suggest quoting 'like this' or "like this", instead of
1138         `like this' or ``like this''.
1139         * HACKING, NEWS, README, README-hacking, TODO, doc/diagmeet.note:
1140         * doc/diffutils.texi, ms/config.bat, ms/config.site:
1141         * src/analyze.c, src/cmp.c, src/context.c, src/diff.c:
1142         * src/diff.h, src/diff3.c, src/dir.c, src/ifdef.c, src/io.c:
1143         * src/sdiff.c, src/side.c, src/system.h, src/util.c:
1144         * tests/help-version:
1145         Quote 'like this' or "like this" in commentary.
1146         * cfg.mk (old_NEWS_hash): Adjust to reflect new NEWS quoting.
1147         * man/help2man: Update to 1.40.4 version, with quoting fixed as above.
1148         * po/en.po: Remove translation involving `, as it's no longer needed.
1149         * src/cmp.c (try_help, specify_ignore_initial, usage, main):
1150         * src/diff.c (main, try_help, option_help_msgid, specify_value)
1151         (compare_files):
1152         * src/diff3.c (main, try_help, option_help_msgid, usage)
1153         (read_diff):
1154         * src/dir.c (compare_names):
1155         * src/sdiff.c (try_help, usage, check_child_status, main):
1156         * src/util.c (finish_output):
1157         * tests/help-version:
1158         Quote 'like this' in output.
1159
1160         build: update gnulib submodule to latest
1161
1162 2012-01-12  Jim Meyering  <meyering@redhat.com>
1163
1164         build: accommodate newer bootstrap from gnulib
1165         * bootstrap.conf (gnulib_tool_option_extras): Add both --symlink
1166         and --makefile-name=gnulib.mk.  Also remove now-obsolete $bt/ prefix.
1167         * bootstrap: Update from gnulib.
1168         * tests/init.sh: Update from gnulib.
1169         * lib/Makefile.am: Initialize numerous variables, so that
1170         generated code in gnulib.mk may use += to append to them.
1171
1172         maint: avoid new syntax-check failure
1173         * src/diff.c (compare_files): Use STREQ, not strcmp.
1174
1175 2012-01-08  Bruno Haible  <bruno@clisp.org>
1176
1177         New option --no-dereference.
1178         * src/diff.h (no_dereference_symlinks): New variable.
1179         * src/diff.c: Include xreadlink.h.
1180         (longopts): Add --no-dereference option.
1181         (main): Accept --no-dereference option.
1182         (option_help_msgid): Mention the --no-dereference option.
1183         (compare_files): If no_dereference_symlinks is true, use lstat()
1184         instead of stat(). Compare symbolic links by comparing their values.
1185         * bootstrap.conf (gnulib_modules): Add lstat, stat, xreadlink.
1186         * doc/diffutils.texi (Comparing Directories, diff Options): Mention the
1187         --no-dereference option.
1188         * tests/no-dereference: New file.
1189         * tests/Makefile.am (TESTS): Add it.
1190
1191 2012-01-01  Jim Meyering  <meyering@redhat.com>
1192
1193         maint: update all copyright year number ranges
1194         Run "make update-copyright".
1195
1196 2011-12-14  Jim Meyering  <meyering@redhat.com>
1197
1198         build: update to latest gnulib and adapt
1199         * tests/binary: Reverse arguments to compare to avoid failure of
1200         new syntax-check rule.
1201         * configure.ac: Use -Wno-format-nonliteral.
1202         Mark functions as pure of const, per recommendations enabled by
1203         new gcc -W options.  Use _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST.
1204         * lib/cmpbuf.h (buffer_lcm, block_compare):
1205         Apply pure and/or const attributes.
1206         * src/cmp.c (block_compare): Likewise.
1207         * src/context.c (find_hunk): Likewise.
1208         * src/diff.h (lines_differ): Likewise.
1209         * src/diff3.c (skipwhite): Likewise.
1210         * src/dir.c (dir_loop): Likewise.
1211         * src/util.c (find_change, find_reverse_change): Likewise.
1212         (translate_line_number): Likewise.
1213
1214         build: stop distributing gzip'd releases;  xz is enough
1215         * configure.ac (AM_INIT_AUTOMAKE): Add no-dist-gzip.
1216
1217 2011-11-29  Jim Meyering  <meyering@redhat.com>
1218
1219         tests: use "compare exp out", not "compare out exp"
1220         Likewise, when an empty file is expected, use "compare /dev/null out",
1221         not "compare out /dev/null". I.e., specify the expected/desired contents
1222         via the first file name.  Prompted by a suggestion from Bruno Haible
1223         in http://thread.gmane.org/gmane.comp.gnu.grep.bugs/4020/focus=29154
1224
1225         Run these commands:
1226
1227           git grep -l -E 'compare [^ ]+ exp' \
1228             |xargs perl -pi -e 's/\b(compare) (\S+) (exp\S*)/$1 $3 $2/'
1229           git grep -l -E 'compare [^ ]+ /dev/null' \
1230             |xargs perl -pi -e 's,\b(compare) (\S+) (/dev/null),$1 $3 $2,'
1231
1232         But manually convert this one:
1233
1234           -compare out exp-$(echo $opt|tr ' ' _)
1235           +compare exp-$(echo $opt|tr ' ' _) out
1236
1237         and avoid an inappropriate change to cfg.mk.
1238
1239 2011-10-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
1240
1241         tests: use more portable fd redirection in TESTS_ENVIRONMENT
1242         * tests/Makefile.am (TESTS_ENVIRONMENT): Redirection with `exec 9>&2'
1243         is not portable to various Korn shells, and to (at least) HP-UX 11
1244         /bin/sh.  Use a more portable idiom.
1245         See http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/22488 for
1246         lots of discussion.
1247
1248 2011-10-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
1249
1250         tests: make test runner a script, not a shell function
1251         All the test scripts in the diffutils testsuite are shell scripts,
1252         so the current definition of TESTS_ENVIRONMENT, which adaptively
1253         run tests using either perl or the shell depending on their kind,
1254         is an overkill.
1255
1256         Moreover, this change is required in order for the testsuite to
1257         continue to work with the new testsuite harness that is planned
1258         to be introduced in Automake 1.12 (which, as of the writing date,
1259         is still under development and in late alpha state).
1260
1261         See also related discussion on bug-coreutils:
1262          <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8887>
1263
1264         * tests/Makefile.am (TESTS_ENVIRONMENT): Remove definition of the
1265         `shell_or_perl_' shell function, which is not required anymore.
1266         (LOG_COMPILER): New, define to `$(SHELL)'.
1267         * tests/binary: Make executable.
1268         * tests/colliding-file-names: Likewise.
1269         * tests/excess-slash: Likewise.
1270         * tests/no-newline-at-eof: Likewise.
1271
1272 2011-10-04  Claudio Bley  <claudio.bley@gmail.com>
1273
1274         portability: use SET_BINARY rather than xfreopen (NULL, ...
1275         * src/diff.c: Include binary-io.h, not xfreopen.h.
1276         (main): Use SET_BINARY (...) rather than xfreopen (NULL, X, ...),
1277         because the latter doesn't work on MinGW and crashes using MSVC.
1278         * src/cmp.c (main): Likewise.
1279
1280 2011-10-04  Jim Meyering  <meyering@redhat.com>
1281
1282         build: update gnulib submodule to latest
1283
1284 2011-09-02  Jim Meyering  <meyering@redhat.com>
1285
1286         post-release administrivia
1287         * NEWS: Add header line for next release.
1288         * .prev-version: Record previous version.
1289         * cfg.mk (old_NEWS_hash): Auto-update.
1290
1291         version 3.2
1292         * NEWS: Record release date.
1293
1294         build: update bootstrap and tests/init.sh from gnulib
1295         * bootstrap: Update from gnulib.
1296         * tests/init.sh: Likewise.
1297
1298         build: update gnulib submodule to latest
1299
1300 2011-09-01  Jim Meyering  <meyering@redhat.com>
1301
1302         doc: diffutils' texi-derived doc may now be in debian's "main" section
1303         * NEWS (Packaging): Mention the "no front/back-cover" change.
1304
1305 2011-08-14  Jim Meyering  <meyering@redhat.com>
1306
1307         maint: avoid new "make sytnax-check" failure.
1308         * src/diff.h (find_dir_file_pathname): Mark declaration with "extern"
1309         keyword, in order to placate the tight-scope syntax check.
1310
1311 2011-08-14  Paul Eggert  <eggert@cs.ucla.edu>
1312
1313         * src/io.c (find_and_hash_each_line): Refactor for brevity.
1314
1315 2011-08-14  Roland McGrath  <roland@hack.frob.com>
1316
1317         diff, sdiff: new option --ignore-trailing-space (-Z)
1318         Derived from Roland McGrath's patch (dated June 2004!) in:
1319         http://lists.gnu.org/archive/html/bug-gnu-utils/2004-07/msg00000.html
1320         * NEWS:
1321         * doc/diffutils.texi (White Space, Blank Lines)
1322         (sdiff Option Summary, diff Options, sdiff Options): Document -Z.
1323         * src/diff.h (IGNORE_TRAILING_SPACE)
1324         (IGNORE_TAB_EXPANSION_AND_TRAILING_SPACE): New constants, for -Z.
1325         * src/diff.c (shortopts, longopts, main, option_help_msgid):
1326         * src/sdiff.c (longopts, option_help_msgid, main):
1327         * src/io.c (find_and_hash_each_line):
1328         * src/util.c (lines_differ, analyze_hunk): Support -Z.
1329
1330 2011-08-13  Paul Eggert  <eggert@cs.ucla.edu>
1331
1332         * bootstrap.conf (gnulib_modules): Remove timegm.
1333         This fixes a problem noted by Andreas Schwab in:
1334         http://lists.gnu.org/archive/html/bug-diffutils/2011-08/msg00035.html
1335
1336 2011-08-13  Tim Waugh  <twaugh@redhat.com>
1337
1338         diff: --ignore-file-name-case now applies at top level too
1339         Derived from Tim Waugh's patch in:
1340         http://lists.gnu.org/archive/html/bug-diffutils/2011-08/msg00034.html
1341         * NEWS, doc/diffutils.texi (diff Options): Document this.
1342         * src/diff.c (compare_files): Implement this, by using
1343         find_dir_file_pathname.
1344         * src/diff.h (find_dir_file_pathname): New decl.
1345         * src/dir.c: Include filenamecat.h.
1346         (find_dir_file_pathname): New function.
1347
1348 2011-08-13  Paul Eggert  <eggert@cs.ucla.edu>
1349
1350         * .gitignore: Add lib/unistr, lib/unused-parameter.h.
1351
1352 2011-08-10  Jim Meyering  <meyering@redhat.com>
1353
1354         post-release administrivia
1355         * NEWS: Add header line for next release.
1356         * .prev-version: Record previous version.
1357         * cfg.mk (old_NEWS_hash): Auto-update.
1358
1359         version 3.1
1360         * NEWS: Record release date.
1361
1362         build: use largefile module and update to latest gnulib
1363         * configure.ac: Remove AC_SYS_LARGEFILE, subsumed by ...
1364         * bootstrap.conf (gnulib_modules): ...this.  Use largefile module.
1365         * gnulib: Update to latest.
1366
1367 2011-08-08  Santiago Vila  <sanvila@unex.es>
1368
1369         doc: insert comma in --help line for --ignore-space-change (-b)
1370         * src/diff.c (option_help_msgid): Insert omitted comma between
1371         "-b" and "--ignore-space-change".  (tiny change)
1372
1373 2011-08-04  Jim Meyering  <meyering@redhat.com>
1374
1375         doc: relax restriction on front-cover and back-cover texts
1376         * doc/diffutils.texi (copying): Relax restriction on front-cover
1377         and back-cover texts (just as m4 did here:
1378         http://git.savannah.gnu.org/cgit/m4.git/commit?id=ee1e92ec).
1379         Reported by Santiago Vila.  Fix suggested by Eric Blake.
1380
1381 2011-08-03  Jim Meyering  <meyering@redhat.com>
1382
1383         tests: update init.sh from gnulib
1384         * tests/init.sh: Update from gnulib.
1385
1386         build: update gnulib submodule to latest
1387
1388 2011-07-03  Jim Meyering  <meyering@redhat.com>
1389
1390         maint: remove inclusion of unused header, for "make syntax-check"
1391         * src/diff3.c: Don't include <inttostr.h>.  Not used.
1392         * src/context.c: Likewise.
1393
1394 2011-06-19  Jim Meyering  <meyering@redhat.com>
1395
1396         build: don't require perl when building from a tarball
1397         But do ensure -- in all other circumstances -- that the man/*.1
1398         files are rebuilt whenever the version number changes.
1399         * configure.ac (SRC_VERSION_C): Define.
1400         * man/Makefile.am (dist_man1_MANS): Rename from $(man1_MANS),
1401         so that we distribute those pesky man/*.1 files.
1402         (EXTRA_DIST): Reflect name change.
1403         (MAINTAINERCLEANFILES): Define this, not DISTCLEANFILES,
1404         now that these generated files are distributed.
1405         ($(dist_man1_MANS)): Depend on $(SRC_VERSION_C), so we get the
1406         full dependency when not building from a tarball.
1407
1408 2011-06-13  Jim Meyering  <meyering@redhat.com>
1409
1410         doc: do not distribute generated man/*.1 man files
1411         * man/help2man: New file.
1412         * man/Makefile.am: Use $(srcdir)/help2man.
1413         Convert $(dist_man1_MANS) to $(man1_MANS), to tell automake
1414         not to distribute the generated man/*.1 files.  Now they're
1415         generated at build-from-tarball time.
1416         ($(man1_MANS)): Depend on version.c, so that man pages are
1417         regenerated whenever the version string changes.
1418
1419         build: ccache works better without embedded version strings
1420         * src/Makefile.am: Generate version.c and version.h and put the
1421         new symbol in a tiny library to be used by each program.
1422         (LDADD): Add the new library.
1423         * src/cmp.c (main): Use Version, not PACKAGE_VERSION, so the .o
1424         file does not change with each commit-derived version increment.
1425         * src/diff.c (main): Likewise.
1426         * src/diff3.c (main): Likewise.
1427         * src/sdiff.c (main): Likewise.
1428         * src/system.h: Include "version.h".
1429         * .gitignore: Add version.[ch]
1430
1431 2011-06-12  Jim Meyering  <meyering@redhat.com>
1432
1433         doc: ensure each program has a man/*.x file: add "SEE ALSO" references
1434         * man/cmp.x: New file.
1435         * man/diff3.x: New file.
1436         * man/sdiff.x: New file.
1437         * man/diff.x: Add xrefs to the other three programs, and to patch.
1438         * man/Makefile.am (EXTRA_DIST): List new files.
1439         (cmp.1, diff3.1, sdiff.1): Depend on each .x file.
1440
1441         doc: rename diff.texi to diffutils.texi
1442         This makes the .texi basename the same as the package name,
1443         which is consistent with most other GNU packages.
1444         * doc/diffutils.texi: Rename from...
1445         * doc/diff.texi: ...removed.
1446         * doc/Makefile.am (info_TEXINFOS): Reflect name change.
1447         (diffutils_TEXINFOS): Likewise.
1448         * cfg.mk (gendocs_options_): Remove this customization.  It is no
1449         longer needed, now that the .texi name matches that of the package.
1450         * man/Makefile.am ($(dist_man1_MANS)): Remove now-unnecessary sed
1451         filter.
1452         * README: Update references to diffutils.texi etc. here, too.
1453         * .gitignore: Update here, too.
1454         Suggested by Karl Berry.
1455
1456 2011-06-08  Karl Berry  <karl@freefriends.org>
1457
1458         cmp, diff, diff3, sdiff: edit and align --help text.
1459         * cmp.c (option_help_msgid, usage),
1460         * diff.c (option_help_msgid, usage),
1461         * diff3.c (option_help_msgid, usage),
1462         * sdiff.c (option_help_msgid, usage): align descriptions in the --help
1463         output and slightly edit content.
1464
1465 2011-05-27  Paul Eggert  <eggert@cs.ucla.edu>
1466
1467         diff: don't use locales after local-specific sorting fails
1468         * src/dir.c (compare_names): Don't invoke strcasecmp if
1469         locale-specific sorting fails, because POSIX.1-2008 says strcasecmp
1470         has unspecified behavior outside the POSIX locale.  See:
1471         http://lists.gnu.org/archive/html/bug-diffutils/2011-05/msg00008.html
1472
1473         bootstrap: Avoid multithreading.
1474         * bootstrap.conf (gnulib_tool_option_extras):
1475         Add "--avoid=localename --avoid=lock", because we don't want to
1476         bring in the multithreading code that recent gnulib changes would
1477         otherwise bring in.
1478         (excluded_files): Remove m4/lock.m4; no longer needed, now that
1479         we use --avoid=lock.
1480
1481         build: update gnulib submodule to latest
1482
1483 2011-05-23  Karl Berry  <karl@gnu.org>
1484
1485         maint: update README-hacking
1486         * README-hacking: Update a la coreutils for git, etc.
1487
1488 2011-05-23  Jim Meyering  <meyering@redhat.com>
1489
1490         maint: update gnulib to latest with accompanying tight-scope tweaks
1491         * cfg.mk: Include $(srcdir)/dist-check.mk using "-include",
1492         to accommodate the new sc_tight_scope rule.
1493         (_gl_TS_extern): Define, to tell gnulib's tight_scope rule that
1494         headers here mark externs with "XTERN".
1495         * gnulib: Update to latest.
1496
1497 2011-05-18  Jim Meyering  <meyering@redhat.com>
1498
1499         maint: use gnulib's new readme-release module
1500         * bootstrap.conf (gnulib_modules): Add readme-release.
1501         (bootstrap_epilogue): Add the recommended perl one-liner.
1502         * README-release: Remove file; it is now generated from gnulib.
1503         * .gitignore: Add it.
1504
1505         build: update gnulib submodule to latest
1506
1507         maint: prepare for the tight-scope check
1508         * src/diff.h: Mark function declarations with "extern" in
1509         preparation for the tight-scope check.
1510         (ignore_white_space): Separate enum decl from declaration
1511         of this variable.
1512         * src/Makefile.am (diff_SOURCES): Move diff.h from here to ...
1513         (noinst_HEADERS): ...here.
1514         For convenience, since the tight-scope rule uses $(noinst_HEADERS).
1515
1516         maint: don't use now-removed gnulib "exit" module
1517         * bootstrap.conf (gnulib_modules): Remove "exit" module.
1518         It no longer exists.
1519
1520 2011-03-26  Jim Meyering  <meyering@redhat.com>
1521
1522         build: update gnulib submodule to latest
1523
1524         * .x-sc_space_tab: Remove file.  Instead, ...
1525         * cfg.mk (exclude_file_name_regexp--sc_space_tab): ...define this.
1526
1527         maint: fix typo in unused rule
1528         * cfg.mk (config-save): Fix typo: add leading "_" in variable name.
1529
1530 2011-03-18  Jim Meyering  <meyering@redhat.com>
1531
1532         doc: add a reference to wdiff(1) from diff.1
1533         * man/diff.x: New file, to add "SEE ALSO" reference to wdiff(1).
1534         * man/Makefile.am (diff.1): Depend on diff.x.
1535         ($(dist_man1_MANS)): Tell help2man to include diff.x.
1536         (EXTRA_DIST): Add diff.x.
1537         Suggestion from Dan Jacobson in http://bugs.debian.org/613319
1538
1539 2011-03-18  Eric Blake  <eblake@redhat.com>
1540
1541         docs: info should mention -L
1542         * doc/diff.texi (diff Options): Document -L.
1543
1544         docs: diff --help should mention -L
1545         * src/diff.c (option_help_msgid): Document -L.
1546
1547 2011-02-15  Jim Meyering  <meyering@redhat.com>
1548
1549         doc: speak of the --test (-a) option, not "the -a or --test option"
1550         Convert using this command:
1551         perl -pi -e \
1552           's/(\@option{-.}) or (\@option{--.*?}) option/$2 ($1) option/' \
1553           doc/diff.texi
1554         Then convert some more with this:
1555         perl -pi -e \
1556             's/the (\@option{-.}) or (\@option{--.*?})$/the $2 ($1)/' \
1557           doc/diff.texi
1558         Then convert more manually.
1559
1560         Suggested by Dan Jacobson
1561
1562 2011-01-24  Jim Meyering  <meyering@redhat.com>
1563
1564         maint: remove all uses of vfork: use fork instead
1565         Our use of vfork now provokes warnings from gcc-4.6.0.
1566         Also, vfork is no longer even specified by POSIX.1-2008.
1567         * src/diff3.c (read_diff): Change each use of vfork to "fork".
1568         Remove #ifdef'd code.
1569         * src/util.c (begin_output, finish_output): Likewise.
1570         * src/sdiff.c (cleanup, main, edit): Likewise.
1571         (handler_index_of_SIGPIPE): Remove now-unused definition.
1572         * src/system.h: Don't include <vfork.h>.
1573         (vfork): Remove definition.
1574         * ms/config.site: Remove reference to vfork cache variable.
1575
1576         tests: avoid newer but less-portable tail option syntax
1577         * tests/function-line-vs-leading-space: Use sed -n '3,$p' rather than
1578         tail -n+3.  Older versions of tail do not accept that newer syntax.
1579         Reported by Sudhakara Peram.
1580
1581         tests: fix an erroneous test
1582         On most systems, like-named files were compared, by luck.
1583         However, on others, different-named files would be compared
1584         since their names were being treated as equal -- but they had
1585         different content, so the test would fail.
1586         * tests/colliding-file-names: Use different sets of file names
1587         in d1 and d2 so that they cannot accidentally match.
1588         Put the same line in each test file.  This is required
1589         when files named e.g., abc and ABC are compared.
1590         This test was failing on a NixOS 86_64-darwin system.
1591
1592         build: update gnulib submodule to latest
1593
1594         tests: fix typo that silently disabled all tests
1595         * tests/Makefile.am (TESTS): Fix typo: s/jESTS/TESTS/
1596
1597 2011-01-23  Jim Meyering  <meyering@redhat.com>
1598
1599         build: update gnulib submodule to latest
1600
1601         maint: avoid new syntax-check failure
1602         * src/diff.c (specify_value): Use !STREQ(...), not strcmp(...) != 0.
1603         * src/diff3.c (main): Likewise.
1604
1605 2011-01-03  Jim Meyering  <meyering@redhat.com>
1606
1607         maint: update copyright year ranges to include 2011
1608         Run "make update-copyright", so "make syntax-check" works in 2011.
1609
1610         build: update gnulib submodule to latest
1611
1612 2010-12-16  Paul Eggert  <eggert@cs.ucla.edu>
1613
1614         bootstrap: adjust to recent gnulib changes
1615         * bootstrap.conf (excluded_files): Do not exclude m4/size_max.m4
1616         and m4/xsize.m4 when using an external gettext, since they are
1617         now needed by other gnulib modules.
1618
1619 2010-12-16  Jim Meyering  <meyering@redhat.com>
1620
1621         doc: add contributor guidelines: HACKING
1622         * HACKING: New file, copied 99% from the one in grep's repository.
1623
1624 2010-10-09  Jim Meyering  <meyering@redhat.com>
1625
1626         maint: describe policy on copyright year number ranges
1627         * README: Mention coreutils' long-standing policy on use of M-N
1628         ranges in copyright year lists.  Requested by Richard Stallman.
1629
1630 2010-09-04  Jim Meyering  <meyering@redhat.com>
1631
1632         maint: adjust init.sh use to conform
1633         * tests/help-version: Use one line: "${srcdir=.}/init.sh"; ...
1634         * tests/basic: Likewise.
1635         * tests/binary: Likewise.
1636         * tests/colliding-file-names: Likewise.
1637         * tests/excess-slash: Likewise.
1638         * tests/function-line-vs-leading-space: Likewise.
1639         * tests/help-version: Likewise.
1640         * tests/label-vs-func: Likewise.
1641         * tests/no-newline-at-eof: Likewise.
1642         * tests/stdin: Likewise.
1643
1644         maint: avoid shadowing warning
1645         * src/dir.c (diff_dirs): Rename shadowed local cmp to "c".
1646
1647 2010-09-03  Jim Meyering  <meyering@redhat.com>
1648
1649         build: use gettext-h, not gettext
1650         * bootstrap.conf (gnulib_modules): Use gettext-h, not gettext.
1651         The latter is overkill for a package that uses
1652         AM_GNU_GETTEXT([external]...
1653
1654         build: update build/test tools from gnulib
1655         * bootstrap: Update from gnulib.
1656         * tests/init.sh: Likewise.
1657
1658         build: update gnulib submodule to latest
1659
1660 2010-08-14  Jim Meyering  <meyering@redhat.com>
1661
1662         diff -r: avoid printing excess slashes in concatenated file names
1663         * bootstrap.conf (gnulib_modules): Add filenamecat.
1664         * src/diff.c: Include "filenamecat.h".
1665         (compare_files): Use file_name_concat, rather than dir_file_pathname.
1666         * src/util.c (dir_file_pathname): Remove now-unused function.
1667         * src/diff.h: Remove its declaration.
1668         * tests/excess-slash: New script to test for this.
1669         * tests/Makefile.am (TESTS): Add it.
1670         Forwarded by Santiago Vila from <bugs.debian.org/586301a>,
1671         reported by Jari Aalto.
1672
1673 2010-08-12  Paul Eggert  <eggert@cs.ucla.edu>
1674
1675         diff: avoid spurious diffs when two distinct dir entries compare equal
1676         Problem reported by Christoph Anton Mitterer in:
1677         http://lists.gnu.org/archive/html/bug-diffutils/2010-08/msg00000.html
1678
1679         * NEWS: Mention this bug fix.
1680         * src/dir.c (compare_names_for_qsort): Fall back on file_name_cmp
1681         if two distinct entries in the same directory compare equal.
1682         (diff_dirs): Prefer a file_name_cmp match when available.
1683         * tests/Makefile.am (TESTS): New test colliding-file-names.
1684         * tests/colliding-file-names: New file.
1685
1686 2010-05-09  Jim Meyering  <meyering@redhat.com>
1687
1688         build: update gnulib submodule to latest
1689
1690         build: don't define macros that gnulib provides
1691         * bootstrap.conf (gnulib_modules): Add signal, stdint.
1692         * lib/cmpbuf.c (SA_RESTART, SA_INTERRUPT): Remove definitions.
1693         (SIZE_MAX, PTRDIFF_MAX): Likewise.
1694         Include <stdint.h>.
1695         * src/system.h (WEXITSTATUS, WIFEXITED): Remove definitions.
1696         (SA_RESTART, SA_INTERRUPT): Likewise.
1697
1698         build: rely on gnulib's sigprocmask module
1699         * src/sdiff.c: Remove #if-!HAVE_SIGPROCMASK-guarded code.
1700         * bootstrap.conf (gnulib_modules): Add sigprocmask.
1701
1702 2010-05-04  Jim Meyering  <meyering@redhat.com>
1703
1704         doc: README-release: don't mention To:, Cc:, etc announcement headers,
1705         now that those are supplied automatically via gnulib's maint.mk.
1706         * README-release: sync with coreutils.
1707
1708         maint: teach web-doc-generating code how to do its job
1709         * cfg.mk (gendocs_options): Define, so that gendocs.sh knows
1710         the name of our texinfo source file.
1711         * gnulib: Update to latest, for new gnu-web-doc-update and maint.mk.
1712
1713 2010-05-03  Jim Meyering  <meyering@redhat.com>
1714
1715         doc: update release procedure
1716         * README-release: Rearrange slightly: post the announcement to
1717         Savannah first, so you can include a link to that post in the email.
1718         Sync a few details from coreutils' README-release.
1719
1720         post-release administrivia
1721         * NEWS: Add header line for next release.
1722         * .prev-version: Record previous version.
1723         * cfg.mk (old_NEWS_hash): Auto-update.
1724
1725         version 3.0
1726         * NEWS: Record release date.
1727
1728         build: update gnulib submodule to latest
1729
1730 2010-04-30  Jim Meyering  <meyering@redhat.com>
1731
1732         build: use gnulib's sys_wait module
1733         * bootstrap.conf (gnulib_modules): Use gnulib's sys_wait module,
1734         now that we assume its presence.
1735
1736         build: update gnulib submodule to latest
1737         * bootstrap: Also update from gnulib.
1738         * tests/init.sh: Likewise
1739
1740         maint: remove now-useless #if HAVE_HEADER_H guards
1741         * src/system.h: Include <sys/wait.h> unconditionally,
1742         now that gnulib guarantees its presence.
1743         * lib/cmpbuf.c: Likewise for <unistd.h> and <inttypes.h>.
1744
1745 2010-04-16  Jim Meyering  <meyering@redhat.com>
1746
1747         tests: use original no-newline-at-eof test, but with -U1, not -U2
1748         * tests/no-newline-at-eof: Revert to the smaller test, but with
1749         -U1 rather than -U2, since that actually triggers the bug.
1750
1751 2010-04-16  Paul Eggert  <eggert@cs.ucla.edu>
1752
1753         Followon improvements for the fix for Debian bug 577832.
1754         * src/io.c (find_and_hash_each_line): Omit the inserted newline in
1755         a simpler way.
1756         * tests/no-newline-at-eof: Fix the test case so that it rejects
1757         the old, buggy behavior.
1758
1759 2010-04-16  Jim Meyering  <meyering@redhat.com>
1760
1761         build: update gnulib submodule to latest
1762
1763         tests: test for the no-newline-at-EOF bug
1764         * tests/no-newline-at-eof: New file.
1765         * tests/Makefile.am (TESTS): Add it.
1766
1767 2010-04-16  Jim Meyering  <meyering@redhat.com>
1768
1769         diff: fix a regression when at least one input lacks a newline-at-EOF,
1770         and the final hunk plus context-length aligns exactly with the end
1771         of the newline-lacking file.  Diff would fail to output the required
1772         "\ No newline at end of file" line, thus rendering the output invalid.
1773         This bug appears to have been introduced by 2006-05-07
1774         commit 58d0483b, "(find_identical_ends): Fix huge performance bug...",
1775         at least to the extent that reverting that change fixes the bug.
1776         Considering the stated effect of that change and lack of metrics,
1777         reverting it is not an option, so here we take a more direct approach.
1778
1779         Given these inputs,
1780
1781             printf '\n1'>a; printf '\n0\n\n1'>b
1782
1783         and running diff like this:
1784
1785             ./diff -U1 a b
1786
1787         for input file "b", the pointer, files[1].linbuf[4][-1], to
1788         the last byte on the final line was mistakenly pointing at the
1789         sentinel newline at EOF, rather than at the preceding byte.
1790
1791           (gdb) p files[1].linbuf[4][-1]
1792           $3 = 10 '\n'
1793
1794         Thus, this test in the final print_1_line call:
1795
1796           if ((!line_flag || line_flag[0]) && limit[-1] != '\n')
1797             fprintf (out, "\n\\ %s\n", _("No newline at end of file"));
1798
1799         would fail, because limit[-1] (which is files[1].linbuf[4][-1])
1800         was mistakenly '\n', rather than the desired '1'.
1801
1802         My first thought was simply to adjust the final linbuf[line] setting,
1803         at the end of io.c's find_and_hash_each_line function function:
1804
1805                if (p == bufend)
1806         -       break;
1807         +       {
1808         +         if (current->missing_newline)
1809         +           --linbuf[line];
1810         +         break;
1811         +       }
1812
1813         But that would make diff misbehave with this input
1814         (same as above, but with a newline appended to "a"),
1815
1816             printf '\n1\n'>a; printf '\n0\n\n1'>b
1817             ./diff -U1 a b
1818
1819         due to the block (100 lines above) that is triggered in that case
1820         (but not in the both-files-missing-newline case):
1821
1822               if (p == bufend
1823                   && current->missing_newline
1824                   && ROBUST_OUTPUT_STYLE (output_style))
1825                 {
1826                   /* This line is incomplete.  If this is significant,
1827                      put the line into buckets[-1].  */
1828                   if (ignore_white_space < IGNORE_SPACE_CHANGE)
1829                     bucket = &buckets[-1];
1830
1831                   /* Omit the inserted newline when computing linbuf later.  */
1832                   p--;
1833                   bufend = suffix_begin = p;
1834                 }
1835
1836         Note how "p" is decremented and "bufend" adjusted.
1837         When that happens, we certainly don't want to decrement
1838         "bufend" yet again.
1839
1840         Since there is no other way to determine at the end whether "bufend"
1841         was already decremented, add a new variable to serve as witness.
1842
1843         * NEWS (Bug fixes): Mention it.
1844         Reported by Timo Juhani Lindfors in http://bugs.debian.org/577832.
1845         Forwarded by Santiago Vila.
1846
1847 2010-04-16  Jim Meyering  <meyering@redhat.com>
1848
1849         tests: update init.sh from gnulib
1850         * tests/init.sh: Update from gnulib.
1851
1852 2010-04-08  Jim Meyering  <meyering@redhat.com>
1853
1854         build: include cfg.mk and dist-check.mk in the distribution tarball
1855         * Makefile.am (EXTRA_DIST): Add cfg.mk and dist-check.mk.
1856
1857         maint: update to latest gnulib
1858         * cfg.mk (sc_cross_check_PATH_usage_in_tests): Remove rule,
1859         now that it's in gnulib's maint.mk.
1860         * gnulib: Update to latest.
1861
1862 2010-04-07  Jim Meyering  <meyering@redhat.com>
1863
1864         tests: make new PATH-crosschecking syntax-check tighter
1865         * cfg.mk (sc_cross_check_PATH_usage_in_tests): Use grep's -x (match
1866         entire line) option with -F.
1867
1868         tests: pull latest help-version from gzip
1869         * tests/help-version: Update from gzip.
1870         * Makefile.am (TESTS_ENVIRONMENT): Export VERSION,
1871         as required for this new help-version script.
1872
1873         tests: add syntax-check rule to verify that tests use proper PATH
1874         * cfg.mk (sc_cross_check_PATH_usage_in_tests): New rule, that is
1875         useful only in conjunction with the help-version script.
1876
1877         tests: use path_prepend_ consistently; remove unnecessary VERBOSE check
1878         * tests/basic: Likewise.
1879         * tests/binary: Likewise.
1880         * tests/function-line-vs-leading-space: Likewise.
1881         * tests/label-vs-func: Likewise.
1882         * tests/stdin: Likewise.
1883
1884 2010-04-06  Eric Blake  <eblake@redhat.com>
1885
1886         maint: ignore generated files
1887         * .gitignore: Ignore recent gnulib additions.
1888
1889         maint: update to latest bootstrap
1890         * bootstrap: Copy from gnulib/build-aux.
1891
1892 2010-04-05  Jim Meyering  <meyering@redhat.com>
1893
1894         tests: get latest init.sh from gnulib
1895         * tests/init.sh: Update from gnulib.
1896
1897         build: update gnulib submodule to latest; adapt
1898         * cfg.mk (local-checks-to-skip): Add new sc_texinfo_acronym, to skip it.
1899
1900         diff -F/-p: don't depend on locale-specific white-space definition
1901         * src/context.c: Include "c-ctype.h".
1902         Use c_isspace, not isspace.
1903
1904 2010-03-18  Jim Meyering  <meyering@redhat.com>
1905
1906         tests: exercise new behavior of -F RE
1907         * tests/function-line-vs-leading-space: New file.
1908         * tests/Makefile.am (TESTS): Add it.
1909
1910 2010-03-18  Yannick Moy  <yannick.moy@adacore.com>
1911
1912         with -F or -p, emit better function lines: no leading white space
1913         * src/diff.c (print_context_function): For languages like Ada
1914         that allow local functions and procedures, the plain context
1915         function line may start with enough blank characters that the
1916         function name does not get completely printed in the 40
1917         characters limit.  This patch solves this problem by removing
1918         these useless initial blank characters.
1919         * NEWS (Changes in behavior): Mention this change.
1920
1921 2010-03-17  Jim Meyering  <meyering@redhat.com>
1922
1923         build: don't require a specific version of help2man
1924         * bootstrap.conf (buildreq): Bootstrap can't deal with it,
1925         perhaps because the command name contains a digit.
1926
1927         build: make bootstrap ensure that help2man is available
1928         * bootstrap.conf (buildreq): Add help2man.
1929
1930 2010-02-23  Jim Meyering  <meyering@redhat.com>
1931
1932         tests: test for the "Binary files A and B differ" diagnostic
1933         * tests/binary: New script.
1934         * tests/Makefile.am (TESTS): Add it.
1935
1936         revert 2002 change that removed "Binary " from "files A and B differ"
1937         With this change, "printf '\0'|diff - /dev/null" now prints
1938         "Binary files - and /dev/null differ" once again.
1939         This reverts 2002-06-28 commit a352f0980,
1940         "(briefly_report): Don't say "Binary files differ", ...".
1941         * src/analyze.c (briefly_report): Do include the "Binary " prefix
1942         in the diagnostic, when !brief.
1943         * NEWS (Changes in behavior): Mention the diagnostic change.
1944         Reported by Andreas Hoenen in http://bugs.debian.org/570064.
1945
1946 2010-02-14  Juan Manuel Guerrero  <juan.guerrero@gmx.de>
1947
1948         avoid compilation failure on systems lacking both fork and vfork
1949         * src/sdiff.c [!HAVE_WORKING_FORK && !HAVE_WORKING_VFORK] (main):
1950         Pass the right number of arguments to shell_quote_copy.
1951         * src/util.c [!HAVE_WORKING_FORK && !HAVE_WORKING_VFORK] (begin_output):
1952         Likewise.
1953
1954 2010-02-11  Jim Meyering  <meyering@redhat.com>
1955
1956         post-release administrivia
1957         * NEWS: Add header line for next release.
1958         * .prev-version: Record previous version.
1959         * cfg.mk (old_NEWS_hash): Auto-update.
1960
1961         version 2.9
1962         * NEWS: Record release date.
1963
1964         doc: document the release procedure
1965         * README-release: New file.
1966
1967 2010-02-10  Jim Meyering  <meyering@redhat.com>
1968
1969         maint: change use of "|" to more maintainable "||" (no semantic change)
1970         * src/analyze.c (diff_2_files): Using the "||" operator happens to
1971         be equivalent to using "|" in this case.  It is also clearer and
1972         less prone to inadvertent bug introduction, in case the variable,
1973         "changes" were ever to take on a value not in {0,1}.
1974         Patch by Tim Waugh, via Mike Frysinger.
1975
1976         portability: avoid "diff - ..." failure at least on *BSD and Solaris
1977         The new "stdin" test was failing on many types of systems.
1978         * src/diff.c (compare_files): Guard use of xfreopen (NULL, "rb", ...
1979         also with O_BINARY, so as to avoid this unnecessary call on
1980         systems where it's not needed (on some it fails with "Bad address".
1981
1982 2010-02-09  Jim Meyering  <meyering@redhat.com>
1983
1984         tests: honor VERBOSE
1985         * tests/basic: Enable "set -x" if $VERBOSE.
1986         * tests/help-version: Likewise.
1987         * tests/label-vs-func: Likewise.
1988         * tests/stdin: Likewise.
1989
1990 2010-02-04  Jim Meyering  <meyering@redhat.com>
1991
1992         build: update gnulib submodule to latest
1993
1994         sync with gnulib
1995         * gl/lib/regcomp.c.diff: Adjust to apply to the latest in gnulib.
1996         * gnulib: Update submodule to latest.
1997
1998 2010-02-04  Jim Meyering  <meyering@redhat.com>
1999
2000         build: do not override gnulib-provided AM_CFLAGS options
2001         Avoid a warning from automake:
2002         lib/Makefile.am:23: AM_CFLAGS multiply defined in condition TRUE ...
2003         lib/gnulib.mk:30: ... `AM_CFLAGS' previously defined here
2004         lib/Makefile.am:18:   `lib/gnulib.mk' included from here
2005
2006         * lib/Makefile.am (AM_CFLAGS): Append $(WARN_CFLAGS) and
2007         $(WERROR_CFLAGS), i.e., use "+=", not "=".
2008         This was introduced via 2009-12-17 commit e58efa5b
2009         "build: enable warnings and -Werror.",
2010         but fortunately is not a bug, because the definition
2011         it would have overridden was always empty.
2012
2013 2010-01-17  Jim Meyering  <meyering@redhat.com>
2014
2015         maint: add to .gitignore
2016         * .gitignore: Ignore more.
2017
2018 2010-01-15  Jim Meyering  <meyering@redhat.com>
2019
2020         doc: add to TODO
2021         * TODO: Add an item, suggested by Dan Jacobson.
2022
2023 2010-01-13  Jim Meyering  <meyering@redhat.com>
2024
2025         tests: ensure that an argument of "-" is treated as standard input
2026         * tests/stdin: New test.
2027         * tests/Makefile.am (TESTS): Add it.
2028
2029 2010-01-10  Jim Meyering  <meyering@redhat.com>
2030
2031         tests: now "make distcheck" runs more tests, incl. syntax-check
2032         * cfg.mk: Include dist-check.mk, from coreutils.
2033         * Makefile.am (distcheck-hook): Define rule, to hook to...
2034         * dist-check.mk: New file.
2035
2036 2010-01-09  Jim Meyering  <meyering@redhat.com>
2037
2038         build: update gnulib to latest, for fixed syntax-check rule
2039
2040         maint: record updated NEWS hash
2041         * cfg.mk (old_NEWS_hash): Update to account for GFDL change.
2042
2043         build: update gnulib submodule to latest
2044
2045         tests: add a test of basic functionality
2046         * tests/basic: Start adding tests.
2047         * tests/Makefile.am (TESTS): Add it.
2048
2049         maint: udpate GFDL license to 1.3
2050         * doc/diff.texi: Update to use GFDL version 1.3.
2051
2052 2010-01-04  Eric Blake  <ebb9@byu.net>
2053
2054         build: allow compilation on cygwin
2055         * src/Makefile.am (cmp_LDADD): Move LIBICONV...
2056         (LDADD): ...into global flags, since all programs need it.
2057
2058 2010-01-03  Jim Meyering  <meyering@redhat.com>
2059
2060         maint: record update-copyright options for this package
2061         * cfg.mk: Next time, just run "make update-copyright".
2062
2063         tests: prepend ../src, not "." to PATH
2064         * tests/help-version: Correct PATH.
2065
2066 2010-01-01  Jim Meyering  <meyering@redhat.com>
2067
2068         maint: update all FSF copyright year lists to include 2010
2069         Use this command:
2070         git ls-files |grep -vE '^(\..*|COPYING|gnulib)$' |xargs \
2071         env UPDATE_COPYRIGHT_USE_INTERVALS=1 build-aux/update-copyright
2072
2073 2009-12-31  Jim Meyering  <meyering@redhat.com>
2074
2075         maint: newer gnulib; don't hard-code my GPG key ID
2076         * cfg.mk (gpg_key_ID): Remove definition, now that maint.mk automates it.
2077         * gnulib: Update to latest.
2078
2079         tests: exercise diff -p's function-name matching
2080         * tests/label-vs-func: New file.
2081         * tests/Makefile.am (TESTS): Add label-vs-func.
2082         Reported by Simon Arlott <simon@fire.lp0.eu>
2083         http://article.gmane.org/gmane.linux.kernel.janitors/14260
2084
2085         tests: use gnulib's init.sh
2086         * tests/Makefile.am (EXTRA_DIST): Add init.sh.
2087         Remove test-lib.sh.
2088         * tests/init.sh: New file.
2089         * tests/test-lib.sh: Remove file.
2090         * tests/help-version: Use init.sh, not test-lib.sh.
2091
2092 2009-11-28  Jim Meyering  <meyering@redhat.com>
2093
2094         maint: don't let trailing spaces in diffs perturb make syntax-check
2095         * .x-sc_space_tab: New file.
2096
2097 2009-11-22  Jim Meyering  <meyering@redhat.com>
2098
2099         build: enable warnings and -Werror.
2100         * src/Makefile.am (AM_CFLAGS): Enable warnings and -Werror.
2101         Set to this: $(WARN_CFLAGS) $(WERROR_CFLAGS)
2102         * lib/Makefile.am (AM_CFLAGS): Similarly, but use this:
2103         $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)
2104         * configure.ac (GNULIB_WARN_CFLAGS): Don't turn off -Wuninitialized.
2105
2106         build: avoid a warning from gnulib's sh-quote.c
2107         * gl/lib/sh-quote.c.diff: New file, to avoid a warning.
2108
2109         maint: avoid warnings via patched versions of gnulib's regex functions
2110         * gl/lib/regcomp.c.diff: New file.
2111         * gl/lib/regex_internal.c.diff: Likewise.
2112         * gl/lib/regex_internal.h.diff: Likewise.
2113         * gl/lib/regexec.c.diff: Likewise.
2114
2115         build: update gnulib submodule to latest
2116
2117 2009-11-20  Eric Blake  <ebb9@byu.net>
2118
2119         build: ignore more files
2120         * .gitignore: Add config.cache, *.exe.
2121
2122 2009-11-20  Eric Blake  <ebb9@byu.net>
2123
2124         build: fix test run on cygwin
2125         This, plus a gnulib update for xalloc-die-tests, are necessary
2126         for make check to pass on cygwin.
2127
2128         * tests/Makefile.am (built_programs): Ignore $(EXEEXT).
2129         * src/Makefile.am (paths.h): Add missing dependency.
2130
2131 2009-11-20  Jim Meyering  <meyering@redhat.com>
2132
2133         maint: remove vestiges of nanosleep
2134         * src/Makefile.am (LDADD): Remove $(LIB_NANOSLEEP), now
2135         that we no longer use the nanosleep module.
2136         Spotted by Eric Blake.
2137
2138         maint: don't pull in gnulib's nanosleep unnecessarily
2139         * bootstrap.conf (gnulib_modules): Remove nanosleep.  Not needed.
2140         Spotted by Eric Blake.
2141
2142         maint: cfg.mk: remove factored-out ftp host/dir definitions
2143         * cfg.mk (gnu_ftp_host-alpha, gnu_ftp_host-beta gnu_ftp_host-stable):
2144         (gnu_rel_host, url_dir_list): Remove definitions.  The defaults,
2145         now provided by maint.mk, are the same.
2146         * gnulib: Update for latest, including those maint.mk additions.
2147
2148         build: link with now-required libraries
2149         * src/Makefile.am (LDADD): Add gnulib-required libraries.
2150         (cmp_LDADD): Add $(LIBICONV), for cmp's use of proper_name_utf8.
2151
2152         maint: lib/xfreopen.c contains translatable strings
2153         * po/POTFILES.in: Add lib/xfreopen.c.
2154
2155         maint: remove hard-coded macro definitions provided by intprops.h
2156         * lib/cmpbuf.c: Include "intprops.h" rather than open-coding macros
2157         like TYPE_SIGNED and TYPE_MINIMUM.
2158
2159         maint: add gnulib's announce-gen module
2160         * bootstrap.conf (gnulib_modules): Add announce-gen
2161
2162         build: suppress warnings about bindtextdomain and textdomain
2163         * src/system.h (bindtextdomain, textdomain) [!ENABLE_NLS]: Define away.
2164
2165         build: use more gnulib modules
2166         * bootstrap.conf (gnulib_modules): Add mktime, nanosleep, strptime
2167         and timegm.
2168
2169         use xfreopen rather than freopen
2170         * src/cmp.c: Include "xfreopen.h".
2171         Use xfreopen in place of freopen.
2172         * src/diff.c Likewise, and...
2173         (main): Set exit_failure to EXIT_TROUBLE, rather than to 2.
2174         * src/diff3.c: Likewise.
2175         * bootstrap.conf (gnulib_modules): Add xfreopen.
2176
2177         build: enable many warnings
2178         * configure.ac: Add support for --enable-gcc-warnings.
2179         * bootstrap.conf (gnulib_modules): Add manywarnings.
2180         * Makefile.am (AM_CFLAGS): Add $(WARN_CFLAGS) $(WERROR_CFLAGS)
2181
2182         build: update gnulib submodule to latest
2183
2184         maint: add an assertion to suppress clang-detected warning
2185         The clang static analyzer reported that a NULL parent could be
2186         dereferenced.  However, that cannot happen, because for all callers,
2187         the parameter, parent, is always non-NULL at that point.
2188         * src/diff.c: Include <assert.h>.
2189         Assert that parent is not NULL.
2190
2191         maint: remove dead assignment from diff3.c
2192         * src/diff3.c (make_3way_diff): Remove dead assignment.
2193
2194 2009-11-17  Jim Meyering  <meyering@redhat.com>
2195
2196         build: update gnulib submodule to latest
2197
2198         maint: hide build commands behind $(AM_V_GEN)
2199         * src/Makefile.am (paths.h): Use $(AM_V_GEN), and split a long line.
2200         * man/Makefile.am ($(dist_man1_MANS)): Use $(AM_V_GEN) here, too.
2201
2202 2009-11-16  Jim Meyering  <meyering@redhat.com>
2203
2204         build: let automake generate better man-installation rules
2205         * man/Makefile.am (dist_man1_MANS): Rename from dist_man_MANS,
2206         to enable better automake-generated installation rules.
2207
2208         admin: ignore all of gnulib-tests
2209         * .gitignore: Add gnulib-tests
2210
2211 2009-11-16  Eric Blake  <ebb9@byu.net>
2212
2213         build: avoid link failure when libsigsegv is used
2214         * src/Makefile.am (LDADD): Link against LIBSIGSEGV.
2215
2216 2009-11-16  Jim Meyering  <meyering@redhat.com>
2217
2218         maint: define/use PROGRAM_NAME and AUTHORS; use propername module
2219         * bootstrap.conf (gnulib_modules): Add propername.
2220         * src/cmp.c (PROGRAM_NAME, AUTHORS): Define.
2221         (main): Use them in use of version_etc.
2222         * src/diff.c (PROGRAM_NAME, AUTHORS, main): Likewise.
2223         * src/diff3.c (PROGRAM_NAME, AUTHORS, main): Likewise.
2224         * src/sdiff.c (PROGRAM_NAME, AUTHORS, main): Likewise.
2225         * src/system.h: Include "propername.h".
2226
2227         maint: no longer define *_FILENO constants
2228         * src/system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
2229         Remove definitions.  Now guaranteed by gnulib.
2230
2231         maint: bug-diffutils@gnu.org is the new bug-reporting address
2232         * configure.ac (AC_INIT): Use bug-diffutils@..., not bug-gnu-utils
2233         as the bug-reporting address.
2234         * NEWS (Administrivia): Mention this.
2235         * src/cmp.c (usage): Remove hard-coded address.
2236         Instead, use gnulib's emit_bug_reporting_address function.
2237         * src/diff.c (usage, option_help_msgid): Likewise.
2238         * src/diff3.c (usage): Likewise.
2239         * src/sdiff.c (usage): Likewise.
2240
2241         sdiff, diff3: exec diff, not $(bindir)/diff
2242         * src/Makefile.am (paths.h): Emit a definition of DEFAULT_DIFF_PROGRAM
2243         that is simply "diff" (or whatever $(transform) would convert that to,
2244         e.g., "gdiff").  This makes it so that tests can work without first
2245         installing diff, and so that the binaries do not hard-code $(prefix).
2246         * NEWS (Changes in behavior): Mention this.
2247
2248 2009-11-14  Jim Meyering  <meyering@redhat.com>
2249
2250         tests: add the first script; hook up gnulib-tests
2251         * configure.ac (AC_CONFIG_FILES): Add tests/Makefile and
2252         gnulib-tests/Makefile.
2253         * tests/help-version: New file, from coreutils.
2254         * tests/test-lib.sh: Likewise.
2255         * tests/Makefile.am: New file, from gzip.
2256         * Makefile.am (SUBDIRS): Add tests and gnulib-tests.
2257         * tests/t-local.sh: New, empty(for now) file.
2258
2259 2009-11-13  Jim Meyering  <meyering@redhat.com>
2260
2261         build: require gettext-0.17
2262         * configure.ac: Require gettext-0.17; it was released two years ago.
2263
2264         build: correct gettext configure-time support
2265         * configure.ac: Use AM_GNU_GETTEXT([external], [need-ngettext]),
2266         rather than AM_GNU_GETTEXT([external], [need-formatstring-macros]).
2267         Reported by Martin Jacobs in
2268         http://thread.gmane.org/gmane.comp.parsers.bison.bugs/3181
2269
2270 2009-11-12  Jim Meyering  <meyering@redhat.com>
2271
2272         build: generalize autoheader check
2273         * bootstrap: Look for AC_CONFIG_HEADER as well as AC_CONFIG_HEADERS.
2274
2275 2009-11-11  Jim Meyering  <meyering@redhat.com>
2276
2277         maint: use a git submodule for gnulib
2278         * .gitmodules: New file, to track gnulib.
2279         * gnulib: New file, created by running this:
2280         git submodule add git://git.sv.gnu.org/gnulib.git gnulib
2281
2282         maint: tell git what it can ignore
2283         * .gitignore: Ignore generated files.