-
Notifications
You must be signed in to change notification settings - Fork 1
/
ChangeLog-2013
11398 lines (8606 loc) · 419 KB
/
ChangeLog-2013
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
2013-12-08 James Youngman <[email protected]>
Bug #35753: check the success/failure of material I/O operations.
* lib/listfile.c (list_file): Check the result of fprintf to
determine if there was an I/O error on output. Return false (bool
instead of void) if so.
(print_name_without_quoting): Likewise.
(print_name_with_quoting): Likewise.
(print_name): Propagate the result of print_name_without_quoting
or print_name_with_quoting (and make all three functions return bool).
* find/pred.c (is_ok): Check the result of fprintf to
determine if there was an I/O error on output. Exit fatally if
there was a problem (since we cannot expect the user to say "yes"
or "no" to a prompt they will not have seen).
* xargs/xargs.c (print_args): Check the result of fprintf and
fflush to determine if there was an I/O error on output. Exit
fatally for the same reason as above if there is a problem.
* NEWS: Mention this bugfix (now that it is fully fixed).
Fix some signed/unsigned problems.
* find/util.c (show_valid_debug_options): change type of array
subscript to size_t to avoid signed/unsigned problems.
(set_stat_placeholders): Silence unuseful compiler warning about
unused parameter.
* find/ftsfind.c (show_outstanding_execdirs): change type of array
subscript to size_t to avoid signed/unsizned problems.
Fix format specifier in safe_read error message.
* xargs/xargs.c (xargs_do_exec): print size_t values with %zu, not
%d (since size_t is not and never can be the same type as int).
Bug #35753: detect failure of the atexit library function.
* find/find.c (main): Issue a fatal error message if atexit fails.
* xargs/xargs.c (main): Likewise.
* find/ftsfind.c (main): Likewise.
* locate/code.c (main): Likewise.
* locate/frcode.c (main): Likewise.
* locate/locate.c (dolocate): Likewise.
* locate/bigram.c (main): Likewise; also include <errno.h>.
2013-10-27 James Youngman <[email protected]>
* THANKS: Add Eric S. Raymond.
2013-10-27 Eric S. Raymond <[email protected]>
Add bracket missing from synopsis in locate manpage.
* locate/locate.1 (SYNOPSIS): Add missing bracket.
2013-10-26 James Youngman <[email protected]>
Clearly explain the result of -exec/-execdir ... +
* doc/find.texi (Single File): Explain that "-exec command ;"
returns true of the command exited with a status of 0.
(Multiple Files): Explain that "-execdir command +" always returns
true. Likewise for "-exec command +".
* find/find.1: similar changes.
2013-09-24 James Youngman <[email protected]>
Fix bug #40094: minor inconsistencies in xargs option descriptions.
* xargs/xargs.1: Update the description of -e option to emphasize
that the argument must follow the option letter immediately (in
other words, that it may not appear in the next program argument).
Likewise for the the -i and -l (lower-case L) options.
* xargs/xargs.c (usage): Minor consistency improvements to help
text.
Update Vietnamese, Czech and Dutch translations.
* po/nl.po: Update Dutch translation.
* po/cs.po: Update Czech translation.
* po/vi.po: Update Vietnamese translation.
2013-09-23 James Youngman <[email protected]>
Fix bug #39162: -printf reads beyond arguments terminated by \
* find/print.c (insert_fprintf): If a \ is found at the end of a
format string, issue a warning (and render it as-is).
* NEWS: Mention this bugfix.
Update version number to 4.5.13-git.
* configure.ac: Update version number to 4.5.13-git.
* NEWS: Likewise.
Updated Estonian, Polish, Ukrainian translations.
* po/et.po: Updated the Estonian translation from the Translation
Project.
* po/pl.po: Updated the Polish translation.
* po/uk.po: Updated the Ukrainian translation.
* NEWS: Mention these updates.
2013-09-22 James Youngman <[email protected]>
Release findutils-4.5.12.
* configure.ac (AC_INIT): Change version number to 4.5.12.
* NEWS: Change version number of most recent release to 4.5.12.
Issue an error message when fts_read fails. Fixes bug #39324.
* find/ftsfind.c (find): when fts_read fails, issue an error
message, set the exit status to zero and stop. Previously the
program would just stop (i.e. it failed to distinguish "done" from
"failed").
* find/find.1 (-exec): explain that on failure, some pending
command launches may not happen. The Texinfo documentation
already pointed this out, so that didn't need to be changed.
* NEWS: Mention this bugfix.
Add a bug number for bug #40088.
* NEWS: Add a bug number for bug #40088: potential buffer overflow
in -execdir and -okdir. Re-order the bugs listed to be
decreasing numerically by ID.
2013-09-21 James Youngman <[email protected]>
find: state that -execdir command is run locally to the matched file.
* doc/find.texi (Single File): Correct the description of what the
current directory will be when the command specified by -execdir
gets run. This fixes a documentation but reported by Eric
Hanchrow.
* NEWS: Mention this fix.
2013-09-21 Bernhard Voelker <[email protected]>
xargs: wait for process before prompting in interactive mode (-p)
* xargs/xargs.c (xargs_do_exec): Move the code for waiting for
forked processes up, so that the child process terminates before
we prompt for the next command.
* NEWS: Mention the fix.
2013-09-21 Dmitry V. Levin <[email protected]>
find: fix potential buffer overflow in -execdir and -okdir.
* lib/buildcmd.c (bc_push_arg): Take prefix length into account
to avoid state->argbuf overflow.
* NEWS: Mention this fix.
2013-09-21 James Youngman <[email protected]>
Make sv-34976-execdir-fd-leak.sh test more POSIX-compliant.
* find/testsuite/sv-34976-execdir-fd-leak.sh: Avoid using seq;
instead, use pre-generated lists of test file names. Also avoid
using file descriptors 0, 1, 2 in the test.
Fix typo "sturct".
* find/exec.c (impl_pred_exec): Typo fix: struct/struct.
* ChangeLog (2007-03-28): Likewise.
2013-09-20 Bernhard Voelker <[email protected]>
find: fix fd leak with --execdir option (bug#34976)
* find/exec.c (impl_pred_exec): Free the working directory if find
executes the command in the local dir, i.e. if it has been saved
by record_exec_dir(). Re-indent code.
* find/testsuite/sv-34976-execdir-fd-leak.sh: Add test.
* find/testsuite/Makefile.am (test_shell_progs): Mention the test.
* NEWS: Mention the fix.
2013-09-20 James Youngman <[email protected]>
Updated Greek translation.
* po/el.po: Updated Greek translation from the Translation
Project.
2013-09-20 Bernhard Voelker <[email protected]>
xargs: Fix integer overflow in implicit conversion in do_exec.
* xargs/xargs.c (xargs_do_exec): Change type of r from int to
size_t, since that is the type that safe_read actually returns.
2013-09-20 James Youngman <[email protected]>
Add Bernhard Voelker to AUTHORS.
* AUTHORS: Add Bernhard Voelker.
* configure.ac: Check for prefixed versions of ranlib, too.
2013-09-20 Benedikt Morbach <[email protected]> (tiny change)
Check for both prefixed and unprefixed versions of "ar".
* configure.ac: Look for '${host}-ar' as set by AC_CANONICAL_HOST
before looking for the unprefixed 'ar'. This is useful when
cross-compiling when all your binutils are prefixed.
2013-09-20 James Youngman <[email protected]>
Fix compilation error where struct dirent lacks a d_ino member.
* find/find.c (NOT_AN_INODE_NUMBER): Add missing identifier which
(when missing) caused a compilation error on system where struct
dirent lacks a d_ino member.
Be consistent about what we call the places the search starts.
* find/find.1: Consistently describe the paths at which the search
begins as "satrting points".
Refer to the info manual in a clearer and more explicit way.
* find/find.1 (SEE ALSO): Explain how to invoke info to read the
Texinfo manual.
* locate/locate.1 (SEE ALSO): Likewise.
* locate/updatedb.1 (SEE ALSO): Likewise.
* xargs/xargs.1 (SEE ALSO): Likewise.
2013-06-02 James Youngman <[email protected]>
Add unlinkat moduile.
* import-gnulib.config (modules): Add unlinkat module, following
bug report from Martin von Gagern.
2013-04-22 Paul Eggert <[email protected]>
More removal of support for -perm +MODE.
* find/parser.c (parse_perm): Remove no-longer-needed local var
and associated code. Reported by Eric Blake in
<https://savannah.gnu.org/bugs/?38474#comment9>.
2013-04-21 Paul Eggert <[email protected]>
Remove support for obsolete -perm +MODE syntax.
Also, do not reject -perm /MODE merely because of POSIXLY_CORRECT.
Problem reported in <https://savannah.gnu.org/bugs/?38474>.
* NEWS:
* doc/find.texi (Mode Bits): Document this.
(Environment Variables): POSIXLY_CORRECT does not affect -perm.
* find/parser.c (parse_help): Mention /MODE, not +MODE.
(non_posix_mode): Remove.
(parse_perm): Remove support for -perm +MODE.
Do not reject -perm /MODE merely because POSIXLY_CORRECT is set;
POSIXLY_CORRECT is not supposed to be for pedantic checking.
* find/find.1 (-perm): describe this change.
(HISTORY): update the existing statement about the deprecation of
+MODE to explain that support has now been removed.
2013-04-22 James Youngman <[email protected]>
Fix documentation typo.
* doc/find.texi (Mode Bits): Fix typo "it set" -> "is set".
2013-04-20 Paul Eggert <[email protected]>
doc: fix typos uncovered by texinfo 5.0
* doc/find-maint.texi: Fix typos that cause 'make' to fail
if texinfo 5.0 is installed.
2013-04-22 James Youngman <[email protected]>
Enable assertions in locate.
* locate/locate.c: Don't #define NDEBUG.
2013-04-21 James Youngman <[email protected]>
* find/find.1 (-size): explain the rounding-up semantics more
clearly.
Add example for find -printf.
* doc/find.texi (Print File Information): Add an example for "find
-printf" suggested by Karl Berry.
2011-12-31 Karl Berry <[email protected]>
Further documentation improvements.
* doc/find.texi: use @code for environment variable names, and
other improvements.
2009-08-03 Peter Breitenlohner <[email protected]>
* locate/locate.c: Simplify handling of slocate databases.
Fix the bug assuming second path extends the first one.
* locate/testsuite/locate.gnu/slocate.{exp,xo}: New testcase
for slocate databse, exposing this bug.
* locate/testsuite/Makefile.am: Add new test case.
2009-08-03 Peter Breitenlohner <[email protected]>
* locate/locate.c: Enable assertions and fix the off-by-one
bugs that prevented this.
2009-08-03 Peter Breitenlohner <[email protected]>
* doc/find.texi: Remove duplicate paragraph and fix a typo.
2013-03-31 James Youngman <[email protected]>
Don't use reserved identifiers in macro names; fix other code smells.
* build-aux/src-sniff.py (checkers): Check for #define directives
which use a macro name which is reserved.
(MakefileRegexChecker): New class which performs regex checks on
makefiles; this ensures that we don't check Makefile.in if we're
going to check Makefile.am anyway.
* lib/unused-result.h: Don't use a reserved identifier in the
macro name defined as the #include guard.
* locate/locatedb.h: Likewise.
* Makefile.am (findutils-check-smells): Don't check gnulib code.
* import-gnulib.sh (hack_gnulib_tool_output): Move the 'do' of a
for loop onto the line following the 'for' (instead of the same
line).
2013-03-29 James Youngman <[email protected]>
Document that -0/-d turns off logical end-of-file processing.
* doc/find.texi (xargs options): Explain that the logical end of
file marker string set with -E is not special if -d or -0 was
specified.
* xargs/xargs.c (usage): Mention this in the --help output.
(read_string): Correct the function header comment to point out
that there is no logical end-of-file processing for this case.
Also point out that the delimiter may not always be NUL.
This documentation update fixes Savannah bug #36652.
(main): Emit a warning message if -0/-d is specified and -E was
also used.
* xargs/testsuite/xargs.gnu/E_-0.exp: Don't compare stderr output,
since for this case xargs now emits a warning message.
* NEWS: Mention this change.
2013-03-29 James Youngman <[email protected]>
Updated the Galician translation.
* gl.po: Updated Galician translation.
2013-03-26 James Youngman <[email protected]>
Updated a number of translations.
* cs.po: Updated Czech translation.
* et.po: Updated Estonian translation.
* fi.po: Updated Finnish translation.
* fr.po: Updated French translation.
* nl.po: Updated Dutch translation.
* pl.po: Updated Polish translation.
* ru.po: Updated Russian translation.
* uk.po: Updated Ukrainian translation.
* vi.po: Updated Vietnamese translation.
* zh_CN.po: Updated Chinese (simplified) translation.
2013-03-26 Kamil Dudka <[email protected]>
Fix compile-time warnings.
* find/defs.h (struct predicate): Add a missing const modifier.
* find/find.c (wd_sanity_check): Suppress a warning in #else branch.
(process_dir): Remove an unused variables and statements.
* find/pred.c (pred_context): Use const modifier in the prototype.
* lib/buildcmd.{c,h} (bc_args_exceed_testing_limit): Remove a const
modifier causing unnecessary warnings.
* xargs/xargs.c (main): Add explicit type-casts.
2013-03-24 James Youngman <[email protected]>
Expand on warning about xargs -P and stdout, including in Info.
* xargs/xargs.1: Expand on the warning about sharing stdout for
"xargs -P".
* doc/find.texi (Controlling Parallelism): Add a suitable warning
about sharing resources here, too.
* NEWS: Mention that all relevant documentation was updated with
this warning.
2013-03-24 Bernhard Voelker <[email protected]>
Improve error message for find -type X (X = an unknown file type).
* find/parser.c (insert_type): Give a more comprehensible error
message when the type letter following -type or -xtype corresponds
to a type of file which was unknown on the system which compiled
the find binary.
* NEWS: Mention this improvement.
xargs: split usage text to help translators, and clarify it.
* xargs/xargs.c (usage): Define HTL macro to print one help text
line (or entry). Split the option descriptions up by using the
above macro. Refine the messages to adapt to the common way:
change the start of each option's description to lower case, do
not use periods at the end, use semicolons where needed, indent
secondary lines, several other minor improvements.
* NEWS: Mention this improvement.
* xargs/xargs.1: Add note for -P suggesting the use of a locking
system to avoid corrupted stdout.
2013-03-24 James Youngman <[email protected]>
Fix Savannah bug #38583: errno-buffer read failed in xargs_do_exec
* import-gnulib.config (modules): Import the safe-read module.
* xargs/xargs.c (xargs_do_exec): Use safe_read so that the read
system-call is retried if we handle a signal (for example
SIGUSR[12]) while we are trying to read the errno vlaue from the
child process.
Fix misleading message from import-gnulib.sh; allow .git symlink.
* import-gnulib.sh (check_old_gnulib_dir_layout): Really apply the
bugfix by Kamil Dudka which eliminates a misleading message of
import-gnulib.sh on a fresh repository obtained by 'git clone
--recursive', by requiring gnulib/.git to exist but not requiring
it to be a directory.
Bugfix to "make clean": do not delete header files.
* lib/Makefile.am (coverage-clean): Remove output files left
behind by gcc -fprofile-arcs -ftest-coverage by using $(RM) with a
glob pattern rather than a $(libfindtools_a_SOURCES.c=.gcno)
Makefile substitution, because the latter caused us to delete
header files entirely (their names do not end in .c). This had
meant that it was impossible to compile findutils after "make
clean". Bug report by David Gilbert.
* find/Makefile.am (coverage-clean): Likewise.
* xargs/Makefile.am (coverage-clean): Likewise.
* locate/Makefile.am (coverage-clean): Likewise.
* Makefile.am (coverage-clean): Likewise, but also do this in the
subdirectories whose Makefile.am files are generated by
gnulib-tool.
Move on from 4.5.11, to 4.5.12-git
* NEWS: Add a new section for 4.5.12-git. Mention the bugfix to
find/testsuite/sv-bug-32043.sh.
* configure.ac: Update the version number.
Fix Bash-ism [[ ... ]].
* find/testsuite/sv-bug-32043.sh: Change [[ ... ]] to [ ... ]
because the first pattern is a Bash-ism. Bug reported by David
Gilbert.
2013-02-03 Kamil Dudka <[email protected]>
Avoid using 'INCLUDES =' in automake templates.
* find/Makefile.am: Use AM_CPPFLAGS instead of deprecated INCLUDES.
* lib/Makefile.am: Likewise.
* locate/Makefile.am: Likewise.
* xargs/Makefile.am: Likewise.
Eliminate a misleading message of import-gnulib.sh on a fresh
repository obtained by 'git clone --recursive'.
* import-gnulib.sh (check_old_gnulib_dir_layout): Do not require
./gnulib/.git to be a directory.
2013-02-03 James Youngman <[email protected]>
Fix Savannah bug #38239, missing variable initialisation in locate
* locate/locate.c (cleanup_quote_opts): New atexit function, frees
quote_opts which otherwise would leak.
(dolocate): Eliminate the redundant boolean variable
they_chose_db, whose true/false-ness followed the not-NULL-ness of
locate_path. Rename locate_path to user_selected_locate_path to
make this explicit.
(dolocate): When we get to the bottom of the loop, don't try to
check for a further element in user_selected_locate_path if it is
NULL (that is, $LOCATE_PATH was unset and the -d option was not
used).
* po/findutils.pot: Updated template file from the Translation
Project
2013-02-02 James Youngman <[email protected]>
Release findutils-4.5.11.
* NEWS: update version number from 4.5.11-git to 4.5.11.
* configure.ac (AC_INIT): Likewise.
Reduce needless calls to complete_pending_execdirs.
* find/exec.c (impl_pred_exec): Once pushing an argument for
-exec{,dir} ... +, Only set state.execdirs_outstanding if
there were previously no todo items on ths command line.
This avoids spurious calls to complete_pending_execdirs().
2012-12-19 James Youngman <[email protected]>
Make the manual section ordering and menu item ordering consistent.
* doc/find.texi (Top): Re-order menu items to be consistent with
ordering of sections ('Reference' is moved).
(Print File Information): Add missing menu item 'Formatting Flags'
and remove that menu item from inside 'Format Directives'.
(Formatting Flags): Hence this is a subsection, not a
subsubsection.
2012-12-15 Stefano Lattarini <[email protected]> (trivial change)
build: remove redundant AC_SUBST of var INCLUDES
* configure.ac: don't call AC_SUBST(INCLUDES).
2012-12-15 Bernhard Voelker <[email protected]> (trivial change)
* locate/updatedb.sh (PRUNEFS): Avoid 9P, cifs and nfs4
filesystems by default.
2012-12-15 James Youngman <[email protected]>
Tweak updatedb.sh to make diffs easier to read.
* locate/updatedb.sh (PRUNEFS): List the default items in
alphabetical order to make diffs easier to read.
(PRUNEPATHS): likewise.
Re-generate doc/regexprops.texi.
* doc/regexprops.texi: re-generate to describe the changes to
gnulib for the regular expression types "awk" (to add character
class support), "gnu-awk" (to add range support) and "posix-awk"
(also to add range suport).
* NEWS: Describe this change.
2012-11-17 Dmitry V. Levin <[email protected]>
find: use FTS_VERBATIM
* gnulib: update to latest, to get FTS_VERBATIM support.
* find/ftsfind.c (ftsoptions): Set the FTS_VERBATIM bit. This
Patch was contributed on 2012-11-18, but was applied with the
above regexprops change)
2012-12-14 James Youngman <[email protected]>
Fix bug #37926 (wrong result for oldfind -inum)
* find/find.c (D_INO): Define D_INO as a convenience accessor for
the inode number in struct dirent; use 0 if there is no d_ino
member in struct dirent.
(main): Pass the inode number of the top-level directory to
process_top_path.
(at_top): Add argument inum, the inode number of the file we are
looking at. Pass this to the action function.
(do_process_top_dir): Pass the inode number to process_path.
(do_process_predicate): Take (but ignore) the inode number
argument.
(process_path): Add argument inum, the inode number of the file we are
looking at. Populate statbuf.st_ino with this value. This avoids
a stat call in pred_inum if the stat information would not
otherwise be used.
(process_dir): Pass the inode number to process_path.
* import-gnulib.config (modules): Add d-ino.
* NEWS: Mention this bugfix.
2012-11-17 James Youngman <[email protected]>
Update the Vietnamese, Ukranian and Croatian translations.
* po/vi.po, po/uk.po, po/hr.po: Update the translation files from
the translation project.
2012-09-18 Jim Meyering <[email protected]>
find: fix two time-formatting leaks (bug #37356)
* find/print.c (do_time_format): Call xmalloc for static "buf" only
the first time.
When reallocating buf, be sure to update its buf_size.
Also free "altbuf".
Reported by Nemo Maelstrom Thorx in http://bugs.debian.org/687358
via Andreas Metzler in https://savannah.gnu.org/bugs/?37356
find: minor tweaks
* find/print.c (do_time_format): Use memcpy in place of sprintf.
When calling x2nrealloc, use "sizeof *buf" as the element size,
rather than "2u".
build: avoid import-gnulib.sh failure
* import-gnulib.config (extra_files): Remove build-aux/missing,
since that file has been removed from gnulib.
build: stop using now-obsolete macro, AM_C_PROTOTYPES
* configure.ac: Don't use obsolete AM_C_PROTOTYPES.
2011-12-30 Karl Berry <[email protected]>
Documentation improvements (UK spelling, use of @code).
* find.texi (@copying): add 2011, period outside quotes.
(thoughout): use UK spelling and " -- " convention.
(section names): use @code where needed.
2011-09-11 Jim Meyering <[email protected]>
Fix a typo in find.texi.
* doc/find.texi (Error Messages From find): Fix typo s/an/a/.
2011-08-20 James Youngman <[email protected]>
Describe recent memory savings on very large directories.
* NEWS: Describe the recent changes which reduce the amount of
heap memory used in processing directories containing very many
entries.
Remove no-longer-used files savedir.[ch].
* lib/savedirinfo.c: delete unused file.
* lib/savedirinfo.h: delete unused file.
* lib/Makefile.am (libfind_a_SOURCES): Remove savedirinfo.c.
(EXTRA_DIST): Remove savedirinfo.h.
Reduce memory consumption of oldfind on large directories.
* find/find.c (process_dir): Reduce memory consumption for large
directories. Don't save the whole directory content with
xsavedir, instead just loop over the results of readdir. This
means that oldfind will consume one file descriptor per directory
level.
* find/testsuite/sv-34079.sh: verify that the memory consumption
of oldfind is reasonable on large directories.
Reduce memory consumption of fts.
* gnulib: update to latest, mainly to include a bugfix (gnulib
commit 47cb657eca1abf2c26c32c8ce03def994a3ee37c) which limits the
memory consumed by fts.
* find/testsuite/sv-34079.sh: New test, verifying that memory
consumption in ftsfind does not grow indefinitely as the size of
directories increases.
* find/testsuite/Makefile.am (test_shell_progs): Added sv-34079.sh.
2011-06-29 James Youngman <[email protected]>
Fix some constness warnings when dealing with -printf formats.
* find/parser.c (collect_arg_nonconst): Rename collect_arg to
collect_arg_nonconst and change the collected argument from const
char* to char*.
(collect_arg): Call collect_arg_nonconst to do the real work.
(parse_printf): Call collect_arg_nonconst instead of collect_arg.
Change `format' from const char* to char*.
(parse_fprintf): Likewise.
* find/print.h: Change 'format' from const char* to char*, since
actually we edit it in place.
* find/print.c (parse_octal_escape): Instead of updating a const
char* pointer to indicate how many characters from the input we
consumed, update a size_t value.
(insert_fprintf): Change function definition to match updated
prototype. Eliminate fmt_inpos. Introduce a `readpos' offset
variable which takes the previous role of fmt_inpos.
2011-06-28 James Youngman <[email protected]>
Refactor insert_fprintf to minimise calls to make_segment.
* find/print.c (get_format_flags_length): Factor out of
insert_fprintf; computes the length of the format flags for a
format specifier (that is everything after the % but before the
format control character).
(get_format_specifer_length): Also factored out of insert_fprintf;
returns the number of format control characters (e.g. 2 for %A@)
or 0 for error.
(insert_fprintf): Keep fmt_editpos and fmt_inpos more closely in
step, instead of initialising fmt_inpos only when we need it (the
idea eventually will be to make fmt_inpos the loop control
variable). Call get_format_specifer_length and
get_format_flags_length when needed. Reduce the number of
different calls to make_segment. We now have one for each KIND_
value plus one for the error case.
2011-06-27 James Youngman <[email protected]>
Factor some of the code out of insert_fprintf.
* find/print.c (insert_fprintf): Factor out the handling of
eascape codes into new functions parse_escape_char,
parse_octal_escape.
2011-06-25 James Youngman <[email protected]>
Separate out the handling of \c.
* find/print.c (insert_fprintf): Deal with \c as a special case.
Remove some redundant continue statements.
* find/print.c (insert_fprintf): Remove a pair of redundant
'continue' statements.
Simplify -fprintf %%; handle %% like a regular format specifier.
* find/print.c (make_segment): Handle foo%% by simply generating a
format string of foo%% (that is, let vfprintf handle the escaped
%).
(insert_fprintf): Handle %% as KIND_FORMAT instead of KIND_PLAIN.
(do_fprintf): Handle %%.
Clarify variable naming in insert_fprintf.
* find/print.c (insert_fprintf): Rename some variables for greater
clarity:
format is now segstart, since it points to the start of the part
of the format string we're next going to pass to make_segment.
scan2 is now fmt_inpos (which is a const char*) and is the
scanning position beyond segstart which we're reading to locate
the end of this segment.
scan is now fmt_editpos and is the scanning position at which we
are modifying the format string (for example to change \n in the
format to the value of the '\n' character).
2011-06-19 James Youngman <[email protected]>
Test find -printf %i.
* find/testsuite/test_inode.sh: New test, for find -printf %i.
* find/testsuite/Makefile.am (test_shell_progs): Add test_inode.sh.
Extract common test code into a sourced file.
* find/testsuite/binary_locations.sh: New file, extracting common
code from the test scripts.
* find/testsuite/test_escape_c.sh: Source binary_locations.sh.
* find/testsuite/test_escapechars.sh: Source binary_locations.sh.
* find/testsuite/Makefile.am (EXTRA_DIST): Distribute
binary_locations.sh.
2011-06-18 James Youngman <[email protected]>
Fix some compiler warnings in xargs.
* xargs/xargs.c: Remove definition of the unused macro VOID.
Include error.h instead of declaring error (incorrectly).
Change the type of lineno from int to size_t.
(get_char_oct_or_hex_escape): Don't point endp unnecessarily at p,
because they have different constness. There's no need for this,
just initialise it to NULL.
(main): Make input_file const. Make the default arglist
non-const, to avoid a constness warning.
(main): Pass the option name as the argument to error's %s format,
as opposed to the whole struct (this was a bug, but since the name
member was the first in the struct, there were probably no
symptoms).
(main): read_args returns an int, but the only negative value it
can return is -1. Once we know that didn't happen, assign the
value to a size_t variable to avoid signed/unsigned warnings
elsewhere.
(xargs_do_exec): Manually inhibit some unused-parameters warnings.
(print_args): Use size_t as the type of a loop variable.
(wait_for_proc): Since procs_executing is an unsigned long, use a
%lu format specifier to print it.
(increment_proc_max): Inhibit an unused-parameter warning (the
signal number).
(decrement_proc_max): Likewise.
* lib/buildcmd.h (struct buildcmd_control): Make member
replace_pat const. Change the type of lines_per_exec to unsigned
long.
2011-06-20 James Youngman <[email protected]>
Use a consistent include order in header files too.
* lib/printquoted.h: Use the preferred header-file inclusion order
here too.
Use a consistent order for header-file inclusion.
* find/exec.c: Include config.h, then system headers followed by
gnulib headers and last, find-specific headers.
* find/find.c: Likewise.
* find/finddata.c: Likewise.
* find/fstype.c: Likewise.
* find/ftsfind.c: Likewise.
* find/parser.c: Likewise.
* find/pred.c: Likewise.
* find/tree.c: Likewise.
* find/util.c: Likewise.
* lib/buildcmd.c: Likewise.
* lib/dircallback.c: Likewise.
* lib/extendbuf.c: Likewise.
* lib/fdleak.c: Likewise.
* lib/findutils-version.c: Likewise.
* lib/listfile.c: Likewise.
* lib/printquoted.c: Likewise.
* lib/qmark.c: Likewise.
* lib/regexprops.c: Likewise.
* lib/regextype.c: Likewise.
* lib/safe-atoi.c: Likewise.
* lib/savedirinfo.c: Likewise.
* lib/splitstring.c: Likewise.
* lib/test_splitstring.c: Likewise.
* lib/waitpid.c: Likewise.
* locate/bigram.c: Likewise.
* locate/code.c: Likewise.
* locate/frcode.c: Likewise.
* locate/locate.c: Likewise.
* locate/word_io.c: Likewise.
* xargs/xargs.c: Likewise.
Take gnulib-tool's advice about which header files to include.
* locate/locate.c: Include <regex.h> instead of "regex.h".
Include "fnmatch.h" instead of <fnmatch.h> (because we use
fnmatch-gnu). Include "gettext.h".
* lib/regexprops.c: Include <regex.h> instead of "regex.h".
* find/tree.c: Include "gettext.h". Include "fnmatch.h" instead
of <fnmatch.h> (because we use fnmatch-gnu).
* find/parser.c: Include "gettext.h" and <regex.h>. Include
"fnmatch.h" instead of <fnmatch.h> (because we use fnmatch-gnu).
* find/pred.c: Likewise.
* find/exec.c: Include "gettext.h".
* find/find.c: Likewise.
* find/fstype.c: Likewise.
* find/ftsfind.c: Likewise.
* find/print.c: Likewise.
* lib/buildcmd.c: Likewise.
* lib/fdleak.c: Likewise.
* lib/findutils-version.c: Likewise.
* lib/regextype.c: Likewise.
* lib/safe-atoi.c: Likewise.
* find/util.c: Likewise.
* locate/bigram.c: Likewise.
* locate/code.c: Likewise.
* locate/frcode.c: Likewise.
* locate/word_io.c: Likewise.
* xargs/xargs.c: Likewise.
* find/Makefile.am: Add a comment explaining why gnulib-tool
advised us to use each library.
2011-06-19 James Youngman <[email protected]>
Update gnulib.
* gnulib: update to latest version.
2011-06-18 James Youngman <[email protected]>
Remove test-coverage output files for "make clean".
* find/Makefile.am (CLEANFILES): Clean the .gcda and .gcdo files
which are produced by running programs that were compile with gcc
-fprofile-arcs -ftest-coverage.
* lib/Makefile.am (CLEANFILES): Likewise.
* locate/Makefile.am (CLEANFILES): Likewise.
* xargs/Makefile.am (CLEANFILES): Likewise.
Move the printing code into print.c.
* find/print.c (scan_for_digit_differences): Move to this file
from pred.c.
(do_time_format): Move to this file from pred.c.
(format_date): Likewise.
(weekdays): Likewise.
(months): Likewise.
(ctime_format): Likewise.
(file_sparseness): Likewise.
(checked_fprintf): Likewise.
(checked_print_quoted): Likewise.
(checked_fwrite): Likewise.
(checked_fflush): Likewise.
(HANDLE_TYPE): Likewise.
(do_fprintf): Likewise.
(pred_fprintf): Likewise.
* find/pred.c: Don't include human.h, filemode.h, verify.h or
xalloc.h, we don't need them. Don't define MAX. Don't declare
ctime_format or format_date. Each of the functions moved into
print.c were moved out of this file.
Reserve format specifiers %(, %{ and %[ for future use.
* find/print.c (insert_fprintf): Reject %(, %{ and %[.
(make_segment): Remove code which previously supposedly rejected
these format specifiers, but in fact did nothing. Replace with
an assertion to document the fact that we do not expect to see
these format characters in make_segment.
* find/testsuite/find.gnu/printf-reserved.exp: New test case, for
%(, %{ and %[, which are all rejected.
* find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add
find.gnu/printf-reserved.exp.
* doc/find.texi (Reserved and Unknown Directives): Document this.
* find/find.1: Document this.
* NEWS: Mention this change.
Additional test cases for printf field width, precision and sign.
* find/testsuite/find.gnu/printf.exp: Add test cases for left and
right string alignment (%-10p), string truncation (%10.6p),
explicit signs (%+d), left and right alignment (%10p, %-10p),
zero-filling on decimal fields.
* find/testsuite/find.gnu/printf.xo: Add expected outputs for the
new tests.
Add a test for find -printf ... %%.
* find/testsuite/find.gnu/printf.exp: Also test %%.
* find/testsuite/find.gnu/printf.xo: Add expected output for the
%% test case.
Add a test for "find -printf \c".
* find/testsuite/Makefile.am (test_shell_progs): Add
test_escape_c.sh.
* find/testsuite/test_escape_c.sh: New test for "find -printf
\c".
Remove an unnecessary argument from insert_fprintf.
* find/print.c (insert_fprintf): Eliminate the 'func' argument,
since it is always pref_fprintf.
* find/print.h: Adjust the prototype accordingly.
* find/parser.c (parse_fprintf): Don't pass the func argument to
insert_fprintf.
(parse_printf): Likewise.
Add new test for octal and letter escapes in -printf format.
* find/testsuite/test_escapechars.golden: Expected output file.
* find/testsuite/Makefile.am (EXTRA_DIST_GOLDEN): New variable;
distribute test_escapechars.golden.
* find/testsuite/test_escapechars.sh: New test.
* find/testsuite/Makefile.am (test_shell_progs): New variable,
where we keep the list of shell script tests. Move existing
examples from TESTS and add test_escapechars.sh.
* find/testsuite/Makefile.am (TESTS): Refer to test_shell_progs.
* cfg.mk: allow trailing blanks and space-tab sequences in
find/testsuite/test_escapechars.golden.
2011-06-17 James Youngman <[email protected]>
Split find's printf-related code into a new file.
* find/print.h: New file. Declare insert_fprintf and
make_segment.
* find/print.c: New file. Move definitions of insert_fprintf and
make_segment to here.
* find/parser.c: Include "parser.h". Move declarations of
insert_fprintf and make_segment into that file; move the
definitions into parser.c.
* find/Makefile.am (libfindtools_a_SOURCES): Add print.c.
(EXTRA_DIST): Add print.h.
* po/POTFILES.in: Add find/print.c.
2011-06-15 James Youngman <[email protected]>
Fix compiler warnings in lib/regextype.c and find/parser.c.
* lib/regextype.c (tagRegexTypeMap): make the name field const.
* find/parser.c (parse_version): instead of counting features, use
a boolean variable, nofeatures. This avoids compiler warnings
about overflow.
Adopt the use of the manywarnings module.
* import-gnulib.config (modules): Add manywarnings.
* configure.ac: Invoke gl_MANYWARN_ALL_GCC and
gl_MANYWARN_COMPLEMENT.
* configure.ac: Turn on the compiler warnings only if
--enable-compiler-warnings was specified to configure.
2011-06-14 James Youngman <[email protected]>
Avoid pointer/integer comparison on value returned by strchr.
* find/parser.c (parse_newerXY): Compare the result of strchr
against NULL rather than 0.
Fix further compiler warnings.
* find/ftsfind.c (show_outstanding_execdirs): Now that
execp->state.cmd_argc is a size_t, we can't print it with %d. So
print it with PRIuMAX (and include <inttypes.h> to define that).
* find/tree.c (prec_name): change return type to const char*.
(type_name): Likewise.
* find/exec.c (impl_pred_exec): use a separate variable (buf) to
point the memory allocated/freed with malloc/free, so that the
existing variable target can then be const (and so we can assign
pathname to it without a compiler warning).
Eliminate some compiler warnings.
* find/find.c: Remove definition of SAFE_CHDIR, which we don't
use.
* find/defs.h: Remove redundant declaration of launch.
* find/parser.c (parse_false): Cast unused arguments to void.
(parse_print0): Likewise.
(pred_context): Likewise.
(parse_newerXY): Add some parens for slightly greater clarity.
(make_segment): Avoid switch-missing-default-case warning by
turning it into an if statement.
(check_path_safety): Remove unused argument.
(insert_exec_ok): Don't pass the unwanted argument to
check_path_safety.
(get_relative_timestamp): silence compiler warning by adding a
case for the remaining enumeration value rather than using
default.
* find/pred.c (months): the strings can be const char*, rather
than just char*.
(ctime_format): change TIME_BUF_LEN to an integer constant to
avoid signed/unsigned comparison.
(blank_rtrim): Change to new-style function definition(!) and
remove unnecessary parentheses around a return value.
* lib/buildcmd.c: Omit redundant declaration of environ.
* find/tree.c (get_expr): Make static.
(cost_assoc): make the name field const.
(prec_assoc): make the prec_name field const.
(op_assoc): make the type_name field const.
(type_name): turn into an ANSI function definition(!).
(prec_name): Likewise! Also remove spurious parentheses around
return value.
(prec_name): Remove spurious parentheses around return value.
* lib/buildcmd.h (buildcmd_state): change types of several fields
to size_t: cmd_argc, cmd_argv_alloc, largest_successful_arg_count,
smallest_failed_arg_count.
(buildcmd_control): change types of several fields
to size_t: max_arg_count, initial_argc, lines_per_exec,
args_per_exec.
Assume SIGCHLD and O_NOFOLLOW are defined by gnulib.
* find/find.c: Since gnulib defines O_NOFOLLOW, don't check to see
if the macro is defined. Check instead to see if it is 0.
(safely_chdir_nofollow): Point this out.
(safely_chdir): Check O_NOFOLLOW for zeroness.
* find/exec.c: Don't #define SIGCHLD.
* xargs/xargs.c: Likewise.
2011-06-14 James Youngman <[email protected]>
Fix coredump bug introduced in the previous change.
* locate/locate.c (dolocate): Remove declaration of e, which was
replaced by the variable db_name. Change the last two uses of 'e'
to use 'db_name'. This bugfix prevents possible coredumps when
issuing error messages about reads from the locate database (or
warnings about byte order for old databases). This bug had been
introduced in the previous change.
2011-06-13 James Youngman <[email protected]>
Split strings into fields nondestructively.
* lib/splitstring.c: New file; defines splitstring(), which will
non-destructively locate character-separated fields in a string.
* lib/splitstring.h: New file; declares splitstring.
* lib/test_splitstring.c: New file; unit test for splitstring.c.
* lib/nextelem.c: Delete (obsoleted by splitstring.c).
* lib/nextelem.h: Delete (obsoleted by splitstring.h).
* lib/Makefile.am (libfind_a_SOURCES): Add splitstring.c,
splitstring.c. Remove nextelem.c, nextelem.h.
(check_PROGRAMS): Add test_splitstring.
(TESTS): Add test_splitstring.
(test_splitstring_SOURCES): Sources for the
test_splitstring unit test.
* locate/locate.c: Include splitstring.h rather than nextelem.h.
(dolocate): Use splitstring rather than next_element. In places
where we need a nul-terminated string, use strndup() to create it.
Convert some space-tab sequences to regular spacing.
* find/parser.c: Include splitstring.h rather than nextelem.h.
(check_path_safety): Use splitstring rather than next_element.
* import-gnulib.config (modules): Depend on the module strndup.
* cfg.mk: Exempt lib/test_splitstring.c from calling
bindtextdomain or set_program_name.
2011-06-13 James Youngman <[email protected]>
Fix compilation failure in bigram.c by including <locale.h>.
* locate/bigram.c: Include <locale.h>.
2011-06-12 James Youngman <[email protected]>
Split exec-related code into a new file, exec.c
* find/exec.c: New file.