* configure.ac (AM_SILENT_RULES): Use this, with it's undocumented
[yes] argument. Those who want verbose build output may configure
with --disable-silent-rules or use "make V=1".
Changes:
- Avoid warning "(macro BR): only 1 argument, but more are expected".
- Change misused SI (metric) numeric prefixes to the binary ones, like
a bare "1K blocks" to "1 KB blocks".
- Protect a full stop (.) with "\&", if it has a blank (white-space)
in front of or (ignoring transparent characters to the full stop) after
it, and it does not mean an end of a sentence.
- Change the name of a macro for two fonts (e.g., BR and IR) to one
letter, if there is only one argument.
- Use a macro to change to the italic font, instead of \fI [1], if
possible.
- Remove space in the first column, if not intented.
- Move a full stop (period) and a comma outside of a quoted text, if
it is at the end of the quote and does not end a quoted sentence.
- Change a HYPHEN-MINUS (code 0x55, 2D) to a minus (\-), if in front
of a name for an option.
- Split lines longer than 80 characters into two or more lines.
- Separate the sentences and subordinate clauses; each begins on a new
line. Or: Adjust space between sentences (two spaces).
- Fix the spelling of "kibi", "mebi", and "gibi".
* find/find.1: Do the above.
Patch contributed via https://sv.gnu.org/patch/?9585
Copyright-paperwork-exempt: Yes
Run 'make update-copyright'.
* lib/regexprops.c (copying): Update the year number manually.
* All other files: Update copyright years via the above make run.
The following new warning sneaked in with the gnulib update in the
previous commit:
In file included from parser.c:49:0:
../gl/lib/stat-time.h: In function 'stat_time_normalize':
../gl/lib/stat-time.h:215:47: error: unused parameter 'st' \
[-Werror=unused-parameter]
stat_time_normalize (int result, struct stat *st)
^~
* configure.ac: Add the -Wno-unused-parameter option explicitly as it
is implied - and thus overridden - by the more general -Wunused option.
* find/find.1 (-executable): Mention to whom the matching files are
accessible: to the current user.
(-readable): Likewise.
(-writable): Likewise.
Reported by 積丹尼 Dan Jacobson <jidanni@jidanni.org> in
https://lists.gnu.org/r/bug-findutils/2017-12/msg00017.html
* lib/regextype.c (get_regex_type_synonym): don't return regex
dialect Y as a synonym of dialect X, if we're not in fact going to
include X. Accept a CONTEXT parameter in order to identify this
situation. This ensures that the bug fixed in commit
e2c673cbcdc325a3a2e9dd02169bb4a42c61bc48 stays fixed for any
permutation of regex_map.
* lib/regextype.h: update prototype of get_regex_type_synonym.
* lib/regexprops.c (describe_all): Pass the new context parameter.
* doc/regexprops.texi: regenerate this file.
* lib/regextype.c (regex_map): Permute the entries to list POSIX
dialects before other ones, so that we don't end up with a
dangling reference to `ed' regular expressions when
context=findutils. Remove trailing white space from the output.
* doc/regexprops.texi: Regenerate this file, so that we no longer
have a dangling reference to the `ed' dialect.
* doc/find.texi (Regular Expressions): Point out the difference
between Emacs regular expressions and findutils regular
expressions: in findutils "." will match newline.
* find/find.1: Likewise.
* locate/locate.1: Likewise. Also document the --regextype option.
Each /archive/html/ part can be replace with /r/.
Run this to induce the change:
git grep -l archive/html|xargs perl -pi -e 's,/archive/html/,/r/,g'
* README: Perform that substitution.
* find/testsuite/find.posix/depth1.exp: Likewise.
* gnulib-local/lib/gcc-function-attributes.h
die() has the advantage of being apparent to the compiler
that it doesn't return, which will avoid warnings in some cases,
and possibly generate better code.
While at it, wrap some of the overly long error messages into a new line.
* cfg.mk (sc_die_EXIT_FAILURE): A new syntax check rule to
catch any new uses of error (CONSTANT, ...);
* find/exec.c: Include "die.h" and use die rather than exit (EXIT_FAILURE).
* find/fstype.c: Likewise.
* find/ftsfind.c: Likewise.
* find/oldfind.c: Likewise.
* find/parser.c: Likewise.
* find/pred.c: Likewise.
* find/print.c: Likewise.
* find/tree.c: Likewise.
* find/util.c: Likewise.
* lib/buildcmd.c: Likewise.
* lib/listfile.c: Likewise.
* lib/regextype.c: Likewise.
* lib/safe-atoi.c: Likewise.
* locate/frcode.c: Likewise.
* locate/locate.c: Likewise.
* locate/word_io.c: Likewise.
* xargs/xargs.c: Likewise.
GCC-7.2.1 complained about this occur during 'make check'.
* lib/regexprops.c (menu): Remove set-but-unused-variable 'options'.
* lib/test_splitstring.c (main): Avoid unused-parameter warnings
for 'argc' and 'argv'.
* lib/die.h (die): New file/function from grep/coreutils.
Note: this file will probably be migrated to gnulib.
* lib/Makefile.am (libfind_a_SOURCES): Reference it.
* xargs/xargs.c: Include die.h.
(xargs_do_exec): Use die in place of error-nonzero, thus allowing
the compiler to know that we do not fall through into the 0 (child)
case.
Avoid the new warnings GCC 7 gives with the
"-Werror=implicit-fallthrough=" compiler option.
Since version 7, GCC requires fallthrough switch/cases to be
marked by the appropriate attribute.
* lib/system.h: Add new header file defining the FALLTHROUGH macro.
* lib/Makefile.am (libfind_a_SOURCES): Reference it.
* find/print.c (do_fprintf): Use the new macro.
* xargs/xargs.c (read_line): Likewise.
(xargs_do_exec): For error(3), GCC 7 doesn't know that the function
does not return, and would complain about falling through into the
following case. Temporarily add an abort call - this will be fixed
with another commit.
Avoid the new warnings GCC 7 gives with the
"-Werror=implicit-fallthrough=" compiler option.
Since version 7, GCC requires fallthrough switch/cases to be
marked by the appropriate attribute.
* lib/system.h: Add new header file defining the FALLTHROUGH macro.
* lib/Makefile.am (libfind_a_SOURCES): Reference it.
* find/print.c (do_fprintf): Use the new macro.
* xargs/xargs.c (read_line): Likewise.
(xargs_do_exec): For error(3), GCC 7 doesn't know that the function
does not return, and would complain about falling through into the
following case. Temporarily add an abort call - this will be fixed
with another commit.
GCC-7.2.1 on openSUSE-Tumbleweed complains:
listfile.c:56:0: error: macro "HAVE_MAJOR" is not used \
[-Werror=unused-macros]
#define HAVE_MAJOR
* listfile.c (major,minor): Avoid the temporary #define HAVE_MAJOR
by using #else's.
Previously, the Copyright header output by 'updatedb --version' was
not updated by 'make update-copyright', so it still showed 2010 as
the Copyright year.
* locate/updatedb.sh (version): Replace the Copyright header by
the placeholder "@COPYRIGHT@" ...
* locate/Makefile.am (updatedb): ... set here from the Copyright line
extracted from 'updatedb.sh'.
'make distcheck' failed with:
...
ERROR: files left in build directory after distclean:
./find/testsuite/find.err
./find/testsuite/oldfind.err
Makefile:2064: recipe for target 'distcleancheck' failed
* find/testsuite/sv-52220.sh: Add command to remove the temporary
files used for stderr output.
Bug introduced in commit v4.6.0-123-gef1581e.
* cfg.mk: Set XZ_OPT = -7e (determined empirically).
The compressed tarball size is identical to the default settings (-9e),
but using -9e would force every decompression process to use 48 MiB
more memory.
On some platforms, 'find -D' without any further argument crashed.
* find/util.c (process_leading_options): Output an error diagnostic
when the -D option is the last argument. Previously, 'find -D'
without any further arguments crashed on some platforms where the
following strtok_r does not expect a NULL pointer argument in the
first call.
* NEWS (Bug Fixes): Mention the fix.
* find/testsuite/sv-52220.sh: Add a test.
* find/testsuite/Makefile.am (test_shell_progs): Reference the test.
Fixes https://savannah.gnu.org/bugs/?52220
* find/find.1 (NON-BUGS): Update the sample error diagnostic to match
the latest code of the unquoted pattern example for the -name predicate.
Also improve the explanation about what is happening in that case.
* find/testsuite/find.gnu/printf.exp: Add coverage for %T* (limited to
strftime sequences mandated by POSIX), %M, %t, %y, and %Y. Run this test
with TZ=UTC. (Latter fix by Bernhard Voelker.)
* find/testsuite/find.gnu/printf.xo: Likewise.
* find/print.c (format_date): Increase size of local variable
FMT to match the longest possible content.
Fixes https://bugs.debian.org/873032 reported upstream by
Andreas Metzler in https://savannah.gnu.org/bugs/?51841;
fix proposed by Kamil Dudka.
Bug introduced in commit v4.6.0-111-g95816b2, so no released version
ever saw this; therefore not adding a NEWS entry.
When the user passes a bad command line, then find(1) outputs the
error message followed by a short usage() text, e.g. (wrapped):
$ find . -name a* b*
find: paths must precede expression: bfile
Usage: find [-H] [-L] [-P] [-Olevel] \
[-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
Omit the usage() text in more cases like this in order to make the
error diagnostic more eye-catching.
* find/tree.c (build_expression_tree): Exit with EXIT_FAILURE
immediately in more cases, i.e., without outputting also a short
usage() text. While at it, add quotes around the offending argument
in one another place.
* NEWS (Improvements): Mention the fix.
Reported in https://savannah.gnu.org/bugs/?51711
* find/print.c (format_date): Avoid passing %F to strftime since
some implementation lack it. Pass the synonymous %Y-%m-%d
instead. This fixes a bug manifesting on HP Tru64 UNIX V5.1B.
Reported by Steven M. Schweda <sms@antinode.info>.
* build-aux/git-log-fix: Ignore a recent incorrectly-formatted
change-log message (5e56fe96bc5cf5c0b616dc0251dddebb7e480074)
which is replaced by another
(f146a243400c211a19c9b76e5f598b6d7c57b1b0). Also don't copy the
resulting merge commit message into the ChangeLog.