Paul Eggert [Mon, 7 Aug 2023 16:10:21 +0000 (09:10 -0700)]
quotearg: fix obsolete comment
* lib/quotearg.h: Fix comment to match behavior.
This fixes a commentary bug introduced in
commit 1a43a982c927eaf26bbc2701a872009d9be4b33b
"quotearg: do not use grave accent for left quote"
dated 2011-12-18 15:44:17+01, where the comment
was not updated to match the changed behavior.
Paul Eggert [Sun, 6 Aug 2023 19:19:36 +0000 (12:19 -0700)]
Document Android, OpenBSD printf "%n" lack
In doc/posix/functions/*printf*.texi,
document that the POSIX-specified printf functions
do not support the %n format on Android and OpenBSD.
This lack of support is deliberate, as %n is
a common target of attacks on security.
Paul Eggert [Sat, 5 Aug 2023 18:16:12 +0000 (11:16 -0700)]
readutmp: anticipate Y2038 hack for utmp
* lib/readutmp.c (struct utmpx32): Use unsigned int for tv_sec,
not int, as that is more likely to work after 2038.
Suggested by Andreas Schwab in:
https://sourceware.org/pipermail/libc-alpha/2023-August/150661.html
Paul Eggert [Sat, 5 Aug 2023 17:04:41 +0000 (10:04 -0700)]
diffseq: simplify lint removal
* lib/diffseq.h (IF_LINT): Remove.
Instead, always ignore the diagnostic, as that’s simpler
now that we have the pragma change installed in May.
This removes the last IF_LINT from diffutils, though not
the last use of GCC_LINT.
Bruno Haible [Sat, 5 Aug 2023 00:40:03 +0000 (02:40 +0200)]
unistr/{u8-mbtouc,u8-mbsnlen}: Fix test failures (regr. 2023-07-25).
* modules/unistr/u8-mbtouc (configure.ac): Compile this code if the
preinstalled libunistring version is >= 0.9.4, < 1.2.
* modules/unistr/u8-mbsnlen (configure.ac): Likewise.
Paul Eggert [Thu, 3 Aug 2023 23:01:52 +0000 (16:01 -0700)]
readutmp: systemd supports only UTMP_FILE
* lib/readutmp.c (read_utmp): Fail if not UTMP_FILE.
* m4/systemd.m4 (gl_SYSTEMD_CHOICE): Default to no for now,
since yes means "who /var/log/wtmp" stops working.
Paul Eggert [Thu, 3 Aug 2023 23:01:50 +0000 (16:01 -0700)]
readutmp: switch new struct to struct timespec
* lib/readutmp.c (get_boot_time_uncached, get_boot_time)
(add_utmp, read_utmp):
Use struct timespec, not struct timeval.
* lib/readutmp.h: Always include <time.h>, for struct timespec.
Simplify when utmp.h and utmpx.h are included.
(struct gl_utmp): Use the same struct for both the
systemd and the dummy version. Reorder members, and
use proper pid_t type for ut_session. Rename ut_tv to ut_ts
and make it a struct timespec. All uses changed.
(HAVE_GL_UTMP): New macro. Use it where appropriate, instead
of READUTMP_USE_SYSTEMD.
(UT_USER, HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID)
(HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_HOST):
Simplify.
* modules/readutmp (Depends-on): Add time-h, timespec_get.
Remove sys_type. Sort.
Paul Eggert [Thu, 3 Aug 2023 22:53:30 +0000 (15:53 -0700)]
readutmp: fix idx_t FIXME in API
* lib/readutmp.c (read_utmp): 2nd arg is now idx_t *, not
size_t *.
* lib/readutmp.h: Include idx.h, for idx_t.
* modules/readutmp (Depends-on): Add idx.
Paul Eggert [Thu, 3 Aug 2023 22:53:27 +0000 (15:53 -0700)]
readutmp: go back to simple ‘free’
Omit the new free_utmp function. Instead, allocate storage
in one block, so that using code can still just call ‘free’.
* lib/readutmp.c (struct utmp_alloc) [READUTMP_USE_SYSTEMD]: New type.
(add_utmp) [READUTMP_USE_SYSTEMD]: New function.
(read_utmp) [READUTMP_USE_SYSTEMD]: Use it.
Also, use malloc a bit less heavily.
(free_utmp): Remove.
* tests/test-readutmp.c (main): Call free, not free_utmp.
Paul Eggert [Thu, 3 Aug 2023 22:31:48 +0000 (15:31 -0700)]
readutmp: simplify extract_trimmed_name via ximemdup0
* lib/readutmp.c (extract_trimmed_name): Simplify.
* modules/readutmp (Depends-on):
Add strnlen, which was a missing dependency.
* lib/readutmp.c: Include xmemdup0.
(extract_trimmed_name): Simplify.
* modules/readutmp (Depends-on): Add xmemdup0.
Add strnlen, which was a missing dependency already.
Bruno Haible [Thu, 3 Aug 2023 16:09:29 +0000 (18:09 +0200)]
alignasof, stdalign: Avoid some -Wundef warnings from config.h.
Reported by Tim Rühsen <tim.ruehsen@gmx.de> in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00012.html>.
* m4/stdalign.m4 (gl_ALIGNASOF): Test whether __cplusplus is defined
before evaluating it. Assume HAVE_STDALIGN_H, _GL_STDALIGN_NEEDS_STDDEF
are never defined to 0.
Bruno Haible [Tue, 1 Aug 2023 22:56:25 +0000 (00:56 +0200)]
readutmp: Small changes to reduce the code size on the coreutils side.
* m4/readutmp.m4 (gl_READUTMP): Test also for the ut_host field in
'struct utmpx' and 'struct utmp'.
* lib/readutmp.h (HAVE_STRUCT_XTMP_UT_HOST): New macro.
(UT_USER_SIZE): Define also as a macro. Set to -1 if
READUTMP_USE_SYSTEMD.
(UT_LINE_SIZE, UT_HOST_SIZE): New constants and macros.
Bruno Haible [Tue, 1 Aug 2023 19:44:07 +0000 (21:44 +0200)]
readutmp: For year-2038 safety on Linux/{x86,arm}, use systemd APIs.
Suggested by Thorsten Kukuk <kukuk@suse.com> in
<https://www.thkukuk.de/blog/Y2038_glibc_utmp_64bit/> and
<https://github.com/thkukuk/utmpx/blob/main/utmp-to-logind.md>.
* m4/systemd.m4: New file.
* m4/readutmp.m4 (gl_READUTMP): Require gl_SYSTEMD_CHOICE. Set
READUTMP_LIB. Conditionally define READUTMP_USE_SYSTEMD.
* lib/readutmp.h: For READUTMP_USE_SYSTEMD, include <sys/time.h> and
<utmpx.h>.
(struct gl_utmp): New type.
(UTMP_STRUCT_NAME, UT_TIME_MEMBER, UT_EXIT_E_TERMINATION,
UT_EXIT_E_EXIT, UT_USER, HAVE_STRUCT_XTMP_UT_EXIT,
HAVE_STRUCT_XTMP_UT_ID, HAVE_STRUCT_XTMP_UT_PID): Define differently for
READUTMP_USE_SYSTEMD.
(UT_USER_SIZE): Don't define for READUTMP_USE_SYSTEMD.
(UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, READ_UTMP_SUPPORTED): Define also for
READUTMP_USE_SYSTEMD.
(free_utmp): New declaration.
* lib/readutmp.c: Add new includes for READUTMP_USE_SYSTEMD.
(extract_trimmed_name): Adapt to READUTMP_USE_SYSTEMD.
(get_boot_time_uncached, get_boot_time, guess_pty_name): New functions.
(read_utmp): New implementation for READUTMP_USE_SYSTEMD.
(free_utmp): New function.
* tests/test-readutmp.c (main): At the end, invoke free_utmp.
* modules/readutmp (Files): Add m4/systemd.m4.
(Link): New section.
* modules/readutmp-tests (Makefile.am): Link test-readutmp with
READUTMP_LIB.
* NEWS: Mention the free_utmp function and the READUTMP_LIB link
requirement.
Bruno Haible [Mon, 31 Jul 2023 18:33:48 +0000 (20:33 +0200)]
readutmp: Revisit portability.
* m4/readutmp.m4 (gl_READUTMP): Don't test for struct utmp.ut_exit.ut_*,
since no platform has these.
* lib/readutmp.h (UT_EXIT_E_TERMINATION): Don't test
HAVE_STRUCT_UTMP_UT_EXIT_UT_TERMINATION.
(UT_EXIT_E_EXIT): Don't test HAVE_STRUCT_UTMP_UT_EXIT_UT_EXIT.
* doc/posix-headers/utmpx.texi: Update platforms list. Mention
portability problems of specific 'struct utmpx' fields.
* doc/glibc-headers/utmp.texi: Update platforms list. Mention
portability problems of specific 'struct utmp' fields.
Bruno Haible [Mon, 31 Jul 2023 14:13:11 +0000 (16:13 +0200)]
readutmp: Make the header file and function usable on all platforms.
* lib/readutmp.h (struct gl_utmp, UTMP_STRUCT_NAME, UT_TIME_MEMBER,
UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT, UT_USER): Provide fallback
definitions.
(READ_UTMP_SUPPORTED): New macro.
* lib/readutmp.c (read_utmp) [!READ_UTMP_SUPPORTED]: Provide a dummy
definition.
* modules/readutmp (Depends-on): Add sys_time.
(configure.ac): Remove conditional.
(Makefile.am): Compile readutmp.c on all platforms.
(Include): Include readutmp.h on all platforms.
* tests/test-readutmp.c: Include readutmp.h on all platforms.
(main): Invoke read_utmp on all platforms.
* lib/readutmp.h (extract_trimmed_name): Add specification comment.
(read_utmp): Move specification comment from lib/readutmp.c to here.
Mention also UTMP_FILE and READ_UTMP_USER_PROCESS.
* lib/readutmp.c (extract_trimmed_name): Fix comment.
* modules/readutmp (Include): Only include the .h file if
HAVE_UTMPX_H || HAVE_UTMP_H.
Paul Eggert [Sun, 30 Jul 2023 00:06:42 +0000 (17:06 -0700)]
readutmp: work around glibc utmpx bug
When compiled with _TIME_BITS=64, glibc <utmpx.h> does not work,
because the files use 32-bit time_t and the code passes this to
the user unmodified, but <utmpx.h> defines a struct with 64-bit
time_t. Work around this compatibility bug. Problem reported
by Jakub Wilk via Sven Joachim <https://bugs.gnu.org/64937>.
* lib/readutmp.c (copy_utmp_entry): New function.
(read_utmp): Use it.
Bruno Haible [Fri, 28 Jul 2023 13:15:26 +0000 (15:15 +0200)]
uchar: Include the necessary snippets.
* lib/uchar.in.h: Add insertion points for _GL_ARG_NONNULL and
_GL_WARN_ON_USE.
* modules/uchar (Depends-on): Add snippet/arg-nonnull,
snippet/warn-on-use.
(Makefile.am): In uchar.h, include the ARG_NONNULL_H and WARN_ON_USE_H
snippets.
Bruno Haible [Fri, 28 Jul 2023 11:56:15 +0000 (13:56 +0200)]
mbmemcasecmp, mbmemcasecoll: Avoid test failure on MSVC.
* tests/test-mbmemcasecmp.h (test_utf_8): Disable two tests on platforms
that don't have the upper/lower mappings for 'ü'/'Ü'.
* tests/test-mbmemcasecmp.c: Include <wchar.h>, <wctype.h>.
* tests/test-mbmemcasecoll.c: Likewise.
* modules/mbmemcasecmp-tests (Depends-on): Add mbrtowc, wctype-h.
* modules/mbmemcasecoll-tests (Depends-on): Likewise.
Bruno Haible [Thu, 27 Jul 2023 20:19:08 +0000 (22:19 +0200)]
fnmatch-h, glob-h tests: Fix link errors (regression 2023-07-24).
* modules/fnmatch-h-c++-tests (Makefile.am): Link test-fnmatch-h-c++
with $(LIBUNISTRING).
* modules/glob-h-c++-tests (Makefile.am): Link test-glob-h-c++ with
$(LIBUNISTRING).
Bruno Haible [Thu, 27 Jul 2023 18:52:36 +0000 (20:52 +0200)]
fnmatch, glob tests: Fix link errors (regression 2023-07-24).
* modules/fnmatch-tests (Makefile.am): Link test-fnmatch-w32 with the
same libraries as test-fnmatch.
* modules/glob (Link): Add $(LIBUNISTRING).
* modules/glob-tests (Makefile.am): Link test-glob with $(LIBUNISTRING).
Bruno Haible [Wed, 26 Jul 2023 13:12:47 +0000 (15:12 +0200)]
wctype: Work around wctype+iswctype bug on MSVC.
* m4/wctype.m4 (gl_FUNC_WCTYPE): In the test program, test also for the
MSVC bug. Update cross-compilation guess.
* doc/posix-functions/wctype.texi: Mention the MSVC bug.
Bruno Haible [Wed, 26 Jul 2023 12:50:00 +0000 (14:50 +0200)]
wctype: Work around wctype bug on mingw.
* lib/wctype.in.h (rpl_wctype_t, wctype_t, GNULIB_defined_wctype_t):
Define if REPLACE_WCTYPE is 1.
(wctype): Consider REPLACE_WCTYPE.
(iswctype): Override also if REPLACE_WCTYPE is 1.
* lib/iswctype.c: If GNULIB_defined_wctype_t is defined, use the
function-pointer based implementation.
* m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize REPLACE_WCTYPE.
* m4/wctype.m4 (gl_FUNC_WCTYPE): Define through AC_DEFUN_ONCE. Test
whether wctype supports the "blank" character class. Set REPLACE_WCTYPE
if not.
* m4/iswctype.m4 (gl_FUNC_ISWCTYPE): Require gl_FUNC_WCTYPE.
* modules/wctype (Status, Notice): Remove.
(Depends-on): Add iswctype. Consider REPLACE_WCTYPE.
(configure.ac): Consider REPLACE_WCTYPE.
* modules/iswctype (Status, Notice): Remove.
(Files): Add m4/wctype.m4.
(configure.ac): Override also if REPLACE_WCTYPE is 1.
* modules/wctype-h (Makefile.am): Substitute REPLACE_WCTYPE.
* doc/posix-functions/wctype.texi: Mention the mingw bug.
Bruno Haible [Wed, 26 Jul 2023 12:13:48 +0000 (14:13 +0200)]
wctype-h: Work around iswprint bug on mingw.
* lib/wctype.in.h (rpl_iswprint): On mingw, don't use the system's
iswprint function.
* tests/test-wctype-h.c (main): Verify that this character class
contains the ASCII space but not tab and newline.
* tests/test-c32isprint.c (main): For tab, \v, \f, expect the same value
on native Windows as on other platforms.
* doc/posix-functions/iswprint.texi: Mention the mingw bug.
Bruno Haible [Wed, 26 Jul 2023 11:40:06 +0000 (13:40 +0200)]
wctype, wctrans: Require a non-NULL argument.
* lib/wctype.in.h: Add placeholder for definition of _GL_ARG_NONNULL.
(wctype, wctrans): Mark with _GL_ARG_NONNULL ((1)).
* modules/wctype-h (Depends-on): Add snippet/arg-nonnull.
(Makefile.am): Substitute $(ARG_NONNULL_H) into wctype.h.
Bruno Haible [Tue, 25 Jul 2023 21:39:15 +0000 (23:39 +0200)]
iswctype: Add tests.
* tests/test-iswctype.c: New file, based on
tests/test-c32_apply_type_test.c.
* tests/test-c32_apply_type_test.c (main): Update accordingly.
* modules/iswctype-tests: New file.
Bruno Haible [Tue, 25 Jul 2023 20:20:51 +0000 (22:20 +0200)]
unistr/u8-*: Make Unicode decoder more Unicode Standard compliant.
Based on a remark by Paul Eggert in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00120.html>.
* tests/unistr/test-u8-mbtouc.c (test_safe_function): Change expected
results for "non-shortest form" or out-of-range byte sequences. Add new
test cases of incomplete well-formed byte sequences.
* tests/unistr/test-u8-mbsnlen.c (main): Likewise.
* lib/unistr/u8-mbtouc-aux.c (u8_mbtouc_aux): Reject a first byte in the
range 0xF5..0xF7 as invalid. Distinguish incomplete from invalid byte
sequences correctly. For the former, return only the number of bytes in
the maximal well-formed subpart.
* lib/unistr/u8-mbtouc.c (u8_mbtouc): Likewise.
* lib/unistr/u8-check.c (u8_check): Reject a first byte in the range
0xF5..0xF7 as invalid.
* lib/unistr/u8-mblen.c (u8_mblen): Likewise.
* lib/unistr/u8-mbtoucr.c (u8_mbtoucr): Likewise.
* lib/unistr/u8-strmbtouc.c (u8_strmbtouc): Likewise.
* lib/unistr/u8-strmblen.c (u8_strmblen): Likewise.
* lib/unistr/u8-prev.c (u8_prev): Likewise.
Bruno Haible [Mon, 24 Jul 2023 10:08:23 +0000 (12:08 +0200)]
fnmatch: Overcome wchar_t limitations.
* m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Set REPLACE_FNMATCH to 1 on
AIX in 32-bit mode.
* lib/fnmatch.c: Include <uchar.h>. Conditionally include unistr.h.
(UCHAR_TO_WCHAR): Renamed from BTOWC.
(WCHAR_T, WINT_T, BTOWC, MBSRTOWCS, WCSLEN, WCSCAT, WMEMPCPY, WMEMCHR,
TOWLOWER, WCTYPE_T, WCTYPE, ISWCTYPE): New macros.
(IS_CHAR_CLASS): Use WCTYPE instead of wctype.
(UCHAR_TO_WCHAR): Use BTOWC instead of btowc.
(FOLD): Use TOWLOWER instead of towlower.
(CHAR): Use WCHAR_T instead of wchar_t.
(UCHAR, INT): Use WINT_T instead of wint_t.
(STRLEN): Use WCSLEN instead of wcslen.
(STRCAT): Use WCSCAT instead of wcscat.
(MEMPCPY): Use WMEMPCPY instead of wmempcpy.
(MEMCHR): Use WMEMCHR instead of wmemchr.
(is_char_class): Use WCTYPE_T instead of wctype_t, WCHAR_T instead of
wchar_t, WCTYPE instead of wctype.
(fnmatch): Use WCHAR_T instead of wchar_t, MBSRTOWCS instead of
mbsrtowcs.
* lib/fnmatch_loop.c (FCT): Use WCTYPE_T instead of wctype_t, ISWCTYPE
instead of iswctype. Update for renamed BTOWC.
* modules/fnmatch (Depends-on): Add btoc32, c32tolower,
c32_get_type_test, c32_apply_type_test, mbsrtoc32s, unistr/u32-chr,
unistr/u32-pcpy, unistr/u32-strcat, unistr/u32-strlen.
(Link): Add $(LIBUNISTRING).
* modules/fnmatch-tests (Makefile.am): Link test-fnmatch with
$(LIBUNISTRING).
* doc/posix-functions/fnmatch.texi: Move the Cygwin, mingw, MSVC, AIX
bug descriptions to the "fixed by Gnulib" section.
Bruno Haible [Sun, 23 Jul 2023 13:26:28 +0000 (15:26 +0200)]
fnmatch: Work around bugs on FreeBSD, NetBSD, Solaris, Cygwin, Android.
* m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Add three more test cases to
the test program. Reorganize its return values.
* tests/test-fnmatch.c (main): Reflect the changes done in fnmatch.m4.
* doc/posix-functions/fnmatch.texi: Move the corresponding bug
descriptions to the "fixed by Gnulib" section.
Bruno Haible [Sun, 23 Jul 2023 12:04:59 +0000 (14:04 +0200)]
fnmatch, fnmatch-gnu: Document known bugs.
* doc/posix-headers/fnmatch.texi: Mention the macros FNM_LEADING_DIR,
FNM_CASEFOLD, FNM_EXTMATCH, FNM_FILE_NAME.
* doc/posix-functions/fnmatch.texi: Reference the glibc documentation
and the Linux man page. Document the effects of the two modules and all
the known bugs in detail.
Bruno Haible [Sat, 22 Jul 2023 23:43:43 +0000 (01:43 +0200)]
fnmatch tests: Add many more test cases.
* lib/fnmatch.in.h (GNULIB_defined_fnmatch_function): New macro.
* tests/test-fnmatch.c: Add many more test cases.
* tests/test-fnmatch-1.sh: New file, based on tests/test-mbrtoc32-5.sh.
* tests/test-fnmatch-2.sh: New file, based on tests/test-mbrtoc32-1.sh.
* tests/test-fnmatch-3.sh: New file, based on tests/test-mbrtoc32-2.sh.
* tests/test-fnmatch-4.sh: New file, based on tests/test-mbrtoc32-3.sh.
* tests/test-fnmatch-5.sh: New file, based on tests/test-mbrtoc32-4.sh.
* tests/test-fnmatch-w32.c: New file, based on tests/test-mbrtoc32-w32.c
and tests/test-fnmatch.c.
* tests/test-fnmatch-w32-1.sh: New file, based on
tests/test-mbrtoc32-w32-1.sh.
* tests/test-fnmatch-w32-2.sh: New file, based on
tests/test-mbrtoc32-w32-2.sh.
* tests/test-fnmatch-w32-3.sh: New file, based on
tests/test-mbrtoc32-w32-3.sh.
* tests/test-fnmatch-w32-4.sh: New file, based on
tests/test-mbrtoc32-w32-4.sh.
* tests/test-fnmatch-w32-5.sh: New file, based on
tests/test-mbrtoc32-w32-5.sh.
* tests/test-fnmatch-w32-6.sh: New file, based on
tests/test-mbrtoc32-w32-6.sh.
* tests/test-fnmatch-w32-7.sh: New file, based on
tests/test-mbrtoc32-w32-7.sh.
* modules/fnmatch-tests: Add the new program and shell scripts.
* tests/unistr/test-pcpy.h: New file, based on tests/unistr/test-cpy.h.
* tests/unistr/test-u8-pcpy.c: New file, based on
tests/unistr/test-u8-cpy.c.
* tests/unistr/test-u16-pcpy.c: New file, based on
tests/unistr/test-u16-cpy.c.
* tests/unistr/test-u32-pcpy.c: New file, based on
tests/unistr/test-u32-cpy.c.
* modules/unistr/u8-pcpy-tests: New file, based on
modules/unistr/u8-cpy-tests.
* modules/unistr/u16-pcpy-tests: New file, based on
modules/unistr/u16-cpy-tests.
* modules/unistr/u32-pcpy-tests: New file, based on
modules/unistr/u32-cpy-tests.
Bruno Haible [Fri, 21 Jul 2023 09:16:04 +0000 (11:16 +0200)]
unistr/u8-pcpy, unistr/u16-pcpy, unistr/u32-pcpy: New modules.
* lib/unistr.in.h (u8_pcpy, u16_pcpy, u32_pcpy): New declarations.
* lib/unistr/u-pcpy.h: New file, based on lib/wmempcpy.c.
* lib/unistr/u8-pcpy.c: New file, based on lib/unistr/u8-cpy.c.
* lib/unistr/u16-pcpy.c: New file, based on lib/unistr/u16-cpy.c.
* lib/unistr/u32-pcpy.c: New file, based on lib/unistr/u32-cpy.c.
* modules/unistr/u8-pcpy: New file, based on modules/unistr/u8-cpy.
* modules/unistr/u16-pcpy: New file, based on modules/unistr/u16-cpy.
* modules/unistr/u32-pcpy: New file, based on modules/unistr/u32-cpy.
Bruno Haible [Wed, 19 Jul 2023 23:35:10 +0000 (01:35 +0200)]
Document migration path for obsolescent functions.
* doc/glibc-functions/timespec_get.texi: Add reference to ISO C.
* doc/posix-functions/_tolower.texi: Recommend use of tolower.
* doc/posix-functions/_toupper.texi: Recommend use of toupper.
* doc/posix-functions/asctime.texi: Recommend use of strftime.
* doc/posix-functions/asctime_r.texi: Likewise.
* doc/posix-functions/ctime.texi: Recommend use of localtime_r and
strftime.
* doc/posix-functions/ctime_r.texi: Likewise.
* doc/posix-functions/ftw.texi: Recommend use of fts.
* doc/posix-functions/getitimer.texi: Recommend use of timer_gettime.
* doc/posix-functions/gets.texi: Recommend use of fgets.
* doc/posix-functions/gettimeofday.texi: Recommend use of gettime or
timespec_get.
* doc/posix-functions/inet_addr.texi: Recommend use of inet_pton.
* doc/posix-functions/inet_ntoa.texi: Recommend use of inet_ntop.
* doc/posix-functions/pthread_getconcurrency.texi: Recommend no-op.
* doc/posix-functions/pthread_setconcurrency.texi: Recommend no-op.
* doc/posix-functions/rand_r.texi: Recommend use of random_r.
* doc/posix-functions/setitimer.texi: Recommend use of timer_create and
timer_settime.
* doc/posix-functions/setpgrp.texi: Recommend use of setpgid or setsid.
* doc/posix-functions/sighold.texi: Recommend use of sigprocmask.
* doc/posix-functions/sigignore.texi: Recommend use of sigaction.
* doc/posix-functions/siginterrupt.texi: Recommend use of sigaction.
* doc/posix-functions/sigpause.texi: Recommend use of sigsuspend.
* doc/posix-functions/sigrelse.texi: Recommend use of sigprocmask.
* doc/posix-functions/sigset.texi: Recommend use of sigaction.
* doc/posix-functions/tempnam.texi: Recommend use of mkstemp.
* doc/posix-functions/ulimit.texi: Recommend use of getrlimit and
setrlimit.
* doc/posix-functions/utime.texi: Recommend use of utimens.