maint: prohibit use of strncpy

* cfg.mk (sc_prohibit_strncpy): New syntax-check rule.
Exempt pinky.c and who.c, at least for now.
maint: migrate strncpy-prohibiting rule to gnulib

* cfg.mk (sc_prohibit_strncpy): Remove rule.
Now it's in gnulib.
build: update gnulib to latest; correct comment grammar

* tests/misc/help-version: Fix comment grammar:
s/all these/all of these/
* gl/lib/tempname.c.diff: Likewise.
maint: remove su testing artifact

* tests/misc/help-version: Remove expected su exit code.
stty: portability: accommodate CIL

* src/stty.c (main): Declare locals "mode" and "new_mode" to be static
to ensure that each is initialized to zero, *including* all padding.
While gcc clears padding of a local automatic initialized to "{ 0, }",
CIL does not, and the C99 standard is not clear on this issue.
Reported by Edward Schwartz.  See http://bugs.gnu.org/11675 for details.
maint: sort: style adjustment to help clarify size determination

* src/sort.c (default_sort_size): Move physmem code "down" to first use.
maint: suppress echoing of sc_THANKS_in_duplicates implementation

* cfg.mk (sc_THANKS_in_duplicates): Suppress the echoing of these
commands run during `make syntax-check`
maint: refactor common mode bits used to create files

* src/system.h (MODE_RW_UGO): The new refactored define (666).
* src/mkfifo.c: Use the new define.
* src/mknod.c: Likewise.
* src/split.c: Likewise.
* src/system.h: Likewise.
* src/touch.c: Likewise.
* src/truncate.c: Likewise.

Suggested-by: Jim Meyering
split: ensure output doesn't overwrite input

* src/split.c (create): Check if output file is the
same inode as the input file.
* tests/split/guard-input: New test case.
* tests/Makefile.am: Reference new test case.
* NEWS: Mention the fix.

Improved-by: Jim Meyering
Reported-by: François Pinard
doc: document multiplier for dd number options like count=N

* src/dd.c (usage): Add "N" to the description of multipliers.
* doc/coreutils.texi (dd invocation): Likewise.
maint: avoid a static analysis warning in csplit

The Canalyze static code analyzer correctly surmised
that there is a use-after-free bug in free_buffer()
at the line "struct line *n = l->next", if that
function is called multiple times.

This is not a runtime issue since a list of lines
will not be present in the !lines_found case.

* src/csplit.c (free_buffer): Set list head to NULL so
that this function can be called multiple times.
(load_buffer): Remove a redundant call to free_buffer().

Reported-by: Xu Zhongxing
doc: improve sample backup script

* doc/coreutils.texi (cp invocation): Make the backup script exit
with an accurate reflection of any failure.
Also, add --preserve=all.

Improved-by: Bernhard Voelker
stat,tail: recognize new file system type: aufs

* src/stat.c (human_fstype) [__linux__]: Add a 'case' for the new
remote file system type: aufs (0x61756673).
* NEWS (New features): Mention stat -f.
(Bug fixes): Mention it for tail -f.
Reported by Michael Mol in http://bugs.gnu.org/11823
maint: avoid false-positive syntax-check failure due to fail=0 in .texi

* cfg.mk (exclude_file_name_regexp--sc_prohibit_fail_0): Exempt
all .texi files.
gitignore: ignore the '.am' directories, used internally by Automake-NG

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
.gitignore: add the '.am' directories

Which are used internally by Automake-NG.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Merge branch 'master' into automake-ng

* master:
  maint: avoid false-positive syntax-check failure due to fail=0 in .texi
  stat,tail: recognize new file system type: aufs
  doc: improve sample backup script
  maint: avoid a static analysis warning in csplit
  doc: document multiplier for dd number options like count=N
  split: ensure output doesn't overwrite input
  maint: refactor common mode bits used to create files
  maint: suppress echoing of sc_THANKS_in_duplicates implementation
  maint: sort: style adjustment to help clarify size determination
  stty: portability: accommodate CIL
  maint: remove su testing artifact
  build: update gnulib to latest; correct comment grammar
  maint: migrate strncpy-prohibiting rule to gnulib
  maint: prohibit use of strncpy
maint: avoid a -Wunsed-but-set warning on some systems

* src/stty.c (main): Mark speed_was_set as possibly unused,
as is the case when CIBAUD is undefined (on ppc64 GNU/Linux
for example).
Reported-by: Stefano Lattarini
maint: sc_prohibit_fail_0: update a stale comment

* cfg.mk (sc_prohibit_fail_0): Following on from
commit v8.0-79-g71c2f88, update the comment to match.
sort: avoid redundant processing with inaccessible inputs or output

* src/sort.c (check_inputs): A new function to verify all inputs
are accessible before further processing.
(check_output): A new function to open or create a specified
output file, before futher processing.
(stream_open): Adjust to truncating the previously opened
output file rather than opening directly.
(avoid_trashing_input): Optimize to stat the output file
descriptor, rather than the file name.
(main): Call the new functions to check accessibility of
inputs and output, before processing starts.
* tests/misc/sort: Adjust to the changed error message.
* tests/misc/sort-merge-fdlimit: Account for the earlier opened
file descriptor of the specified output file.
* tests/misc/sort-exit-early: A new test to exercise the improvements.
* tests/Makefile.am: Reference the new test.
* NEWS: Mention the improvement.

Suggested-by: Bernhard Voelker