-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathChangeLog
1741 lines (1310 loc) · 62.9 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2015-06-22 Greg Nietsky <[email protected]>
Merge git://git.savannah.gnu.org/diffutils into distrotech-diffutils
2015-01-02 Jim Meyering <[email protected]>
maint: update copyright year ranges to include 2015; update gnulib
2014-12-13 KO Myung-Hun <[email protected]>
diff: skip test if seek is not possible on OS/2 kLIBC
This fixes the problem that 'diff - file' and 'cat file | diff - file'
fail due to a seek failure with a message 'diff.exe: -: Invalid seek',
because seek does not work on stdin and a pipe on OS/2 kLIBC.
* src/io.c (sip): Set skip_test to true if seek is not possible on
OS/2 kLIBC.
2014-12-09 Jim Meyering <[email protected]>
gnulib: update to latest
2014-12-09 KO Myung-Hun <[email protected]>
build: double-quote use of $PATH
* man/Makefile.am (dist_man1_MANS): On OS/2, PATH_SEPARATOR is ';',
but unquoted, that is interpreted as the shell's statement
terminator. Quote it.
2014-10-28 Paul Eggert <[email protected]>
diff: fix integer overflow problem with --tabsize
Reported by Tobias Stoeckmann in: http://bugs.gnu.org/18857
* src/diff.c (main): Don't overflow if INTMAX_MAX / 2 < tabsize.
* tests/bignum: New file, to test for this bug.
* tests/Makefile.am (TESTS): Add it.
2014-09-04 Paul Eggert <[email protected]>
doc: mention diff -B fix in NEWS
diff: fix bug with diff -B and incomplete lines
Reported by Navin Kabra via Eric Blake in:
http://bugs.gnu.org/18402
* src/util.c (analyze_hunk): Don't mishandle incomplete
lines at end of file.
* tests/no-newline-at-eof: Test for the bug.
diff: fix performance bug with prefix computation
* src/io.c (find_identical_ends): Fix performance bug:
the test for when the prefix was needed messed up by
the 2002-02-28 integer-overflow fixes, causing performance to be
worse than it needed to be.
2014-08-23 Jim Meyering <[email protected]>
gnulib: update to latest, as well as bootstrap
maint: update copyright year range in texinfo documentation
* doc/diffutils.texi: Update copyright.
2014-04-15 Jim Meyering <[email protected]>
maint: update bug-reporting address
* README: Change bug-gnu-utils@... to [email protected].
* doc/diffutils.texi: Likewise.
Reported by Jamie Landeg Jones.
2014-03-26 Paul Eggert <[email protected]>
diff: fix two "..." typos in --help output
* src/diff.c (option_help_msgid): Remove two "..." typos (Bug#17102).
2014-03-26 Paul Eggert <[email protected]>
doc: improve documentation about reading and stdin
See Bug#17075.
* doc/diffutils.texi (Comparison): Say that files need not be read.
(Invoking diff): Remove confusing remark about 'diff - -'.
It's not that useful, and it's not portable anyway.
2014-02-25 Paul Eggert <[email protected]>
diff, sdiff: minor integer overflow fixes
* src/context.c (find_hunk):
Simplify, now that 2 * context + 1 cannot overflow.
* src/diff.c (main):
* src/sdiff.c (interact):
Don't rely on undefined behavior on signed integer overflow.
* src/diff.c (main): Don't let contexts exceed CONTEXT_MAX.
* src/system.h (CONTEXT_MAX): New macro.
diff: fix bug with -I and overlapping hunks
Problem reported by Vincent Lefevre in <http://bugs.gnu.org/16864>.
* src/context.c (find_hunk): Threshold is CONTEXT only if
the second change is ignorable.
* tests/ignore-matching-lines: New test.
* tests/Makefile.am (TESTS): Add it.
2014-02-24 Paul Eggert <[email protected]>
diff: remove TOO_EXPENSIVE heuristic
Problem reported by Vincent Lefevre in <http://bugs.gnu.org/16848>.
The simplest solution is to remove the TOO_EXPENSIVE heuristic
that I added to GNU diff in 1993. Although appropriate for
circa-1993 hardware, these days the heuristic seems to be more
trouble than it's worth.
* NEWS: Document this.
* doc/diffutils.texi (Overview): Modernize citations.
Remove mention of TOO_EXPENSIVE heuristic.
* src/analyze.c (diff_2_files): Adjust to TOO_EXPENSIVE-related
API changes in gnulib's diffseq module.
build: update gnulib submodule to latest
2014-02-01 Paul Eggert <[email protected]>
diff: exit with status 1, not 2, when binary files differ
Problem reported by Vincent Lefevre in <http://bugs.gnu.org/16608>.
* NEWS:
* doc/diffutils.texi (Binary, Invoking diff): Document this.
* src/analyze.c (briefly_report): Return void, not int.
All uses changed. Do not futz with exit status. Simplify.
* tests/binary: Adjust to match new behavior.
2013-09-26 Paul Eggert <[email protected]>
build: omit -Wsuggest-attribute=pure for lib
* configure.ac (WARN_CFLAGS): Omit -Wsuggest-attribute=pure
when compiling the lib subdirectory. Reported for Fedora 19
by Eric Blake in <http://bugs.gnu.org/15463>.
2013-08-23 Paul Eggert <[email protected]>
cmp, diff, sdiff: tune by using rawmemchr
On my platform (AMD Phenom II X4 910e, Fedora 17 x86-64), this sped up
'cmp -n 8GiB /dev/full /dev/zero' by a factor of 3.8, and
'cmp -sn 8GiB /dev/full /dev/zero' by a factor of 1.8.
* bootstrap.conf (gnulib_modules): Add rawmemchr.
* src/cmp.c (cmp): Optimize the common case where buffers are the same,
by using count_newlines rather than block_compare_and_count.
(block_compare_and_count): Remove.
(count_newlines): New function.
* src/cmp.c (count_newlines):
* src/io.c (prepare_text):
* src/sdiff.c (lf_copy, lf_skip, lf_snarf):
Use rawmemchr instead of memchr, for speed.
2013-08-13 Paul Eggert <[email protected]>
cmp: tune 'cmp a b' for GCC x86
Performance problem reported by David Balažic in:
http://lists.gnu.org/archive/html/bug-diffutils/2013-08/msg00013.html
* src/system.h (word): Make it size_t, not uintmax_t.
This sped up plain cmp 90% on my tests (GCC 4.8.1, x86).
2013-07-07 Paul Eggert <[email protected]>
build: update gnulib submodule to latest
2013-06-11 Greg Nietsky <[email protected]>
Distrotech diffutils 3.3
2013-05-06 Stefano Lattarini <[email protected]>
build: enable 'subdir-objects' automake option
The future major Automake version (2.0, ETA at least one year from now)
might enable that option unconditionally, so better get prepared in due
time.
* configure.ac (AM_INIT_AUTOMAKE): Adjust.
(AM_PROG_CC_C_O): New, required by Automake up to 1.13.x when the
'subdir-objects' is in use.
2013-04-29 Paul Eggert <[email protected]>
build: update gnulib submodule to latest
2013-04-03 Paul Eggert <[email protected]>
diff: fix bug with Asian file names
Problem reported by Errembault Philippe in:
http://lists.gnu.org/archive/html/bug-diffutils/2013-03/msg00012.html
* NEWS: Document this.
* src/dir.c (compare_names): Fall back on file_name_cmp if
compare_collated returns 0, unless ignoring file name case.
(diff_dirs): Don't bother with the O(N**2) stuff unless ignoring
file name case.
* tests/Makefile.am (TESTS): Add strcoll-0-names.
* tests/strcoll-0-names: New file.
diff: remove unnecessary decl
* src/dir.c (compare_names_for_qsort): Remove declaration.
Not needed now that we assume C89.
diff: tune compare_names_for_qsort
* src/dir.c (compare_collated): New function.
(compare_names): Use it.
(compare_names_for_qsort): Use it. This is a bit more efficient
as it can avoid a double invocation of file_name_cmp when
file_name_cmp returns zero.
2013-03-30 Jim Meyering <[email protected]>
doc: mention new option, --no-dereference in 3.3's NEWS
* NEWS (New feeatures): Update 3.3's news to mention --no-dereference.
Reported by Denis Excoffier.
* Makefile.am (old_NEWS_hash): Update, since this modifies old, and
normally-immutable NEWS.
2013-03-26 Paul Eggert <[email protected]>
tests: port to Solaris 10 /bin/sh
* tests/Makefile.am (TESTS_ENVIRONMENT):
Use "FOO=val; export FOO" rather than "export FOO=val",
as the latter form doesn't work with Solaris /bin/sh.
Problem found when trying to run "make check" on Solaris 10.
2013-03-24 Jim Meyering <[email protected]>
maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
version 3.3
* NEWS: Record release date.
2013-03-23 Paul Eggert <[email protected]>
doc: fix menu typo
* doc/diffutils.texi (Comparing Three Files): Fix out-of-order menu.
Bug caught by Texinfo 5.0.
maint: update build procedure to recent gettext etc.
* bootstrap.conf (gnulib_modules): Add vararrays.
(needed_gnulib_files, unnecessary_gettext_files): New vars.
(bootstrap_post_import_hook): New function, to implement these vars.
(excluded_files): Remove; 'bootstrap' no longer supports this.
Its function is now performed by unnecessary_gettext_files.
(buildreq): Update automake to 1.12.2, to avoid CVE-2012-3386.
* configure.ac (AM_GNU_GETTEXT_VERSION): Bump from 0.17 to 0.18.2,
to lessen the probability that we'll have outlandishly old files
during a build.
* m4/vararrays.m4: Remove from repository, as we now use the
gnulib version.
2013-03-22 Jim Meyering <[email protected]>
build: update gnulib to latest and adapt; update bootstrap, too
Blindly updating to the latest from gnulib, bootstrap would
fail due to failure of our local patches to apply. Hence,
these first two updates.
* gl/lib/regex_internal.c.diff: Update offsets, so this patch
applies to the latest from gnulib.
* gl/lib/regex_internal.h.diff: Remove file. No longer needed.
* bootstrap: Update from gnulib.
2013-01-06 Paul Eggert <[email protected]>
tests: port to hosts lacking fmt, make -C
* tests/Makefile.am (built_programs): Don't assume fmt works.
Don't rely on 'make -C', either.
maint: update .gitignore for recent gnulib
* .gitignore: Add tests/*.trs and several *.h and *.sed files in lib,
2013-01-04 Jim Meyering <[email protected]>
build: update gnulib submodule to latest
maint: update all copyright year number ranges
Run "make update-copyright".
2012-10-23 Eric Blake <[email protected]>
build: default to --enable-gcc-warnings in a git tree
Anyone building from cloned sources can be assumed to have a new
enough environment, such that enabling gcc warnings by default will
be useful. Tarballs still default to no warnings, and the default
can still be overridden with --disable-gcc-warnings.
* configure.ac (gl_gcc_warnings): Set default based on environment.
2012-10-04 Paul Eggert <[email protected]>
* doc/diffutils.texi (cmp Options): Document -l format better.
2012-09-10 Jim Meyering <[email protected]>
maint: use xasprintf in place of xmalloc+sprintf
* bootstrap.conf (gnulib_modules): Add gnulib's xvasprintf module.
* src/util.c: Include "xvasprintf.h".
(begin_output): Use xasprintf in place of xmalloc+sprintf.
2012-09-10 Andreas Gruenbacher <[email protected]>
diff: encode file names with special characters
* src/util.c (c_escape_char): New function.
(c_escape): New function.
(begin_output): Escape file names when needed.
* src/context.c (print_context_header): New names parameter.
(print_context_label): New name parameter.
* src/diff.h (print_context_header): Change prototype.
* tests/filename-quoting: New file.
* NEWS: Document this change.
2012-08-30 Paul Eggert <[email protected]>
diff: silence GCC warning instead of slowing down
* src/dir.c (find_dir_file_pathname): Use 'IF_LINT (volatile)' to
silence the gcc warning, rather than using 'volatile', as the
warning appears to be bogus.
2012-08-28 Jim Meyering <[email protected]>
diff: avoid possible longjmp-triggered misbehavior
* src/dir.c (find_dir_file_pathname): gcc 4.8.0 20120825 reported
that a local variable's value might be clobbered. Declare "match"
to be volatile.
build: update gnulib, bootstrap and init.sh to latest
maint: avoid new syntax-check failure due to @xref use
* doc/diffutils.texi: Change several "; @xref{..." to ". @xref{...",
since @xref should start a sentence.
2012-05-15 Paul Eggert <[email protected]>
maint: remove ms subdirectory
diffutils is now designed to build with Cygwin or MinGW.
The old DJGPP stuff probably doesn't work anyway.
* Makefile.am (SUBDIRS): Remove ms.
* NEWS: Document this.
* configure.ac (AC_CONFIG_FILES): Remove ms/Makefile.
* ms/Makefile.am, ms/README, ms/config.bat, ms/config.sed:
* ms/config.site: Remove.
maint: update bootstrap from gnulib
* bootstrap: Update from gnulib.
main: port subcommands to mingw
Problem reported by Eli Zaretskii in
<http://lists.gnu.org/archive/html/bug-gnu-utils/2012-05/msg00013.html>.
Approach suggested by Bruno Haible as option (4) in
<http://lists.gnu.org/archive/html/bug-gnu-utils/2012-05/msg00036.html>.
* bootstrap.conf (gnulib_modules): Add system-quote.
* src/diff3.c, src/sdiff.c, src/util.c:
Include <system-quote.h>, not <sh-quote.h>.
* src/diff3.c (read_diff):
* src/sdiff.c (main, edit):
* src/util.c (begin_output):
Use system_quote_argv, for portability to Mingw.
* src/sdiff.c (NUM_SIGS, handler_index_of_SIGINT): Now enum
values, not macros; this is cleaner and avoids a GCC warning if
!HAVE_WORKING_VFORK.
* src/util.c (begin_output) [! HAVE_WORKING_FORK]: Do not use -f,
for consistency with the HAVE_WORKING_FORK code.
maint: update bootstrap from gnulib
* bootstrap: Update from gnulib.
maint: m4/gnulib-cache.m4 is not under version control
This is like what coreutils does, and suppresses 'git status' chatter.
* .gitignore: Add /m4/gnulib-cache.m4.
2012-05-14 Paul Eggert <[email protected]>
Use binary mode when testing for binary files.
This reverts the 2006-01-05 change and modernizes to the current API.
Idea suggested by Eli Zaretskii in:
http://lists.gnu.org/archive/html/bug-gnu-utils/2012-05/msg00066.html
* src/cmp.c (main):
* src/diff.c (main, compare_files):
Use set_binary_mode rather than SET_BINARY.
* src/diff.c (compare_files): Omit unnecessary use of O_BINARY.
* src/io.c (sip): Sample unknown files in binary mode, to see
whether they are binary.
(read_files): Read binary files in binary mode.
build: update gnulib submodule to latest
2012-05-14 Stefano Lattarini <[email protected]>
build: omit obsolete AM_PROG_CC_STDC macro
The Automake-provided macro 'AM_PROG_CC_STDC' has been superseded by
the Autoconf-provided one 'AC_PROG_CC' since October 2002, and will
be removed in the next major automake version.
* configure.ac (AM_PROG_CC_STDC): Drop it.
2012-05-05 Jim Meyering <[email protected]>
diff: fix a typo that was always disabling the same_special_file macro
* src/system.h (same_special_file): Correct cpp guard expression:
s/HAVE_ST_RDEV/HAVE_STRUCT_STAT_ST_RDEV/. Reported by Eli Zaretskii.
2012-04-17 Jim Meyering <[email protected]>
maint: update bootstrap from gnulib
* bootstrap: Update from gnulib.
2012-03-07 Eric Blake <[email protected]>
usage: improve wording of --ignore-matching-lines
* src/diff.c (option_help_msgid): Tweak wording.
2012-03-04 Paul Eggert <[email protected]>
doc: explain -I RE better in --help output
* src/diff.c, src/sdiff.c (option_help_msgid): For -I RE,
change "whose lines all match" to "all whose lines match" to avoid
unintended interpretation. Reported by Danijel Tasov in
<http://bugs.debian.org/648411>.
2012-02-12 Paul Eggert <[email protected]>
sdiff: remove dependency on sigprocmask
* bootstrap.conf (gnulib_modules): Remove sigprocmask.
* src/sdiff.c (temporary_file): No need to invoke sigprocmask
here, since the signal handler merely sets a flag.
2012-02-05 Paul Eggert <[email protected]>
diff: -N, --unidirectional-new-file now compare to "-" too
* NEWS: Document this.
* doc/diffutils.texi (Comparing Directories): Likewise.
Also, document that these options work at the top level.
* src/diff.c (compare_files): Treat EBADF like ENOENT, to handle
the case where "-" is closed. Allow the other file to be
STDIN_FILENO, in case it's "-".
* tests/Makefile.am (TESTS): Add new-file.
* tests/new-file: New file.
2012-01-26 Paul Eggert <[email protected]>
maint: quote 'like this' or "like this", not `like this'
This is in response to a recent change in the GNU coding standards,
which now suggest quoting 'like this' or "like this", instead of
`like this' or ``like this''.
* HACKING, NEWS, README, README-hacking, TODO, doc/diagmeet.note:
* doc/diffutils.texi, ms/config.bat, ms/config.site:
* src/analyze.c, src/cmp.c, src/context.c, src/diff.c:
* src/diff.h, src/diff3.c, src/dir.c, src/ifdef.c, src/io.c:
* src/sdiff.c, src/side.c, src/system.h, src/util.c:
* tests/help-version:
Quote 'like this' or "like this" in commentary.
* cfg.mk (old_NEWS_hash): Adjust to reflect new NEWS quoting.
* man/help2man: Update to 1.40.4 version, with quoting fixed as above.
* po/en.po: Remove translation involving `, as it's no longer needed.
* src/cmp.c (try_help, specify_ignore_initial, usage, main):
* src/diff.c (main, try_help, option_help_msgid, specify_value)
(compare_files):
* src/diff3.c (main, try_help, option_help_msgid, usage)
(read_diff):
* src/dir.c (compare_names):
* src/sdiff.c (try_help, usage, check_child_status, main):
* src/util.c (finish_output):
* tests/help-version:
Quote 'like this' in output.
build: update gnulib submodule to latest
2012-01-12 Jim Meyering <[email protected]>
build: accommodate newer bootstrap from gnulib
* bootstrap.conf (gnulib_tool_option_extras): Add both --symlink
and --makefile-name=gnulib.mk. Also remove now-obsolete $bt/ prefix.
* bootstrap: Update from gnulib.
* tests/init.sh: Update from gnulib.
* lib/Makefile.am: Initialize numerous variables, so that
generated code in gnulib.mk may use += to append to them.
maint: avoid new syntax-check failure
* src/diff.c (compare_files): Use STREQ, not strcmp.
2012-01-08 Bruno Haible <[email protected]>
New option --no-dereference.
* src/diff.h (no_dereference_symlinks): New variable.
* src/diff.c: Include xreadlink.h.
(longopts): Add --no-dereference option.
(main): Accept --no-dereference option.
(option_help_msgid): Mention the --no-dereference option.
(compare_files): If no_dereference_symlinks is true, use lstat()
instead of stat(). Compare symbolic links by comparing their values.
* bootstrap.conf (gnulib_modules): Add lstat, stat, xreadlink.
* doc/diffutils.texi (Comparing Directories, diff Options): Mention the
--no-dereference option.
* tests/no-dereference: New file.
* tests/Makefile.am (TESTS): Add it.
2012-01-01 Jim Meyering <[email protected]>
maint: update all copyright year number ranges
Run "make update-copyright".
2011-12-14 Jim Meyering <[email protected]>
build: update to latest gnulib and adapt
* tests/binary: Reverse arguments to compare to avoid failure of
new syntax-check rule.
* configure.ac: Use -Wno-format-nonliteral.
Mark functions as pure of const, per recommendations enabled by
new gcc -W options. Use _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST.
* lib/cmpbuf.h (buffer_lcm, block_compare):
Apply pure and/or const attributes.
* src/cmp.c (block_compare): Likewise.
* src/context.c (find_hunk): Likewise.
* src/diff.h (lines_differ): Likewise.
* src/diff3.c (skipwhite): Likewise.
* src/dir.c (dir_loop): Likewise.
* src/util.c (find_change, find_reverse_change): Likewise.
(translate_line_number): Likewise.
build: stop distributing gzip'd releases; xz is enough
* configure.ac (AM_INIT_AUTOMAKE): Add no-dist-gzip.
2011-11-29 Jim Meyering <[email protected]>
tests: use "compare exp out", not "compare out exp"
Likewise, when an empty file is expected, use "compare /dev/null out",
not "compare out /dev/null". I.e., specify the expected/desired contents
via the first file name. Prompted by a suggestion from Bruno Haible
in http://thread.gmane.org/gmane.comp.gnu.grep.bugs/4020/focus=29154
Run these commands:
git grep -l -E 'compare [^ ]+ exp' \
|xargs perl -pi -e 's/\b(compare) (\S+) (exp\S*)/$1 $3 $2/'
git grep -l -E 'compare [^ ]+ /dev/null' \
|xargs perl -pi -e 's,\b(compare) (\S+) (/dev/null),$1 $3 $2,'
But manually convert this one:
-compare out exp-$(echo $opt|tr ' ' _)
+compare exp-$(echo $opt|tr ' ' _) out
and avoid an inappropriate change to cfg.mk.
2011-10-12 Stefano Lattarini <[email protected]>
tests: use more portable fd redirection in TESTS_ENVIRONMENT
* tests/Makefile.am (TESTS_ENVIRONMENT): Redirection with `exec 9>&2'
is not portable to various Korn shells, and to (at least) HP-UX 11
/bin/sh. Use a more portable idiom.
See http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/22488 for
lots of discussion.
2011-10-11 Stefano Lattarini <[email protected]>
tests: make test runner a script, not a shell function
All the test scripts in the diffutils testsuite are shell scripts,
so the current definition of TESTS_ENVIRONMENT, which adaptively
run tests using either perl or the shell depending on their kind,
is an overkill.
Moreover, this change is required in order for the testsuite to
continue to work with the new testsuite harness that is planned
to be introduced in Automake 1.12 (which, as of the writing date,
is still under development and in late alpha state).
See also related discussion on bug-coreutils:
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8887>
* tests/Makefile.am (TESTS_ENVIRONMENT): Remove definition of the
`shell_or_perl_' shell function, which is not required anymore.
(LOG_COMPILER): New, define to `$(SHELL)'.
* tests/binary: Make executable.
* tests/colliding-file-names: Likewise.
* tests/excess-slash: Likewise.
* tests/no-newline-at-eof: Likewise.
2011-10-04 Claudio Bley <[email protected]>
portability: use SET_BINARY rather than xfreopen (NULL, ...
* src/diff.c: Include binary-io.h, not xfreopen.h.
(main): Use SET_BINARY (...) rather than xfreopen (NULL, X, ...),
because the latter doesn't work on MinGW and crashes using MSVC.
* src/cmp.c (main): Likewise.
2011-10-04 Jim Meyering <[email protected]>
build: update gnulib submodule to latest
2011-09-02 Jim Meyering <[email protected]>
post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
version 3.2
* NEWS: Record release date.
build: update bootstrap and tests/init.sh from gnulib
* bootstrap: Update from gnulib.
* tests/init.sh: Likewise.
build: update gnulib submodule to latest
doc: diffutils' texi-derived doc may now be in debian's "main" section
* NEWS (Packaging): Mention the "no front/back-cover" change.
2011-08-15 Jim Meyering <[email protected]>
maint: avoid new "make sytnax-check" failure.
* src/diff.h (find_dir_file_pathname): Mark declaration with "extern"
keyword, in order to placate the tight-scope syntax check.
2011-08-15 Paul Eggert <[email protected]>
* src/io.c (find_and_hash_each_line): Refactor for brevity.
2011-08-15 Roland McGrath <[email protected]>
diff, sdiff: new option --ignore-trailing-space (-Z)
Derived from Roland McGrath's patch (dated June 2004!) in:
http://lists.gnu.org/archive/html/bug-gnu-utils/2004-07/msg00000.html
* NEWS:
* doc/diffutils.texi (White Space, Blank Lines)
(sdiff Option Summary, diff Options, sdiff Options): Document -Z.
* src/diff.h (IGNORE_TRAILING_SPACE)
(IGNORE_TAB_EXPANSION_AND_TRAILING_SPACE): New constants, for -Z.
* src/diff.c (shortopts, longopts, main, option_help_msgid):
* src/sdiff.c (longopts, option_help_msgid, main):
* src/io.c (find_and_hash_each_line):
* src/util.c (lines_differ, analyze_hunk): Support -Z.
2011-08-14 Paul Eggert <[email protected]>
* bootstrap.conf (gnulib_modules): Remove timegm.
This fixes a problem noted by Andreas Schwab in:
http://lists.gnu.org/archive/html/bug-diffutils/2011-08/msg00035.html
2011-08-13 Tim Waugh <[email protected]>
diff: --ignore-file-name-case now applies at top level too
Derived from Tim Waugh's patch in:
http://lists.gnu.org/archive/html/bug-diffutils/2011-08/msg00034.html
* NEWS, doc/diffutils.texi (diff Options): Document this.
* src/diff.c (compare_files): Implement this, by using
find_dir_file_pathname.
* src/diff.h (find_dir_file_pathname): New decl.
* src/dir.c: Include filenamecat.h.
(find_dir_file_pathname): New function.
2011-08-13 Paul Eggert <[email protected]>
* .gitignore: Add lib/unistr, lib/unused-parameter.h.
2011-08-10 Jim Meyering <[email protected]>
post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
version 3.1
* NEWS: Record release date.
build: use largefile module and update to latest gnulib
* configure.ac: Remove AC_SYS_LARGEFILE, subsumed by ...
* bootstrap.conf (gnulib_modules): ...this. Use largefile module.
* gnulib: Update to latest.
2011-08-08 Santiago Vila <[email protected]>
doc: insert comma in --help line for --ignore-space-change (-b)
* src/diff.c (option_help_msgid): Insert omitted comma between
"-b" and "--ignore-space-change". (tiny change)
2011-08-04 Jim Meyering <[email protected]>
doc: relax restriction on front-cover and back-cover texts
* doc/diffutils.texi (copying): Relax restriction on front-cover
and back-cover texts (just as m4 did here:
http://git.savannah.gnu.org/cgit/m4.git/commit?id=ee1e92ec).
Reported by Santiago Vila. Fix suggested by Eric Blake.
2011-08-03 Jim Meyering <[email protected]>
tests: update init.sh from gnulib
* tests/init.sh: Update from gnulib.
build: update gnulib submodule to latest
2011-07-03 Jim Meyering <[email protected]>
maint: remove inclusion of unused header, for "make syntax-check"
* src/diff3.c: Don't include <inttostr.h>. Not used.
* src/context.c: Likewise.
2011-06-19 Jim Meyering <[email protected]>
build: don't require perl when building from a tarball
But do ensure -- in all other circumstances -- that the man/*.1
files are rebuilt whenever the version number changes.
* configure.ac (SRC_VERSION_C): Define.
* man/Makefile.am (dist_man1_MANS): Rename from $(man1_MANS),
so that we distribute those pesky man/*.1 files.
(EXTRA_DIST): Reflect name change.
(MAINTAINERCLEANFILES): Define this, not DISTCLEANFILES,
now that these generated files are distributed.
($(dist_man1_MANS)): Depend on $(SRC_VERSION_C), so we get the
full dependency when not building from a tarball.
2011-06-13 Jim Meyering <[email protected]>
doc: do not distribute generated man/*.1 man files
* man/help2man: New file.
* man/Makefile.am: Use $(srcdir)/help2man.
Convert $(dist_man1_MANS) to $(man1_MANS), to tell automake
not to distribute the generated man/*.1 files. Now they're
generated at build-from-tarball time.
($(man1_MANS)): Depend on version.c, so that man pages are
regenerated whenever the version string changes.
build: ccache works better without embedded version strings
* src/Makefile.am: Generate version.c and version.h and put the
new symbol in a tiny library to be used by each program.
(LDADD): Add the new library.
* src/cmp.c (main): Use Version, not PACKAGE_VERSION, so the .o
file does not change with each commit-derived version increment.
* src/diff.c (main): Likewise.
* src/diff3.c (main): Likewise.
* src/sdiff.c (main): Likewise.
* src/system.h: Include "version.h".
* .gitignore: Add version.[ch]
2011-06-12 Jim Meyering <[email protected]>
doc: ensure each program has a man/*.x file: add "SEE ALSO" references
* man/cmp.x: New file.
* man/diff3.x: New file.
* man/sdiff.x: New file.
* man/diff.x: Add xrefs to the other three programs, and to patch.
* man/Makefile.am (EXTRA_DIST): List new files.
(cmp.1, diff3.1, sdiff.1): Depend on each .x file.
doc: rename diff.texi to diffutils.texi
This makes the .texi basename the same as the package name,
which is consistent with most other GNU packages.
* doc/diffutils.texi: Rename from...
* doc/diff.texi: ...removed.
* doc/Makefile.am (info_TEXINFOS): Reflect name change.
(diffutils_TEXINFOS): Likewise.
* cfg.mk (gendocs_options_): Remove this customization. It is no
longer needed, now that the .texi name matches that of the package.
* man/Makefile.am ($(dist_man1_MANS)): Remove now-unnecessary sed
filter.
* README: Update references to diffutils.texi etc. here, too.
* .gitignore: Update here, too.
Suggested by Karl Berry.
2011-06-08 Karl Berry <[email protected]>
cmp, diff, diff3, sdiff: edit and align --help text.
* cmp.c (option_help_msgid, usage),
* diff.c (option_help_msgid, usage),
* diff3.c (option_help_msgid, usage),
* sdiff.c (option_help_msgid, usage): align descriptions in the --help
output and slightly edit content.
2011-05-28 Paul Eggert <[email protected]>
diff: don't use locales after local-specific sorting fails
* src/dir.c (compare_names): Don't invoke strcasecmp if
locale-specific sorting fails, because POSIX.1-2008 says strcasecmp
has unspecified behavior outside the POSIX locale. See:
http://lists.gnu.org/archive/html/bug-diffutils/2011-05/msg00008.html
bootstrap: Avoid multithreading.
* bootstrap.conf (gnulib_tool_option_extras):
Add "--avoid=localename --avoid=lock", because we don't want to
bring in the multithreading code that recent gnulib changes would
otherwise bring in.
(excluded_files): Remove m4/lock.m4; no longer needed, now that
we use --avoid=lock.
build: update gnulib submodule to latest
2011-05-23 Karl Berry <[email protected]>
maint: update README-hacking
* README-hacking: Update a la coreutils for git, etc.
2011-05-23 Jim Meyering <[email protected]>
maint: update gnulib to latest with accompanying tight-scope tweaks
* cfg.mk: Include $(srcdir)/dist-check.mk using "-include",
to accommodate the new sc_tight_scope rule.
(_gl_TS_extern): Define, to tell gnulib's tight_scope rule that
headers here mark externs with "XTERN".
* gnulib: Update to latest.
2011-05-18 Jim Meyering <[email protected]>
maint: use gnulib's new readme-release module
* bootstrap.conf (gnulib_modules): Add readme-release.
(bootstrap_epilogue): Add the recommended perl one-liner.
* README-release: Remove file; it is now generated from gnulib.
* .gitignore: Add it.
build: update gnulib submodule to latest
maint: prepare for the tight-scope check
* src/diff.h: Mark function declarations with "extern" in
preparation for the tight-scope check.
(ignore_white_space): Separate enum decl from declaration
of this variable.
* src/Makefile.am (diff_SOURCES): Move diff.h from here to ...
(noinst_HEADERS): ...here.
For convenience, since the tight-scope rule uses $(noinst_HEADERS).
maint: don't use now-removed gnulib "exit" module
* bootstrap.conf (gnulib_modules): Remove "exit" module.
It no longer exists.
2011-03-26 Jim Meyering <[email protected]>
build: update gnulib submodule to latest
* .x-sc_space_tab: Remove file. Instead, ...
* cfg.mk (exclude_file_name_regexp--sc_space_tab): ...define this.
maint: fix typo in unused rule
* cfg.mk (config-save): Fix typo: add leading "_" in variable name.
2011-03-18 Jim Meyering <[email protected]>
doc: add a reference to wdiff(1) from diff.1
* man/diff.x: New file, to add "SEE ALSO" reference to wdiff(1).
* man/Makefile.am (diff.1): Depend on diff.x.
($(dist_man1_MANS)): Tell help2man to include diff.x.
(EXTRA_DIST): Add diff.x.
Suggestion from Dan Jacobson in http://bugs.debian.org/613319
2011-03-18 Eric Blake <[email protected]>
docs: info should mention -L
* doc/diff.texi (diff Options): Document -L.
docs: diff --help should mention -L
* src/diff.c (option_help_msgid): Document -L.
2011-02-15 Jim Meyering <[email protected]>
doc: speak of the --test (-a) option, not "the -a or --test option"
Convert using this command:
perl -pi -e \
's/(\@option{-.}) or (\@option{--.*?}) option/$2 ($1) option/' \
doc/diff.texi
Then convert some more with this:
perl -pi -e \
's/the (\@option{-.}) or (\@option{--.*?})$/the $2 ($1)/' \
doc/diff.texi
Then convert more manually.
Suggested by Dan Jacobson
2011-01-24 Jim Meyering <[email protected]>
maint: remove all uses of vfork: use fork instead
Our use of vfork now provokes warnings from gcc-4.6.0.
Also, vfork is no longer even specified by POSIX.1-2008.
* src/diff3.c (read_diff): Change each use of vfork to "fork".
Remove #ifdef'd code.
* src/util.c (begin_output, finish_output): Likewise.
* src/sdiff.c (cleanup, main, edit): Likewise.
(handler_index_of_SIGPIPE): Remove now-unused definition.
* src/system.h: Don't include <vfork.h>.
(vfork): Remove definition.
* ms/config.site: Remove reference to vfork cache variable.
tests: avoid newer but less-portable tail option syntax
* tests/function-line-vs-leading-space: Use sed -n '3,$p' rather than
tail -n+3. Older versions of tail do not accept that newer syntax.
Reported by Sudhakara Peram.
tests: fix an erroneous test
On most systems, like-named files were compared, by luck.
However, on others, different-named files would be compared
since their names were being treated as equal -- but they had
different content, so the test would fail.
* tests/colliding-file-names: Use different sets of file names
in d1 and d2 so that they cannot accidentally match.
Put the same line in each test file. This is required
when files named e.g., abc and ABC are compared.
This test was failing on a NixOS 86_64-darwin system.
build: update gnulib submodule to latest
tests: fix typo that silently disabled all tests
* tests/Makefile.am (TESTS): Fix typo: s/jESTS/TESTS/
2011-01-23 Jim Meyering <[email protected]>
build: update gnulib submodule to latest
maint: avoid new syntax-check failure
* src/diff.c (specify_value): Use !STREQ(...), not strcmp(...) != 0.
* src/diff3.c (main): Likewise.
2011-01-03 Jim Meyering <[email protected]>
maint: update copyright year ranges to include 2011
Run "make update-copyright", so "make syntax-check" works in 2011.
build: update gnulib submodule to latest
2010-12-16 Paul Eggert <[email protected]>
bootstrap: adjust to recent gnulib changes
* bootstrap.conf (excluded_files): Do not exclude m4/size_max.m4
and m4/xsize.m4 when using an external gettext, since they are
now needed by other gnulib modules.
2010-12-16 Jim Meyering <[email protected]>
doc: add contributor guidelines: HACKING
* HACKING: New file, copied 99% from the one in grep's repository.
2010-10-09 Jim Meyering <[email protected]>
maint: describe policy on copyright year number ranges
* README: Mention coreutils' long-standing policy on use of M-N
ranges in copyright year lists. Requested by Richard Stallman.
2010-09-04 Jim Meyering <[email protected]>
maint: adjust init.sh use to conform
* tests/help-version: Use one line: "${srcdir=.}/init.sh"; ...
* tests/basic: Likewise.
* tests/binary: Likewise.
* tests/colliding-file-names: Likewise.
* tests/excess-slash: Likewise.
* tests/function-line-vs-leading-space: Likewise.
* tests/help-version: Likewise.
* tests/label-vs-func: Likewise.
* tests/no-newline-at-eof: Likewise.
* tests/stdin: Likewise.
maint: avoid shadowing warning
* src/dir.c (diff_dirs): Rename shadowed local cmp to "c".
build: use gettext-h, not gettext
* bootstrap.conf (gnulib_modules): Use gettext-h, not gettext.
The latter is overkill for a package that uses
AM_GNU_GETTEXT([external]...
build: update build/test tools from gnulib
* bootstrap: Update from gnulib.
* tests/init.sh: Likewise.
build: update gnulib submodule to latest
2010-08-15 Jim Meyering <[email protected]>
diff -r: avoid printing excess slashes in concatenated file names
* bootstrap.conf (gnulib_modules): Add filenamecat.
* src/diff.c: Include "filenamecat.h".
(compare_files): Use file_name_concat, rather than dir_file_pathname.
* src/util.c (dir_file_pathname): Remove now-unused function.
* src/diff.h: Remove its declaration.
* tests/excess-slash: New script to test for this.
* tests/Makefile.am (TESTS): Add it.
Forwarded by Santiago Vila from <bugs.debian.org/586301a>,
reported by Jari Aalto.
2010-08-13 Paul Eggert <[email protected]>
diff: avoid spurious diffs when two distinct dir entries compare equal
Problem reported by Christoph Anton Mitterer in:
http://lists.gnu.org/archive/html/bug-diffutils/2010-08/msg00000.html
* NEWS: Mention this bug fix.
* src/dir.c (compare_names_for_qsort): Fall back on file_name_cmp
if two distinct entries in the same directory compare equal.
(diff_dirs): Prefer a file_name_cmp match when available.
* tests/Makefile.am (TESTS): New test colliding-file-names.
* tests/colliding-file-names: New file.
2010-05-09 Jim Meyering <[email protected]>
build: update gnulib submodule to latest
build: don't define macros that gnulib provides
* bootstrap.conf (gnulib_modules): Add signal, stdint.
* lib/cmpbuf.c (SA_RESTART, SA_INTERRUPT): Remove definitions.
(SIZE_MAX, PTRDIFF_MAX): Likewise.
Include <stdint.h>.
* src/system.h (WEXITSTATUS, WIFEXITED): Remove definitions.
(SA_RESTART, SA_INTERRUPT): Likewise.
build: rely on gnulib's sigprocmask module
* src/sdiff.c: Remove #if-!HAVE_SIGPROCMASK-guarded code.
* bootstrap.conf (gnulib_modules): Add sigprocmask.
2010-05-04 Jim Meyering <[email protected]>