]> Savannah Git Hosting - gnulib.git/log
gnulib.git
2 years agoUpdate build-aux/po/Makefile.in.in.
Bruno Haible [Sun, 5 Feb 2023 16:20:50 +0000 (17:20 +0100)]
Update build-aux/po/Makefile.in.in.

Reported by Reuben Thomas <rrt@sc3d.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-02/msg00020.html>.

* build-aux/po/Makefile.in.in: Sync from GNU gettext 0.21.1.
Fixes:
- In the .po -> .gmo rules, consider the newest changes to the POT file.
- Emit a warning when creating a tarball without POT file.

2 years agoassert-h, verify: Fix compilation error in C++ mode with MSVC 14.
Bruno Haible [Sun, 5 Feb 2023 10:19:28 +0000 (11:19 +0100)]
assert-h, verify: Fix compilation error in C++ mode with MSVC 14.

* lib/verify.h (static_assert): Define _ALLOW_KEYWORD_MACROS.
* tests/test-assert-h-c++.cc: Strengthen test.
* tests/test-assert-h-c++2.cc: Likewise.

2 years agofts: pacify GCC 12 -Wstrict-aliasing
Paul Eggert [Sat, 4 Feb 2023 18:28:55 +0000 (10:28 -0800)]
fts: pacify GCC 12 -Wstrict-aliasing

* lib/fts.c (ADJUST): Avoid -Wstrict-aliasing waring.

2 years agofts: pacify GCC 13 -Wuse-after-free
Paul Eggert [Sat, 4 Feb 2023 18:07:11 +0000 (10:07 -0800)]
fts: pacify GCC 13 -Wuse-after-free

Problem reported by Peter Frazier in:
https://lists.gnu.org/r/bug-gnulib/2023-02/msg00000.html
* lib/fts.c: Include stdint.h.
(fts_build): Do not access freed pointer directly; instead,
save its bit-pattern into a uintptr_t, and use that to compare.
(ADJUST): Likewise, but more trickily since this hack
puns pointer types and relies on undefined behavior.
* modules/fts (Depends-on): Add stdint.

2 years agoassert-h, verify: Fix conflict with standard C++ header files on macOS.
Bruno Haible [Sat, 4 Feb 2023 13:31:08 +0000 (14:31 +0100)]
assert-h, verify: Fix conflict with standard C++ header files on macOS.

* lib/verify.h (_Static_assert): Don't redefine with clang ≥ 3.8.0
in C++ mode.
* tests/test-assert-h-c++.cc: Also check against conflict with the
standard C++ header files.
* tests/test-assert-h-c++2.cc: Likewise.

2 years agoActivate all existing C++ tests.
Bruno Haible [Sat, 4 Feb 2023 11:53:02 +0000 (12:53 +0100)]
Activate all existing C++ tests.

* modules/assert-h-tests (Depends-on): Add assert-h-c++-tests.
* modules/stdarg-tests (Depends-on): Add stdarg-c++-tests.

2 years agospawn: Fix compilation error on macOS (regression 2023-01-22).
Bruno Haible [Sat, 4 Feb 2023 07:43:50 +0000 (08:43 +0100)]
spawn: Fix compilation error on macOS (regression 2023-01-22).

* lib/spawn.in.h: Tweak logic for defining the POSIX_SPAWN_* constants.

2 years agorelocatable-prog: Fix compiler warning.
Bruno Haible [Sat, 4 Feb 2023 01:51:04 +0000 (02:51 +0100)]
relocatable-prog: Fix compiler warning.

* lib/progreloc.c (full_read): Use a non-const pointer.

2 years agodoc: Update regarding AIX.
Bruno Haible [Sat, 4 Feb 2023 01:47:38 +0000 (02:47 +0100)]
doc: Update regarding AIX.

* doc/glibc-headers/getopt.texi: Update.

2 years agodoc: Update regarding NetBSD.
Bruno Haible [Sat, 4 Feb 2023 01:40:59 +0000 (02:40 +0100)]
doc: Update regarding NetBSD.

* doc/posix-functions/sigprocmask.texi: Mention a NetBSD 9.0 bug.
* doc/posix-functions/pthread_sigmask.texi: Likewise.

2 years agoisnan: update comment
Paul Eggert [Fri, 3 Feb 2023 22:05:16 +0000 (14:05 -0800)]
isnan: update comment

* lib/isnan.c: Update comment for C23.

2 years agoat-internal: Fix support for z/OS.
Bruno Haible [Mon, 30 Jan 2023 22:10:21 +0000 (23:10 +0100)]
at-internal: Fix support for z/OS.

* lib/openat-proc.c (openat_proc_name) [z/OS]: Proper error handling.
Convert only the relevant part of the dir[] buffer.

2 years agoat-internal: Add support for z/OS.
Bruno Haible [Mon, 30 Jan 2023 11:30:21 +0000 (12:30 +0100)]
at-internal: Add support for z/OS.

Reported and draft patch by Igor Todorovski <itodorov@ca.ibm.com>.

* lib/openat-proc.c [z/OS]: Include <termios.h>.
(openat_proc_name): For z/OS, use an approach similar to kLIBC, with
3 lines of z/OS specific code by Igor Todorovski <itodorov@ca.ibm.com>.

2 years agoUpdate NEWS.
Bruno Haible [Mon, 30 Jan 2023 09:56:14 +0000 (10:56 +0100)]
Update NEWS.

* NEWS: Update for qcopy-acl change on 2023-01-13.

2 years agomaintainer-makefile: Determine gnulib's location on disk correctly.
Bruno Haible [Mon, 30 Jan 2023 01:45:23 +0000 (02:45 +0100)]
maintainer-makefile: Determine gnulib's location on disk correctly.

* top/maint.mk (gnulib_dir): Give priority to $(GNULIB_SRCDIR) over
$(srcdir)/gnulib.

2 years agoFix compilation errors with CC="clang -D_FORTIFY_SOURCE=2" on Android.
Bruno Haible [Sun, 29 Jan 2023 22:51:42 +0000 (23:51 +0100)]
Fix compilation errors with CC="clang -D_FORTIFY_SOURCE=2" on Android.

Reported by Alexey Rochev <equeim@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnu-libiconv/2023-01/msg00019.html>.

* lib/cdefs.h (__bos, __bos0, __glibc_objsize0, __glibc_objsize,
__glibc_safe_len_cond, __glibc_unsigned_or_positive,
__glibc_safe_or_unknown_len, __glibc_unsafe_len, __glibc_fortify,
__glibc_fortify_n): Don't define these macros in Gnulib.
* lib/libc-config.h: Don't undefine these macros in Gnulib.

2 years agoClarify _GL_ATTRIBUTE_NODISCARD code.
Bruno Haible [Sat, 28 Jan 2023 19:22:02 +0000 (20:22 +0100)]
Clarify _GL_ATTRIBUTE_NODISCARD code.

Reported by Paul Eggert.

* m4/gnulib-common.m4 (gl_COMMON_BODY): Add comment regarding
_GL_ATTRIBUTE_NODISCARD definition.

