??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php:4) in /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php:4) in /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php:4) in /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php:4) in /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php:4) in /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php:4) in /home/mybf1/public_html/class.bf1.my/wp-includes/js/dist/index.php on line 178
2013-02-02 James Youngman
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
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 (trivial change)
build: remove redundant AC_SUBST of var INCLUDES
* configure.ac: don't call AC_SUBST(INCLUDES).
2012-12-15 Bernhard Voelker (trivial change)
* locate/updatedb.sh (PRUNEFS): Avoid 9P, cifs and nfs4
filesystems by default.
2012-12-15 James Youngman
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
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
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
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
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 http://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
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
Fix a typo in find.texi.
* doc/find.texi (Error Messages From find): Fix typo s/an/a/.
2011-08-20 James Youngman
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
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
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
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
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
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
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
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 instead of "regex.h".
Include "fnmatch.h" instead of (because we use
fnmatch-gnu). Include "gettext.h".
* lib/regexprops.c: Include instead of "regex.h".
* find/tree.c: Include "gettext.h". Include "fnmatch.h" instead
of (because we use fnmatch-gnu).
* find/parser.c: Include "gettext.h" and . Include
"fnmatch.h" instead of (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
Update gnulib.
* gnulib: update to latest version.
2011-06-18 James Youngman
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
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
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
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 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
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
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
Fix compilation failure in bigram.c by including .
* locate/bigram.c: Include .
2011-06-12 James Youngman
Split exec-related code into a new file, exec.c
* find/exec.c: New file.
(initialise_wd_for_exec): Move out of pred.c
(record_exec_dir): Likewise.
(impl_pred_exec): Likewise.
(prep_child_for_exec): Likewise.
(launch): Likewise.
* find/pred.c: These functions are moved out of this file.
* find/defs.h: impl_pred_exec is no longer static in pred.c, so
add an external declaration for it. Move the declaration of
launch to here also.
* find/Makefile.am (libfindtools_a_SOURCES): Add exec.c.
* po/POTFILES.in: Add find/exec.c.
Eliminate .x-sc_prohibit_empty_lines_at_EOF and .x-sc_bindtextdomain
* cfg.mk: Move definition of which files we should not check to
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF, instead
of .x-sc_prohibit_empty_lines_at_EOF.
Move contents of .x-sc_bindtextdomain into
exclude_file_name_regexp--sc_bindtextdomain.
.x-sc_prohibit_empty_lines_at_EOF: Delete.
.x-sc_bindtextdomain: Delete.
Enable sc_makefile_at_at_check; fix problems it identifies.
* lib/Makefile.am: Use $(FINDLIBOBJS) instead of @FINDLIBOBJS@.
* find/Makefile.am (LDADD): Use $(FINDLIBS) instead of @FINDLIBS@.
* locate/Makefile.am (updatedb): Use $(VERSION) and
$(PACKAGE_NAME) instead of @VERSION@ and @PACKAGE_NAME@.
* cfg.mk: remove sc_makefile_at_at_check from local-checks-to-skip
2011-06-12 James Youngman
Improve src-sniff.py.
* build-aux/src-sniff.py: Mention that many of these checks would
be better as gnulib syntax checks (since there are more flexible
ways to disable these).
(RegexChecker.__init__): Don't pass a spurious second "self"
argument.
(RegexChecker.Check): Provide a more intelligible message when
complaining about use atof/scanf.
(RegexChecker.Check): Enable the check for HAVE_FCNTL_H.
(RegexChecker.Check): When checking for trailing whitespace, don't
complain about trailing newlines(!)
(RegexChecker.Check): Indicate what the out-of-date address is
when we find one.
2011-06-11 James Youngman
Enable the sc_trailing_blank check.
* cfg.mk: Enable sc_trailing_blank check.
(exclude_file_name_regexp--sc_trailing_blank): Exclude
xargs test inputs and outputs. Exclude the COPYING file. Exclude
a find test output. Exclude the .po files.
* xargs/xargs.c: Remove trailing blanks.
* xargs/testsuite/config/unix.exp: Likewise.
* find/testsuite/find.posix/bracket-depth.exp: Likewise.
* find/testsuite/find.posix/files-not-expressions1.exp: Likewise.
* find/testsuite/find.posix/files-not-expressions2.exp: Likewise.
* find/testsuite/find.posix/files-not-expressions3.exp: Likewise.
* find/testsuite/find.posix/nameslash.exp: Likewise.
* find/testsuite/find.posix/perm-vanilla.exp: Likewise.
* find/testsuite/find.posix/sizes.exp: Likewise.
* find/testsuite/find.posix/sv-bug-25359.exp: Likewise.
* find/testsuite/find.posix/typesize.exp: Likewise.
* find/testsuite/find.gnu/access.exp: Likewise.
* find/testsuite/find.gnu/deletedir.exp: Likewise.
* find/testsuite/find.gnu/deletefile.exp: Likewise.
* find/testsuite/find.gnu/exec-one-rtn-fail.exp: Likewise.
* find/testsuite/find.gnu/execdir-hier.exp: Likewise.
* find/testsuite/find.gnu/execdir-pwd.exp: Likewise.
* find/testsuite/find.gnu/execdir-root-only.exp: Likewise.
* find/testsuite/find.gnu/follow-arg-parent-symlink.exp: Likewise.
* find/testsuite/find.gnu/ilname.exp: Likewise.
* find/testsuite/find.gnu/lname.exp: Likewise.
* find/testsuite/find.gnu/perm-slash.exp: Likewise.
* find/testsuite/find.gnu/posix-h.exp: Likewise.
* find/testsuite/find.gnu/sv-bug-17782.exp: Likewise.
* find/testsuite/find.gnu/sv-bug-24169.exp: Likewise.
* find/testsuite/find.gnu/used-invarg.exp: Likewise.
* find/testsuite/find.gnu/used-missing.exp: Likewise.
* find/testsuite/excuses.txt: Likewise.
* locate/testsuite/config/unix.exp: Likewise.
* locate/testsuite/locate.gnu/bigendian.exp: Likewise.
* locate/testsuite/locate.gnu/bigprefix1.exp: Likewise.
* locate/testsuite/locate.gnu/exists2.exp: Likewise.
* locate/testsuite/locate.gnu/exists3.exp: Likewise.
* locate/testsuite/locate.gnu/littleendian.exp: Likewise.
* locate/testsuite/locate.gnu/notexists2.exp: Likewise.
* locate/testsuite/locate.gnu/notexists3.exp: Likewise.
* locate/testsuite/locate.gnu/sv-bug-14535.exp: Likewise.
* xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.exp: Likewise.
* xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp: Likewise.
* xargs/testsuite/xargs.posix/rc-125.exp: Likewise.
* xargs/testsuite/xargs.posix/sv-bug-18714.exp: Likewise.
* xargs/testsuite/xargs.posix/sv-bug-18714b.exp: Likewise.
* po/Makevars (EXTRA_LOCALE_CATEGORIES): Likewise.
* xargs/xargs.1 (SEE ALSO): Likewise.
Enable the sc_space_tab check
* cfg.mk: Enable the sc_space_tab check. Exclude various xargs
test inputs and outputs from the check. Remove some obsolete
comments.
* locate/Makefile.am (dblocation.texi): Remove space-tab sequences.
Enable the sc_texinfo_acronym check
* cfg.mk: Enable the sc_texinfo_acronym check. Exempt
doc/perm.text, which isn't ours anyway.
* doc/find.texi (Deleting Files): Say just POSIX rather than
@acronym{POSIX}, simply because this is the convention in GNU
documentation. The motivation is that it's hard to do so
consistently (because, for example, you can't use @acronym in a
node name).
Enable syntax check sc_obsolete_symbols.
(exclude_file_name_regexp--sc_obsolete_symbols): Don't check
build-aux/src-sniff.py.
Enable more syntax checks, eliminate useless C preprocessor parentheses
* find/defs.h: Eliminate useless parentheses in #if.
* find/find.c (safely_chdir): Likewise.
* find/pred.c: Likewise.
* lib/buildcmd.c: Likewise.
* lib/fdleak.c: Likewise
* xargs/xargs.c: Likewise.
* find/parser.c: Likewise.
(ISDIGIT): Simplify, and avoid undefining isascii.
* cfg.mk (local-checks-to-skip): Remove sc_prohibit_cvs_keyword,
since the test produces no hits anyway. Explain why we avoid
sc_two_space_separator_in_usage. Enable the sc_useless_cpp_parens
check.
Use stat-size macros in pred.c also.
* find/pred.c: Include stat-size. Eliminate definitions of
DEV_BSIZE, ST_BLKSIZE, ST_NBLOCKS, ST_NBLOCKSIZE macros which are
now in stat-size.h (yes, this is the second set of these macros
we've removed).
(file_sparseness): Use ST_NBLOCKS and ST_NBLOCKSIZE.
* cfg.mk (local-checks-to-skip): Don't skip
sc_prohibit_stat_st_blocks, because now we no loner access the
st_blocks field of struct stat, directly.
* lib/listfile.c (file_blocksize): Eliminate this function, it's
no longer needed.
* lib/listfile.h: Don't declare file_blocksize.
Adopt the new gnulib module stat-size.
* lib/listfile.c: Include "stat-size.h". Delete the DEV_BSIZE,
ST_BLKSIZE, ST_NBLOCKS, ST_NBLOCKSIZE macros which are now in
stat-size.h.
* gnulib: Update to latest.
* import-gnulib.config (modules): Add stat-size.
2011-06-05 James Youngman
Don't include sys/param.h where we don't need it.
* xargs/xargs.c: Don't include sys/param.h, we don't use it.
Don't include "stdio-safer.h" where it is not used.
* find/parser.c: Don't include stdio-safer.h, it's not used.
* lib/findutils-version.c: Likewise.
Don't include where it is not used.
* lib/dircallback.c: Don't include , it's not used.
* lib/extendbuf.c: Likewise.
* lib/qmark.c: Likewise.
* lib/savedirinfo.c: Likewise.
Fixes for empty-lines-at-EOF syntax check.
* .x-sc_bindtextdomain: Add newline at EOF.
* locate/Makefile.am: Remove empty trailing line at EOF.
* find/testsuite/sv-bug-32043.sh: Likewise.
* .x-sc_prohibit_empty_lines_at_EOF: Don't apply this check to
m4/order-good.bin m4/order-bad.bin
locate/testsuite/locate.gnu/locateddb.old.x86.xi
locate/testsuite/locate.gnu/locateddb.old.powerpc.xi.
Avoid some false positives for the sc_prohibit_doubled_word check.
* .x-sc_prohibit_doubled_word: don't perform this check on
xargs/testsuite/xargs.sysv/iquotes.xo or ChangeLog.
Don't check .po files for doubled English words (because they're
not in English).
* find/tree.c: Modify some text to avoid saying "AND and",
which one of the syntax checks doesn't like.
(opt_expr): Likewise.
(consider_arm_swap): Likewise.
* README: Likewise.
Include dirent.h uncontintionally (since gnulib provides it).
* find/pred.c: Include unconditionally; gnulib provides
it.
* lib/savedirinfo.c: Likewise.
Silence some false positives for sc_prohibit_always_true_header_tests.
* .x-sc_prohibit_always_true_header_tests: New file; exclude
build-aux/src-sniff.py from C inclusion tests, because it itself
contains examples of string the syntac checkers don't like
(because it's also a syntax checker).
ChangeLog: also exclude this because it frequently contains the
specifics of items added/removed, including examples of text which
are this syntax check looks for.
Prefer "cannot" to "can not".
* locate/locatedb.5: Change "can not" to "cannot".
* locate/updatedb.1: Likewise.
Update xargs error message.
* doc/find.texi (Error Messages From xargs): the message "can not
fit single argument within argument list size limit" is now
"argument list too long".
2011-06-04 James Youngman
Use the gnulib byteswap and uname modules.
* import-gnulib.config (modules): Add byteswap and uname.
* locate/word_io.c: Include byteswap.h. Don't #define bswap_32.
* find/util.c: sys/utsname.h no longer needs include guards since
gnulib always provides it.
* configure.ac: Don't check for sys/utsname.
gnulib already defines O_CLOEXEC.
* lib/fdleak.c: gnulib's fcntl.h always defines O_CLOEXEC, so
don't define it here.
Add internationalisation support to bigram but not regexprops.
* locate/bigram.c: Use libintl.h.
(main): Call bindtextdomain.
* .x-sc_bindtextdomain: Exempt lib/regexprops.c from needing to
use bindtextdomain. The output of regexprops is intended to be
determined entirely by the properties of the GNU regex
implementation.
Update gnulib.
* gnulib: update to current head.
Update the copyright year in C source files.
* find/defs.h: Update copyright year.
* find/find.c: Update copyright year.
* find/finddata.c: Update copyright year.
* find/ftsfind.c: Update copyright year.
* find/parser.c: Update copyright year.
* find/pred.c: Update copyright year.
* find/sharefile.c: Update copyright year.
* find/sharefile.h: Update copyright year.
* find/tree.c: Update copyright year.
* find/util.c: Update copyright year.
* lib/buildcmd.c: Update copyright year.
* lib/buildcmd.h: Update copyright year.
* lib/dircallback.c: Update copyright year.
* lib/dircallback.h: Update copyright year.
* lib/extendbuf.c: Update copyright year.
* lib/extendbuf.h: Update copyright year.
* lib/fdleak.c: Update copyright year.
* lib/fdleak.h: Update copyright year.
* lib/findutils-version.c: Update copyright year.
* lib/findutils-version.h: Update copyright year.
* lib/forcefindlib.c: Update copyright year.
* lib/listfile.c: Update copyright year.
* lib/listfile.h: Update copyright year.
* lib/nextelem.c: Update copyright year.
* lib/nextelem.h: Update copyright year.
* lib/printquoted.c: Update copyright year.
* lib/printquoted.h: Update copyright year.
* lib/qmark.c: Update copyright year.
* lib/regexprops.c: Update copyright year.
(copying): Update copyright year in the output file, too.
* lib/regextype.c: Update copyright year.
* lib/regextype.h: Update copyright year.
* lib/safe-atoi.c: Update copyright year.
* lib/safe-atoi.h: Update copyright year.
* lib/savedirinfo.c: Update copyright year.
* lib/savedirinfo.h: Update copyright year.
* lib/unused-result.h: Update copyright year.
* lib/waitpid.c: Update copyright year.
* locate/bigram.c: Update copyright year.
* locate/code.c: Update copyright year.
* locate/frcode.c: Update copyright year.
* locate/locate.c: Update copyright year.
* locate/locatedb.h: Update copyright year.
* locate/word_io.c: Update copyright year.
* xargs/xargs.c: Update copyright year.
More copyright year updates.
* build-aux/check-testfiles.sh: Update copyright year.
* m4/noreturn.m4: Update copyright year.
* po/POTFILES.in: Update copyright year.
Update the copyright year in test/documentation files, updatedb.
* build-aux/src-sniff.py: Update copyright year.
* doc/find-maint.texi: Update copyright year.
* doc/regexprops.texi: Update copyright year.
* find/testsuite/config/unix.exp: Update copyright year.
* locate/testsuite/config/unix.exp: Update copyright year.
* xargs/testsuite/config/unix.exp: Update copyright year.
* locate/updatedb.sh: Update copyright year.
2011-06-03 James Youngman
Warn about lack of birth time information only when it's true.
* find/pred.c (pred_newerXY): Issue a warning about the inability
to get the birth time of a file, only if we actually failed to
obtain the birth time of the file. This is a bugfix; there was a
misplaced semicolon after an if condition, so the immediately
succeeding block qould be executed unconditionally.
Compiler warning fixes in find/pred.c.
* find/pred.c (mode_to_filetype): return const char*.
(impl_pred_exec): Make target and prefix variables const.
(impl_pred_exec): Separate 'target' variable (which sometimes
points to a string literal) from a separate 'buf' variable (which,
if set, is always the value returned by base_name, which needs to
be freed.
(checked_fwrite): Store the result of fwrite in a size_t (i.e. the
same type the function returns).
Eliminate some compiler warnings in parser.c
* find/parser.c: Don't define the macros STRINGIFY and
PARSE_ACTION_NP.
(optionh_getfilecon): Make this function static
since it is not used elsewhere.
(optionl_getfilecon): Likewise.
(optionp_getfilecon): Likewise.
(found_parser): Likewise.
Avoid code redundancy in lib/buildcmd.c.
* lib/buildcmd.c (bc_get_arg_max): Recheck val only if we might
have changed it (i.e. when ARG_MAX is defined).
Eliminate some compiler warnings in find/parser.c.
* find/defs.h (struct parser_table): Make parser_name field const.
* find/parser.c: Remove redundant declaration of parse_print.
(insert_path_check): Change name of parameter pred_name to avoid
shadowing the function of that name.
(find_parser): Make search_name parameter const.
Fix a compiler warning in lib/buildcmd.c
* lib/buildcmd.c: special_terminating_arg should be const.
Fix compiler warnings in lib/fdleak.c
* lib/fdleak.c (visit_open_fds): Rename loop variable from i to j
to avoid shadowing.
(get_proc_max_fd): Fix definition (it's a void function, not a
traditional pre-ANSI function definition).
Fix several small compiler warnings.
* lib/dircallback.c: Include dircallback.h.
* lib/dircallback.h: Correct declaration of run_in_dir.
* lib/listfile.c (file_blocksize): Use the otherwise-unused parameter.
* find/defs.h: Remove redundant declaration of variable options.
Fix some compiler warnings in findutils-version.c.
* lib/findutils-version.c: include findutils-version.h. Make
version_string const. Don't #define N_, since we don't use it.
Don't display a separate gnulib version.
* lib/findutils-version.c (display_findutils_version): Don't
display gnulib_version because it's no longer defined (because
there is no gnulib version separate from the findutils version,
now that gnulib is a submodule).
* import-gnulib.config: remove gnulib_version and destdir, they
are not needed any more.
* lib/Makefile.am (EXTRA_DIST): Don't distribute gnulib-version.h
or gnulib-version.c.
(BUILT_SOURCES): delete, there are no longer any built sources.
* lib/gnulib-version.h: Remove.
* locate/code.c: Don't include gnulib-version.h
* xargs/xargs.c: Don't include gnulib-version.h
2011-06-01 James Youngman
Take the last matching entry in /etc/mtab, not the first.
* find/fstype.c (file_system_type_uncached): Instead of taking the
first match, take the last match. This deals better with mtab
implementations in which there can be duplicate entries, for
example Linux-based systems in which /etc/mtab is a symlink to
/proc/mounts) can have duplicate entries in the file system list.
This happens most frequently for /.
* NEWS: Mention this change.
2011-06-02 James Youngman
Remove unnecessary header checks and include guards.
* configure.ac (AC_CHECK_HEADERS): Remove checks for header files
that gnulib either assumes are always present, or provides
itself. These include errno.h fcntl.h inttypes.h limits.h
locale.h stddef.h stdint.h stdlib.h string.h sys/types.h
unistd.h.
* lib/buildcmd.c: Remove include guard for limits.h.
* find/fstype.c: Remove include guard for sys/types.h.
* lib/savedirinfo.c: Likewise.
* find/find.c: Remove include guard for locale.h.
* find/ftsfind.c: Likewise.
2011-06-01 James Youngman
Better error handling for the result of set_fstype_devno.
* find/fstype.c (file_system_type_uncached): If set_fstype_devno
fails for an entry (that is, the device number stays at -1) don't
consider it a match.
(get_mounted_filesystems): Don't call set_fstype_devno since we
don't need to check the device number.
(get_mounted_devices): If set_fstype_devno fails for a file
system, don't return it.
2011-05-31 James Youngman
import-gnulib.sh now stops if it sees the old directory layout.
* import-gnulib.sh (check_old_gnulib_dir_layout): Check the
./gnulib-git, ./gnulib/ and ./gl/ subdirectories to figure out if
we are using a current version of import-gnulib.sh with an old
directory layout. If so, print an explanation of the problem and
return false.
(main): stop if check_old_gnulib_dir_layout didn't like the
directory layout.
Minor fixes in import-gnulib.sh.
* import-gnulib.sh (fixmsg): Fix punctuation in the commands given
for installing the changelog driver.
(usage): Explain what the -a option does.
(run_gnulib_tool): delete broken symlinks in the output directory,
not the gnulib source.
(check_merge_driver): fix the path to the ChangeLog merge driver
source.
2011-05-30 James Youngman
Manage gnulib as a git submodule.
* .gitmodules: New file; manage gnulib as a submodule. For future
compatibility with the "bootstrap" script, keep the gnulib
submodule in the gnulib directory (instead of the gnulib-git
directory as before). This means we need to find a new directory
for the output of gnulib-tool; we will use "gl" for that.
* import-gnulib.sh (do_checkout): Replace with do_submodule.
(do_submodule): initialise and configure the gnulib module.
(main): call do_submodule instead of do_checkout. Don't call
move_cvsdir, it's obsolete.
(move_cvsdir): delete
(run_gnulib_tool): change gnulib to ${gldest} (and set that variable).
(hack_gnulib_tool_output): generate gl/Makefile.am, not
gnulib/Makefile.am.
(refresh_output_files): Rename gnulib to gl.
(update_version_file): Check the state of the submodule.
* Makefile.am (SUBDIRS): Rename gnulib to gl.
(ACLOCAL_AMFLAGS): Likewise.
* lib/Makefile.am (INCLUDES): Likewise.
(LDADD): Likewise.
(findutils-check-smells): Rename gnulib-git to gnulib.
* find/Makefile.am (INCLUDES): Change gnulib to gl.
(LDADD): Likewise.
* xargs/Makefile.am (INCLUDES): Change gnulib to gl.
(LDADD): Likewise.
* locate/Makefile.am (INCLUDES): Rename gnulib to gl.
(LDADD): Likewise.
* .gitignore: Rename gnulib to gl.
* configure.ac (AC_CONFIG_MACRO_DIR): Change to gl/m4.
(AC_CONFIG_FILES): use gl/Makefile and gl/lib/Makefile instead of
gnulib/Makefile and gnulib/lib/Makefile.
* find/fstype.c: Include gnulib include files as "foo.h", not
"../gnulib/lib/foo.h", because the relative path is not needed and
in any case has changed.
2011-05-29 James Youngman
Savannah bug #31424: Revert Interix-specific change.
Gnulib will use suacomp for solving this problem, so findutils
will not need a workaround here.
* lib/arg-max.h: Delete this file.
* lib/Makefile.am (libfind_a_SOURCES): Remove arg-max.h.
* lib/buildcmd.c: Don't include arg-max.h.
* xargs/xargs.c: Likewise.
2011-05-24 James Youngman
Fix Savannah bug #33384.
* locate/updatedb.sh: Don't reset $PATH, because the hard-coded
value we were using isn't guaranteed to contain all the utilities
(for example rm, chmod and so on) we would like to use.
* NEWS: Mention this bugfix.
2011-05-22 James Youngman
Don't assume that "echo" lives in /bin.
* xargs/xargs.c (main): Change default_cmd from "/bin/echo" (which
may not be present on some POSIX systems) to "echo" (which must
exist somewhere on $PATH on any POSIX system).
* doc/find.texi (Multiple Files): document this.
* NEWS: Describe this change.
* xargs/testsuite/xargs.sysv/empty_def-t.xe: Change /bin/echo to
echo.
* xargs/testsuite/xargs.gnu/n2-s26-x-0.exp: Change -s26 to -s21 to
keep the expected test result the same. Rename the test to
reflect the updated arguments.
* xargs/testsuite/xargs.gnu/n2-s26-x-0.xo: Rename to
n2-s21-x-0.xo.
* xargs/testsuite/xargs.gnu/n2-s26-0.exp: Rename to n2-s21-0.exp,
update -s argument.
* xargs/testsuite/xargs.posix/s30.exp: Rename to s25.exp, update -s.
* xargs/testsuite/xargs.posix/s30.xo: Rename to s25.xo.
* xargs/testsuite/xargs.gnu/s30-0.exp: Rename to s25-0.exp, update
-s argument.
* xargs/testsuite/xargs.gnu/s30-0.xo: Rename to s25-0.xo.
* xargs/testsuite/xargs.sysv/s30-t.exp: Rename to s25-t.exp,
update -s.
* xargs/testsuite/xargs.sysv/s30-t.xo: Rename to s25-t.xo.
* xargs/testsuite/xargs.sysv/s30-t.xe: Rename to s25-t.xe, change
/bin/echo to just echo.
* xargs/testsuite/xargs.posix/s47.exp: Rename to s42.exp, update -s.
* xargs/testsuite/xargs.posix/s47.xo: Rename to s42.xo.
* xargs/testsuite/xargs.gnu/n3-s36-0.exp: Rename to n3-s31-0.exp,
update -s.
* xargs/testsuite/xargs.gnu/n3-s36-0.xo: Rename to n3-s31-0.xo.
* xargs/testsuite/xargs.gnu/s20-0.exp: Rename to s15-0.exp, update
-s.
* xargs/testsuite/xargs.gnu/s20-0.xo: Rename to s15-0.xo.
* xargs/testsuite/xargs.posix/n2-s26.exp: Rename to n2-s21.exp,
update -s.
* xargs/testsuite/xargs.posix/n2-s26.xo: Rename to n2-s21.xo.
* xargs/testsuite/xargs.gnu/s19-0.exp: Rename to s14-0.exp, update
-s.
* xargs/testsuite/xargs.gnu/s19-0.xo: Rename to s14-0.xo.
* xargs/testsuite/xargs.gnu/s19_2-0.exp: Rename to s14_2-0.exp,
update -s.
* xargs/testsuite/xargs.gnu/s19_2-0.xo: Rename to s14_2-0.xo.
* xargs/testsuite/xargs.posix/n3-s36.exp: Rename to n3-s31.exp,
update -s.
* xargs/testsuite/xargs.posix/n3-s36.xo: Rename to n3-s31.xo.
* xargs/testsuite/xargs.posix/s19.exp: Rename to s14.exp, update
-s.
* xargs/testsuite/xargs.posix/s19.xo: Rename to s14.xo.
* xargs/testsuite/xargs.posix/s19_2.exp: Rename to s14_2.exp,
update -s.
* xargs/testsuite/xargs.posix/s19_2.xo: Rename to s14_2.xo.
* xargs/testsuite/xargs.posix/s20.exp: Rename to s15.exp,
update -s.
* xargs/testsuite/xargs.posix/s20.xo: Rename to s15.xo.
* xargs/testsuite/Makefile.am (EXTRA_DIST_XO): Update names.
(EXTRA_DIST_EXP): Likewise.
2011-05-17 James Youngman
Document ftsfind/oldfind and configure options.
* doc/find.texi (Configuration): New section documenting the
important configuration options that can be passed to configure,
including --without-fts.
* find/find.1 (BINARIES): New section explaining why two binaries
are installed.
* find/oldfind.1: New manual page explaining how 'oldfind' is
different to 'find'.
* find/ftsfind.1: New manual page explaining how 'ftsfind' is
different to 'find'.
* find/Makefile.am (man_MANS): As well as find.1, install one of
ftsfind.1 or oldfind.1, depending on whether --without-fts was
specified to configure.
* NEWS: Mention this change.
2011-05-15 James Youngman
Add lib/fdleak.c to translatable files.
* po/POTFILES.in: Add lib/fdleak.c.
Fix Savannah bug #18227 (-ls doesn't print device major/minor).
* lib/listfile.c (list_file): check HAVE_STRUCT_STAT_ST_RDEV
instead of HAVE_ST_RDEV, fixing this bug. HAVE_ST_RDEV was
defined by the obsolete Autoconf macro AC_STRUCT_ST_RDEV, but
findutils hasn't actually called AC_STRUCT_ST_RDEV since Apr 5
2000.
* NEWS: Mention this bugfix.
#29698: Correct and clarify documentation of xargs -d option
* xargs/xargs.1: Update documentation for -d option to more
clearly distinguish the treatment of backslashes in the input and
the treatment of backslashes in the argument to -d.
* NEWS: Mention this bugfix.
Implement xargs --process-slot-var.
* xargs/xargs.c (set_slot_var): New function; sets an environment
variable to the index of the entry in pids[] that represents the
relevant child process. This can be used in rudimentary load
distribution systems.
(slot_var_name): the name of the variable to use (selected by
--process-slot-var).
(enum LongOptionIdentifier): Unique identifiers for long options
with no short option equivalent (--process-slot-var is the first).
(longopts): Add --process-slot-var.
(add_proc): return the index within pids[] that we selected.
(main): Pass &option_index to getopt_long (option_index is a new
variable) in order to identify which long option was passed.
Handle --process-slot-var.
(prep_child_for_exec): Call set_slot_var.
(usage): Mention --process-slot-var.
* doc/find.texi (xargs options): Document --process-slot-var.
* xargs/xargs.1: Likewise.
* NEWS: Mention this change and that it was Savannah bug #29512.
Describe xargs options in alphabetical order.
* xargs/xargs.1: Re-order the options to place them in
alphabetical order. Put --help and --version at the end.
* xargs/xargs.c (usage): Describe the options in alphabeitcal
order.
* NEWS: Mention this change.
Fix bug #14386: updatedb relies on mktemp, which is not portable.
* locate/updatedb.sh (make_tempdir): new function, works around
the possible absence of mktemp. We now create the file list and
the bigrams file in a temporary directory. Also add some quoting
for a few shell variables. Update the copyright years.
* locate/testsuite/locate.gnu/oldformat.exp: Add a test case which
uses the old database format, in order to exercise our mktemp
replacement.
* locate/testsuite/Makefile.am (EXTRA_DIST_EXP): Ship this new
file.
* locate/testsuite/locate.gnu/oldformat.xo: The expected output
for the new test.
* locate/testsuite/Makefile.am (EXTRA_DIST_XO): Ship this new
file.
* NEWS: Mention this bugfix.
2011-05-14 James Youngman
Fix bug #32043 (fnmatch should treat unquoted [ literally).
* import-gnulib.config (gnulib_version): Update gnulib to the
version which includes the fnmatch fix (a backport of glibc bug
#12378). This fixes our bug too.
* find/testsuite/sv-bug-32043.sh: New (non-DejaGnu) test script.
Tests Savannah bug #32043 (POSIX requires that an unquoted [
should be matched literally).
* find/testsuite/Makefile.am (TESTS): Add sv-bug-32043.sh.
(EXTRA_DIST): Distribute sv-bug-32043.sh.
* NEWS: Mention this bugfix.
2011-05-11 James Youngman
Move on from 4.5.10, to 4.5.11-git.
* NEWS, configure.ac: update version number.
Prepare for release of findutils-4.5.10.
* NEWS: Update version number to 4.5.10 to prepare for that
release. Add a release date (2011-05-11).
* configure.ac: Also update version number.
* po/*.po, po/findutils.pot: make dist changes these.
Savannah bug #30608 (Automagic dependency on selinux) is fixed.
* NEWS: Mention that Savannah bug #30608 (Automagic dependency on
selinux) is fixed. The gnulib update on 2011-04-02 will have
included gnulib change 83e52ee5a420f8b552745a72e5869001b0f6da60
which fixes this problem. The configure script now provides a
--without-selinux option.
Update Estonian translation.
* po/et.po: Update from the Translation Project.
2010-05-24 Kamil Dudka
Fix Savannah bug #29949, -execdir does not change working directory.
* find/pred.c (record_exec_dir): Do not throw the execdir when not
working in the cumulative mode.
* find/testsuite/find.gnu/execdir-multiple.exp: Add a test-case for
the bug #29949.
* NEWS: Mention this bugfix.
2011-04-02 James Youngman
Change "can not" to "cannot".
* lib/buildcmd.c (bc_push_arg): "can not" -> "cannot" in message.
* find/tree.c: Likewise in a comment.
Update Danish translation.
* po/da.po: Likewise.
Update Slovenian, German, Estonian, French, Japanese translations.
* po/sl.po: Updated from the Translation Project.
* po/de.po: Likewise.
* po/et.po: Likewise.
* po/fr.po: Likewise.
* po/ja.po: Likewise.
Update to the current version of gnulib.
* import-gnulib.config (gnulib_version): Update to the current
version of gnulib.
* configure.ac: Update to gettext 0.18.1.
* po/Rules-quot: Update this file from gettext.
Use parse-datetime instead of the obsolete module getdate.
* import-gnulib.config (modules): Import the gnulib module
parse-datetime instead of the obsolete module getdate.
* find/parser.c: Include parse-datetime.h instead of getdate.h.
* doc/find.texi: Include parse-datetime.texi instead of
getdate.texi.
* doc/Makefile.am (find_TEXINFOS): Use parse-datetime.texi instead
of getdate.texi.
2010-10-23 James Youngman
Savannah bug #31424: Work around Interix bug in _SC_ARG_MAX,
in which execve will fail with ENOMEM if we use a command line
somewhere between ARG_MAX and _SC_ARG_MAX.
* lib/arg-max.h: New file: undefine _SC_ARG_MAX if we cannot rely
on the value that sysconf produces.
* lib/Makefile.am (libfind_a_SOURCES): Add arg-max.h.
* lib/buildcmd.c: #include arg-max.h.
* xargs/xargs.c: Likewise.
2010-10-21 James Youngman
Fix Savannah bug #31359: FAIL: test-strstr on alpha.
* import-gnulib.config (gnulib_version): Update the version of
gnulib.
* NEWS: Mention this bugfix.
2010-10-11 James Youngman
* doc/find.texi (Further Reading on Security): Give some
references to further reading on security.
* NEWS: Mention this change.
2010-08-16 James Youngman
Fix Savannah bug #30777.
* find/parser.c (insert_exec_ok): Fail if {} appears in an
argument between -exec ... \+ but it's not the whole argument
(that is, reject "FOO{}"). Previously the FOO prefix was accepted
but ignored, which is probably POSIX-incompliant and certainly
surprising.
* find/testsuite/find.posix/sv-bug-30777.exp: New test case for
Savannah bug #30777.
* find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add
find.posix/sv-bug-30777.exp.
2010-08-15 James Youngman
Fix Savannah bug #30180, wrong error message for -size b300
* find/parser.c (parse_size): Don't print a suffix in the error
message if no suffix was specified.
* NEWS: Mention this change.
* po/da.po: Update Danish translation.
2010-05-11 John Gilmore
Fix bug arising when we receive SIGUSR2.
* xargs/xargs.c (xargs_do_exec): Don't assume that proc_max won't
decrease while we are waiting for a process to exit. This happens
if we receive SIGUSR2.
2010-05-09 James Youngman
* xargs/xargs.1: Refer to signal(7) rather than signal(2).
2010-05-08 John Gilmore
Control xargs parallelism with SIGUSR1/SIGUSR2.
* xargs/xargs.c: Increase parallelism in mid-run with SIGUSR1;
decrease it with SIGUSR2.
* doc/find.texi, xargs/xargs.1, NEWS: Document SIGUSR1/2.
2010-05-09 Sergei Golovan (tiny change)
Fix Savannah bug #29828, test suite deadlock on FreeBSD.
* find/testsuite/find.gnu/sv-bug-24169.exp: Read find output until
eof before calling wait, in order to avoid a deadlock on FreeBSD.
2010-05-08 Andreas Metzler
Fix a typo. Use "\-" in nroff, rather than a naked "-".
* find/parser.c (check_option_combinations): Fix typo
"atomatically".
* find/find.1 (-name): protect nroff hyphens with backslashes.
* locate/locatedb.5: Likewise.
2010-05-07 James Youngman
* AUTHORS: Add Kamil Dudka.
2010-05-07 Kamil Dudka
* lib/dircallback.c (run_in_dir): Make sure that if the callback
doesn't get run, the return value is nonzero. Make sure that if
the directory save/restore fails, we don't overwrite errno with a
random value (and hence report some unrelated and nonexistent
error, instead of the real problem). Restore the previous current
directory.
2010-05-04 James Youngman
Bugfix: make sure make distdir works in VPATH directly after configure
* locate/Makefile.am (EXTRA_DIST): Add dblocation.texi.
(dblocation.texi): Always rebuild, but don't replace the existing
version if the content would not change.
2010-04-30 James Youngman
Update Finnish and Italian translations.
* po/fi.po: Updated Finnish translation.
* po/it.po: Updated Italian translation.
* NEWS: Mention these updates.
Move on from 4.5.9.
* NEWS: Bump the version number from 4.5.9 to 4.5.10-git.
* configure.ac: Likewise.
2010-04-29 James Youngman
Prepare for the release of findutils version 4.5.9.
* NEWS: Change the version number to 4.5.9.
* configure.ac: Likewise.
Preserve locate/dblocation.texi during 'make clean'.
* locate/Makefile.am (DISTCLEANFILES): Clean dblocation.texi for
'make distclean', but not 'make clean'.
2010-04-18 James Youngman
Remove redundant declarations.
* locate/frcode.c: Don't declare xmalloc, include xalloc.h instead.
* locate/code.c: Don't declare program_name, we already included
progname.h.
Remove support for compilers lacking prototypes.
* find/defs.h: Don't define or use the PARAMS macro.
* xargs/xargs.c: Likewise.
* locate/locatedb.h: Likewise.
* locate/frcode.c: Likewise.
* lib/buildcmd.c: Likewise.
* find/tree.c: Likewise.
* find/pred.c: Likewise.
* find/parser.c: Likewise.
* find/fstype.c: Likewise.
* find/find.c: Likewise.
2010-04-21 James Youngman
Update Chinese (simplified) translation.
* po/zh_CN.po: Updated from the Translation Project.
* NEWS: Mention this change.
2010-04-18 James Youngman
Fix Savannah bug #29593: Make import-gnulib.sh work under a POSIX shell.
* import-gnulib.sh: Remove bash-specific '[[...]]' tests; instead
use '[...]'.
* NEWS: Mention this bugfix.
2010-04-17 James Youngman
Remove obsolete module strpbrk.
* import-gnulib.config (modules): Remove strpbrk.
* locate/Makefile.am (locate_TEXINFOS): Add dblocation.texi.
2010-04-13 James Youngman
Correct some test file names.
* find/testsuite/Makefile.am (EXTRA_DIST_EXP):
find.gnu/sv-bug-25359-execdir.exp should in fact be
find.gnu/sv-bug-27563-execdir.exp and
find.posix/sv-bug-25359-exec.exp should be
find.posix/sv-bug-27563-exec.exp.
* .x-sc_prohibit_test_minus_ao: Condense the file (since the
entries are regular expressions anyway).
* .x-sc_prohibit_empty_lines_at_EOF: New file; exceptions for the
sc_prohibit_empty_lines_at_EOF syntax check.
2010-04-11 James Youngman
Make sure we don't open a file on a standard fd (that is, 0/1/2).
* lib/fdleak.c: Include fcntl--.h to turn calls to open into calls
to open_safer.
* find/find.c: Likewise.
After-the-fact change to NEWS for 4.5.8: fixed bug 27974.
* NEWS: Mention that release 4.5.8 also fixed bug #27974 (Use
gnulib's xreadlinkat support), though the NEWS file in that
release omitted to say so.
Fix Savannah bug #29511: fails to build on kfreebsd-*
* lib/fdleak.c (get_max_fd): Don't use RLIM_SAVED_MAX or
RLIM_SAVED_CUR. Not only are they non-portable, they aren't
useful.
* NEWS: Mention this bugfix.
Remove some unused or dead code.
* find/util.c (hook_fstatat): This has been disabled and unused
for a long time, delete it.
* find/find.c (process_dir): Remove some unused debug code.
* find/tree.c (predlist_insert): Remove some dead code.
* lib/fdleak.c (complain_about_leaky_fds): Remove some unused
debug code.
Add a test case for Savannah bug 27563 (-L breaks -execdir).
* find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add
find.gnu/sv-bug-27563-execdir.exp and
find.posix/sv-bug-27563-exec.exp.
(EXTRA_DIST_XO): Add find.gnu/sv-bug-27563-execdir.xo and
find.posix/sv-bug-27563-exec.xo.
* find/testsuite/find.gnu/sv-bug-27563-execdir.exp: New test.
* find/testsuite/find.posix/sv-bug-27563-exec.exp: New test.
* find/testsuite/find.gnu/sv-bug-27563-execdir.xo: Expected output.
* find/testsuite/find.posix/sv-bug-27563-exec.xo: Expected output.
Fix Savannah bug #27563, -L breaks -execdir.
* find/pred.c (initialise_wd_for_exec): New function, factoring
out part of the body of record_exec_dir.
(record_exec_dir): If state.rel_pathname contains a /, extract the
directory part and initialise execp->wd_for_exec to point at that
directory.
(impl_pred_exec): Rename new_impl_pred_exec to impl_pred_exec.
Drop the prefix and pfxlen parameters. Compute the base name of
the target and pass that to the bc_push_arg function instead of
state.rel_pathname. Deal with state.rel_pathname being an
absolute path (e.g. find / -execdir...). Introduce a new
variable, result, allowing us to free the buffer used for the base
name in the return path.
(pred_exec): Don't pass the prefix and the prefix length any more.
(pred_execdir): Likewise.
(pred_ok): Likewise.
(pred_okdir): Likewise.
2010-04-10 James Youngman
Fix Savannah bug #19593, -execdir .... {} + has suboptimal performance
* find/ftsfind.c (consider_visiting): Don't call
complete_pending_execdirs for every file we visit.
(find): Instead, call complete_pending_execdirs every time we
see a file which isn't at the same nesting level as the previous
file we saw. This is an improvement but not optimal (since
descending into a subdirectory will cause us to issue an exec
before we've finished with the current directory).
* NEWS: Mention this change.
Exec predicates now store which directory they want to run in.
* lib/dircallback.c (run_in_dirfd): New name for old run_in_dir
function.
(run_in_dir): Like the old function of the same name, but now
takes an argument const struct saved_cwd *.
* lib/dircallback.h: Update declarations of run_in_dirfd and
run_in_dir.
* find/util.c: Include dircallback.h, xalloc.h, save-cwd.h.
(do_complete_pending_execdirs): Remove dir_fd parameter, since the
per-predicate data structures now indicate what directory they
need to be run in. Instead of calling bc_do_exec directly, use a
callback 'exec_cb' that uses run_in_dir (which now takes a
saved_cwd* parameter instead of a file descriptor).
(do_exec): Called by do_complete_pending_execdirs, and simply uses
run_in_dir to call exec_cb, restoring the working directory
afterward.
(record_initial_cwd): New function, initialises the global
variable initial_wd.
(cleanup_initial_cwd): New function, cleans up the global variable
initial_wd.
(cleanup): Call cleanup_initial_cwd.
(get_start_dirfd): Remove.
(is_exec_in_local_dir): New function; true for predicates -execdir
and -okdir.
* find/pred.c: Include cloexec.h and save-cwd.h.
(record_exec_dir): New function, sets the value of
execp->wd_for_exec if needed.
(new_impl_pred_exec): Remove the obsolete dir_fd parameter. Call
record_exec_dir.
(pred_exec): Don't pass the dir_fd parameter.
(pred_execdir): Likewise.
(pred_ok): Likewise.
(pred_okdir): Likewise.
(can_access): Call run_in_dirfd rather than run_in_dir (the
function was renamed).
(prep_child_for_exec): Remove dir_fd parameter; don't fchdir to
that. Call restore_cwd instead (passing a saved_cwd* parameter
which replaced dir_fd).
(launch): Remove references to execp->use_current_dir.
(launch): Change references to execp->dir_fd to execp->wd_for_exec.
* find/parser.c: Correct indentiation of declaration of
insert_exec_ok and remove the obsolete dir_fd parameter.
(parse_exec): Don't pass the dir_fd parameter to insert_exec_ok.
(parse_execdir): Likewise.
(parse_ok): Likewise.
(parse_okdir): Likewise.
(insert_exec_ok): Remove obsolete dir_fd paramter. Initialise
execp->wd_for_exec, either to NULL (for -*dir) or to the
initial_wd.
* find/ftsfind.c: Remove get_current_dirfd. Remove
complete_execdirs_cb.
(consider_visiting): Call complete_pending_execdirs directly.
(main): Call record_initial_cwd to record the initial working
directory, early on. Don't initialise starting_dir or
starting_desc, they have been removed.
* find/finddata.c: Include save-cwd.h. Remove starting_dir and
starting_desc. Add new global variable initial_wd. It is a struct
saved_wd* and represents find's initial working directory.
* find/find.c: Include save-cwd.h.
(main): Call record_initial_cwd in order to initialise the
global variable initial_wd Don't set starting_desc and
starting_dir, since those variables have been removed.
(safely_chdir): Don't pass an fd to complete_pending_execdirs.
(chdir_back): Remove the safety check (since we are using fchdir
and in any case no longer have all the data that the existing
wd_sanity_check function wants).
(do_process_top_dir): Don't pass an fd to
complete_pending_execdirs.
(process_dir): Likewise.
* find/defs.h (struct exec_val): Remove use_current_dir and
dir_fd. Replace with wd_for_exec, which is a struct saved_wd*.
(get_start_dirfd): Remove prototype.
(get_current_dirfd): Remove prototype.
(complete_pending_execdirs): No longer takes dir_fd parameter.
(record_initial_cwd): Add prototype.
(is_exec_in_local_dir): Add prototype.
(options): Declare.
(initial_wd): Add declaration. It is a struct saved_wd* and
represents find's initial working directory.
(starting_dir): Remove declaration of global variable.
(starting_desc): Remove declaration of global variable.
* import-gnulib.config (modules): Import module save-cwd.
2010-04-10 James Youngman
Add a test which checks $CWD for find -execdir {} +/;
* find/testsuite/find.gnu/execdir-multiple.exp: New test; verifies
that for -execdir +, all the execs occur with the correct working
directory.
* find/testsuite/find.gnu/execdir-multiple.xo: Expected output for
this test.
* find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add the new test.
(EXTRA_DIST_XO): Add the expected output file.
* find/testsuite/config/unix.exp (mkdir): Create proc "mkdir"
which creates a directory.
* find/testsuite/find.gnu/execdir-pwd1.exp: New test.
* find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add
execdir-pwd1.exp.
2010-04-11 James Youngman
Fix syntax checks problems for check sc_unmarked_diagnostics.
* find/tree.c (get_pred_cost): Clarify an error message and mark
it for translation.
Fix false positives for syntax check sc_prohibit_test_minus_ao.
* .x-sc_prohibit_test_minus_ao: Add all the DejaGnu scripts to the
list of exceptions to the 'test C1 -a C2' syntax check, since they
are not actually shell scripts.
Remove trailing blank lines.
* .x-sc_prohibit_empty_lines_at_EOF: Add list of exceptions to the
no-blank-lines-at-EOF syntax check.
* doc/regexprops.texi: Remove empty lines at the end of the file.
* find/finddata.c: Likewise.
* find/fstype.c: Likewise.
* find/testsuite/excuses.txt: Likewise.
* find/testsuite/find.gnu/access.exp: Likewise.
* find/testsuite/find.gnu/exec-one-rtn-fail.exp: Likewise.
* find/testsuite/find.gnu/posix-perminvalid.exp: Likewise.
* find/testsuite/find.gnu/samefile-missing.exp: Likewise.
* find/testsuite/find.gnu/samefile-p-brokenlink.exp: Likewise.
* find/testsuite/find.gnu/sv-bug-17490.exp: Likewise.
* find/testsuite/find.gnu/sv-bug-18222.exp: Likewise.
* find/testsuite/find.posix/bracket-depth.exp: Likewise.
* find/testsuite/find.posix/empty-parens.exp: Likewise.
* find/testsuite/find.posix/files-not-expressions1.exp: Likewise.
* find/testsuite/find.posix/files-not-expressions2.exp: Likewise.
* find/testsuite/find.posix/files-not-expressions3.exp: Likewise.
* find/testsuite/find.posix/group-empty.exp: Likewise.
* find/testsuite/find.posix/user-empty.exp: Likewise.
* find/testsuite/find.posix/user-missing.exp: Likewise.
* lib/extendbuf.c: Likewise.
* lib/fdleak.c: Likewise.
* lib/fdleak.h: Likewise.
* lib/findutils-version.h: Likewise.
* lib/gnulib-version.h: Likewise.
* lib/printquoted.c: Likewise.
* lib/regextype.c: Likewise.
* lib/safe-atoi.c: Likewise.
* locate/testsuite/config/unix.exp: Likewise.
* locate/testsuite/locate.gnu/exists1.exp: Likewise.
* locate/testsuite/locate.gnu/exists2.exp: Likewise.
* locate/testsuite/locate.gnu/exists3.exp: Likewise.
* locate/testsuite/locate.gnu/ignore_case1.exp: Likewise.
* locate/testsuite/locate.gnu/ignore_case2.exp: Likewise.
* locate/testsuite/locate.gnu/ignore_case3.exp: Likewise.
* locate/testsuite/locate.gnu/notexists1.exp: Likewise.
* locate/testsuite/locate.gnu/notexists2.exp: Likewise.
* locate/testsuite/locate.gnu/notexists3.exp: Likewise.
* locate/testsuite/locate.gnu/sv-bug-14535.exp: Likewise.
* m4/Makefile.am: Likewise.
* m4/nullsort.m4: Likewise.
* xargs/testsuite/xargs.posix/arg_max_32bit_linux_bug.exp: Likewise.
* xargs/testsuite/xargs.posix/arg_max_64bit_linux_bug.exp: Likewise.
After-the-fact change to NEWS for 4.5.8: fixed bug 27221.
* NEWS: Mention that release 4.5.8 also fixed bug #27221
(symlink_loop check broken by FTS_CWDFD), though the NEWS file in
that release omitted to say so.
After-the-fact change to NEWS for 4.5.8: fixed bug 27974.
* NEWS: Mention that release 4.5.8 also fixed bug #27974 (Use
gnulib's xreadlinkat support), though the NEWS file in that
release omitted to say so.
2010-04-10 James Youngman
* import-gnulib.config (gnulib_version): Update to current gnulib
head.
2010-04-09 James Youngman
* find/parser.c (parse_samefile): Use open_cloexec to open the
reference file, so that we don't leak a file descriptor.
2010-04-09 Roberto Reale (tiny change)
* find/parser.c (parse_samefile): Since collect_arg_stat_info
increments *arg_ptr, argv[*arg_ptr] is often NULL. Use filename
instead, as that's the variable in which we store the name of our
file. The purpose of the fd was only to attempt to keep the inode
number stable on systems that don't really have inode numbers, so
this change should have no functional effect on POSIX systems.
2010-04-08 James Youngman
Adopt the use of the gnulib module readlink.
* import-gnulib.config (modules): Add readlink.
Adopt the use of the gnulib module isblank.
(modules): Add isblank.
Adopt the use of the gnulib module faccessat.
* import-gnulib.config (modules): Add faccessat.
* find/pred.c (struct access_check_args): Delete.
(access_callback): Delete.
(can_access): Delete.
(pred_executable): Use faccessat.
(pred_readable): Likewise.
(pred_writable): Likewise.
Adopt (explicitly) the use of the gnulib module dirent-safer.
* import-gnulib.config (modules): Add dirent-safer; we were
previously transitively importing this module, but we are now
importing it directly.
* lib/savedirinfo.c: Include opendir-safer.h.
(xsavedir): Call opendir_safer instead of opendir.
Adopt the use of the gnulib module d-type.
* import-gnulib.config (modules): Import the d-type module.
* configure.ac: Remove old struct dirent.d_type detection logic
(since we now use the gnulib macro from the d-type module for
this).
* find/parser.c (parse_version): Use HAVE_STRUCT_DIRENT_D_TYPE
(since the d-ino module still defines it) but remove references to
the macro USE_STRUCT_DIRENT_D_TYPE, since it's not defined and not
needed.
* lib/savedirinfo.c: Use HAVE_STRUCT_DIRENT_D_TYPE but ignore
USE_STRUCT_DIRENT_D_TYPE.
(xsavedir): Unconditionally initialise
internal[result->size].type_info so that we don't have untested
code (HAVE_STRUCT_DIRENT_D_TYPE is defined on my system).
Move on from 4.5.8.
* configure.ac: Bump the version number to 4.5.9-git.
* NEWS: Likewise.
2010-04-07 James Youngman
Prepare to release findutils-4.5.8.
* configure.ac: Update version number in AC_INIT.
* NEWS: Update version number and release date.
Depend on gnulib modules appropriate to features we already use.
* import-gnulib.config (modules): Add c-casestr, errno, fdopendir,
fflush, getdelim, gettimeofday, locale, modf, perror, snprintf,
stat, stdarg, stddef, stdio, stdlib, string, strpbrk, sys_time,
sys_wait.
Also add comments about other modules we may also want to use
which would require other code changes (for example dirent-safer).
* find/Makefile.am (LDADD): Add $(LIB_EACCESS) $(LIB_SELINUX)
$(MODF_LIBM) which are needed by gnulib modules we now depend on.
More stat/xstat cleanup.
* find/parser.c (estimate_fstype_success_rate): Change the name of
the variable "dir" to "the_root_dir" to emphasise that it doesn't
matter that we're calling stat rather than options.xstat.
* find/ftsfind.c (symlink_loop): Call options.xstat instead of
stat/lstat, because options.xstat takes account of
state.cwd_dir_fd.
Fix Savannah bug 29460, -printf %Y fails in $CWD-dependent way
* find/pred.c (do_fprintf): Use optionl_stat and optionp_stat
instead of stat and lstat, because the first two functions are
aware of state.cwd_dir_fd.
* find/testsuite/find.gnu/printf-nonlocal-symlink.exp: A new test
case for this bug.
* find/testsuite/find.gnu/printf-nonlocal-symlink.xo: Expected
output for this test.
* find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add the new test
case.
(EXTRA_DIST_XO): Add the expected-output file.
* NEWS: Mention this fix.
* lib/strspn.c: Delete this unused file.
Update the maintenance manual.
* doc/find-maint.texi: Update the maintenance manual to take into
account the fact that we uniformly use git rather than CVS. Point
out the new version tag format. Mention "make coverage".
README-CVS is now called README-hacking. Update the URL for the
Translation Project.
Eliminate some obsolete code.
* locate/locate.c (search_one_database): Remove obsolete code
(alternative size for procdata.pathsize).
* lib/buildcmd.c (get_line_max): Remove obsolete function.
Remove obsolete code from savedirinfo.c.
* lib/savedirinfo.c (new_savedirinfo): Rename new_savedirinfo to
savedirinfo.
(old_savedirinfo): Remove obsolete function body.
Support extendbuf buffers larger than SIZE_MAX/2.
* lib/extendbuf.c (xextendbuf): New function; extends the buffer,
but calls xalloc_die on failure. On the the other hand, extendbuf
returns NULL on failure.
(decide_size): If wanted>SIZE_MAX/2, return wanted. This means
that for very large buffers, performance on repeated extension
degrades from linear to quadratic (instead of just failing at that
point, as before).
* lib/savedirinfo.c (xsavedir): Use xextendbuf rather than
extendbuf, now that there is a difference in semantics.
* find/fstype.c (get_mounted_filesystems): If extendbuf returns
NULL, fail (by returning NULL ourselves).
(get_mounted_devices): Likewise.
* po/vi.po: Update Vietnamese translation.
* NEWS: Mention this change.
2010-04-05 James Youngman
Use set_program_name in regexprops.
* lib/regexprops.c: Include "progname.h". Update function
defintions to have a newline before the function name (to comply
with the GNU coding standard). Use set_program_name.
2010-04-06 James Youngman
Fix several merge errors.
* find/defs.h (struct state): Correct type of
already_issued_stat_error_msg from boolean to bool.
* find/util.c (report_file_err): Likewise with parameter
is_target_file.
* find/pred.c: Include "areadlink.h".
(do_fprintf): nonfatal_file_error should be
nonfatal_target_file_error.
(match_lname): Likewise.
Update some translations.
* po/cs.po: Update Czech translation.
* po/nl.po: Update Dutch translation.
* po/pl.po: Update Polish translation.
* po/ru.po: Update Russian translation.
* import-gnulib.config (modules): Use the getopt-gnu module from
gnulib rather than the (obsolete) getopt module.
Remove form-feeds.
* find/find.c: Remove form-feed characters.
* find/ftsfind.c: Likewise.
* find/parser.c: Likewise.
* find/pred.c: Likewise.
* find/tree.c: Likewise.
* find/util.c: Likewise.
* locate/locate.c: Likewise.
* xargs/xargs.c: Likewise.
2010-04-05 James Youngman
Use bool instead of the previous typedef boolean.
* find/defs.h: Don't create typedef "boolean"; use the standard
type bool. Update other declarations accordingly.
* find/find.c: Update declarations and function definitions to use
bool.
* find/ftsfind.c: Likewise.
* find/parser.c: Likewise.
* find/pred.c: Likewise.
* find/tree.c: Likewise.
* find/util.c: Likewise.
* locate/locate.c: Likewise.
* xargs/xargs.c: Likewise.
Make use of gnulib's areadlinkat.
* lib/listfile.c: #include "areadlink.h" but not "dircallback.h",
since we no longer need to use get_link_name_at.
Don't include xalloc.h, since we don't need it.
(get_link_name_at): Delete.
(get_link_name_cb): Delete.
(get_link_name): Delete.
* lib/listfile.h: Remove declaration of get_link_name_at.
* find/pred.c (match_lname): Use areadlinkat instead of
get_link_name_at.
Use bool instead of the previous typedef boolean.
* find/defs.h: Don't create typedef "boolean"; use the standard
type bool. Update other declarations accordingly.
* find/find.c: Update declarations and function definitions to use
bool.
* find/ftsfind.c: Likewise.
* find/parser.c: Likewise.
* find/pred.c: Likewise.
* find/tree.c: Likewise.
* find/util.c: Likewise.
* locate/locate.c: Likewise.
* xargs/xargs.c: Likewise.
Don't issue an error message twice for the same target file.
* find/defs.h (struct state): New member,
already_issued_stat_error_msg, used to de-duplicate error
messages. If it is true, we already issued an error message for
the current target file.
Declare fatal_target_file_error, fatal_nontarget_file_error,
nonfatal_target_file_error, nonfatal_nontarget_file_error.
Between them, they replace fatal_file_error and
nonfatal_file_error. The *target_file_error versions are
de-duplicated and the nontarget_file_error_versions are not.
* find/util.c (nonfatal_nontarget_file_error): Implement.
(fatal_nontarget_file_error): Implement.
(nonfatal_target_file_error): Implement.
(fatal_target_file_error): Implement.
(fatal_file_error): Remove.
(nonfatal_file_error): Remove.
(error_severity): Define error_severity (moved from ftsfind.c)
(get_statinfo): Call nonfatal_target_file_error in order to avoid
a duplicate message. ALso call error_severity after a different
call to error to preserve the constraint that we exit with a
nonzero status if we issue a diagnostic.
(cleanup): Call nonfatal_nontarget_file_error instead of
nonfatal_file_error.
* find/tree.c (build_expression_tree): Initialise
state.already_issued_stat_error_msg.
* find/find.c (main): Initialise state.already_issued_stat_error_msg.
(wd_sanity_check): Call fatal_target_file_error instead of
fatal_file_error.
(chdir_back): Call fatal_nontarget_file_error instead of
fatal_file_error.
(process_path): Initialise state.already_issued_stat_error_msg.
* find/ftsfind.c (consider_visiting): Call
nonfatal_target_file_error instead of calling error directly.
(find): Call error_severity to ensure exit status is nonzero after
a call to error.
(main): Initialise state.already_issued_stat_error_msg.
(error_severity): Move to util.c.
* find/parser.c (collect_arg_stat_info): Call
fatal_target_file_error instead of fatal_file_error.
(parse_newerXY): Likewise.
(parse_samefile): Likewise.
(parse_samefile): Likewise.
(open_output_file): Call fatal_nontarget_file_error instead of
fatal_file_error.
* find/pred.c (checked_fprintf): Likewise.
(checked_print_quoted): Likewise.
(checked_fwrite): Likewise.
(checked_fflush): Likewise.
* find/sharefile.c (entry_free): Likewise.
2010-04-04 Martin von Gagern
Fix Savannah bug #27213: avoid failed assertions for
non-executable directories.
(consider_visiting): Continue (after issuing an error message)
even if ent->fts_info == FTS_NS.
* find/util.c (get_statinfo): If we cannot stat the file, issue a
diagnostic, but continue anyway.
* find/ftsfind.c (consider_visiting): Don't assert-fail if
ent->fts_info == FTS_NSOK. Don't assert-fail if state.type is
nonzero.
2010-04-04 James Youngman
Fix Savannah bug #29435: fd_is_cloexec does not work on Fedora
buildhosts.
Fix open_cloexec on hosts which ignore O_CLOEXEC (i.e. old kernels).
* lib/fdleak.c (o_cloexec_works): New function, detects whether
the open flag O_CLOEXEC has any effect.
(open_cloexec): Call o_cloexec_works, just once, to find out
whether O_CLOEXEC is effective. If not, set the close-on-exec
flag on fds by calling set_cloexec_flag.
* NEWS: Mention this bugfix.
Use bool instead of the previous typedef boolean.
* find/defs.h: Don't create typedef "boolean"; use the standard
type bool. Update other declarations accordingly.
* find/find.c: Update declarations and function definitions to use
bool.
* find/ftsfind.c: Likewise.
* find/parser.c: Likewise.
* find/pred.c: Likewise.
* find/tree.c: Likewise.
* find/util.c: Likewise.
* locate/locate.c: Likewise.
* xargs/xargs.c: Likewise.
2010-04-05 Jim Meyering
frcode: avoid link failure due to multiple program_name definition
* locate/frcode.c: Include "progname.h".
(program_name): Remove two declarations.
Now the definition comes from gnulib.
2010-04-04 James Youngman
Don't return int to represent a boolean value.
* find/defs.h: fd_leak_check_is_enabled should return boolean, not
int. Likewise following_links and digest_mode.
* lib/buildcmd.h: Likewise for bc_args_exceed_testing_limit.
Also #include .
* find/util.c (fd_leak_check_is_enabled): Now returns boolean.
* find/util.c (following_links): Likewise.
* find/util.c (digest_mode): Likewise.
* lib/buildcmd.c (bc_args_exceed_testing_limit): Likewise.
* find/find.c (get_current_dirfd): Indent definition correctly.
* find/util.c (get_start_dirfd): Likewise.
Fix Savannah bug #29435: fd_is_cloexec does not work on Fedora
buildhosts.
Fix open_cloexec on hosts which ignore O_CLOEXEC (i.e. old kernels).
* lib/fdleak.c (o_cloexec_works): New function, detects whether
the open flag O_CLOEXEC has any effect.
(open_cloexec): Call o_cloexec_works, just once, to find out
whether O_CLOEXEC is effective. If not, set the close-on-exec
flag on fds by calling set_cloexec_flag.
* NEWS: Mention this bugfix.
2010-04-03 James Youngman
Move on from 4.5.7.
* configure.ac: Update version number again, to 4.5.8-git.
* NEWS: Likewise.
Prepare for release of findutils-4.5.7.
* configure.ac: Update version number.
* NEWS: Mention the translation changes. Update version number.
Accelerate find/testsuite/find.posix/exec-nogaps.exp.
* find/testsuite/config/unix.exp (optimisation_levels_to_test):
New function, decides which optimisation levels we shuld run find
at for the current test. Set $OPTIMISATION_LEVELS to control
this.
(find_start): Call optimisation_levels_to_test to determine which
optimisation levels to run find at.
* find/testsuite/find.posix/exec-nogaps.exp: Run the test only at
-O3 (but for both oldfind and ftsfind).
Correct the format of copyright statements, and add 2010.
* lib/fdleak.h: Correct the format of the copyright statement.
* po/vi.po: Likewise.
* lib/safe-atoi.h: Likewise.
* locate/locate.c: Likewise.
* po/ca.po: Likewise.
* po/gl.po: Likewise.
* po/fi.po: Likewise.
* po/it.po: Likewise.
* po/findutils.pot: Fill in the boilerplate in the header.
Update copyright years.
* find/defs.h: Update copyright years.
* find/finddata.c: Likewise.
* find/sharefile.h: Likewise.
* lib/buildcmd.h: Likewise.
* lib/dircallback.h: Likewise.
* lib/extendbuf.h: Likewise.
* lib/findutils-version.h: Likewise.
* lib/gnulib-version.h: Likewise.
* lib/listfile.h: Likewise.
* lib/nextelem.c: Likewise.
* lib/nextelem.h: Likewise.
* lib/printquoted.h: Likewise.
* lib/regextype.h: Likewise.
* lib/savedirinfo.h: Likewise.
* lib/strspn.c: Likewise.
* lib/waitpid.c: Likewise.
* locate/locatedb.h: Likewise.
* m4/mkinstalldirs.m4: Likewise.
* m4/noreturn.m4: Likewise.
* build-aux/check-testfiles.sh: Likewise.
* build-aux/src-sniff.py: Likewise.
* import-gnulib.sh: Likewise.
* locate/testsuite/config/unix.exp: Likewise.
* locate/updatedb.sh: Likewise.
* xargs/testsuite/config/unix.exp: Likewise.
Add the update-copyright gnulib module.
* import-gnulib.config (maintainer_modules): Separate out the
modules primarily useful for maintainer activities. Add
'update-copyright' to this.
* build-aux/.cvsignore: Ignore update-copyright, since it's
installed by gnulib.
* build-aux/.gitignore: Likewise.
Ignore generated files for the convenience of non-VPATH users.
* lib/.gitignore: Ignore object and archive files.
* find/.gitignore: Likewise.
* locate/.gitignore: Ignore object files.
2010-04-02 James Youngman
Check for accidental modifications to the wrong section of the
NEWS file.
* cfg.mk (local-checks-to-skip): Remove sc_immutable_news.
(old_NEWS_hash): add existing hash (from "make update-NEWS-hash").
* cfg.mk: Append the names of checks to skip to
local-checks-to-skip rather than inventing 7 new variables.
Don't include quote.h/quotearg.h where it is not used.
* find/find.c: Don't include "quote.h", it's not used.
* find/ftsfind.c: Likewise.
* find/parser.c: Likewise.
* locate/locate.c: Likewise.
* locate/word_io.c: Likewise.
* cfg.mk (skip_dunno): Enable check sc_prohibit_quote_without_use.
* find/find.c: Don't include "quotearg.h", it's not used.
* lib/fdleak.c: Likewise.
Use set_program_name() to remember the programs' names.
* cfg.mk *skip(defer): Enable sc_program_name. Remove the
now-unused variable skip_defer.
* find/ftsfind.c: Include "program_name.h".
(main): Call set_program_name.
* find/find.c: Include "program_name.h".
(main): Call set_program_name.
* locate/locate.c: Include "program_name.h".
(dolocate): Call set_program_name.
Remove global variable program_name.
* locate/bigram.c: Include "program_name.h".
Remove global variable "program_name".
(main): Call set_program_name.
* locate/frcode.c: Include "program_name.h".
(main): Call set_program_name.
* xargs/xargs.c (main): Call set_program_name.
Include "program_name.h".
Remove global variable program_name.
* find/finddata.c: Remove global variable program_name.
* find/defs.h: No longer need declaration of program_name.
* find/util.c: Include "program_name.h".
Use named constants for xargs exit codes.
* xargs/xargs.c (child_error): Use EXIT_SUCCESS instead of 0.
(enum XargsStatusValues): introduce named constants for the
various things that cause speicific exit codes.
(enum ClientStatusValues): Also introduce named constants for the
child's exit status.
(get_char_oct_or_hex_escape): Use EXIT_FAILURE instead of 1.
(get_input_delimiter): Likewise.
(main): Likewise.
(read_line): Likewise.
(read_string): Likewise.
(print_args): Likewise.
(xargs_do_exec): Likewise.
(wait_for_proc): Likewise.
(wait_for_proc): Use enum XargsStatusValues for exit codes.
(parse_num): Use EXIT_FAILURE instead of 1.
Avoid using magic numbers as exit statuses.
* cfg.mk (skip_defer): Enable sc_prohibit_magic_number_exit.
* doc/find-maint.texi (Security): Avoid error (1, ...) in the
example patch.
* find/find.c (main): Use exit status EXIT_FAILURE instead of 1.
(wd_sanity_check): Likewise.
(safely_chdir_lstat): Likewise.
(process_dir): Likewise.
* find/fstype.c (must_read_fs_list): Likewise.
* find/ftsfind.c (main): Likewise.
(main): Likewise.
* find/parser.c (check_option_combinations): Use exit status
EXIT_FAILURE instead of 1.
(parse_group): Likewise.
(parse_help): Use exit status EXIT_SUCCESS instead of 0.
(parse_version): Likewise.
(fnmatch_sanitycheck): Use exit status EXIT_FAILURE instead of 1.
(insert_depthspec): Likewise.
(parse_newerXY): Likewise.
(non_posix_mode): Likewise.
(parse_perm): Likewise.
(insert_regex): Likewise.
(parse_size): Likewise.
(parse_show_control_chars): Likewise.
(parse_used): Likewise.
(parse_user): Likewise.
(parse_context): Likewise.
(insert_type): Likewise.
(insert_fprintf): Likewise.
(make_segment): Likewise.
(check_path_safety): Likewise.
(new_insert_exec_ok): Likewise.
(get_relative_timestamp): Likewise.
(parse_time): Likewise.
* find/tree.c (get_expr): Use exit status EXIT_FAILURE instead of 1.
(scan_rest): Likewise.
(get_pred_cost): Likewise.
(get_pred_cost): Likewise.
(build_expression_tree): Likewise.
(get_new_pred_chk_op): Likewise.
* find/pred.c (launch): Use exit status EXIT_FAILURE instead of 1.
* find/util.c (process_debug_options): Use exit status
EXIT_SUCCESS instead of 0.
(process_optimisation_option): Use exit status EXIT_FAILURE
instead of 1.
(set_option_defaults): Likewise.
* lib/buildcmd.c (exceeds): Likewise.
(bc_do_exec): Likewise.
(bc_push_arg): Likewise.
* lib/nextelem.c: Remove test code.
* lib/safe-atoi.c (safe_atoi): Use exit status EXIT_FAILURE
instead of 1.
* lib/regextype.c (get_regex_type): Use exit status EXIT_FAILURE
instead of 1. Include , for EXIT_FAILURE.
* locate/locate.c (set_max_db_age): Use exit status EXIT_FAILURE
instead of 1.
(set_max_db_age): Likewise.
(toolong): Likewise.
(visit_locate02_format): Likewise.
(search_one_database): Likewise.
(drop_privs): Likewise.
* locate/frcode.c (get_seclevel): Use exit status EXIT_FAILURE
instead of 1.
(outerr): Likewise.
(main): Likewise.
* locate/code.c (inerr): Use exit status EXIT_FAILURE instead of
1.
(outerr): Likewise.
* locate/word_io.c (getword): Use exit status EXIT_FAILURE instead of 1.
Avoid sc_prohibit_stat_st_blocks check, since it is broken.
* cfg.mk (skip_broken_checks): Skip sc_prohibit_stat_st_blocks.
Enable syntax checker sc_the_the, detecting doubled 'the'.
* cfg.mk (false_positives): Enable syntax checker sc_the_the
* build-aux/src-sniff.py (checkers): Avoid false positive with
sc_the_the.
Avoid false positives for sc_prohibit_atoi_atof.
* find/util.c (set_option_defaults): Avoid false positive with
sc_prohibit_atoi_atof.
(check_nofollow): Likewise.
Avoid sscanf.
* lib/fdleak.c (get_proc_max_fd): Use safe_atoi to do string to
int conversion, instead of sscanf. Skip '.' and '..'.
* cfg.mk (skip_defer): Enable the sc_prohibit_atoi_atof check.
* po/POTFILES.in: Remove source files we don't maintain any more.
Also remove files which exist but have no translated messages
(dircallback.c, listfile.c).
* lib/listfile.c: Don't include libintl, since there are no
translated messages in this file.
* lib/dircallback.c: Likewise.
Move safe_atoi out into a separate module.
* find/parser.c: Include "safe-atoi.h". Remove the body of safe_atoi.
(parse_group): pass options.err_quoting_style to safe_atoi.
(insert_depthspec): Likewise.
(parse_user): Likewise.
* lib/safe-atoi.h: New file.
* lib/safe-atoi.c: New file. Add parameter for quoting style (to
avoid an external reference to the "options"struct).
* lib/Makefile.am (libfind_a_SOURCES): Add safe-atoi.c and
safe-atoi.h.
Avoid false positives for the sc_prohibit_test_minus_ao syntax check.
* doc/find.texi (Updating A Timestamp File): Work around a syntax
check designed to prevent the use of "test X -a Y".
* find/find.1: Likewise.
* find/ftsfind.c: We don't use anything from xalloc.h, so don't
#include it.
Eliminate some unused function result warnings.
* lib/unused-result.h: New file, defines function attribute macro
__attribute_warn_unused_result__.
* lib/Makefile.am (EXTRA_DIST): Add unused-result.h.
* find/ftsfind.c (find): Issue a diagnostic if fts_close fails,
change return type to bool and return false for this case. Add
__warn_unused_result__ attribute.
(process_all_startpoints): Likewise (except no need for second
diagnostic).
(main): If process_all_startpoints failed, don't do the cleanup
operations because we don't know what subdirectory we're in.
* find/util.c (fd_leak_check_is_enabled): Avoid implicit
pointer-to-int conversion.
* lib/buildcmd.c: #include for declaration of free.
Avoid false positives for the sc_prohibit_test_minus_ao syntax check.
* doc/find.texi (Updating A Timestamp File): Work around a syntax
check designed to prevent the use of "test X -a Y".
* find/find.1: Likewise.
* find/ftsfind.c: We don't use anything from xalloc.h, so don't
#include it.
Eliminate some unused function result warnings.
* lib/unused-result.h: New file, defines function attribute macro
__attribute_warn_unused_result__.
* lib/Makefile.am (EXTRA_DIST): Add unused-result.h.
* find/ftsfind.c (find): Issue a diagnostic if fts_close fails,
change return type to bool and return false for this case. Add
__warn_unused_result__ attribute.
(process_all_startpoints): Likewise (except no need for second
diagnostic).
(main): If process_all_startpoints failed, don't do the cleanup
operations because we don't know what subdirectory we're in.
* find/util.c (fd_leak_check_is_enabled): Avoid implicit
pointer-to-int conversion.
* lib/buildcmd.c: #include for declaration of free.
Fix some space-followed-by-tab sequences.
* NEWS: Change space-tab sequences to just spaces.
* build-aux/check-testfiles.sh (main): Likewise
* build-aux/src-sniff.py (checkers): Likewise.
* find/Makefile.am: Likewise.
* find/testsuite/find.posix/sv-bug-25359.exp: Likewise.
* import-gnulib.sh (check_merge_driver): Likewise.
* m4/withfts.m4 (FIND_WITH_FTS): Likewise.
* cfg.mk (false_positives): Explain why we can't enable the
sc_space_tab check (xargs .xo test files).
* cfg.mk: Explain that we cannot enable the sc_texinfo_acronym
syntax check right now, since the perm.texi file uses
@acronym{GNU} but we try to keep that in sync. with coreutils.
Mark error messages for translation.
* find/parser.c (safe_atoi): Likewise.
* find/pred.c (pred_context): Likewise.
(do_fprintf): Likewise.
* xargs/xargs.c (xargs_do_exec): Translate error message.
(xargs_do_exec): Likewise.
* lib/buildcmd.c (exceeds): Likewise.
Add customisation of the behaviour of "make syntax-check".
* cfg.mk: New file; configuration file for the maintainer-makefile
provided by gnulib.
* import-gnulib.config (modules): Add maintainer-makefile.
Various coding standard fixes.
* m4/withfts.m4: Quote the first argument of AC_DEFINE.
* lib/regextype.c: Don't use HAVE_CONFIG_H.
* doc/find-maint.texi: Remove RCS keywords (they were in an
example security vulnerability announcement).
Don't define S_IS*; include instead.
* lib/modetype.h: Remove (all it does is define S_IS*).
* lib/Makefile.am (EXTRA_DIST): Remove modetype.h.
* lib/listfile.c: Don't define S_IS* macros.
* find/pred.c: Don't include "modetype.h".
* find/parser.c: Likewise.
* find/ftsfind.c: Likewise.
* find/fstype.c: Likewise.
* find/find.c: Likewise.
* m4/withfts.m4: Quote the first argument of AC_DEFINE.
Coding standard fix: "Warning" should be "WARNING".
* find/find.c (dirchange_is_fatal): Change "Warning" to "WARNING".
* find/ftsfind.c (consider_visiting): Likewise.
* find/pred.c (pred_newerXY): Likewise.
* find/util.c (get_statinfo): Likewise.
(hook_fstatat): Likewise.
* locate/word_io.c (decode_value): Likewise.
* xargs/xargs.c (main): Change "Warning" to "warning".
(read_line): Change "Warning" to "WARNING".
(wait_for_proc): Likewise.
Remove useless if conditionals before calls to 'free'.
* lib/nextelem.c (next_element): Remove useless if-before-free.
* lib/buildcmd.c (bc_do_exec): Likewise.
* find/find.c (process_dir): Likewise.
* import-gnulib.sh (usage): Defeat the simple GPL version check
of maint.mk, since it's trying to identify GPL2 licenses. Since
the 'rehack' script converts v2 licenses into v3, we get a false
positive for v2. So, amusingly, we use the same hack that
maint.mk uses to avoid a false positive on itself: spurious
quotes.
Switch from GNU Free Documentation License 1.2 to 1.3.
* NEWS: Update GFDL version.
* README-hacking: Likewise.
* doc/find-maint.texi: Likewise.
* lib/regexprops.c: Likewise (though the license being changed is
the license for the output).
* NEWS: Update copyright years.
2010-04-01 James Youngman
Change error (1, ...) to error (EXIT_FAILURE, ...).
* find/find.c: Change error (1, ...) to error (EXIT_FAILURE, ...).
* find/fstype.c: Likewise.
* find/ftsfind.c: Likewise.
* find/parser.c: Likewise.
* find/pred.c: Likewise.
* find/tree.c: Likewise.
* find/util.c: Likewise.
* locate/code.c: Likewise.
* locate/frcode.c: Likewise.
* locate/locate.c: Likewise.
* locate/word_io.c: Likewise.
* xargs/xargs.c: Likewise.
* lib/buildcmd.c: Likewise. Also include .
* lib/regextype.c: Likewise (both).
Assume C89 (or C99) C headers. Assume working .
* xargs/xargs.c: Unconditionally include . Assume
isblank(c) is defined. Assume memcpy() has a prototype in
.
* import-gnulib.config (modules): Import gnulib's ctype module.
Optimise -fstype NOTUSED to -false at -O2.
* find/parser.c: Include mountlist.h.
(insert_false): New function, inserts a -false predicate.
(parse_false): Use insert_false.
(is_used_fs_type): New function, determines if any mounted
filesystem is of the named type.
(parse_fstype): At optimisation level 2 and above, -fstpe FOO
is converted to -false if no mounted filesytem is of type FOO.
* find/find.1: Document this optimisation.
* doc/find.texi (Optimisation Options): Likewise.
* NEWS: Mention this change.
Updated copyright years to add 2010.
* find/find.c: Add 2010.
* find/fstype.c: Add 2010.
* find/ftsfind.c: Add 2010.
* find/parser.c: Add 2010.
* find/pred.c: Add 2010.
* find/sharefile.c: Add 2010.
* find/testsuite/config/unix.exp: Add 2010.
* find/tree.c: Add 2010.
* find/util.c: Add 2010.
* locate/bigram.c: Add 2010.
* locate/frcode.c: Add 2010.
* xargs/xargs.c: Add 2010.
Coding style fixes: space after function names.
* lib/buildcmd.c: Insert a space between function name and open
parenthesis.
* lib/dircallback.c: Likewise.
* lib/extendbuf.c: Likewise.
* lib/fdleak.c: Likewise.
* lib/findutils-version.c: Likewise.
* lib/forcefindlib.c: Likewise.
* lib/listfile.c: Likewise.
* lib/printquoted.c: Likewise.
* lib/qmark.c: Likewise.
* lib/regexprops.c: Likewise.
* lib/regextype.c: Likewise.
* lib/savedirinfo.c: Likewise.
* locate/code.c: Likewise.
* locate/frcode.c: Likewise.
* locate/locate.c: Likewise.
* locate/word_io.c: Likewise.
2010-03-31 James Youngman
Coding style fixes: space after function names.
* find/util.c: Insert a space between function name and open
parenthesis.
* find/ftsfind.c: Likewise.
* find/fstype.c: Likewise.
* find/util.c: Likewise.
* find/tree.c: Likewise.
* find/sharefile.c: Likewise.
* find/pred.c: Likewise.
* find/parser.c: Likewise.
* xargs/xargs.c: Likewise.
Move version number on to 4.5.7-git, so that we can make test
releases.
* configure.ac: Update version number.
* NEWS: Likewise.
* Makefile.am (AUTOMAKE_OPTIONS): Return to "gnits" rules.
Mention additional bugfixes.
* NEWS: Mention that Savannah bug #29089 was also fixed in
4.5.6b.
Prepare for release of findutils-4.5.6b
This release is identical to 4.5.6 apart from the version number
and the fact that it was generated by automake version 1.11.1 in
order to avoid issues with CVE-2009-4029.
* configure.ac: Update version number.
* NEWS: Update version number. Mention that Savannah bug #29089
was also fixed in 4.5.6b.
* Makefile.am: switch to 'gnu' option ('gnits' forbids the 'b'
suffix).
2010-03-30 James Youngman
Prepare for release of findutils-4.5.6
* configure.ac: Update version number.
* NEWS: Update version number.
Support O_CREAT in open_cloexec.
* lib/fdleak.c: Include and "cloexec.h".
(open_cloexec): Support O_CREAT. Use O_CLOEXEC if it is available.
(O_CLOEXEC): #define to 0 if not already #defined.
* lib/fdleak.h: Update prototype of open_cloexec to allow mode to
be passed.
* import-gnulib.config (modules): Import modules open (for
PROMOTED_MODE_T) and stdbool (for 'true').
Tolerate the absence of getrusage.
* configure.ac: Check for and the getrusage
function.
* lib/fdleak.c: Don't #include if we don't have it.
(get_max_fd): If neither /proc/self/fd not getrusage is available,
return _POSIX_OPEN_MAX.
Detect leaks in file descriptors 0, 1, 2.
* lib/fdleak.c: (remember_non_cloexec_fds): Also check for leaks
in file descriptors 0, 1, 2, just in case the caller closed them.
(find_first_leaked_fd): Likewise.
2009-08-16 James Youngman
Bugfixes to the handling of %Z in the Red Hat SELinux patch.
* find/pred.c (do_fprintf): If getfilecon fails, print the
relevant segment anyway, with the file context expanding to an
empty string.
* find/parser.c (make_segment): For %Z, set the cost to
NeedsAccessInfo.
2009-08-11 Kamil Dudka
find: add SELinux support
* find/defs.h: Add SELinux related definitions.
* find/tree.c: Add -context predicate to lookup.
* find/pred.c: Handle %Z printf directive.
* find/parser.c: Parse -context predicate and %Z printf directive.
* find/find.1: Mention -context predicate and %Z printf directive.
* doc/find.texi: Mention -context predicate and %Z printf directive.
* find/Makefile.am: Add SELinux libraries.
* import-gnulib.config: Require module selinux-at and the corresponding
version of gnulib.
2010-03-29 James Youngman
Fix file descriptor leaks. This fixes Savannah bug bug #27375.
* find/util.c (fd_leak_check_is_enabled): New function; returns
nonzero if the environment variable GNU_FINDUTILS_FD_LEAK_CHECK is
enabled. Setting this variable enables the file descriptor leak
checker.
* find/defs.h: Declare fd_leak_check_is_enabled.
* import-gnulib.config (gnulib_version): Update to more recent
version of gnulib. Import the cloexec module too.
* lib/fdleak.c: New file; a module for detecting file descriptor
leaks. Also define an open_cloexec() function.
* lib/fdleak.h: Declare the global functions defined in fdleak.c.
* lib/Makefile.am (libfind_a_SOURCES): Add fdleak.c.
* find/find.c (main): Call remember_non_cloexec_fds in order to
detect file descriptor leaks.
(main): set FD_CLOEXEC on starting_desc.
(safely_chdir_lstat): Likewise for dotfd.
(safely_chdir_nofollow): Likewise for fd.
* find/ftsfind.c (inside_dir): set FD_CLOEXEC on curr_fd.
(main): Call remember_non_cloexec_fds in order to detect file
descriptor leaks.
(main): set FD_CLOEXEC on starting_desc.
* find/pred.c (launch): before we exec the child, call
complain_about_leaky_fds in order to complain about non-FD_CLOEXEC
file descriptors that weren't open when the program was run.
* find/sharefile.c (sharefile_fopen): Set FD_CLOEXEC on the files
we open.
* import-gnulib.sh (run_gnulib_tool): Pass the --local-dir option
in order to apply any required patches (none needed right now).
* find/testsuite/config/unix.exp: Set environment variable
$GNU_FINDUTILS_FD_LEAK_CHECK to enable the file descriptor leak
check for all tests.
* find/testsuite/find.gnu/no-fdleak-test.exp: New test; runs find
with the fd leak detector turned off, in order to make sure there
are no (e.g.) crashing bugs when that happens.
* find/testsuite/find.gnu/no-fdleak-test.xo: Expected output for
the new test.
* find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add no-fdleak-test.exp
(EXTRA_DIST_XO): Add no-fdleak-test.xo.
* NEWS: Mention these changes.
2010-03-30 James Youngman
Add missing exec-nogaps.{exp,xo}.
* find/testsuite/Makefile.am (EXTRA_DIST_XO): Add exec-nogaps.xo.
(EXTRA_DIST_EXP): Add exec-nogaps.exp.
2010-02-25 James Youngman
Explain the problems with "-name a/b" and "-path foo/".
* find/find.1 (-iname): We already refer to -name, so duplicate
less text.
(-name): Explain that -name a/b will never match anything.
* doc/find.texi (Base Name Patterns): Explain that -name a/b will
never match anything.
(Full Name Patterns): Fix typo.
2010-02-22 James Youngman
* xargs/xargs.1: Simplify the wording in the description of "xargs
-i".
2010-02-21 James Youngman
Update #include directives for the openat module, to comply with
recent POSIX-compliance changes.
* find/find.c: Don't include .
* find./ftsfind.c: Likewise.
* find/pred.c: Likewise; include .
* find/util.c: Don't include ; include .
* import-gnulib.config (gnulib_version): Update to current version
of gnulib.
* build-aux/.cvsignore: Ignore new files built by gnulib.
* build-aux/.gitignore: Likewise.
2010-02-20 James Youngman
Fix Savannah bug #27846: assertion failure in xargs.c on AIX.
* xargs/xargs.c (smaller_of): New function, returns the smaller of
its two size_t arguments.
(main): Instead of asserting that the value of bc_ctl.arg_max is
smaller than some value, simply adjust the value if necessary.
* NEWS: Mention this change.
Fix Savannah bug#28872, Mistake in "Problems with -exec and filenames"
* doc/find.texi (Problems with -exec and filenames): Add missing
$0 argument in example for sh -c 'something "$@" sh ...
* NEWS: Mention this change.
Fix Savannah bug# 28824: "-ctime x" yields "missing argument to
`-ctime'".
* find/parser.c (parse_fls): If the argument is invalid, reverse
the change that collect_arg() made to *arg_ptr (that is, don't
consume the argument).
(parse_fprint0): Likewise.
(parse_gid): Likewise.
(parse_group): Likewise.
(parse_inum): Likewise.
(parse_links): Likewise.
(do_parse_xmin): Likewise.
(parse_name): Likewise.
(parse_printf): Likewise.
(parse_uid): Likewise.
(parse_used): Likewise.
(parse_time): Likewise.
* NEWS: mention this change.
2009-12-04 James Youngman
Fix Savannah bug #26868: compilation error in pred.c on Solaris
x86_64.
* import-gnulib.config (modules): Include gnulib's math module, to
avoid a compilation error for "-HUGE_VAL" on Solaris x86_64.
* NEWS: Mention this change.
2009-11-29 James Youngman
* find/testsuite/find.posix/exec-nogaps.exp: New test for find
-exec ... {} ; and find -exec ... {} +, both of which simply
ensure that all exec arguments are processed exactly once each.
* find/testsuite/find.posix/exec-nogaps.xo: Expected output file
for the test in exec-nogaps.exp.
Fix Savannah bug#27328, segfault if the initial exec for "find
-exec" fails. Also Savennah bug #27975: Infinite loop
for -exec [..] {} +.
* lib/buildcmd.h (struct buildcmd_state): Introduce
largest_successful_arg_count and smallest_failed_arg_count in
order to avoid an assumption that we understand how the operatingn
system interprets ARG_MAX and the assumption that the compile-time
ARG_MAX value (or the equivalent from sysconf()) is avtually
correct.
(struct buildcmd_control): Change the calling convention of the
exec callback to allow us to pass the argument list separately.
(bc_args_exceed_testing_limit): declare this new function.
* lib/buildcmd.c (bc_args_complete): New function, NULL-terminates
the argv list. We use this instead of passing NULL to
bc_push_arg().
(update_limit): New function. Decides how many arguments to
pass to the invoked command on the next attempt.
(copy_args): Build an argument list containing all the initial
arguments plus some of the other args (the number to be used is
decided by update_limit).
(bc_do_exec): Avoid special-casing the first call to exec. Use
update_limit to decide how many arguments to pass and copy_args to
build the argument list. The new form of the loop should fix
Savannah bug #27328.
(bc_push_arg): Drop support for passing NULL as an argument (to
terminate the arg list we just pass in a special argument instead).
(bc_args_exceed_testing_limit): New function, returns nonzero if
the argument list exceeds a testing limit (used for failure
injection by tests).
(exceeds): New support function, implementing part of
bc_args_exceed_testing_limit.
(bc_init_state): Initialise largest_successful_arg_count and
smallest_failed_arg_count.
* find/defs.h (struct exec_val): New member last_child_status.
This stores the status of the most recently completed child.
* find/pred.c (new_impl_pred_exec): Use last_child_status.
(launch): Use the new calling convention for the exec callback.
Set last_child_status. Call bc_args_exceed_testing_limit() to do
failure injection for unit tests.
* find/util.c (do_complete_pending_execdirs): Call bc_do_exec
rather than calling launch directly in order to allow for breaking
the argument list up if it's too long.
* xargs/xargs.c (xargs_do_exec): Update to use the new caling
convention for the exec callback.
* NEWS: Mention these fixes.
2009-11-09 Jim Meyering
Adjust two xargs diagnostics.
* xargs/xargs.c (print_args): Give a better diagnostic when
failing to open /dev/tty.
(xargs_do_exec): Mark a diagnostic for translation.
2009-11-08 James Youngman
Localise some previously non-localised strings.
* find/find.c (init_mounted_dev_list): Pass translatable string
gettext.
(safely_chdir_lstat): Likewise.
* find/fstype.c (must_read_fs_list): Likewise.
* find/parser.c (safe_atoi): Likewise.
Updated a number of translation messages.
* po/it.po: Updated Italian translation.
* po/fi.po: Updated Finnish translation.
* po/vi.po: Updated Vietnamese translation.
* po/hu.po: Updated Hungarian translation.
* po/de.po: Updated German translation.
* po/ru.po: Updated Russian translation.
2009-08-16 James Youngman
* lib/check-regexprops.sh: Portability fixes for FreeBSD (mktemp
requires an argument, dialect differences in sed regexes).
Bugfixes to the handling of %Z in the Red Hat SELinux patch.
* find/pred.c (do_fprintf): If getfilecon fails, print the
relevant segment anyway, with the file context expanding to an
empty string.
* find/parser.c (make_segment): For %Z, set the cost to
NeedsAccessInfo.
2009-08-15 James Youngman
* import-gnulib.config (gnulib_version): Update to the current
version of gnulib.
2009-07-18 James Youngman
Fix up some problems introduced in a manual conflict resolution.
* find/parser.c (insert_path_check): Add missing third argument to
insert_primary_withpred.
(parse_iwholename): Remove redundant extra definition.
(parse_ipath): Likewise.
2009-07-14 James Youngman
Fix Savannah bug #27017: find -D opt / -fstype ext3 -print , -quit
coredumps.
* find/tree.c (set_new_parent): Initialise struct
predicate->arg_text to NULL (instead of leaving it uninitialised).
(get_new_pred_noarg): Likewise.
(get_new_pred): Initialise predicate->arg_text to
"ThisShouldBeSetToSomethingElse" to make it easier to notice
bugs.
(get_new_pred_chk_op): Use get_new_pred_noarg.
(print_predicate): Use an if statement instead of
two ternary operators.
* find/util.c (insert_primary_withpred): Accept new argument, arg,
being the argument (if any) of this predicate. Pass it to
get_new_pred_chk_op.
(insert_primary): Likewise (pass arg to insert_primary_withpred).
(insert_primary_noarg): New function; calls insert_primary with
arg=NULL.
* find/parser.c (collect_arg_stat_info): Add an output parameter;
the filename from which we collected the stat information.
(parse_closeparen, parse_delete, parse_and, parse_or,
parse_comma): Use get_new_pred_noarg.
(parse_cnewer, parse_newer, parse_anewer): Use new
collect_arg_stat_info and insert_primary interface.
(parse_print, parse_prune, parse_nouser, parse_empty): Use
insert_primary_noarg.
(parse_accesscheck, parse_false): Use insert_primary_noarg.
(parse_used, parse_iname, parse_fprint, insert_fprint,
parse_fstype, parse_ilname): Use new collect_arg and
insert_primary interfaces.
(parse_ipath, parse_lname, do_parse_xmin, parse_name, parse_path,
parse_perm, parse_size, parse_user, parse_time): Use new
collect_arg and insert_primary_withpred interface.
(parse_negate, parse_openparen): Use new get_new_pred_chk_op interface.
(parse_newerXY, parse_nogroup): Use new insert_primary interface.
(insert_regex, parse_samefile): Use new insert_primary_withpred
interface.
(insert_type, insert_fprintf, new_insert_exec_ok, insert_num): Use
new insert_primary_withpred interface.
* find/defs.h (struct predicate.arg_text): make const.
Add declarations for new function get_new_pred_noarg and
insert_primary_noarg. Add 'arg' parameter to get_new_pred_chk_op
and insert_primary_withpred.
* NEWS: Mention the bugfix.
2009-07-12 James Youngman
Savannah bug #23920: warn about -path arguments ending in /.
* find/parser.c (insert_path_check): new function; abstracts the
common functionality of parse_path, parse_ipath, parse_wholename,
parse_iwholename. Also check for a trailing slash and warn about
it (unless $POSIXLY_CORRECT is set). Don't warn if the pattern
also happens to be a start_point, because those could be matched.
(parse_path, parse_ipath, parse_wholename, parse_iwholename): Use
insert_path_check.
* find/tree.c (is_start_point): new function; returns true if the
indidated string matches a start point.
(num_start_points, start_points): new variables, storing the
starting points listed on the command line.
(build_expression_tree): Set num_start_points and start_points.
* find/defs.h: Declare is_start_point.
* doc/find.texi (Full Name Patterns): Explain that candidate names
for -path, -regex etc. will never end in a slash, so "-path /tmp/"
will never match anything.
* find/find.1: Likewise.
Fix Savannah bug #26327: xargs man page is vague about the number
of times command is executed.
* xargs/xargs.1 (DESCRIPTION): Explain more clearly that the
command will be executed many times. Indicate that -L can also be
useful with -P.
* NEWS: Mention this change.
2009-07-11 James Youngman
* NEWS: Set the version to 4.5.6-git, so that we can make test
releases.
2009-06-11 James Youngman
Make import-gnulib.sh faster in the common case where neither
import-gnulib.config nor gnulib itself changed.
* import-gnulib.sh (gnulib_changed): New variable.
(do_checkout): set gnulib_changed=true if the gnulib code didn't
already correspond to our configured version. Don't use a large
subshell, because we need to set $gnulib_changed and don't want
the value to be discarded.
(main): Run gnulib-tool if gnulib was not at the correct version
or the import-gnulib.config file has changed.
2009-07-10 Reuben Thomas
Fix quotation punctuation in find manual page, fixing bug #19120.
* find/find.1: Use ` instead of ' at the start of quoted text. Use
\(aq instead of ' or \' in commands to get a literal straight quote.
Use ` and ' instead of `` and '' (for consistency).
* NEWS: mention this change.
2009-07-10 James Youngman
* import-gnulib.config (gnulib_version): Update to the current version
of gnulib.
Fix Savannah bug #24873, Duplicate fprint option corrupts output
by opening each output file only once.
* find/sharefile.c: New file; keeps a mapping from dev/inode to
FILE*, allowing us to determine when the file we just opened is
the same as something else we already opened.
* import-gnulib.config (modules): Import the hash module, used by
sharefile.c.
* find/sharefile.h: Function declarations for same.
* find/find.c (main): Call sharefile_init().
* find/ftsfind.c (main): Likewise.
* find/parser.c (open_output_file): Call sharfile_fopen to open an
output file, instead of fopen_safer.
* find/util.c (cleanup): Close any shared output files that are
open. Also fflush stdout.
(undangle_file_pointers): Set the relevant FILE* pointers to
NULL.
(flush_and_close_output_files): Remove (since sharefile_destroy
has the desired effect).
* find/Makefile.am (libfindtools_a_SOURCES): Add sharefile.c.
(EXTRA_DIST): Add sharefile.h.
* find/defs.h: #include sharefile.h.
(struct state): Add member shared_files, holding a handle to the
shared-file hash table implemented in sharefile.[ch].
* find/testsuite/find.gnu/fprintf-samefile.exp: New test,
exercising -fprintf (though it is not able to detect bug #24873).
* find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add
find.gnu/fprintf-samefile.exp.
* NEWS: Mention the bugfix.
2009-07-07 James Youngman
* NEWS: Indicate that -wholename is no longer preferred over -ipath.
2009-07-06 James Youngman
Prepare for release of findutils version 4.5.5.
* configure.ac: Set version number to 4.5.5.
* NEWS: Likewise.
2009-07-06 Andreas Metzler
* doc/find.texi: Various typo fixes.
2009-07-05 James Youngman
Fix typo in -execdir documentation.
* doc/find.texi (Single File): Typo correction; we're describing
-execdir, not -exec.
* NEWS: Mention the bugfix.
2009-05-12 James Youngman
#26537: find -prune now makes sure it has valid stat() information.
* NEWS: Added Savannah bug number for Colin's bugfix.
2009-05-07 Colin Watson
* find/parser.c (parse_prune): -prune needs stat information if
-depth is not in use.
* find/pred.c (pred_prune): Assert that stat information is
available if needed.
* find/testsuite/find.posix/prune-stat.exp: New test.
* find/testsuite/find.posix/prune-stat.xo: New test.
* find/testsuite/Makefile.am (EXTRA_DIST_EXP, EXTRA_DIST_XO): Added
prune-stat.exp, prune-stat.xo.
* NEWS: Mention this bugfix.
2009-07-05 James Youngman
* lib/check-regexprops.sh: New test. Run regexprops as a check,
and compare its output against the contents of doc/regexprops.texi.
* lib/Makefile.am: Run check-regexprops.sh for 'make check'.
* doc/Makefile.am: don't clean regexprops.texi, and don't generate
it automatically.
* doc/regexprops.texi: add into source control.
* doc/.gitignore: don't ignore regexprops.texi
2009-07-04 James Youngman
* configure.ac (AC_CONFIG_FILES): order the entries alphabetically
and remove duplicates. Put po/Makefile.in before
po/Makefile, since the former is required in order to
config.status to generate the latter.
2009-07-04 gettextize
* configure.ac (AC_CONFIG_FILES): Add po/Makefile.in.
(AM_GNU_GETTEXT_VERSION): Bump to 0.17.
2009-05-12 Eric Blake
xargs: fix compilation on cygwin
* xargs/xargs.c (main): Check that ARG_MAX is defined.
xargs: avoid compiler warning
* xargs/xargs.c (get_char_oct_or_hex_escape): Pass correct type to
ctype macro.
2009-05-04 James Youngman
* find/util.c (get_info): Don't fall off the end of the function
without returning a value.
2009-04-25 James Youngman
* AUTHORS: Add Andreas Metzler.
2009-04-25 Andreas Metzler (tiny change)
Correct a typo "diagnositcs".
* doc/find.texi (Environment Variables): Correct a typo.
2009-04-24 A. Costa (tiny change)
Correct a typo "diagnositcs".
* find/find.1 (POSIXLY_CORRECT): Correct a typo.
2009-04-24 James Youngman
* find/ftsfind.c (consider_visiting): Print a message for "-D
search" both on entry to the function and at the point where we
have decided not to ignore this file.
2009-04-12 James Youngman
* NEWS: Mention the fix for bug #22708 in the correct section.
Avoid mixing declarations and statements.
* lib/buildcmd.c (bc_do_exec): Declare variables at the top of the
relevant block, in order to avoid mixing declarations and
statements.
* xargs/xargs.c (main): Likewise.
2009-04-12 Leslie Polzer
Merge Leslie Polzer's ARG_MAX enhancements to xargs which were
produced as part of the Google Summer of Code 2007.
These changes fix Savannah bug #22708.
* find/pred.c (launch): The struct buildcmd_control* argument is
no longer const.
* find/defs.h: Likewise
* lib/buildcmd.c (bc_do_insert): The struct buildcmd_control*
argument is no longer const.
(bc_push_arg): Likewise.
(cb_exec_noop): Likewise.
(get_stringv_len): New function; measures the length of
a NULL-terminated argv sequence.
(bc_do_exec): Rename from do_exec, and make global. Modify the
function to react to exec failing with E2BIG by trying again
with fewer arguments.
* xargs/xargs.1: Mention that xargs automatically adopts to the
situation where exec fails with E2BIG.
* xargs/xargs.c: (parent): New variable, the PID of the parent
process.
(main): initialise the variable 'parent'. Don't fail immediately
due to lack of space when the environment is large. Call
xargs_do_exec via bc_do_exec.
(xargs_do_exec): The struct buildcmd_control* argument is no
longer const. When exec fails in the child, communicate the
errno value back to the parent through a pipe which is
close-on-exec; this allows us to accurately determine the cause of
the failure and also to distinguish exec failures from all
possible exit codes in the child.
(wait_for_proc): If the utility cannot be found or cannot be run,
we now find out about this by reading an errno value from the
pipe, so this means that exit codes 126 and 127 in the child no
longer have a special interpretation.
* NEWS: mention these changes.
2009-04-13 James Youngman
* import-gnulib.config (gnulib_version): Update to current head
version.
2009-04-13 Andreas Metzler
Fix Savannah bug# 26092: find.1 still marks -iwholename as preferred
* find/find.1 (-iwholename): Indicate that this option is no
longer preferred over -ipath.
2009-03-07 James Youngman
Update the code to better reflect the semantics of digest_mode().
* find/defs.h: Pass the file mode to digest_mode() by reference
(as a pointer) rather than by value to make it unnecessary for the
caller to know that the value passed should become dead.
* find/util.c (digest_mode): Change the implementation.
* find/find.c (process_path): Update caller.
* find/ftsfind.c (consider_visiting): Update caller.
2009-03-10 James Youngman
Remove "lib/wait.h", since gnulib provides .
* lib/Makefile.am (EXTRA_DIST): Remove wait.h, since gnulib
provides it.
* lib/wait.h: Not needed.
* find/pred.c: Include instead of "wait.h".
* lib/waitpid.c: Likewise.
* xargs/xargs.c: Likewise.
Remove unnecessary include guards.
* lib/dircallback.c: gnulib provides , so no need for
include guards.
* locate/locate.c: Likewise.
* lib/listfile.c: Likewise.
* lib/savedirinfo.c: Likewise with
* find/defs.h: gnulib provides , so no need for
include guards.
* lib/nextelem.c: Likewise with and .
* locate/bigram.c: Likewise.
* locate/frcode.c: Likewise.
* lib/buildcmd.c: Likewise with and
* xargs/xargs.c: Likewise with , and
* import-gnulib.config (modules): Import the mbrtowc and whchar
modules.
* lib/qmark.c (multibyte_qmark_chars): Don't surround with
HAVE_MBRTOWC, since we now have a replacement for mbrtowc.
Likewise, don't protect inclusion of with
HAVE_STRING_H. Likewise with .
(multibyte_qmark_chars): Rename to qmark_chars.
(qmark_chars): Remove old version (since it is replaced by the
function that used to be multibyte_qmark_chars).
* lib/printquoted.c: Don't include , we don't need it.
Prepare for release of findutils-4.5.4.
* configure.ac (AC_INIT): Set version number to 4.5.4.
* NEWS: Likewise.
Remove obsolete regex.c copy fixup.
* Makefile.am (jy-regex-fix) Delete.
(dist-hook): Remove jy-regex-fix.
Update to version 0.17 of GNU gettext.
* configure.ac: Update to version 0.17 of gettext.
* import-gnulib.sh (refresh_output_files): Run autopoint too.
* ABOUT-NLS: Remove the file from source control, since gettext
produces it.
* .gitignore: Ignore ABOUT-NLS.
* po/Makefile.in.in: Likewise.
* po/.gitignore: Ignore po/Makefile.in.in.
Correct the changelog-driver argument list.
* import-gnulib.sh (check_merge_driver): Add the missing arguments
to the changelog driver. Change the name of the merge driver from
cl-merge to merge-changelog, for consistency with gnulib,
coreutils, autoconf, libtool, and m4.
2009-03-08 James Youngman
Switch to using a merge driver for the ChangeLog file.
* import-gnulib.sh (check_merge_driver): New function; verifies
that we have a merge driver installed for the ChangeLog file (if
we're on the master or release branch, the check is skipped).
Also check that the .gitattributes file exists.
* README-hacking: Point out that using a merge driver for
ChangeLog is a good idea.
* .gitattributes: New file
Optimise away calls to stat if all we need is the inode number.
This fixes Savannah bug #24342.
* find/util.c (get_info): call get_statinfo if need_inum and we
don't already have the inode number.
(apply_predicate): Call get_info if need_inum.
* find/defs.h (enum EvaluationCost): Add NeedsInodeNumber.
(struct predicate): Add need_inum.
* find/tree.c (get_new_pred): Default need_inum to false.
(get_new_pred_chk_op): Likewise.
* find/ftsfind.c (consider_visiting): Copy the value of st_ino
into statbuf.st_ino.
* find/parser.c (parse_inum): Set need_inum=true.
(parse_samefile): Set need_inum=false, but add a comment
indicating that there is an optimisation opportunity.
(make_segment): For -printf %i, set NeedsInodeNumber rather than
NeedsStat.
* find/pred.c (pred_inum): assert that the inode number is known
(i.e. non-zero).
(print_optlist): Print "[need inum]" when need_inum is true.
* find/tree.c (opt_expr): Also reorder expressions if the right
hand expression is -inum (that is, consider that test to be no
more expensive than -type).
(set_new_parent): Default need_inum to false.
(costlookup): Set pred_inum=NeedsInodeNumber.
(get_pred_cost): need_inum implies a data cost of
NeedsInodeNumber.
(cost_table): Add NeedsInodeNumber.
(print_tree): Handle need_inum.
For -samefile, skip stat if inode numbers differ.
* find/pred.c (pred_samefile): Skip stat if the inode numbers are
different.
Enable -Wall compiler warnings and fix them.
* configure.ac: Turn on -Wall warnings.
* find/find.c (process_dir): Print unsigned values of unspecified
width as uintmax_t.
* xargs/xargs.c: Include and , but without
the include guards (since we assume an ISO C platform anyway).
* import-gnulib.config (modules): Add modules inttypes and stdint.
2009-03-07 James Youngman
Remove unused Debian files; the Debian package doesn't use them.
* debian.rules: Delete.
* debian/README.debian: Delete.
* debian/TODO: Delete.
* debian/changelog: Delete.
* debian/conffiles: Delete.
* debian/control: Delete.
* debian/copyright: Delete.
* debian/cron.find: Delete.
* debian/doc-base: Delete.
* debian/postinst: Delete.
* debian/preinst: Delete.
* debian/prerm: Delete.
* debian/rules: Delete.
* debian/substvars: Delete.
* debian/updatedb.conf: Delete.
* debian/.cvsignore: Delete.
* debian/.gitignore: Delete.
2009-03-06 James Youngman
Change suffix for non-release versions from -CVS to -git.
* configure.ac(AC_INIT): Change the suffix used to indicate that
the version number doesn't correspond to a source release from
-CVS to -git.
* NEWS: Likewise.
Delete the INSTALL file; rely on Autoconf providing it.
* INSTALL: Delete; this file can be copied/generated by Autoconf,
so do that rather than keeping it under source control.
* .gitignore: Ignore INSTALL.
Updated translation po files from translationproject.org.
* po/bg.po: Updated Bulgarian translation.
* po/de.po: Updated German translation.
* po/ga.po: Updated Irish translation.
* po/hu.po: Updated Hungarian translation.
* po/lt.po: Updated Lithuanian translation.
* po/nl.po: Updated Dutch translation.
* po/pl.po: Updated Polish translation.
* po/sl.po: Updated Slovenian translation.
* po/sv.po: Updated Swedish translation.
* po/tr.po: Updated Turkish translation.
* po/uk.po: Updated Ukrainian translation.
* po/vi.po: Updated Vietnamese translation.
* NEWS: Mention these updates.
2009-03-05 James Youngman
Fix Savannah bug #25764, duplicate entry for proc in PRUNEFS.
* locate/updatedb.sh (PRUNEFS): Remove duplicate entry for proc.
* locate/Makefile.am (updatedb): add dependency on Makefile, and
add a comment explaining why updatedb is generated by make, not
configure.
* NEWS: Mention this bugfix.
Provide more detailed help on how to work with the git sources.
* README-CVS: Rename to README-hacking.
* README-hacking: Add more specific information about using topic
branches, test cases, documentation, coding standards and how to
submit patches. Much of this is adapted from the files
README-hacking and HACKING in the coreutils source tree.
* Makefile.am: Generate tool-versions.txt, which is a list of the
--version outputs of the tools that the maintainer used to build a
release.
* NEWS: Mention these improvements.
2009-03-04 James Youngman
Upgrade to gnulib version 86a37c05846ff3772afd1300f135866dd1d271c6.
* import-gnulib.config(gnulib_version): Update.
* xargs/Makefile.am: Add $(LIB_CLOSE) to $(LDADD), as suggested by
gnulib's unistd module.
* locate/Makefile.am: Likewise.
* find/Makefile.am: Likewise.
Removed trailing white space.
* Makefile.am: Removed trailing white space.
* NEWS, build-aux/check-testfiles.sh, build-aux/src-sniff.py,
doc/Makefile.am, doc/find-maint.texi, doc/find.texi, find/Makefile.am,
find/defs.h, find/find.1, find/find.c, find/finddata.c, find/fstype.c,
find/ftsfind.c, find/parser.c, find/pred.c, find/tree.c, find/util.c,
import-gnulib.sh, lib/Makefile.am, lib/buildcmd.c, lib/buildcmd.h,
lib/dircallback.c, lib/dircallback.h, lib/extendbuf.c,
lib/extendbuf.h, lib/findutils-version.c, lib/findutils-version.h,
lib/forcefindlib.c, lib/gnulib-version.h, lib/listfile.c,
lib/modetype.h, lib/nextelem.c, lib/nextelem.h, lib/printquoted.c,
lib/printquoted.h, lib/qmark.c, lib/regexprops.c, lib/regextype.c,
lib/savedirinfo.c, lib/savedirinfo.h, lib/strspn.c, lib/wait.h,
lib/waitpid.c, locate/bigram.c, locate/code.c, locate/locate.1,
locate/locate.c, locate/locatedb.5, locate/locatedb.h,
locate/updatedb.1, locate/updatedb.sh, locate/word_io.c,
m4/findlib.m4, m4/nullsort.m4, m4/withfts.m4, xargs/xargs.1:
Likewise.
* m4/nullsort.m4: Removed occurrences of space followed by tab.
Enabled GCC warnings for declarations after statements.
* import-gnulib.config: Import the gnulib module 'warnings'
* configure.ac: Add GCC warning -Wdeclaration-after-statement.
* Makefile.am: Add AM_CFLAGS and set it to $(WARN_CFLAGS).
* find/Makefile.am, doc/Makefile.am, lib/Makefile.am: Likewise.
* locate/Makefile.am, xargs/Makefile.am: Likewise.
2009-03-03 James Youngman
Fix Savannah bug #25359, more efficiently (suggestion by Nick Fortino).
* find/ftsfind.c (consider_visiting): revert the previous change
which discarded type information, and instead simply ensure that
state.curdepth holds the correct value before digest_mode() is
called.
(find): revert the previous change.
(visit): we no longer need to set state.curdepth here, since it
will have been set already in consider_visiting().
2009-03-02 James Youngman
Fix Savannah bug #25359.
* find/ftsfind.c (consider_visiting): discard mode information
from fts when the -H option is in effect and the current file is a
symbolic link.
(find): don't decode the mode information that find is trying to
pass to us in that case, since we don't want to use it.
* find.posix/sv-bug-25359.exp: new test for this bug.
* find.posix/sv-bug-25359.xo: expected output for the test.
* NEWS: Mention this bugfix.
2009-02-21 James Youngman
Updated the email address for Eric B. Decker.
* ChangeLog: Updated Eric's address
* find/find.c: Likewise
* find/ftsfind.c: Likewise
2009-02-21 Jim Meyering
find: take advantage of new gnulib/fts leaf-optimization
* find/ftsfind.c (ftsoptions): Set the FTS_CWDFD bit.
This is required in order to take advantage of fts' leaf-optimization.
* find/ftsfind.c (consider_visiting): Allow state.type to be 0
when fts_info is FTS_NSOK;
This allows find to process an fts entry for which fts_read returns
FTS_NSOK (no stat) but for which find requires only type info.
This happens on file systems that lack dirent.dtype information.
Currently, only reiserfs is handled this way. Until the recent
gnulib/fts change, [97d5b66] "fts: arrange not to stat non-directories
in more cases" this change was not necessary, because fts would always
stat non-dir entries on a file system with no dirent.dtype information.
However, combined with the gnulib change, this change lets find
avoid many per-non-directory stat-like syscalls (i.e. fstatat)
in some very common cases, like "find . -print" on reiserfs --
which can be a huge performance savings.
find: avoid warning about unused local
* find/pred.c (scan_for_digit_differences): Remove declaration of
unused local, "ok". (second time, really applying that patch).
2009-02-21 James Youngman
Update gnulib version.
* import-gnulib.config (gnulib_version): Update from
d4b129b8e5f8a8d1198020fd6fc79310d305936c to
df70a4bf4a1e84171918db09b639ae1a14c2a9b2. This pulls in the
following relevant changes:
fts: correct internal computation of nlinks (optimization-related)
fts: move a function definition "up" (no semantic change)
fts: arrange not to stat non-directories in more cases
fts: add #if guards so that the fts_lgpl module still builds
fts: avoid used-uninitialized error due to recent change
regex: avoid compilation failure with upcoming gcc-4.4
regex: fix glibc bug 697
regex: fix glibc bug 9697
Other changes may also be relevant; for details please check gnulib/ChangeLog.
Improvements to import-gnulib.config, import-gnulib.sh.
* import-gnulib.config (gpl3_update_files): No longer need to
update the licenses of build-aux/mdate-sh, build-aux/texinfo.tex
or build-aux/ylwrap as they are already GPLv3+.
(modules): Use the strdup-posix module instead of strdup, and stop
using the obsolete modules memcmp and memset, since we now assume
those functions will already be present on the host system.
* import-gnulib.sh (rehack): Be more verbose about which files
actually needed a license edit and which did not.
Follow gnulib-tool's Makefile.am edit suggestions.
* find/Makefile.am (LDADD): Use $(LIBINTL) instead of @INTLLIBS@
and use $(LIB_CLOCK_GETTIME) instead of @LIB_CLOCK_GETTIME@.
* lib/Makefile.am: Likewise.
* locate/Makefile.am: Likewise.
* xargs/Makefile.am: Likewise.
* import-gnulib.sh (hack_gnulib_tool_output): Add
m4/gnulib-cache.m4 to EXTRA_DIST in gnulib/Makefile.am, as
gnulib-tool suggests.
2009-02-21 Jim Meyering
find: avoid warning about unused local, remove unnecessary include.
* find/pred.c (scan_for_digit_differences): Remove declaration of
unused local, "ok".
(do_time_format): Remove decl of "done"; replace sole use with a
constant, "true". Initialize "i" and "n".
* lib/dircallback.c: Don't include unistd.h. Not needed.
2009-01-17 Thien-Thi Nguyen
find: Fix -regexptype parse specification bug: declare as POSOPT.
* find/parser.c (parse_table): Parse -regextype as POSOPT.
2008-12-26 Jim Meyering
find: avoid using undefined statbuf
* /ftsfind.c (consider_visiting): Use local variable, mode,
rather than possibly undefined statbuf.st_mode.
2008-12-23 James Youngman
Fix Savannah bug #25154: Failure to compile with GCC-2.95.4
* find/parser.c (do_parse_xmin): Move declaration of struct
timespec origin before the statements; declarations after
statements are a GCC extension we were accidentally relying on.
2008-12-21 James Youngman
Fix Savannah bug #25144: Misleading message for find -user unknown.
* find/parser.c (parse_user): If there is no known group for the
specified user (and it does not appear to be a uid), issue a
fatal error message instead of returning false, because the error
message that results from a return of false is "invalid argument",
which is misleading in this case. Similarly for a missing or an
empty argument.
2008-12-01 James Youngman
* po/fr.po: Updated French translation.
* po/id.po: Updated Indonesian translation.
2008-12-01 Geoff Gole
* xargs/xargs.1 (STANDARDS CONFORMANCE): Fix typo.
2008-11-30 Jim Meyering
Pass file type information in dirent.d_type from fts to find.
* find/ftsfind.c (consider_visiting): When fts provides usable
dirent.d_type information, and the only stat information required
by find's predicates is the file-type information normally found
in stat.st_mode (that is, not the permissions information), skip
the now-redundant stat calls. This change is useful only with the
very latest version of fts.c from gnulib. Requires gnulib version
d4b129b8e5f8a8d1198020fd6fc79310d305936c or later.
* find/ftsfind.c (find): Set state.have_type if fts returned type
information.
2008-11-08 James Youngman
* import-gnulib.config (gnulib_version): Update version of gnulib,
mainly in order to pull in Jim Meyering's efficiency improvements
to fts. See http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=2f2978ede97205c49d3e568ccffa5a04fb53326b
* lib/dircallback.c: gnulib's lstat.h is now gone, instead it
provides where that is needed.
2008-11-08 Jim Meyering
* README-CVS: tiny typo fix (s/fileutils/findutils/).
2008-09-07 James Youngman
Fix bug #23996 (integer overflow when parsing "-used 3").
* find/parser.c (get_relative_timestamp): Check for overflow after
the fact by comparing the relative sizes of the result and the
operands. This prevents an incorrect diagnosis of overflow when
the resulting tv_sec is correctly negative (as is normally the
case for -used).
2008-08-31 James Youngman
New Czech translation.
* po/cs.po: New Czech translation.
* configure.ac: Added cs (Czech) to ALL_LINGUAS.
Fix Savannah bug #24169 (-neweraa without following arg coredumps).
* find/parser.c (parse_newerXY): Issue a fatal error message if
there is no following argument.
* find/testsuite/find.gnu/sv-bug-24169.exp: Test case for this
bug.
* find/testsuite/Makefile.am (EXTRA_DIST_EXP): Also distribute
this new test file.
* NEWS: Mention this change.
2008-08-04 James Youngman
* find/find.1: correct typo seach->seach (reported by Bobby
R. Ward).
* locate/updatedb.1: correct typo Any -> any (reported by Reuben
Thomas).
2008-06-28 James Youngman
Fix savannah bug #23070 (find.1 needs update for -perm /000)
* find/find.1 (-perm /mode): The all-bits-zero behaviour has
already changed.
* NEWS: Mention the fix.
2008-06-21 James Youngman
* import-gnulib.config (gnulib_version): Updated to current HEAD
gnulib.
Fix Savannah bug #23663, crash in some locales for %AX.
* find/pred.c (do_time_format): Fix off-by-one error in handling
of the buffer used to print timestamps. This caused a crash in
some locales when handling the %AX format specifier.
* NEWS: Mention this bugfix.
2008-06-20 RB
* doc/find.texi (Finding the Shallowest Instance): Add worked
example explaining how to efficiently locate the shallowest
instances of '.svn' or 'CVS' in a forest of project trees.
* find/find.1 (EXAMPLES): Add the same example here (with slightly
briefer wording).
2008-06-19 Per Starbäck (tiny change)
* doc/find.texi (Unusual characters in filenames): Directory
separator is the slash, not the backslash.
2008-06-19 James Youngman
* po/zh_CN.po: Updated the Chinese (simplified) translation.
* NEWS: Mention this change.
2008-06-19 Stepan Kasal
* doc/find.texi (Cleaning Up): Move the note about -depth up.
2008-06-19 James Youngman
* po/lt.po: New Lithuanian translation.
* NEWS: Mention this change.
* configure.ac: Add "lt" to ALL_LINGUAS.
2008-05-28 James Youngman
Bugfix to the code that was previously supposed to fix bug #22662
in 4.5.0.
* find/pred.c (scan_for_digit_differences): Remember that wesaw
the first differing digit and also get the order of the
subtractionoperands right.
(do_time_format): Off by one error on checking for a nondigit
after the sequence of changed digits.
* NEWS: Mention this change.
2008-05-18 James Youngman
Update gnulib.
* import-gnulib.config (gnulib_version): Update to current head
version of gnulib.
Document effect of gnulib update, mainly on yesno().
* doc/find.texi (Unusual Characters in File Names): Explain that
the LC_CTYPE variable affects which characters are considered to
be printable by -printf %p, -print and -fprint.
(Querying): Explain in more detail how environment variables
affect the interpretation of the response to -ok and -okdir.
(Regular Expressions): Indicate that the locale configuration
affects the interpretation of regular expressions.
(Environment Variables): Describe how LC_COLLATE and LC_CTYPE
affect the interpretation of regular expressions. Indicate that
LC_MESSAGES affects the interpretation of the response to -ok.
* find/find.1 (-ok): Describe the effect of POSIXLY_CORRECT,
LC_CTYPE and LC_COLLATE.
(-okdir): Likewise.
(UNUSUAL FILENAMES): Describe how LC_CTYPE affects -printf %p,
-print, -fprint.
(STANDARDS CONFORMANCE): -ok and -okdir now obey the system's
definition of yes/no if POSIXLY_CORRECT is set. In any case,
LC_CTYPE and LC_COLLATE may have some effect. Point out that
the setting of LC_MESSAGES deternmines what pattern is used to
interpret the user's response to -ok/-okdir.
* find/parser.c: Remove definition of ISUPPER, which we no longer
need.
* NEWS: mention these changes.
2008-04-25 Eric Blake
Support cygwin 1.7.0.
* find/parser.c (parse_newerXY)
[HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC]: Add support for another
form of birthtime.
* import-gnulib.config (gnulib_version): Update to pick up change
necessary for cygwin fstatat.
2008-03-21 James Youngman
* find/testsuite/find.gnu/xtype-symlink.exp: Removed unnecessary
test code which created a insecure tempfile.
2008-03-16 James Youngman
Update gnulib.
* import-gnulib.config (gnulib_version): Update to a newer version
of gnulib.
Find optimises at -O2 by default.
* find/util.c (set_option_defaults): Use a default optimisation
level of 2 rather than 0.
* NEWS: Mention this change.
Begin work on findutils-4.5.x.
* configure.ac: We're now working on the 4.5.x release series, so
change the version number.
* NEWS: Likewise.
2008-03-10 Justin Pryzby (tiny change)
* doc/find.texi: Various typo corrections.
2008-03-10 Eric Blake
Don't truncate printed ino values. Fixes Savannah bug #15472.
* find/find.c (wd_sanity_check): Use PRIuMAX for platforms with
64-bit ino_t.
* NEWS: Document this.
2008-03-10 Jim Meyering
Rename local and member "dirfd" to avoid shadowing the function.
This avoids many warnings from gcc -Wshadow:
* lib/buildcmd.h (struct buildcmd_state) [dir_fd]: Rename member
from dirfd.
* find/defs.h (struct exec_val) [dir_fd]: Likewise.
Rename parameter in prototype.
* find/ftsfind.c (inside_dir): Rename parameter: s/dirfd/dir_fd/
* find/parser.c (new_insert_exec_ok, insert_exec_ok): Likewise.
* find/pred.c (new_impl_pred_exec, prep_child_for_exec, launch):
s/dirfd/dir_fd/
* find/util.c (do_complete_pending_execdirs): Likewise.
(complete_pending_execdirs): Likewise
* lib/buildcmd.c (bc_init_state, bc_clear_args): Likewise.
* lib/dircallback.c (run_in_dir): Likewise.
* lib/dircallback.h (DIRCALLBACK_H): Likewise.
* lib/listfile.c (list_file, get_link_name_at): Likewise.
* lib/listfile.h (LISTFILE_H): Likewise.
Avoid link failure with -fno-common.
* locate/code.c (program_name): Declare "extern".
2008-03-09 James Youngman
Fix (documentation) bug #20873, / and . in file names for -path.
* doc/find.texi (Full Name Patterns): Mention that * in the "find
-path" pattern will match both / and leading dots.
2008-03-08 Jim Meyering
Fix doc typos.
* doc/find-maint.texi (Security): s/ongest/longest/
(Making Releases): s/the the/the/
Avoid link failure with gcc -fno-common.
* find.c (program_name, starting_desc): Declare "extern".
2008-02-15 Eric Blake
Avoid compiler warnings.
* find/pred.c (pred_name_common): Remove unused variable.
* locate/locate.c (print_stats): Avoid undefined format string.
2008-02-15 James Youngman
* README-CVS: Explain how to update the translations from the
translation project.
* NEWS, configure.ac: Change release number to 4.3.14-CVS.
2008-02-13 Ralf Wildenhues (tiny change)
* import-gnulib.config: Add progname.
* lib/Makefile.am (LDADD): Use @LIBINTL@ instead of @INTLLIBS@.
* xargs/xargs.1: Fix a couple of typos.
2008-02-12 James Youngman
Updated translations: German, Irish, Dutch, Polish, Vietnamese.
* po/de.po, po/ga.po, po/nl.po, po/pl.po, po/vi.po: Updated from
the Translation Project.
Fix Savannah bug #22056, -Xtime tests are off by one second.
* find/defs.h (struct options): Change cur_day_start from time_t
to strct timespec.
* find/util.c (set_option_defaults): Likewise.
* find/parser.c (get_relative_timestamp): Change the origin
argument from time_t to struct timespec.
(estimate_timestamp_success_rate): Ignore the nanoseconds field of
the timestamp when estimating the probable success rate.
(parse_daystart): Handle the nanoseconds field too.
(do_parse_xmin): The origin argument to get_relative_timestamp()
is of type struct timespec, not time_t.
(parse_used): Likewise.
(parse_time): Likewise.
* find/pred.c (pred_timewindow): in the COMP_EQ case, accept times
exactly at the end of the window and do not accept times exactly
at the start (reversing the previous treatment of the bounds).
* find/testsuite/Makefile.am (EXTRA_DIST_EXP): Added test for
-mtime 0; find.posix/mtime0.{exp,xo}.
* NEWS: mention this bugfix.
2008-02-09 James Youngman
* doc/find.texi (xargs options): Moved documentation of xargs'
options into this new section.
(Invoking the shell from xargs): New section providing examples
about "xargs sh -c '...'".
* xargs/xargs.1: Indicate that the "sh -c" trick with xargs
achieves the same thing as BSD's "xargs -o", but in a more
flexible way.
* locate/updatedb.sh: Actually rename the old database to the new
one atomically, instead of just claiming the rename is atomic in a
comment :) This fixes Savannah bug #22057.
* find/find.c (ngettext): Introduce a new macro to help with
internationalising plurals. Use it to allow better
translations of format strings.
* locate/locate.c: Likewise.
2008-01-07 James Youngman
* xargs/xargs.c: (main): Standardise on "Warning" instead of
"warning" in messages.
* xargs/xargs.c: (add_proc): Use x2nrealloc to extend the pids
array, rather than doubling the size of the buffer (since the old
aproach was vulnerable to overflow).
Reap all available child processes before every fork. This fixes
Savannah bug #21960.
* xargs/xargs.c: (proc_max): since this is a non-negative
quantity, make it unsigned.
(procs_executing): Likewise.
(pids_alloc): Likewise (using size_t).
(procs_executed): In order to prevent possible overflow, make this
a boolean, not a count. We only cared if the previous counter was
zero or not, anwyay.
(add_proc): Set procs_executed to true rather than incrementing it.
(wait_for_proc): When called, always reap all available children.
Add an extra argument which is the minimum number of children we
must reap before returning.
(wait_for_proc_all): Pass the new extra argument.
(xargs_do_exec): Call wait_for_proc() to reap all available
children before forking a new child. Modify other calls to
wait_for_proc to pass the new extra argument.
* NEWS: Mention this change.
2007-12-20 James Youngman
* find/fstype.c, find/ftsfind.c, find/parser.c, find/pred.c,
find/tree.c, lib/regextype.c, locate/locate.c, xargs/xargs.c,
find.c: Backed out positional paremeter change, as the use of
positional parameters was over-complex and unnecessary. We'll
re-apply the pluralisation support change soon, but without the
positional parameters.
2007-12-20 Jakub Bogusz (tiny change)
* xargs/xargs.c (parse_num): Corrected typo in format string
message.
2007-12-20 Clytie Siddall (tiny change)
* find/find.c (wd_sanity_check): Corrected typo in the format
string for an error message, which might cause a crash in
"oldfind" if a directory we moved into turned out to be a symbolic
link that moved while we were trying to change directory.
2007-12-20 James Youngman
* configure.ac: Advance the version number, as we are moving on
from 4.3.12.
* NEWS: Likewise
2007-12-19 James Youngman
* find/find.c (ngettext): Introduce a new macro to help with
internationalising plurals. Use it with positional parameters in
order to allow better translations of format strings.
* find/fstype.c, find/ftsfind.c, find/parser.c, find/pred.c,
find/tree.c, lib/regextype.c, locate/locate.c, xargs/xargs.c: Likewise.
2007-12-19 Benno Schulenberg (tiny change)
* find/find.1: Corrected two typos.
2007-12-19 James Youngman
* po/nl.po: Updated Dutch translation from the Translation project.
* po/pl.po: Likewise for the Polish translation.
* po/sv.po: Likewise for the Swedish translation.
* po/vi.po: Likewise for the Vietnamese translation.
2007-12-13 Eric Blake
Allow bootstrapping with autoconf 2.61a.
* configure.ac (AC_AIX, AC_ISC_POSIX): Delete, now that gnulib
takes care of this.
(jy_AC_TYPE_INTMAX_T): Delete, now that gnulib stdint module takes
care of this.
2007-12-09 James Youngman
* doc/perm.texi: Updated from the upstream source.
* po/nl.po, po/pt.po: Updated from the Translation Project.
2007-12-08 James Youngman
* xargs/xargs.1: Added examples on stdin handling and more
efficient core file deletion.
* NEWS: Mention this.
* doc/.cvsignore: Ignore regexprops-generic.texi.
* doc/.gitignore: ditto
2007-12-04 James Youngman
Fix Savannah bug #15384, find misbehaves when parent directory is
not readable.
* find/testsuite/find.posix/parent.exp: New test
* find/testsuite/find.posix/parent.xo: New test
* find/testsuite/Makefile.am (EXTRA_DIST_EXP, EXTRA_DIST_XO):
Added parent.exp, parent.xo.
* find/find.c (safely_chdir): If safely_chdir_nofollow fails with
SafeChdirFailDestUnreadable, fall back on safely_chdir_lstat.
* find/find.1: Formatting fixes; options should be in bold.
2007-12-02 James Youngman
Fix Savannah bug #20802, find -delete anomalies
* find/pred.c (pred_delete): Set find's exit status to nonzero if
-delete fails.
* find/find.1 (-delete): Document this.
* doc/find.texi (Delete Files): Document this.
* NEWS: Mention the fix.
2007-11-30 James Youngman
Fix Savannah bug #20865 (-prune -delete without an explicit
-depth is now an error).
* find/parser.c (check_option_combinations): Diagnose the
situation where -delete and -prune are both used, because -delete
turns on -depth and -depth makes -prune do nothing.
* find/tree.c (build_expression_tree): call
check_option_combinations().
* find/defs.h (struct options): Add new boolean field
explicit_depth.
Also declare check_option_combinations.
* find/util.c (set_option_defaults): Initialise explicit_depth.
* NEWS: Mention this fix.
2007-11-29 James Youngman
Support the generation of regexprops-generic.texi.
* lib/regextype.h (get_regex_type_context): Used to indicate if a
particular type of regular expression is of interest for
regexprops.texi (which is findutils-specific) or
regexprops-generic.texi (which is not). The "context" is simply
a flag set in a word.
* lib/regextype.c (get_regex_type_context): Implement this.
(regex_map): Assign a context to each regular expression type.
* lib/regexprops.c: Use the context information from regextype.c
to decide which regular expression types to docuemnt in the
output. The selection is indicated on the command line; "generic"
and "findutils" are supported.
(copying): New function, which emits a copyright header into the
output.
(comment): New function for emitting a comment.
(ignore): New function which returns nonzero when the indicated
type of regular expression is not of interest for this version of
the document.
(menu): Miss out the non-interesteing regex types.
(get_next): Returns the regex type name for the "next" pointer,
taking into account which regex types are ignored.
(describe_all): Take into account which regex types are ignored,
and emit a copying header also. Include a comment indicating
which "context" was of interest when generating the output.
* doc/Makefile.am: Add regexprops-generic.texi. Generate this
file from regexprops.c.
Check gnulib out with native git, rather than git-cvspserver.
This fixes Savannah bug #21568, for the second time.
* import-gnulib.config (gnulib_version): Switch to using a git
commit id and native git, since git-cvspserver silently fails to
support "cvs update -D".
* import-gnulib.sh (do_checkout): Check gnulib out with git rather
than CVS.
(main): Require 'git' to be available.
(move_cvsdir): Remove any pre-existing gnulib-cvs directory.
* doc/find-maint.texi (Using the GNU Portability Library): Desribe
how we now obtain gnulib. Update the instructions on how we patch
gnulib.
* .gitignore: Ignore gnulib-git, not gnulib-cvs
* .cvsignore: Ditto
* Makefile.am (findutils-check-smells): Change from gnulib-cvs to
gnulib-git.
* README-CVS: Mention the extra dependency on git.
* NEWS: Mention this change.
Add test case for Savannah bug #20803 (-prune return value).
* find/testsuite/find.posix/prune-result.exp: New test for
Savannah bug #20803.
* find/testsuite/find.posix/prune-result.xo: Expected otuput for
new test prune-result.exp.
* find/testsuite/Makefile.am (EXTRA_DIST_EXP): Added
find.posix/prune-result.exp
(EXTRA_DIST_XO): Added find.posix/prune-result.xo
2007-11-27 James Youngman
* find/pred.c (pred_prune): Always return true. This fixes
Savannah bug #20803.
* doc/find.texi (Directories): Document the change to -prune.
* find/find.1: Document the change.
* NEWS: Mention the fix.
2007-11-26 James Youngman
Fix Savannah bug #20970, handling of trailing slashes with -name.
* find/pred.c (pred_name_common): Strip trailing slashes from the
pathname before applying fnmatch() to it. This fixes Savannah bug
#20970.
* find/testsuite/find.posix/nameslash.exp: Test case for bug #20970.
* find/testsuite/find.posix/nameslash.xo: Expected output file for
same.
* find/testsuite/Makefile.am (EXTRA_DIST_EXP): Added nameslash.exp.
(EXTRA_DIST_XO): Added nameslash.xo.
Fix Savannah bug #21634, No copy of FDL1.2 included in source
code.
* doc/find.texi: Change license to the GNU Free Documentation
License 1.2.
(GNU Free Documentation License): Include fdl.texi
* doc/find-maint.texi (GNU Free Documentation License): Include a
copy of the FDL (it was already under this license).
* doc/Makefile.am (find_maint_TEXINFOS): Include fdl.texi
(find_TEXINFOS): Include fdl.texi
* import-gnulib.config (modules): Include gpl-3.0 and fdl.
* doc/perm.texi: Added copyright license, following the license of
the original source document (perm.texi from coreutils).
2007-11-25 James Youngman
* Makefile.am (jy-regex-fix): Comment that the regex.c fix needs
to stay until we no longer support Automate-1.9.
* doc/perm.texi (Mode Structure): Fix setgid/setuid typo.
2007-11-24 James Youngman
* doc/find.texi (Mode Bits): Correct the warning about the change
in behaviour of -perm /000 to indicate that the change has
happened now. This fixes Savannah bug #21628.
* NEWS: Mention this.
2007-11-22 James Youngman
POSIXLY_CORRECT turns off warnings.
* find/defs.h (struct options): Added member posixly_correct.
This is set when the POSIXLY_CORRECT environment variable is set.
* find/util.c (set_option_defaults): Set options.posixly_correct
if the POSIXLY_CORRECT environment variable is set.
(set_option_defaults): Turn off warnings when POSIXLY_CORRECT is
in force.
* find/find.1: Document this.
(Environment Variables): Likewise.
(Warning Messages): Likewise.
Non-POSIX compliant arguments to -perm generate an error when
POSIXLY_CORRECT is set.
* find/parser.c (parse_table): Indicate which primaries are
defined by POSIX.
(non_posix_mode): New function; issues an error message when a
non-POSIX-compliant argument to -perm is used (and POSIXLY_CORRECT
is in force).
(parse_perm): Call non_posix_mode when a non-POSIX-compliant mode
argument is seen.
* find/testsuite/find.gnu/posix-perminvalid.exp: New file; tests
invalid arguments to -perm.
* find/testsuite/Makefile.am (EXTRA_DIST_EXP): Add
posix-perminvalid.exp.
* find/find.1: Document this.
* doc/find.texi (Mode Bits): Likewise
(Environment Variables): Likewise
* xargs/xargs.1: Options should be bold, not italic; filenames
should also be italic. OPTIONS should be a section, not a
subsection. In the description of --max-lines, "max-args" was
corrected to "max-lines". Turn off hyphenation in the SYNOPSIS
section. This fixes Savannah bug #21270.
2007-11-13 James Youngman
* NEWS, configure.ac: Prepare for the release of findutils-4.3.10.
* import-gnulib.sh (usage): If the existing CVS working tree for
gnulib in the source tree does not yet point at the
git-cvs-pserver repository, move the old gnulib working tree out
of the way and do a fresh checkout. This fixes Savannah bug
#21568.
2007-11-11 James Youngman
* configure.ac: Prepared for release of findutils-4.3.9.
* NEWS: Likewise.
* po/POTFILES.in: Use gnulib/lib/getdate.y rather than
gnulib/lib/getdate.c, because the former is the source file, and
because without this change the update-po target of po/Makefile
fails.
* import-gnulib.config (gnulib_version): Move to gnulib
2007-11-10.
* po/hu.po, po/nl.po: Updated from Translation Project.
2007-09-08 James Youngman
Better documentation on $PATH security checks.
* doc/find.texi (Single File): Better explanation of what makes
certain values of $PATH insecure. This fixes Savannah bug
#20951.
* find/find.1 (-execdir): Likewise.
Document interaction of -depth/-delete/-prune.
* doc/find.texi (Directories): Mention that "-prune ... -delete"
will not do what you want and will cause the deletion of more
files than you probably intended.
(Delete Files): Likewise, suggest using "-depth" when testing
command lines you plan to eventually add "-delete" to.
(Cleaning Up): Add -depth explicitly to an example which uses
-delete.
* find/find.1 (-depth): Mention that -delete also implies -depth.
(-delete): Warn against putting -delete first.
(-prune): Also warn against -prune ... -delete.
NEWS: Mention these changes.
2007-08-23 Eric Blake
Pick up gnulib change to getline module.
* import-gnulib.config (gnulib_version): Bump date.
* locate/bigram.c: Use , not getline.h.
* locate/code.c: Likewise.
* locate/frcode.c: Likewise.
* locate/locate.c: Likewise.
* po/ChangeLog: Delete, merge into this file.
2007-08-23 James Youngman
* po/nl.po: Updated from Translation Project
* find/parser.c (check_path_safety): Assume the path is safe is
$PATH is not set. This avoids a segfault in that situation
and thus fixes Savannah bug #20834.
2007-08-22 James Youngman
* find/parser.c (parse_path): This is the 'canonical' name once
again.
(parse_wholename): This is not.
(parse_ipath): No longer deprecated.
* NEWS: Mention this.
2007-08-22 Eric Blake
Fix Savannah bug #20871.
* find/find.c (main): Remove bogus assertion.
* NEWS: Document the fix.
Update to recent gnulib addition of idcache.h.
* lib/listfile.c (getuser, getgroup): Use header rather than
declaring things ourself.
* po/POTFILES.in (locate/frcode.c): Add missing file.
2007-08-21 Eric Blake
Fix for Savannah bug #20273, find -ok with seekable stdin.
* find/find.c (main): Use close_stdin, not close_stdout.
* import-gnulib.config (gnulib_version): Pick up yesno tests.
* NEWS: Document the change.
* build-aux/.cvsignore: Ignore compile.
2007-08-20 Paul Eggert
and Eric Blake
Improve translation of xstrtol messages.
* import-gnulib.config (destdir): Upgrade gnulib to 2007-08-11.
* locate/locate.c (dolocate): Adjust to API change of xstrtol
gnulib module.
* po/POTFILES.in: Likewise.
* NEWS: Document the enhancement.
2007-08-20 James Youngman
* doc/find.texi (Directories): Clarify that built commands which
have not been executed yet will be executed before find quits,
even with -quit. Also clarify the difference between -prune and
-quit.
2007-08-18 Eric Blake
Fix Savannah bug #20751.
* lib/listfile.c (list_file): Accommodate gnulib change of 3 Jul
2006.
* NEWS: Document this.
Reported by Nigel Stepp.
* THANKS: Sort and update.
* AUTHORS: Add myself.
2007-08-05 Eric Blake