2 years agounistdio/*printf: Fix negative width handling for %U, %lU, %llU.
Bruno Haible [Sat, 28 Jan 2023 18:39:23 +0000 (19:39 +0100)]
unistdio/*printf: Fix negative width handling for %U, %lU, %llU.

* lib/vasnprintf.c (VASNPRINTF): In the code for %U, %lU, %llU, test for
the FLAG_LEFT bit in the flags variable.
* tests/unistdio/test-u8-printf1.h (test_xfunction): Add tests for width
given as argument for the directives %U, %lU, %llU, %s, %a, %f, %e, %g.
* tests/unistdio/test-u16-printf1.h (test_xfunction): Likewise.
* tests/unistdio/test-u32-printf1.h (test_xfunction): Likewise.
* tests/unistdio/test-ulc-printf1.h (test_xfunction): Likewise.

2 years agovasnprintf-posix: Fix possible bug with negative width handling for %lc.
Bruno Haible [Sat, 28 Jan 2023 18:12:42 +0000 (19:12 +0100)]
vasnprintf-posix: Fix possible bug with negative width handling for %lc.

* lib/vasnprintf.c (VASNPRINTF): In the code for %lc in vasnprintf, test
for the FLAG_LEFT bit in the flags variable.
* tests/test-vasnprintf-posix.c (test_function): Add tests for width
given as argument for the directives %c, %lc.
* tests/test-vasprintf-posix.c (test_function): Likewise.
* tests/test-snprintf-posix.h (test_function): Likewise.
* tests/test-sprintf-posix.h (test_function): Likewise.
* tests/test-snprintf-posix.c: Include <wchar.h>, for wint_t.
* tests/test-sprintf-posix.c: Likewise.
* tests/test-vsnprintf-posix.c: Likewise.
* tests/test-vsprintf-posix.c: Likewise.

2 years agovasnprintf-posix: Fix possible bug with negative width handling for %lc.
Bruno Haible [Sat, 28 Jan 2023 18:05:24 +0000 (19:05 +0100)]
vasnprintf-posix: Fix possible bug with negative width handling for %lc.

* lib/vasnprintf.c (VASNPRINTF): In the code for %lc in vasnprintf, test
for the FLAG_LEFT bit in the flags variable.
* tests/test-vasnprintf-posix.c (test_function): Add tests for width
given as argument for the directives %c, %lc.
* tests/test-vasprintf-posix.c (test_function): Likewise.
* tests/test-snprintf-posix.h (test_function): Likewise.
* tests/test-sprintf-posix.h (test_function): Likewise.
* tests/test-snprintf-posix.c: Include <wchar.h>, for wint_t.
* tests/test-sprintf-posix.c: Likewise.

2 years agovasnprintf-posix: Fix negative width handling for %ls directive.
Bruno Haible [Sat, 28 Jan 2023 17:17:17 +0000 (18:17 +0100)]
vasnprintf-posix: Fix negative width handling for %ls directive.

Reported by clang via Po Lu <luangruo@yahoo.com>.

* lib/vasnprintf.c (VASNPRINTF): In the code for %ls in vasnprintf and
for %s in vasnwprintf, test for the FLAG_LEFT bit in the flags variable.
* tests/test-vasnprintf-posix.c (test_function): Add tests for width
given as argument for the directives %s, %ls.
* tests/test-vasprintf-posix.c (test_function): Likewise.
* tests/test-snprintf-posix.h (test_function): Likewise.
* tests/test-sprintf-posix.h (test_function): Likewise.

2 years agovasnprintf-posix: Add more unit tests.
Bruno Haible [Sat, 28 Jan 2023 15:58:04 +0000 (16:58 +0100)]
vasnprintf-posix: Add more unit tests.

* tests/test-vasnprintf-posix.c (test_function): Add tests for width
given as argument for the directives %a, %f, %e, %g.
* tests/test-vasprintf-posix.c (test_function): Likewise.
* tests/test-snprintf-posix.h (test_function): Likewise.
* tests/test-sprintf-posix.h (test_function): Likewise.

2 years agoAvoid clang warnings regarding [[__nodiscard__]].
Bruno Haible [Sat, 28 Jan 2023 10:52:40 +0000 (11:52 +0100)]
Avoid clang warnings regarding [[__nodiscard__]].

* m4/gnulib-common.m4 (gl_COMMON_BODY): For clang, in C++ mode, ignore
the __has_c_attribute value and define _GL_ATTRIBUTE_NODISCARD to
__attribute__ ((__warn_unused_result__)), not [[__nodiscard__]].

2 years agoAvoid clang warnings regarding [[__maybe_unused__]].
Bruno Haible [Sat, 28 Jan 2023 08:33:12 +0000 (09:33 +0100)]
Avoid clang warnings regarding [[__maybe_unused__]].

* m4/gnulib-common.m4 (gl_COMMON_BODY): For clang versions ≥ 6, < 10,
in C++ mode, ignore the __has_c_attribute value and define
_GL_ATTRIBUTE_MAYBE_UNUSED to __attribute__ ((__unused__)), not
[[__maybe_unused__]].

2 years agoalignasof: Ensure a correct _Alignof (regression 2023-01-15).
Bruno Haible [Sat, 28 Jan 2023 01:55:06 +0000 (02:55 +0100)]
alignasof: Ensure a correct _Alignof (regression 2023-01-15).

* m4/stdalign.m4 (gl_ALIGNASOF): Apply the workaround for wrong _Alignof
in GCC < 4.9 and clang < 8.0.0 also when the system has <stdalign.h>.

2 years agostdalign: Ensure alignof is defined on FreeBSD (regression 2023-01-15).
Bruno Haible [Sat, 28 Jan 2023 01:23:36 +0000 (02:23 +0100)]
stdalign: Ensure alignof is defined on FreeBSD (regression 2023-01-15).

* lib/stdalign.in.h: Include the system's <stdalign.h> when it exists.
* m4/stdalign.m4 (gl_ALIGNASOF): Invoke gl_CHECK_NEXT_HEADERS. Set
HAVE_STDALIGN_H.
* modules/stdalign (Makefile.am): Substitute GUARD_PREFIX,
HAVE_STDALIGN_H, INCLUDE_NEXT, PRAGMA_SYSTEM_HEADER, PRAGMA_COLUMNS,
NEXT_STDALIGN_H.

2 years agostddef: Fix test-stddef compilation error on FreeBSD 12/x86.
Bruno Haible [Fri, 27 Jan 2023 19:37:19 +0000 (20:37 +0100)]
stddef: Fix test-stddef compilation error on FreeBSD 12/x86.

* m4/stddef_h.m4 (gl_STDDEF_H): When testing for good max_align_t, use
an ISO C compliant definition of _Alignof.

2 years agoKeep config.h idempotent.
Bruno Haible [Wed, 25 Jan 2023 13:36:20 +0000 (14:36 +0100)]
Keep config.h idempotent.

* m4/gnulib-common.m4 (gl_COMMON_BODY): Add double-inclusion guards to
the definitions of the macros _GL_ATTRIBUTE_ALLOC_SIZE,
_GL_ATTRIBUTE_ALWAYS_INLINE, _GL_ATTRIBUTE_ARTIFICIAL,
_GL_ATTRIBUTE_COLD, _GL_ATTRIBUTE_CONST, _GL_ATTRIBUTE_DEALLOC,
_GL_ATTRIBUTE_DEPRECATED, _GL_ATTRIBUTE_ERROR, _GL_ATTRIBUTE_WARNING,
_GL_ATTRIBUTE_EXTERNALLY_VISIBLE, _GL_ATTRIBUTE_FALLTHROUGH,
_GL_ATTRIBUTE_FORMAT, _GL_ATTRIBUTE_LEAF, _GL_ATTRIBUTE_MALLOC,
_GL_ATTRIBUTE_MAY_ALIAS, _GL_ATTRIBUTE_MAYBE_UNUSED,
_GL_ATTRIBUTE_NODISCARD, _GL_ATTRIBUTE_NOINLINE, _GL_ATTRIBUTE_NONNULL,
_GL_ATTRIBUTE_NONSTRING, _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PACKED,
_GL_ATTRIBUTE_PURE, _GL_ATTRIBUTE_RETURNS_NONNULL,
_GL_ATTRIBUTE_SENTINEL, _GL_ATTRIBUTE_UNUSED, _GL_UNUSED_LABEL.

2 years agovasnprintf: Fix compilation error on Android NDK r26b.
Bruno Haible [Wed, 25 Jan 2023 08:53:21 +0000 (09:53 +0100)]
vasnprintf: Fix compilation error on Android NDK r26b.

Reported by Po Lu <luangruo@yahoo.com>.

* lib/vasnprintf.c: Include <wchar.h>.

2 years agothreadlib: Fix support for Solaris 9 and older.
Nick Bowler [Wed, 25 Jan 2023 08:38:00 +0000 (09:38 +0100)]
threadlib: Fix support for Solaris 9 and older.

* m4/threadlib.m4 (gl_PTHREADLIB_BODY): Allow case patterns to survive
m4 processing by using changequote.

2 years agoalignasof, stdalign: Fix a compilation error on FreeBSD 12.0.
Bruno Haible [Tue, 24 Jan 2023 12:44:07 +0000 (13:44 +0100)]
alignasof, stdalign: Fix a compilation error on FreeBSD 12.0.

* m4/stdalign.m4 (gl_ALIGNASOF): In C mode, prefer __builtin_offsetof
over offsetof when possible, since __builtin_offsetof works also when
<stddef.h> has not been fully included yet.

2 years agoautoupdate
Karl Berry [Sun, 22 Jan 2023 16:29:03 +0000 (08:29 -0800)]
autoupdate

2 years agodoc: Update list of target platforms.
Bruno Haible [Sun, 22 Jan 2023 15:34:24 +0000 (16:34 +0100)]
doc: Update list of target platforms.

* doc/gnulib-intro.texi (Supported Platforms): Mark musl libc, Android,
and MSVC as "occasionally tested". Update the version numbers of some
OSes. Combine paragraphs regarding mingw and MSVC.
(Formerly Supported Platforms): Mark AIX 5, 6 as "formerly supported".

2 years agoResolve conflicts for functions introduced in Android API level 29.
Bruno Haible [Sun, 22 Jan 2023 13:49:05 +0000 (14:49 +0100)]
Resolve conflicts for functions introduced in Android API level 29.

* m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY): Conditionally set
REPLACE_REALLOCARRAY.
* lib/stdlib.in.h (reallocarray): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 29.
Bruno Haible [Sun, 22 Jan 2023 13:47:09 +0000 (14:47 +0100)]
Resolve conflicts for functions introduced in Android API level 29.

* lib/stdlib.in.h (getloadavg): Consider REPLACE_GETLOADAVG. Disable
_GL_CXXALIASWARN invocation on non-glibc systems.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_GETLOADAVG.
* modules/stdlib (Makefile.am): Substitute REPLACE_GETLOADAVG.
* m4/getloadavg.m4 (gl_GETLOADAVG): Conditionally set
REPLACE_GETLOADAVG.
* modules/getloadavg (Depends-on, configure.ac): Consider
REPLACE_GETLOADAVG.

2 years agoResolve conflicts for functions introduced in Android API level 29.
Bruno Haible [Sun, 22 Jan 2023 13:45:14 +0000 (14:45 +0100)]
Resolve conflicts for functions introduced in Android API level 29.

* lib/time.in.h (timespec_get): Consider REPLACE_TIMESPEC_GET. Disable
_GL_CXXALIASWARN invocation on non-glibc systems.
* m4/time_h.m4 (gl_TIME_H_DEFAULTS): Initialize REPLACE_TIMESPEC_GET.
* modules/time (Makefile.am): Substitute REPLACE_TIMESPEC_GET.
* m4/gettime.m4 (gl_CHECK_FUNC_TIMESPEC_GET): Set also
gl_cv_onwards_func_timespec_get.
* m4/timespec_get.m4 (gl_FUNC_TIMESPEC_GET): Conditionally set
REPLACE_TIMESPEC_GET.
* modules/timespec_get (Depends-on, configure.ac): Consider
REPLACE_TIMESPEC_GET.

2 years agoResolve conflicts for functions introduced in Android API level 28.
Bruno Haible [Sun, 22 Jan 2023 13:44:44 +0000 (14:44 +0100)]
Resolve conflicts for functions introduced in Android API level 28.

* m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Conditionally set
REPLACE_ALIGNED_ALLOC.
* m4/getrandom.m4 (gl_FUNC_GETRANDOM): Conditionally set
REPLACE_GETRANDOM.

2 years agoResolve conflicts for functions introduced in Android API level 28.
Bruno Haible [Sun, 22 Jan 2023 13:43:32 +0000 (14:43 +0100)]
Resolve conflicts for functions introduced in Android API level 28.

* m4/getlogin_r.m4 (gl_FUNC_GETLOGIN_R): Conditionally set
REPLACE_GETLOGIN_R.
* lib/unistd.in.h (getlogin_r): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 28.
Bruno Haible [Sun, 22 Jan 2023 13:41:07 +0000 (14:41 +0100)]
Resolve conflicts for functions introduced in Android API level 28.

* m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): Conditionally set
REPLACE_POSIX_SPAWN.
* lib/spawn.in.h: Adapt logic for defining the POSIX_SPAWN_* constants.
(posix_spawn, posix_spawnp, posix_spawnattr_init,
posix_spawnattr_destroy, posix_spawnattr_getsigdefault,
posix_spawnattr_setsigdefault, posix_spawnattr_getsigmask,
posix_spawnattr_setsigmask, posix_spawnattr_getflags,
posix_spawnattr_setflags, posix_spawnattr_getpgroup,
posix_spawnattr_setpgroup, posix_spawn_file_actions_init,
posix_spawn_file_actions_destroy, posix_spawn_file_actions_addchdir,
posix_spawn_file_actions_addfchdir): Disable _GL_CXXALIASWARN invocation
on non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 28.
Bruno Haible [Sun, 22 Jan 2023 13:33:37 +0000 (14:33 +0100)]
Resolve conflicts for functions introduced in Android API level 28.

* m4/glob.m4 (gl_GLOB): Conditionally set REPLACE_GLOB.
* lib/glob.in.h (glob): Disable _GL_CXXALIASWARN invocation on non-glibc
systems.

2 years agoResolve conflicts for functions introduced in Android API level 28.
Bruno Haible [Sun, 22 Jan 2023 13:22:28 +0000 (14:22 +0100)]
Resolve conflicts for functions introduced in Android API level 28.

* lib/unistd.in.h (getentropy): Consider REPLACE_GETENTROPY. Disable
_GL_CXXALIASWARN invocation on non-glibc systems.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_GETENTROPY.
* modules/unistd (Makefile.am): Substitute REPLACE_GETENTROPY.
* m4/getentropy.m4 (gl_FUNC_GETENTROPY): Conditionally set
REPLACE_GETENTROPY.
* modules/getentropy (Depends-on, configure.ac): Consider
REPLACE_GETENTROPY.

2 years agoResolve conflicts for functions introduced in Android API level 26.
Bruno Haible [Sun, 22 Jan 2023 13:21:48 +0000 (14:21 +0100)]
Resolve conflicts for functions introduced in Android API level 26.

* m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Test for getdomainname
using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. Conditionally
set REPLACE_GETSUBOPT.

2 years agoResolve conflicts for functions introduced in Android API level 26.
Bruno Haible [Sun, 22 Jan 2023 13:20:58 +0000 (14:20 +0100)]
Resolve conflicts for functions introduced in Android API level 26.

* m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Conditionally set
REPLACE_NL_LANGINFO.
* lib/langinfo.in.h (nl_langinfo): Disable _GL_CXXALIASWARN invocation
on non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 26.
Bruno Haible [Sun, 22 Jan 2023 13:16:36 +0000 (14:16 +0100)]
Resolve conflicts for functions introduced in Android API level 26.

* lib/stdlib.in.h (getsubopt): Consider REPLACE_GETSUBOPT. Disable
_GL_CXXALIASWARN invocation on non-glibc systems.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_GETSUBOPT.
* modules/stdlib (Makefile.am): Substitute REPLACE_GETSUBOPT.
* m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Conditionally set
REPLACE_GETSUBOPT.
* modules/getsubopt (Depends-on, configure.ac): Consider
REPLACE_GETSUBOPT.

2 years agoResolve conflicts for functions introduced in Android API level 24.
Bruno Haible [Sun, 22 Jan 2023 13:15:21 +0000 (14:15 +0100)]
Resolve conflicts for functions introduced in Android API level 24.

* m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Conditionally set
REPLACE_STRCHRNUL.

2 years agoResolve conflicts for functions introduced in Android API level 23.
Bruno Haible [Sun, 22 Jan 2023 13:14:42 +0000 (14:14 +0100)]
Resolve conflicts for functions introduced in Android API level 23.

* m4/login_tty.m4 (gl_FUNC_LOGIN_TTY): Conditionally set
REPLACE_LOGIN_TTY.
* lib/utmp.in.h (login_tty): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 23.
Bruno Haible [Sun, 22 Jan 2023 13:13:24 +0000 (14:13 +0100)]
Resolve conflicts for functions introduced in Android API level 23.

* m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Conditionally set REPLACE_MKFIFOAT.
* lib/sys_stat.in.h (mkfifoat): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 23.
Bruno Haible [Sun, 22 Jan 2023 13:11:49 +0000 (14:11 +0100)]
Resolve conflicts for functions introduced in Android API level 23.

* m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Conditionally set
REPLACE_STRERROR_R.
* lib/string.in.h (strerror_r): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 23.
Bruno Haible [Sun, 22 Jan 2023 13:09:49 +0000 (14:09 +0100)]
Resolve conflicts for functions introduced in Android API level 23.

* m4/error_h.m4 (gl_ERROR_H): Conditionally set REPLACE_ERROR.
* lib/error.in.h (error): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 23.
Bruno Haible [Sun, 22 Jan 2023 12:12:02 +0000 (13:12 +0100)]
Resolve conflicts for functions introduced in Android API level 23.

* lib/wchar.in.h (wmempcpy): Consider REPLACE_WMEMPCPY.
* m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WMEMPCPY.
* modules/wchar (Makefile.am): Substitute REPLACE_WMEMPCPY.
* m4/wmempcpy.m4 (gl_FUNC_WMEMPCPY): Conditionally set
REPLACE_WMEMPCPY.
* modules/wmempcpy (configure.ac): Consider REPLACE_WMEMPCPY.

2 years agoResolve conflicts for functions introduced in Android API level 23.
Bruno Haible [Sun, 22 Jan 2023 12:05:19 +0000 (13:05 +0100)]
Resolve conflicts for functions introduced in Android API level 23.

* lib/unistd.in.h (sethostname): Consider REPLACE_SETHOSTNAME. Disable
_GL_CXXALIASWARN invocation on non-glibc systems.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_SETHOSTNAME.
* modules/unistd (Makefile.am): Substitute REPLACE_SETHOSTNAME.
* m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): Conditionally set
REPLACE_SETHOSTNAME.
* modules/sethostname (Depends-on, configure.ac): Consider
REPLACE_SETHOSTNAME.

2 years agoResolve conflicts for functions introduced in Android API level 23.
Bruno Haible [Sun, 22 Jan 2023 12:01:14 +0000 (13:01 +0100)]
Resolve conflicts for functions introduced in Android API level 23.

* lib/string.in.h (mempcpy): Consider REPLACE_MEMPCPY. Disable
_GL_CXXALIASWARN invocation on non-glibc systems.
* m4/string_h.m4 (gl_STRING_H_DEFAULTS): Initialize REPLACE_MEMPCPY.
* modules/string (Makefile.am): Substitute REPLACE_MEMPCPY.
* m4/mempcpy.m4 (gl_FUNC_STPCPY): Conditionally set REPLACE_MEMPCPY.
* modules/mempcpy (configure.ac): Consider REPLACE_MEMPCPY.

2 years agoResolve conflicts for functions introduced in Android API level 23.
Bruno Haible [Sun, 22 Jan 2023 11:43:06 +0000 (12:43 +0100)]
Resolve conflicts for functions introduced in Android API level 23.

* lib/stdlib.in.h (mkostemp): Consider REPLACE_MKOSTEMP. Disable
_GL_CXXALIASWARN invocation on non-glibc systems.
(mkostemps): Consider REPLACE_MKOSTEMPS. Disable _GL_CXXALIASWARN
invocation on non-glibc systems.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MKOSTEMP,
REPLACE_MKOSTEMPS.
* modules/stdlib (Makefile.am): Substitute REPLACE_MKOSTEMP,
REPLACE_MKOSTEMPS.
* m4/mkostemp.m4 (gl_FUNC_MKOSTEMP): Conditionally set REPLACE_MKOSTEMP.
* modules/mkostemp (Depends-on, configure.ac): Consider
REPLACE_MKOSTEMP.
* m4/mkostemps.m4 (gl_FUNC_MKOSTEMPS): Conditionally set
REPLACE_MKOSTEMPS.
* modules/mkostemps (Depends-on, configure.ac): Consider
REPLACE_MKOSTEMPS.

2 years agoResolve conflicts for functions introduced in Android API level 21.
Bruno Haible [Sun, 22 Jan 2023 11:41:14 +0000 (12:41 +0100)]
Resolve conflicts for functions introduced in Android API level 21.

* m4/fts.m4 (gl_FUNC_FTS_CORE): Use rpl_* symbols also when the system
will have fts_open in a future version.
* m4/iswblank.m4 (gl_FUNC_ISWBLANK): Conditionally set REPLACE_ISWBLANK.
* m4/mbtowc.m4 (gl_FUNC_MBTOWC): Conditionally set REPLACE_MBTOWC.
* m4/vdprintf.m4 (gl_REPLACE_VDPRINTF): Conditionally set
REPLACE_VDPRINTF.
* m4/wcsnrtombs.m4 (gl_FUNC_WCSNRTOMBS): Conditionally set
REPLACE_WCSNRTOMBS.

2 years agoResolve conflicts for functions introduced in Android API level 21.
Bruno Haible [Sun, 22 Jan 2023 11:36:45 +0000 (12:36 +0100)]
Resolve conflicts for functions introduced in Android API level 21.

* m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Conditionally set
REPLACE_MBSNRTOWCS.
* lib/wchar.in.h (mbsnrtowcs): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 21.
Bruno Haible [Sun, 22 Jan 2023 11:34:17 +0000 (12:34 +0100)]
Resolve conflicts for functions introduced in Android API level 21.

* m4/execvpe.m4 (gl_FUNC_EXECVPE): Conditionally set REPLACE_EXECVPE.
* m4/linkat.m4 (gl_FUNC_LINKAT): Conditionally set REPLACE_LINKAT.
* m4/readlinkat.m4 (gl_FUNC_READLINKAT): Conditionally set
REPLACE_READLINKAT.
* m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Conditionally set
REPLACE_SYMLINKAT.
* m4/truncate.m4 (gl_FUNC_TRUNCATE): Conditionally set REPLACE_TRUNCATE.
* lib/unistd.in.h (execvpe, linkat, readlinkat, symlinkat, truncate):
Disable _GL_CXXALIASWARN invocation on non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 21.
Bruno Haible [Sun, 22 Jan 2023 11:30:17 +0000 (12:30 +0100)]
Resolve conflicts for functions introduced in Android API level 21.

* m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Conditionally set REPLACE_MKNODAT.
* lib/sys_stat.in.h (mknodat): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 21.
Bruno Haible [Sun, 22 Jan 2023 11:27:03 +0000 (12:27 +0100)]
Resolve conflicts for functions introduced in Android API level 21.

* m4/stpncpy.m4 (gl_FUNC_STPNCPY): Conditionally set REPLACE_STPNCPY.
* lib/string.in.h (stpncpy): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 21.
Bruno Haible [Sun, 22 Jan 2023 11:25:06 +0000 (12:25 +0100)]
Resolve conflicts for functions introduced in Android API level 21.

* m4/random.m4 (gl_FUNC_RANDOM): Conditionally set REPLACE_INITSTATE,
REPLACE_SETSTATE.
* lib/stdlib.in.h (initstate, setstate): Disable _GL_CXXALIASWARN
invocation on non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 21.
Bruno Haible [Sun, 22 Jan 2023 11:22:31 +0000 (12:22 +0100)]
Resolve conflicts for functions introduced in Android API level 21.

* m4/dprintf.m4 (gl_REPLACE_DPRINTF): Conditionally set REPLACE_DPRINTF.
* lib/stdio.in.h (dprintf): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 21.
Bruno Haible [Sun, 22 Jan 2023 11:19:58 +0000 (12:19 +0100)]
Resolve conflicts for functions introduced in Android API level 21.

* m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Conditionally set
REPLACE_DUPLOCALE.
* m4/localename.m4 (gl_LOCALENAME): Conditionally set REPLACE_NEWLOCALE,
REPLACE_DUPLOCALE, REPLACE_FREELOCALE.
* lib/locale.in.h (newlocale, duplocale, freelocale): Disable
_GL_CXXALIASWARN invocation on non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 21.
Bruno Haible [Sun, 22 Jan 2023 10:55:01 +0000 (11:55 +0100)]
Resolve conflicts for functions introduced in Android API level 21.

* lib/unistd.in.h (dup3): Consider REPLACE_DUP3. Disable
_GL_CXXALIASWARN invocation on non-glibc systems.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_DUP3.
* modules/unistd (Makefile.am): Substitute REPLACE_DUP3.
* m4/dup3.m4 (gl_FUNC_DUP3): Conditionally set REPLACE_DUP3.

2 years agoResolve conflicts for functions introduced in Android API level 21.
Bruno Haible [Sun, 22 Jan 2023 10:51:46 +0000 (11:51 +0100)]
Resolve conflicts for functions introduced in Android API level 21.

* lib/string.in.h (stpcpy): Consider REPLACE_STPCPY. Disable
_GL_CXXALIASWARN invocation on non-glibc systems.
* m4/string_h.m4 (gl_STRING_H_DEFAULTS): Initialize REPLACE_STPCPY.
* modules/string (Makefile.am): Substitute REPLACE_STPCPY.
* m4/stpcpy.m4 (gl_FUNC_STPCPY): Conditionally set REPLACE_STPCPY.
* modules/stpcpy (configure.ac): Consider REPLACE_STPCPY.

2 years agoResolve conflicts for functions introduced in Android API level 21.
Bruno Haible [Sun, 22 Jan 2023 10:48:22 +0000 (11:48 +0100)]
Resolve conflicts for functions introduced in Android API level 21.

* lib/stdlib.in.h (_Exit): Consider REPLACE__EXIT. Disable
_GL_CXXALIASWARN invocation on non-glibc systems.
(getprogname): Consider REPLACE_GETPROGNAME. Disable _GL_CXXALIASWARN
invocation on non-glibc systems.
(posix_openpt): Consider REPLACE_POSIX_OPENPT. Disable _GL_CXXALIASWARN
invocation on non-glibc systems.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE__EXIT,
REPLACE_GETPROGNAME, REPLACE_POSIX_OPENPT.
* modules/stdlib (Makefile.am): Substitute REPLACE__EXIT,
REPLACE_GETPROGNAME, REPLACE_POSIX_OPENPT.
* m4/_Exit.m4 (gl_FUNC__EXIT): Conditionally set REPLACE__EXIT.
* modules/_Exit (configure.ac): Consider REPLACE__EXIT.
* m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Conditionally set
REPLACE_GETPROGNAME.
* modules/getprogname (configure.ac): Consider REPLACE_GETPROGNAME.
* m4/posix_openpt.m4 (gl_FUNC_POSIX_OPENPT): Conditionally set
REPLACE_POSIX_OPENPT.
* modules/posix_openpt (configure.ac): Consider REPLACE_POSIX_OPENPT.

2 years agoResolve conflicts for functions introduced in Android API level 21.
Bruno Haible [Sun, 22 Jan 2023 10:47:22 +0000 (11:47 +0100)]
Resolve conflicts for functions introduced in Android API level 21.

* lib/search.in.h (twalk): Consider REPLACE_TWALK.
* m4/search_h.m4 (gl_SEARCH_H_DEFAULTS): Initialize REPLACE_TWALK.
* modules/search (Makefile.am): Substitute REPLACE_TWALK.
* m4/tsearch.m4 (gl_FUNC_TSEARCH): Conditionally set REPLACE_TWALK.
* modules/tsearch (configure.ac): Consider REPLACE_TWALK.

2 years agoResolve conflicts for functions introduced in Android API level 19.
Bruno Haible [Sun, 22 Jan 2023 10:42:32 +0000 (11:42 +0100)]
Resolve conflicts for functions introduced in Android API level 19.

* lib/inttypes.in.h (imaxabs): Consider REPLACE_IMAXABS. Disable
_GL_CXXALIASWARN invocation on non-glibc systems.
(imaxdiv): Consider REPLACE_IMAXDIV. Disable _GL_CXXALIASWARN invocation
on non-glibc systems.
* m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Initialize HAVE_IMAXABS,
HAVE_IMAXDIV, REPLACE_IMAXABS, REPLACE_IMAXDIV.
* modules/inttypes-incomplete (Makefile.am): Substitute REPLACE_IMAXABS,
REPLACE_IMAXDIV.
* m4/imaxabs.m4 (gl_FUNC_IMAXABS): Conditionally set HAVE_IMAXABS,
REPLACE_IMAXABS.
* modules/imaxabs (configure.ac): Consider HAVE_IMAXABS, REPLACE_IMAXABS.
* m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Conditionally set HAVE_IMAXDIV,
REPLACE_IMAXDIV.
* modules/imaxdiv (configure.ac): Consider HAVE_IMAXDIV, REPLACE_IMAXDIV.

2 years agoResolve conflicts for functions introduced in Android API level 19.
Bruno Haible [Sun, 22 Jan 2023 01:43:23 +0000 (02:43 +0100)]
Resolve conflicts for functions introduced in Android API level 19.

* m4/futimens.m4 (gl_FUNC_FUTIMENS): Conditionally set REPLACE_FUTIMENS.
* lib/sys_stat.in.h (futimens): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 18.
Bruno Haible [Sun, 22 Jan 2023 01:25:19 +0000 (02:25 +0100)]
Resolve conflicts for functions introduced in Android API level 18.

* m4/log2.m4 (gl_FUNC_LOG2): Conditionally set REPLACE_LOG2.
* m4/log2f.m4 (gl_FUNC_LOG2F): Conditionally set REPLACE_LOG2F.
* m4/log2l.m4 (gl_FUNC_LOG2L): Conditionally set REPLACE_LOG2L.
* lib/math.in.h (log2f): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 18.
Bruno Haible [Sun, 22 Jan 2023 01:22:22 +0000 (02:22 +0100)]
Resolve conflicts for functions introduced in Android API level 18.

* m4/getdelim.m4 (gl_FUNC_GETDELIM): Conditionally set REPLACE_GETDELIM.
* m4/getline.m4 (gl_FUNC_GETLINE): Conditionally set REPLACE_GETLINE.
* lib/stdio.in.h (getdelim, getline): Disable _GL_CXXALIASWARN
invocation on non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 16-17.
Bruno Haible [Sun, 22 Jan 2023 01:08:45 +0000 (02:08 +0100)]
Resolve conflicts for functions introduced in Android API level 16-17.

* m4/posix_memalign.m4 (gl_FUNC_POSIX_MEMALIGN): Conditionally set
REPLACE_POSIX_MEMALIGN.
* lib/stdlib.in.h (posix_memalign): Disable _GL_CXXALIASWARN invocation
on non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 16.
Bruno Haible [Sun, 22 Jan 2023 01:05:15 +0000 (02:05 +0100)]
Resolve conflicts for functions introduced in Android API level 16.

* m4/tsearch.m4 (gl_FUNC_TSEARCH): Conditionally set REPLACE_TSEARCH.
* lib/search.in.h (tsearch, tfind, tdelete, twalk): Disable
_GL_CXXALIASWARN invocation on non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 16.
Bruno Haible [Sun, 22 Jan 2023 01:00:51 +0000 (02:00 +0100)]
Resolve conflicts for functions introduced in Android API level 16.

* m4/faccessat.m4 (gl_FUNC_FACCESSAT): Conditionally set
REPLACE_FACCESSAT.
* lib/unistd.in.h (faccessat): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 12.
Bruno Haible [Sun, 22 Jan 2023 00:46:21 +0000 (01:46 +0100)]
Resolve conflicts for functions introduced in Android API level 12.

* m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Conditionally set
REPLACE_UTIMENSAT.
* lib/sys_stat.in.h (utimensat): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 12.
Bruno Haible [Sun, 22 Jan 2023 00:41:06 +0000 (01:41 +0100)]
Resolve conflicts for functions introduced in Android API level 12.

* m4/timegm.m4 (gl_FUNC_TIMEGM): Conditionally set REPLACE_TIMEGM.
* lib/time.in.h (timegm): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 12.
Bruno Haible [Sun, 22 Jan 2023 00:38:16 +0000 (01:38 +0100)]
Resolve conflicts for functions introduced in Android API level 12.

* m4/pwrite.m4 (gl_FUNC_PWRITE): Conditionally set REPLACE_PWRITE.
* lib/unistd.in.h (pwrite): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 12.
Bruno Haible [Sun, 22 Jan 2023 00:36:31 +0000 (01:36 +0100)]
Resolve conflicts for functions introduced in Android API level 12.

* m4/pread.m4 (gl_FUNC_PREAD): Conditionally set REPLACE_PREAD.
* lib/unistd.in.h (pread): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 12.
Bruno Haible [Sun, 22 Jan 2023 00:34:16 +0000 (01:34 +0100)]
Resolve conflicts for functions introduced in Android API level 12.

* m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Conditionally set
REPLACE_FTRUNCATE.
* lib/unistd.in.h (ftruncate): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

2 years agoResolve conflicts for functions introduced in Android API level 9.
Bruno Haible [Sun, 22 Jan 2023 00:23:47 +0000 (01:23 +0100)]
Resolve conflicts for functions introduced in Android API level 9.

* lib/unistd.in.h (fdatasync): Consider REPLACE_FDATASYNC. Disable
_GL_CXXALIASWARN invocation on non-glibc systems.
(pipe2): Consider REPLACE_PIPE2. Disable _GL_CXXALIASWARN invocation on
non-glibc systems.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_FDATASYNC,
REPLACE_PIPE2.
* modules/unistd (Makefile.am): Substitute REPLACE_FDATASYNC,
REPLACE_PIPE2.
* m4/fdatasync.m4 (gl_FUNC_FDATASYNC): Test for fdatasync using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. Conditionally set
REPLACE_FDATASYNC.
* modules/fdatasync (Depends-on, configure.ac): Consider
REPLACE_FDATASYNC.
* m4/pipe2.m4 (gl_FUNC_PIPE2): Conditionally set REPLACE_PIPE2.

2 years agoResolve conflicts for functions introduced in Android API level 8.
Bruno Haible [Sun, 22 Jan 2023 00:19:44 +0000 (01:19 +0100)]
Resolve conflicts for functions introduced in Android API level 8.

* m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Conditionally set
REPLACE_TTYNAME_R.
* lib/unistd.in.h (ttyname_r): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

2 years agoPrepare for resolving conflicts regarding future Android API levels.
Bruno Haible [Sun, 22 Jan 2023 00:19:13 +0000 (01:19 +0100)]
Prepare for resolving conflicts regarding future Android API levels.

* m4/gnulib-common.m4 (gl_CHECK_FUNCS_ANDROID): Don't check for the
function declaration on platforms other than Android. Set a variable
gl_cv_onwards_func_<func>.

2 years agoFix ChangeLog typo in previous commit.
Paul Eggert [Sun, 22 Jan 2023 06:53:15 +0000 (00:53 -0600)]
Fix ChangeLog typo in previous commit.

2 years agosigsegv, vma-iter: port to Solaris 10
Paul Eggert [Sun, 22 Jan 2023 06:49:04 +0000 (00:49 -0600)]
sigsegv, vma-iter: port to Solaris 10

On this platform, <sys/types.h> does not define off_t if neither
_LP64 nor _FILE_OFFSET_BITS is defined, which can happen if we
#undef _FILE_OFFSET_BITS.  This became a problem with the new way
of doing stdbool, since config.h now includes <stdbool.h>, and
Solaris 10 <stdbool.h> includes <sys/feature_tests.h> which
arranges for _FILE_OFFSET_BITS to always be defined (if only to 32),
which <sys/types.h> assumes.
* lib/stackvma.c, lib/vma-iter.c (_FILE_OFFSET_BITS) [__sun && !_LP64]:
Define to 32 instead of leaving undefined.

2 years agologin_tty: Ensure declaration in <utmp.h>.
Bruno Haible [Sat, 21 Jan 2023 20:13:20 +0000 (21:13 +0100)]
login_tty: Ensure declaration in <utmp.h>.

* tests/test-utmp-c++.cc: New file.
* modules/utmp-c++-tests: New file.

* tests/test-utmp.c: New file.
* modules/utmp-tests: New file.

* lib/login_tty.c: Include <utmp.h>.
* m4/login_tty.m4: New file.
(gl_FUNC_LOGIN_TTY): Moved here from m4/pty.m4. Set HAVE_LOGIN_TTY.
* m4/pty.m4 (gl_FUNC_LOGIN_TTY): Moved to m4/login_tty.m4.
* modules/login_tty (Files): Add m4/login_tty.m4.
(Depends-on): Add utmp. Remove pty. Update condition.
(configure.ac): Update condition. Invoke gl_UTMP_MODULE_INDICATOR
instead of gl_PTY_MODULE_INDICATOR.
(Include): List <utmp.h>.
* doc/glibc-functions/login_tty.texi: Mark the include file diversity as
fixed.
* tests/test-login_tty.c: Include <utmp.h>. Don't declare login_tty
here.

* lib/utmp.in.h: New file.
* m4/utmp_h.m4: New file.
* modules/utmp: New file.
* doc/glibc-headers/utmp.texi: New file.
* doc/gnulib.texi (Glibc Header File Substitutes): Include it.

2 years agologin_tty: Fix detection of declaration (regression 2023-01-19).
Bruno Haible [Sat, 21 Jan 2023 20:00:19 +0000 (21:00 +0100)]
login_tty: Fix detection of declaration (regression 2023-01-19).

* m4/pty.m4 (gl_FUNC_LOGIN_TTY): Check for the three possible header
files.

2 years agoautoupdate
Karl Berry [Sat, 21 Jan 2023 16:09:55 +0000 (08:09 -0800)]
autoupdate

2 years agoalignasof tests: Rename test file.
Bruno Haible [Sat, 21 Jan 2023 09:07:19 +0000 (10:07 +0100)]
alignasof tests: Rename test file.

* tests/test-alignasof.c: Renamed from tests/test-stdalign.c.
* modules/alignasof-tests (Files, Makefile.am): Update accordingly.

2 years agoalignasof tests: Fix GCC warning (regression 2023-01-15).
Bruno Haible [Sat, 21 Jan 2023 09:01:45 +0000 (10:01 +0100)]
alignasof tests: Fix GCC warning (regression 2023-01-15).

* tests/test-stdalign.c (alignas): Undefine before redefine.

2 years agogetprogname: Move declaration from "getprogname.h" to <stdlib.h>.
Bruno Haible [Sat, 21 Jan 2023 08:43:50 +0000 (09:43 +0100)]
getprogname: Move declaration from "getprogname.h" to <stdlib.h>.

* lib/stdlib.in.h (getprogname): New declaration.
* lib/getprogname.h: Add deprecation warning.
(getprogname): Remove declaration.
* lib/getprogname.c: Include <stdlib.h> instead of getprogname.h.
* m4/stdlib_h.m4 (gl_STDLIB_H): Test whether getprogname is declared.
(gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize GNULIB_GETPROGNAME.
(gl_STDLIB_H_DEFAULTS): Initialize HAVE_GETPROGNAME.
* m4/getprogname.m4 (gl_PREREQ_GETPROGNAME): New macro, extracted from
gl_FUNC_GETPROGNAME. Set HAVE_GETPROGNAME.
(gl_FUNC_GETPROGNAME): Remove code that was moved to
gl_PREREQ_GETPROGNAME.
* modules/stdlib (Makefile.am): Substitute GNULIB_GETPROGNAME and
HAVE_GETPROGNAME.
* modules/getprogname (Depends-on): Add stdlib.
(configure.ac): Define a module indicator. Invoke gl_PREREQ_GETPROGNAME.
(Makefile.am): Don't compile getprogname.c if not needed.
(Include): List <stdlib.h> instead of getprogname.h.
* tests/test-getprogname.c: Include <stdlib.h> instead of getprogname.h.
* NEWS: Mention the change.
* lib/argmatch.c: Don't include getprogname.h.
* lib/c-stack.c: Likewise.
* lib/error.c: Likewise.
* lib/git-merge-changelog.c: Likewise.

2 years agogendocs.sh comment spelling fix
Paul Eggert [Sat, 21 Jan 2023 06:30:29 +0000 (00:30 -0600)]
gendocs.sh comment spelling fix

2 years agosnippet/_Noreturn: work around Clang _Noreturn bug
Paul Eggert [Fri, 20 Jan 2023 03:39:03 +0000 (19:39 -0800)]
snippet/_Noreturn: work around Clang _Noreturn bug

This is a bigger-hammer workaround for the clang _Noreturn issue
fix for dfa.c on 2023-01-01.  Unfortunately, it causes 270
-Wreturn-type and -Wsometimes-uninitialized warnings when building
bleeding-edge GNU Emacs from Git on Fedora 37 with plain
‘./configure && make’.  So the workaround is enabled only if you
compile with -D_GL_WORK_AROUND_LLVM_BUG_59792.
* lib/_Noreturn.h (_Noreturn):
* m4/gnulib-common.m4 (gl_COMMON_BODY):
#define _Noreturn to be empty if it is Clang 15 or earlier,
and if _GL_WORK_AROUND_LLVM_BUG_59792 is defined.

2 years agoFix warnings for functions introduced in Android API level 34.
Bruno Haible [Thu, 19 Jan 2023 20:55:45 +0000 (21:55 +0100)]
Fix warnings for functions introduced in Android API level 34.

* modules/execute-tests (configure.ac): Test for close_range using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.

2 years agoFix warnings for functions introduced in Android API level 30.
Bruno Haible [Thu, 19 Jan 2023 20:55:42 +0000 (21:55 +0100)]
Fix warnings for functions introduced in Android API level 30.

* m4/threadlib.m4 (gl_STDTHREADLIB_BODY): Test for thrd_create using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.

2 years agoFix warnings for functions introduced in Android API level 29.
Bruno Haible [Thu, 19 Jan 2023 20:55:39 +0000 (21:55 +0100)]
Fix warnings for functions introduced in Android API level 29.

* m4/getloadavg.m4 (gl_GETLOADAVG): Test for getloadavg using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNC.

2 years agoFix warnings for functions introduced in Android API level 28.
Bruno Haible [Thu, 19 Jan 2023 20:55:37 +0000 (21:55 +0100)]
Fix warnings for functions introduced in Android API level 28.

* m4/glob.m4 (gl_GLOB): Test for glob using gl_CHECK_FUNCS_ANDROID
instead of AC_CHECK_FUNCS_ONCE.

2 years agoFix warnings for functions introduced in Android API level 26.
Bruno Haible [Thu, 19 Jan 2023 20:55:35 +0000 (21:55 +0100)]
Fix warnings for functions introduced in Android API level 26.

* m4/mountlist.m4 (gl_MOUNTLIST): Test for hasmntopt using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Test for nl_langinfo using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/strtod.m4 (gl_PREREQ_STRTOD): Test for nl_langinfo using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/strtold.m4 (gl_PREREQ_STRTOLD): Likewise.
* m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Likewise.
* m4/strerror_r.m4 (gl_PREREQ_STRERROR_R): Test for catgets using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/utimens.m4 (gl_UTIMENS): Test for lutimes using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Test for nl_langinfo_l using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* modules/duplocale-tests (configure.ac): Likewise.
* m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Update comment.

2 years agoFix warnings for functions introduced in Android API level 24.
Bruno Haible [Thu, 19 Jan 2023 20:55:32 +0000 (21:55 +0100)]
Fix warnings for functions introduced in Android API level 24.

* m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Test for strchrnul using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.

2 years agoFix warnings for functions introduced in Android API level 23.
Bruno Haible [Thu, 19 Jan 2023 20:55:29 +0000 (21:55 +0100)]
Fix warnings for functions introduced in Android API level 23.

* m4/fbufmode.m4 (gl_FUNC_FBUFMODE): Test for __flbf, __fbufsize using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/filenamecat.m4 (gl_FILE_NAME_CONCAT_LGPL): Test for mempcpy using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/fpurge.m4 (gl_FUNC_FPURGE): Test for __fpurge using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/freadable.m4 (gl_FUNC_FREADABLE): Test for __freadable using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/fwritable.m4 (gl_FUNC_FWRITABLE): Test for __fwritable using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/getpass.m4 (gl_FUNC_GETPASS_GNU): Test for __fsetlocking using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Test for mempcpy using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Test for mkfifoat using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/mkostemp.m4 (gl_FUNC_MKOSTEMP): Test for mkostemp using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/mkostemps.m4 (gl_FUNC_MKOSTEMPS): Test for mkostemps using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/pty.m4 (gl_FUNC_LOGIN_TTY): Test for login_tty using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): Test for sethostname using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Test for strerror_r using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/wmempcpy.m4 (gl_FUNC_WMEMPCPY): Test for wmempcpy using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.

2 years agoFix warnings for functions introduced in Android API level 21.
Bruno Haible [Thu, 19 Jan 2023 20:55:27 +0000 (21:55 +0100)]
Fix warnings for functions introduced in Android API level 21.

* m4/_Exit.m4 (gl_FUNC__EXIT): Test for _Exit using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/c-strtod.m4 (gl_C_STRTOLD): Test for strtold_l using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Test for c32rtomb like
gl_CHECK_FUNCS_ANDROID does.
* m4/dprintf.m4 (gl_FUNC_DPRINTF): Test for dprintf using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_POSIX): Likewise.
* m4/dup3.m4 (gl_FUNC_DUP3): Test for dup3 using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Test for duplocale using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/execvpe.m4 (gl_FUNC_EXECVPE): Test for execvpe using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/fts.m4 (gl_FUNC_FTS_CORE): Test for fts_open using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNC.
* m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Test for getprogname using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/intl-thread-locale.m4 (gt_FUNC_USELOCALE): Test for uselocale using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/iswblank.m4 (gl_FUNC_ISWBLANK): Test for iswblank using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Test for
tcdrain using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/linkat.m4 (gl_FUNC_LINKAT): Test for linkat using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/localename.m4 (gl_LOCALENAME): Test for newlocale, duplocale,
freelocale using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/mbrtoc32.m4 (gl_CHECK_FUNC_MBRTOC32): Test for mbrtoc32 like
gl_CHECK_FUNCS_ANDROID does.
* m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Test for mbsnrtowcs using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/mbtowc.m4 (gl_FUNC_MBTOWC): Test for mbtowc using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Test for mknodat using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/mountlist.m4 (gl_MOUNTLIST): Test for setmntent, endmntent using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/posix_openpt.m4 (gl_FUNC_POSIX_OPENPT): Test for posix_openpt using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/pty.m4 (gl_FUNC_OPENPTY): Test for posix_openpt using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/random.m4 (gl_FUNC_RANDOM): Test for initstate, setstate using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/stpcpy.m4 (gl_FUNC_STPCPY): Test for stpcpy using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/stpncpy.m4 (gl_FUNC_STPNCPY): Test for stpncpy using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Test for symlinkat using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/truncate.m4 (gl_FUNC_TRUNCATE): Test for truncate using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/tsearch.m4 (gl_FUNC_TSEARCH): Test for twalk using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/vdprintf.m4 (gl_FUNC_VDPRINTF): Test for vdprintf using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_POSIX): Likewise.
* m4/wcsnrtombs.m4 (gl_FUNC_WCSNRTOMBS): Test for wcsnrtombs using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/readlinkat.m4 (gl_FUNC_READLINKAT): Test for readlinkat using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/fchmodat.m4 (gl_PREREQ_FCHMODAT): Likewise.
* modules/careadlinkat (configure.ac): Likewise.
* modules/ftoastr (configure.ac): Test for strtof using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* modules/duplocale-tests (configure.ac): Test for duplocale using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* modules/hard-locale-tests (configure.ac): Likewise.
* modules/locale-tests (configure.ac): Test for newlocale using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* modules/localename-tests (configure.ac): Likewise.
* modules/tsearch-tests (configure.ac): Test for initstate using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* modules/unistr/u8-stpcpy (configure.ac): Test for stpcpy using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.

* m4/tcgetattr.m4: New file, extracted from m4/getpass.m4.
* m4/getpass.m4 (gl_PREREQ_GETPASS): Remove code that tests for
tcgetattr. Invoke gl_HAVE_TCGETATTR instead.
* modules/getpass (Files): Add tcgetattr.m4.
* modules/getpass-gnu (Files): Add tcgetattr.m4.
* modules/term-style-control (Files): Add tcgetattr.m4.
(configure.ac): Remove code that tests for tcgetattr. Invoke
gl_HAVE_TCGETATTR instead.

2 years agoFix warnings for functions introduced in Android API level 19.
Bruno Haible [Thu, 19 Jan 2023 20:55:25 +0000 (21:55 +0100)]
Fix warnings for functions introduced in Android API level 19.

* m4/futimens.m4 (gl_FUNC_FUTIMENS): Test for futimens using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/utimens.m4 (gl_UTIMENS): Likewise.
* m4/imaxabs.m4 (gl_FUNC_IMAXABS): Test for imaxabs using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Test for imaxdiv using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.

2 years agoFix warnings for functions introduced in Android API level 18.
Bruno Haible [Thu, 19 Jan 2023 20:55:23 +0000 (21:55 +0100)]
Fix warnings for functions introduced in Android API level 18.

* m4/getdelim.m4 (gl_FUNC_GETDELIM): Test for getdelim using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/getline.m4 (gl_FUNC_GETLINE): Test for getline using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNC.
* m4/log2.m4 (gl_FUNC_LOG2): Test for log2 using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/log2f.m4 (gl_FUNC_LOG2F): Test for log2f using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/log2l.m4 (gl_FUNC_LOG2L): Test for log2l using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.