]> Savannah Git Hosting - gnulib.git/log
gnulib.git
2 years agoFix warnings for functions introduced in Android API level 9.
Bruno Haible [Thu, 19 Jan 2023 20:55:13 +0000 (21:55 +0100)]
Fix warnings for functions introduced in Android API level 9.

* m4/pipe2.m4 (gl_FUNC_PIPE2): Test for pipe2 using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/fdatasync.m4 (gl_FUNC_FDATASYNC): Update comments.

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

* m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Test for ttyname_r using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.

2 years agofts: Document this module.
Bruno Haible [Thu, 19 Jan 2023 14:18:31 +0000 (15:18 +0100)]
fts: Document this module.

* doc/glibc-headers/fts.texi: Mention the 'fts' module.
* doc/glibc-functions/fts_children.texi: Likewise.
* doc/glibc-functions/fts_close.texi: Likewise.
* doc/glibc-functions/fts_open.texi: Likewise.
* doc/glibc-functions/fts_read.texi: Likewise.
* doc/glibc-functions/fts_set.texi: Likewise.

2 years agogetcwd: Speed up on Linux. Add support for Android.
Bruno Haible [Wed, 18 Jan 2023 12:16:42 +0000 (13:16 +0100)]
getcwd: Speed up on Linux. Add support for Android.

* lib/getcwd.c (__getcwd_generic): On Linux, use a specific readlink
call to speed up the operation.

2 years agoqcopy-acl: port to Fedora 9
Paul Eggert [Tue, 17 Jan 2023 23:21:26 +0000 (15:21 -0800)]
qcopy-acl: port to Fedora 9

It has libattr-2.4.41, which is too old for our code.
Problem reported by Po Lu <https://bugs.gnu.org/60843>.
* m4/xattr.m4 (gl_FUNC_XATTR): Check that we can use
ATTR_ACTION_PERMISSIONS, too.  Refactor so that there’s a single
test program that we compile and link, rather than doing the tests
in dribs and drabs.

2 years agoexecute tests: Avoid test failure with GNU make 4.4.
Bruno Haible [Tue, 17 Jan 2023 21:13:36 +0000 (22:13 +0100)]
execute tests: Avoid test failure with GNU make 4.4.

Reported by Eric Blake in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-01/msg00157.html>.

* tests/test-execute-main.c (main): Reset the SIGPIPE handler to
default on all platforms.

2 years agofflush: Tweak last commit.
Bruno Haible [Tue, 17 Jan 2023 19:17:27 +0000 (20:17 +0100)]
fflush: Tweak last commit.

* lib/stdio-impl.h (fp_): Make the last change work also with newer
Android NDKs and _FILE_OFFSET_BITS=64.

2 years agoqset-acl, acl: Improve comments.
Ondrej Valousek [Tue, 17 Jan 2023 17:31:18 +0000 (18:31 +0100)]
qset-acl, acl: Improve comments.

* lib/qset-acl.c (qset_acl): Improve comments.
* lib/set-acl.c (set_acl): Likewise.

2 years agofflush: Fix a buffer overrun on 32-bit Android.
Bruno Haible [Tue, 17 Jan 2023 18:16:29 +0000 (19:16 +0100)]
fflush: Fix a buffer overrun on 32-bit Android.

* lib/stdio-impl.h (fp_): On Android, change the type of _offset to
'long'.
* lib/fflush.c (update_fpos_cache): On Android, update a 'long', not an
'fpos_t'.

2 years agoexecute tests: Avoid test failure on Android.
Bruno Haible [Tue, 17 Jan 2023 14:15:57 +0000 (15:15 +0100)]
execute tests: Avoid test failure on Android.

* tests/test-execute-main.c (main): Reset the SIGPIPE handler to
default.

2 years agohard-locale: Port to Android ≥ 5.0.
Bruno Haible [Tue, 17 Jan 2023 13:09:41 +0000 (14:09 +0100)]
hard-locale: Port to Android ≥ 5.0.

* lib/hard-locale.c: Include <stdlib.h>.
(hard_locale): On Android, consider also MB_CUR_MAX, even if the
locale's name is "C".
* tests/test-hard-locale.c (test_one, main): Assume that on Android,
even the "C" locale is hard.

2 years agostddef tests: Fix compilation error (regression 2023-01-15).
Bruno Haible [Mon, 16 Jan 2023 16:58:30 +0000 (17:58 +0100)]
stddef tests: Fix compilation error (regression 2023-01-15).

* tests/test-stddef.c: Don't include <stdalign.h>.

2 years agoautoupdate
Karl Berry [Mon, 16 Jan 2023 16:54:54 +0000 (08:54 -0800)]
autoupdate

2 years agombrtowc, mbrtoc32 tests: Avoid test failure on Android ≥ 5.0.
Bruno Haible [Mon, 16 Jan 2023 13:34:56 +0000 (14:34 +0100)]
mbrtowc, mbrtoc32 tests: Avoid test failure on Android ≥ 5.0.

* tests/test-mbrtowc.c (main): On Android 5.0 or newer, when testing
the "C" locale, verify that the encoding is UTF-8.
* tests/test-mbrtoc32.c (main): Likewise.
* doc/posix-functions/setlocale.texi: Mention the Android problems.

2 years agombrtowc, mbrtoc32 tests: Refactor.
Bruno Haible [Mon, 16 Jan 2023 13:30:06 +0000 (14:30 +0100)]
mbrtowc, mbrtoc32 tests: Refactor.

* tests/test-mbrtowc.c (main): Straighten convoluted code.
* tests/test-mbrtoc32.c (main): Likewise.

2 years agosigpipe tests: Modernize use of 'head'.
Paul Eggert [Mon, 16 Jan 2023 12:40:48 +0000 (13:40 +0100)]
sigpipe tests: Modernize use of 'head'.

POSIX no longer requires support for ‘head -1’.

* tests/test-sigpipe.sh: Use ‘head -n1’ rather than ‘head -1’.
* tests/test-sigpipe.c (main): Likewise.
* lib/git-merge-changelog.c (main): Update comment accordingly.

2 years agoUse ‘head -n1’ rather than ‘head -1’
Paul Eggert [Mon, 16 Jan 2023 09:42:28 +0000 (01:42 -0800)]
Use ‘head -n1’ rather than ‘head -1’

POSIX no longer requires support for ‘head -1’.

2 years agosys_socket: fix typo
Paul Eggert [Sun, 15 Jan 2023 19:53:40 +0000 (11:53 -0800)]
sys_socket: fix typo

Fix typo in previous change.

2 years agoalignasof: new module
Paul Eggert [Sun, 15 Jan 2023 19:48:43 +0000 (11:48 -0800)]
alignasof: new module

This splits off support for the C23 keywords alignas and alignof,
from the now-deprecated stdalign module.  The latter now merely
provides C11 support.
* MODULES.html.sh, NEWS, doc/gnulib.texi:
* doc/posix-headers/stdalign.texi: Document the change.
* lib/stdalign.in.h: Remove most of the definitions (which are now
supplied by the alignasof module), leaving only
__alignas_is_defined and __alignof_is_defined.
* modules/alignasof, modules/alignasof-tests: New files.
* m4/stdalign.m4 (gl_ALIGNASOF): New macro, with
most of the contents of the old gl_STDALIGN_H.
Do not define __alignas_is_defined or __alignof_is_defined.
(gl_STDALIGN_H): Rely on gl_ALIGNASOF for most of the work.
* modules/alignalloc, modules/alignof, modules/argp:
* modules/crypto/md4-buffer, modules/crypto/md5-buffer:
* modules/crypto/sha1-buffer, modules/crypto/sha256-buffer:
* modules/crypto/sha512-buffer, modules/crypto/sm3-buffer:
* modules/fts, modules/rawmemchr, modules/relocatable-prog-wrapper:
* modules/stddef-tests, modules/sys_socket:
Depend on alignasof, not stdalign.
* modules/stdalign: Deprecate.  Depend on alignasof.
* modules/stdalign-tests: Move most contents to the new module
alignasof-tests, and depend on that.

2 years agofpending: Fix compilation error with NDK ≥ r14b and Android API < 23.
Bruno Haible [Sun, 15 Jan 2023 10:10:09 +0000 (11:10 +0100)]
fpending: Fix compilation error with NDK ≥ r14b and Android API < 23.

Report and patch by Po Lu <luangruo@yahoo.com>.

* lib/fpending.c (__fpending) [__ANDROID__]: Use the fp_ macro.

2 years agoalignof: port to strict C23
Paul Eggert [Sun, 15 Jan 2023 01:48:18 +0000 (17:48 -0800)]
alignof: port to strict C23

Problem reported by Khem Raj in:
https://lists.gnu.org/r/bug-gnulib/2023-01/msg00111.html
* lib/alignof.h (alignof_slot) [!__cplusplus]: Use C23-style alignof.
* modules/alignof (Depends-on): Add stdalign.

2 years agotest-framework-sh: work around AIX 7.2 diff bugs
Paul Eggert [Sun, 15 Jan 2023 00:47:41 +0000 (16:47 -0800)]
test-framework-sh: work around AIX 7.2 diff bugs

* tests/init.sh (compare_dev_null_): Run diff in the C locale.
AIX 7.2 diff messes up in UTF-8 locales; for example,
‘printf '\360\220\200\200\n' | diff - /dev/null’ incorrectly
outputs nothing and exits with status 0 when LC_ALL=en_US.UTF-8.

2 years agoerror, verror tests: Fix link error when the package uses libintl.
Bruno Haible [Sat, 14 Jan 2023 19:30:15 +0000 (20:30 +0100)]
error, verror tests: Fix link error when the package uses libintl.

* modules/error-tests (Makefile.am): Link test-error with $(LIBINTL).
* modules/verror-tests (Makefile.am): Link test-verror with $(LIBINTL).

2 years ago* m4/xattr.m4: Fix copyright date.
Paul Eggert [Sat, 14 Jan 2023 01:41:58 +0000 (17:41 -0800)]
* m4/xattr.m4: Fix copyright date.

2 years agolocalename: Fix -Wtautological-pointer-compare warning in a better way.
Bruno Haible [Fri, 13 Jan 2023 22:50:21 +0000 (23:50 +0100)]
localename: Fix -Wtautological-pointer-compare warning in a better way.

* lib/localename.c (duplocale, freelocale): Revert last patch.
(_GL_ARG_NONNULL): Define to empty.

2 years agoverify: work around xlclang 16.1 compiler bug
Paul Eggert [Fri, 13 Jan 2023 22:32:11 +0000 (14:32 -0800)]
verify: work around xlclang 16.1 compiler bug

Problem reported by Bruno Haible in:
https://lists.gnu.org/r/grep-devel/2023-01/msg00003.html
* lib/verify.h (_GL_HAS_BUILTIN_TRAP, _GL_HAS_BUILTIN_UNREACHABLE):
Define to 0 if compiler advertises itself as clang before version 5.
xlclang 16.1 advertises itself as 4.0.1 and this patch works
around what appears to be a compiler bug when compiling dfa.c in
bleeding-edge grep.

2 years agoFix ChangeLog typo.
Paul Eggert [Fri, 13 Jan 2023 22:32:11 +0000 (14:32 -0800)]
Fix ChangeLog typo.

2 years agoassert-h: suppress xlclang 16.1 false alarms
Paul Eggert [Fri, 13 Jan 2023 20:13:26 +0000 (12:13 -0800)]
assert-h: suppress xlclang 16.1 false alarms

* m4/assert_h.m4 (gl_ASSERT_H): Pacify older clangs too,
with regard to single-argument static_assert.
Problem found with xlclang 16.1 on AIX 7.2.

2 years agoassert-h: fix configure comment-out
Paul Eggert [Fri, 13 Jan 2023 19:57:35 +0000 (11:57 -0800)]
assert-h: fix configure comment-out

* m4/assert_h.m4 (gl_ASSERT_H): Also break apart "#undef
static_assert" with /**/.  Problem discovered with xlclang 16.1,
though it does not directly affect xlclang 16.1.

2 years agoDon’t use alloc_size with xlclang 16.1
Paul Eggert [Fri, 13 Jan 2023 19:40:24 +0000 (11:40 -0800)]
Don’t use alloc_size with xlclang 16.1

* m4/gnulib-common.m4 (_GL_HAS_ATTRIBUTE): Require Clang 5 instead
of 3.5 for this, to pacify xlclang 16.1.0 on AIX 7.2, which
advertises itself as clang 4.1.0, and which otherwise issues
warnings like “./xalloc.h:141:3: warning: 1540-2990 The attribute
"__attribute__((alloc_size(2, 3)))" is not supported.  The
attribute is ignored.” when building bleeding-edge GNU grep.

2 years agolocalename: -Wtautological-pointer-compare
Paul Eggert [Fri, 13 Jan 2023 18:50:12 +0000 (10:50 -0800)]
localename: -Wtautological-pointer-compare

Problem found by xlclang 16.1 on AIX 7.2.
* lib/localename.c (duplocale, freelocale):
Omit unnecessary comparison of non-null args to NULL.

2 years agologin_tty tests: Be more verbose when the test fails.
Bruno Haible [Fri, 13 Jan 2023 14:15:17 +0000 (15:15 +0100)]
login_tty tests: Be more verbose when the test fails.

* tests/test-login_tty.c (main): When the test fails, write a message
into a file.

2 years agoqcopy-acl: Make last patch more robust.
Bruno Haible [Fri, 13 Jan 2023 08:37:40 +0000 (09:37 +0100)]
qcopy-acl: Make last patch more robust.

* m4/acl.m4 (gl_FUNC_ACL): Define through AC_DEFUN_ONCE.
* modules/qcopy-acl (configure.ac): Require gl_FUNC_ACL.

2 years agoqcopy-acl: Adjust link dependencies.
Bruno Haible [Fri, 13 Jan 2023 08:30:29 +0000 (09:30 +0100)]
qcopy-acl: Adjust link dependencies.

* modules/qcopy-acl (Depends-on): Add condition.
(configure.ac): Set QCOPY_ACL_LIB.
(Link): Add $(QCOPY_ACL_LIB). Remove $(LIB_ACL).
* modules/qacl (Link): Add $(LIB_ACL) and $(QCOPY_ACL_LIB).
* modules/acl (Link): Add $(LIB_ACL) and $(QCOPY_ACL_LIB).
* modules/copy-file (Link): Add $(QCOPY_ACL_LIB).
* modules/supersede (Link): Add $(QCOPY_ACL_LIB).
* modules/acl-tests (Makefile.am): Link test-copy-acl with
$(QCOPY_ACL_LIB).
* modules/copy-file-tests (Makefile.am): Link test-copy-file with
$(QCOPY_ACL_LIB).
* modules/supersede-tests (Makefile.am): Link test-supersede with
$(QCOPY_ACL_LIB).

2 years agoqcopy-acl: Avoid autoconf warning.
Bruno Haible [Fri, 13 Jan 2023 07:51:10 +0000 (08:51 +0100)]
qcopy-acl: Avoid autoconf warning.

* m4/xattr.m4 (gl_FUNC_XATTR): Provide a description in AC_DEFINE.
Also, protect against unsafe use of a configure option value.

2 years agoqcopy-acl: Optimize copying of ACLs by directly copying the attributes.
Ondrej Valousek [Wed, 4 Jan 2023 14:34:26 +0000 (15:34 +0100)]
qcopy-acl: Optimize copying of ACLs by directly copying the attributes.

* lib/qcopy-acl.c (is_attr_permissions): New functions.
(qcopy_acl): If USE_XATTR, copy the ACL related attributes directly.
* m4/xattr.m4: New file.
* modules/qcopy-acl (Files): Add it.
(configure.ac): Invoke gl_FUNC_XATTR.

2 years agoerror: Work around an Android problem.
Bruno Haible [Thu, 12 Jan 2023 15:51:15 +0000 (16:51 +0100)]
error: Work around an Android problem.

* lib/error.in.h: Renamed from lib/error.h.
(_GL_ATTRIBUTE_SPEC_PRINTF_ERROR): New macro.
(error): Consider HAVE_ERROR and REPLACE_ERROR.
(error_at_line): Consider HAVE_ERROR_AT_LINE and REPLACE_ERROR_AT_LINE.
* m4/error_h.m4: New file, partially based on m4/error.m4.
* m4/error.m4 (gl_ERROR): Remove the test for error_at_line.
* modules/error-h: New file.
* modules/error (Files): Remove lib/error.h.
(Depends-on): Add error-h. Update conditions.
(configure.ac): Require gl_ERROR_H. Update condition.
* doc/glibc-headers/error.texi: Mention the 'error-h' module.
* doc/glibc-functions/error.texi: Mention the Android problem.
* config/srclist.txt: Add comment regarding error.h.

2 years agoerror, verror tests: Add clarification.
Bruno Haible [Thu, 12 Jan 2023 15:39:21 +0000 (16:39 +0100)]
error, verror tests: Add clarification.

* tests/test-error.c (main): Clarify why we don't test error_at_line
with a NULL filename.
* tests/test-verror.c (main): Clarify why we don't test verror_at_line
with a NULL filename.

2 years agoverror: Add tests.
Bruno Haible [Thu, 12 Jan 2023 11:34:43 +0000 (12:34 +0100)]
verror: Add tests.

* tests/test-verror.sh: New file, based on tests/test-error.sh.
* tests/test-verror.c: New file, based on tests/test-error.c.
* modules/verror-tests: New file.

2 years agoerror: Add tests.
Bruno Haible [Thu, 12 Jan 2023 10:48:27 +0000 (11:48 +0100)]
error: Add tests.

* tests/test-error.sh: New file.
* tests/test-error.c: New file.
* modules/error-tests: New file.

2 years agoxstrtol-error: Improve comments.
Bruno Haible [Wed, 11 Jan 2023 22:24:42 +0000 (23:24 +0100)]
xstrtol-error: Improve comments.

* lib/xstrtol-error.h (xstrtol_fatal): Add parameter names to
declaration.

2 years agospawn-pipe tests: Fix test failure on Android.
Bruno Haible [Wed, 11 Jan 2023 20:38:40 +0000 (21:38 +0100)]
spawn-pipe tests: Fix test failure on Android.

* tests/test-spawn-pipe-child.c (main): Skip the is_open (STDERR_FILENO)
check on Android.

2 years agoperror: Fix "perror clobbers strerror's buffer" problem on Android.
Bruno Haible [Wed, 11 Jan 2023 19:39:55 +0000 (20:39 +0100)]
perror: Fix "perror clobbers strerror's buffer" problem on Android.

* m4/perror.m4 (gl_FUNC_PERROR): Set REPLACE_PERROR to 1 on Android.
* doc/posix-functions/perror.texi: Mention the Android problem.

2 years agoposix_spawn_file_actions_addfchdir tests: Fix test failure on Android.
Bruno Haible [Wed, 11 Jan 2023 18:51:43 +0000 (19:51 +0100)]
posix_spawn_file_actions_addfchdir tests: Fix test failure on Android.

* tests/test-posix_spawn-fchdir.c: Include xvasprintf.h.
(test): On Android, use "/proc" instead of "/".
(main): Determine the relative location of the 'pwd' program
accordingly.
* modules/posix_spawn_file_actions_addfchdir-tests (Depends-on): Add
xvasprintf.

2 years agorename, renameat, renameatu: Fix test failures on Android/Termux.
Bruno Haible [Wed, 11 Jan 2023 17:25:18 +0000 (18:25 +0100)]
rename, renameat, renameatu: Fix test failures on Android/Termux.

* tests/test-rename.h (test_rename): On Android, treat an EACCES failure
like EPERM.

2 years agolink, linkat tests: Fix test failures on Android/Termux.
Bruno Haible [Wed, 11 Jan 2023 17:15:59 +0000 (18:15 +0100)]
link, linkat tests: Fix test failures on Android/Termux.

* tests/test-link.h (test_link): On Android, treat an EACCES failure
like EPERM.
* tests/test-linkat.c (main): When test_link is marked skipped, skip the
rest of the test as well.

2 years agolink tests: Correct indentation.
Bruno Haible [Wed, 11 Jan 2023 13:54:55 +0000 (14:54 +0100)]
link tests: Correct indentation.

* tests/test-link.h (test_link): Correct indentation.

2 years agoFix link errors on Android 4.3: Limit last change to builds with GCC.
Bruno Haible [Wed, 11 Jan 2023 17:06:09 +0000 (18:06 +0100)]
Fix link errors on Android 4.3: Limit last change to builds with GCC.

2 years agoFix link errors on Android 4.3.
Bruno Haible [Wed, 11 Jan 2023 09:50:41 +0000 (10:50 +0100)]
Fix link errors on Android 4.3.

* lib/asyncsafe-spin.c: Don't use the GCC >= 4.1 builtins on Android.
* lib/pthread-spin.c: Likewise.
* lib/simple-atomic.c: Likewise.

2 years agoupdate-copyright: also work with two or more updatable lines in a file
Jim Meyering [Tue, 3 Jan 2023 06:52:08 +0000 (22:52 -0800)]
update-copyright: also work with two or more updatable lines in a file

* build-aux/update-copyright: Replace every occurrence of the copyright
line, not just the first one.
* tests/test-update-copyright.sh: Add a test case for this.

2 years agoimmutable: Fix initialization failure on Android.
Bruno Haible [Tue, 10 Jan 2023 16:44:04 +0000 (17:44 +0100)]
immutable: Fix initialization failure on Android.

* lib/immutable.c: Include "pathmax.h".
(do_init_mmap_file): Use $TMPDIR rather than /tmp, if it is safe.
* modules/immutable (Depends-on): Add pathmax.

2 years agoFix some test failures on Android ≥ 11.
Bruno Haible [Tue, 10 Jan 2023 15:23:18 +0000 (16:23 +0100)]
Fix some test failures on Android ≥ 11.

* tests/test-fclose.c (main): On Android, avoid triggering the
file-descriptor sanitizer (fdsan).
* tests/test-fdopen.c (main): Likewise.
* tests/test-fflush.c (main): Likewise.
* tests/test-fgetc.c (main): Likewise.
* tests/test-fputc.c (main): Likewise.
* tests/test-fread.c (main): Likewise.
* tests/test-fseeko4.c (main): Likewise.
* tests/test-ftello4.c (main): Likewise.
* tests/test-fwrite.c (main): Likewise.

2 years agoutimens: Fix warning on Android.
Bruno Haible [Tue, 10 Jan 2023 11:38:49 +0000 (12:38 +0100)]
utimens: Fix warning on Android.

* m4/utimens.m4 (gl_UTIMENS): Test for futimesat and futimes using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.

2 years agosecure_getenv: Fix warning on Android.
Bruno Haible [Tue, 10 Jan 2023 11:52:10 +0000 (12:52 +0100)]
secure_getenv: Fix warning on Android.

* m4/secure_getenv.m4 (gl_FUNC_SECURE_GETENV): Test for issetugid using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* lib/secure_getenv.c: Fix comment regarding issetugid.

2 years agorenameat, renameatu: Fix warning on Android.
Bruno Haible [Tue, 10 Jan 2023 11:31:56 +0000 (12:31 +0100)]
renameat, renameatu: Fix warning on Android.

* m4/renameat.m4 (gl_FUNC_RENAMEAT): Test for renameat2 using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.

2 years agomemset_explicit tests: Fix signature check.
Bruno Haible [Tue, 10 Jan 2023 11:19:42 +0000 (12:19 +0100)]
memset_explicit tests: Fix signature check.

* tests/test-memset_explicit.c: Fix return type in signature check.

2 years agomath: Fix compilation errors in C++ mode on Android.
Bruno Haible [Tue, 10 Jan 2023 08:58:40 +0000 (09:58 +0100)]
math: Fix compilation errors in C++ mode on Android.

* lib/math.in.h: Declare nothing if this file gets included from
/usr/include/c++/v1/math.h too early.

2 years agosys_ioctl: Fix compilation error in C++ mode on Android.
Bruno Haible [Tue, 10 Jan 2023 08:10:48 +0000 (09:10 +0100)]
sys_ioctl: Fix compilation error in C++ mode on Android.

* lib/sys_ioctl.in.h (ioctl): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

2 years agothreads-h: Improve portability.
Bruno Haible [Mon, 9 Jan 2023 20:31:52 +0000 (21:31 +0100)]
threads-h: Improve portability.

* lib/threads.in.h: Use INCLUDE_NEXT_AS_FIRST_DIRECTIVE when possible.
* modules/threads-h (Makefile.am): Substitute
INCLUDE_NEXT_AS_FIRST_DIRECTIVE and NEXT_AS_FIRST_DIRECTIVE_THREADS_H.

2 years agothreads-h: Fix compilation errors in C++ mode on Android.
Bruno Haible [Mon, 9 Jan 2023 18:12:49 +0000 (19:12 +0100)]
threads-h: Fix compilation errors in C++ mode on Android.

* lib/threads.in.h (_GL_ALREADY_INCLUDING_THREADS_H): New macro.

2 years agoaligned-malloc: Don't disturb the module aligned_alloc.
Bruno Haible [Mon, 9 Jan 2023 20:27:46 +0000 (21:27 +0100)]
aligned-malloc: Don't disturb the module aligned_alloc.

* modules/aligned-malloc (configure.ac): Test for aligned_alloc in the
same way as module aligned_alloc does.

2 years agomalloc-h: Improve portability.
Bruno Haible [Mon, 9 Jan 2023 20:18:20 +0000 (21:18 +0100)]
malloc-h: Improve portability.

* lib/malloc.in.h: Use INCLUDE_NEXT_AS_FIRST_DIRECTIVE when possible.
* modules/malloc-h (Makefile.am): Substitute
INCLUDE_NEXT_AS_FIRST_DIRECTIVE and NEXT_AS_FIRST_DIRECTIVE_MALLOC_H.

2 years agoreallocarray: Fix compilation error in C++ mode on Android.
Bruno Haible [Mon, 9 Jan 2023 16:29:03 +0000 (17:29 +0100)]
reallocarray: Fix compilation error in C++ mode on Android.

* m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY): Use gl_CHECK_FUNCS_ANDROID
instead of AC_CHECK_FUNCS.

2 years agogetsubopt: Fix compilation error in C++ mode on Android.
Bruno Haible [Mon, 9 Jan 2023 16:24:14 +0000 (17:24 +0100)]
getsubopt: Fix compilation error in C++ mode on Android.

* m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Use gl_CHECK_FUNCS_ANDROID
instead of AC_CHECK_FUNCS_ONCE.

2 years agomalloc-h: Fix compilation errors in C++ mode on Android.
Bruno Haible [Mon, 9 Jan 2023 12:47:25 +0000 (13:47 +0100)]
malloc-h: Fix compilation errors in C++ mode on Android.

* lib/malloc.in.h: Don't include <stdlib.h>, except on Solaris and on
HP-UX. Include <stddef.h>. Make _GL_ATTRIBUTE_DEALLOC_FREE work (code
snippet copied from string.in.h and wchar.in.h).
* m4/malloc_h.m4 (gl_MALLOC_H_REQUIRE_DEFAULTS): Invoke
gl_STDLIB_H_REQUIRE_DEFAULTS.
* modules/malloc-h (Depends-on): Add stddef, stdlib.
(Makefile.am): Substitute GNULIB_FREE_POSIX and REPLACE_FREE.

2 years agogettime: Fix compilation error in C++ mode on Android.
Bruno Haible [Mon, 9 Jan 2023 09:14:32 +0000 (10:14 +0100)]
gettime: Fix compilation error in C++ mode on Android.

* m4/gettime.m4 (gl_CHECK_FUNC_TIMESPEC_GET): Also test whether
timespec_get is declared.

2 years agomalloc-h: Fix compilation error in C++ mode on Android.
Bruno Haible [Mon, 9 Jan 2023 08:43:26 +0000 (09:43 +0100)]
malloc-h: Fix compilation error in C++ mode on Android.

* lib/malloc.in.h (_GL_ALREADY_INCLUDING_MALLOC_H): New macro.

2 years agotimer_time: Rename LIB_TIMER_TIME to TIMER_TIME_LIB.
Bruno Haible [Sat, 7 Jan 2023 14:17:30 +0000 (15:17 +0100)]
timer_time: Rename LIB_TIMER_TIME to TIMER_TIME_LIB.

* m4/timer_time.m4: Rename LIB_TIMER_TIME to TIMER_TIME_LIB.
All uses changed.
* NEWS: Mention the change

2 years agosetlocale-null: Rename LIB_SETLOCALE_NULL to SETLOCALE_NULL_LIB.
Bruno Haible [Sat, 7 Jan 2023 14:12:41 +0000 (15:12 +0100)]
setlocale-null: Rename LIB_SETLOCALE_NULL to SETLOCALE_NULL_LIB.

* m4/setlocale_null.m4: Rename LIB_SETLOCALE_NULL to SETLOCALE_NULL_LIB.
All uses changed.
* NEWS: Mention the change

2 years agosetlocale: Rename LIB_SETLOCALE to SETLOCALE_LIB.
Bruno Haible [Sat, 7 Jan 2023 14:05:00 +0000 (15:05 +0100)]
setlocale: Rename LIB_SETLOCALE to SETLOCALE_LIB.

* m4/setlocale.m4: Rename LIB_SETLOCALE to SETLOCALE_LIB.
All uses changed.
* NEWS: Mention the change.

2 years agoselect: Rename LIB_SELECT to SELECT_LIB.
Bruno Haible [Sat, 7 Jan 2023 13:52:00 +0000 (14:52 +0100)]
select: Rename LIB_SELECT to SELECT_LIB.

* m4/select.m4: Rename LIB_SELECT to SELECT_LIB.
All uses changed.
* NEWS: Mention the change.

2 years agosched_yield: Rename LIB_SCHED_YIELD to SCHED_YIELD_LIB.
Bruno Haible [Sat, 7 Jan 2023 13:48:31 +0000 (14:48 +0100)]
sched_yield: Rename LIB_SCHED_YIELD to SCHED_YIELD_LIB.

* m4/threadlib.m4: Rename LIB_SCHED_YIELD to SCHED_YIELD_LIB.
All uses changed.
* NEWS: Mention the change.

2 years agopthread_sigmask: Rename LIB_PTHREAD_SIGMASK to PTHREAD_SIGMASK_LIB.
Bruno Haible [Sat, 7 Jan 2023 13:39:16 +0000 (14:39 +0100)]
pthread_sigmask: Rename LIB_PTHREAD_SIGMASK to PTHREAD_SIGMASK_LIB.

* m4/pthread_sigmask.m4: Rename LIB_PTHREAD_SIGMASK to
PTHREAD_SIGMASK_LIB.
All uses changed.
* NEWS: Mention the change.

2 years agoposix_spawn: Rename LIB_POSIX_SPAWN to POSIX_SPAWN_LIB.
Bruno Haible [Sat, 7 Jan 2023 13:32:04 +0000 (14:32 +0100)]
posix_spawn: Rename LIB_POSIX_SPAWN to POSIX_SPAWN_LIB.

* m4/spawn_h.m4: Rename LIB_POSIX_SPAWN to POSIX_SPAWN_LIB.
All uses changed.
* NEWS: Mention the change.

2 years agopoll: Rename LIB_POLL to POLL_LIB.
Bruno Haible [Sat, 7 Jan 2023 13:28:33 +0000 (14:28 +0100)]
poll: Rename LIB_POLL to POLL_LIB.

* m4/poll.m4: Rename LIB_POLL to POLL_LIB.
All uses changed.
* NEWS: Mention the change.

2 years agonanosleep: Rename LIB_NANOSLEEP to NANOSLEEP_LIB.
Bruno Haible [Sat, 7 Jan 2023 13:25:47 +0000 (14:25 +0100)]
nanosleep: Rename LIB_NANOSLEEP to NANOSLEEP_LIB.

* m4/nanosleep.m4: Rename LIB_NANOSLEEP to NANOSLEEP_LIB.
All uses changed.
* NEWS: Mention the change.

2 years agombrtowc: Rename LIB_MBRTOWC to MBRTOWC_LIB.
Bruno Haible [Sat, 7 Jan 2023 12:59:25 +0000 (13:59 +0100)]
mbrtowc: Rename LIB_MBRTOWC to MBRTOWC_LIB.

* m4/mbrtowc.m4: Rename LIB_MBRTOWC to MBRTOWC_LIB.
All uses changed.
* NEWS: Mention the change.

2 years agohard-locale: Rename LIB_HARD_LOCALE to HARD_LOCALE_LIB.
Bruno Haible [Sat, 7 Jan 2023 10:42:52 +0000 (11:42 +0100)]
hard-locale: Rename LIB_HARD_LOCALE to HARD_LOCALE_LIB.

* modules/hard-locale (configure.ac): Rename LIB_HARD_LOCALE to
HARD_LOCALE_LIB.
All uses changed.
* NEWS: Mention the change.

2 years agogetrandom: Rename LIB_GETRANDOM to GETRANDOM_LIB.
Bruno Haible [Sat, 7 Jan 2023 10:39:17 +0000 (11:39 +0100)]
getrandom: Rename LIB_GETRANDOM to GETRANDOM_LIB.

* m4/getrandom.m4: Rename LIB_GETRANDOM to GETRANDOM_LIB.
All uses changed.
* NEWS: Mention the change.

2 years agogetlogin, getlogin_r: Rename LIB_GETLOGIN to GETLOGIN_LIB.
Bruno Haible [Sat, 7 Jan 2023 10:33:28 +0000 (11:33 +0100)]
getlogin, getlogin_r: Rename LIB_GETLOGIN to GETLOGIN_LIB.

* m4/getlogin.m4: Rename LIB_GETLOGIN to GETLOGIN_LIB.
All uses changed.
* NEWS: Mention the change.

2 years agogethrxtime: Rename LIB_GETHRXTIME to GETHRXTIME_LIB.
Bruno Haible [Sat, 7 Jan 2023 10:26:46 +0000 (11:26 +0100)]
gethrxtime: Rename LIB_GETHRXTIME to GETHRXTIME_LIB.

* m4/gethrxtime.m4: Rename LIB_GETHRXTIME to GETHRXTIME_LIB.
All uses changed.
* NEWS: Mention the change.

2 years agofdatasync: Rename LIB_FDATASYNC to FDATASYNC_LIB.
Bruno Haible [Sat, 7 Jan 2023 10:23:26 +0000 (11:23 +0100)]
fdatasync: Rename LIB_FDATASYNC to FDATASYNC_LIB.

* m4/fdatasync.m4: Rename LIB_FDATASYNC to FDATASYNC_LIB.
All uses changed.
* NEWS: Mention the change.

2 years agoeuidaccess: Rename LIB_EACCESS to EUIDACCESS_LIBGEN.
Bruno Haible [Sat, 7 Jan 2023 10:19:17 +0000 (11:19 +0100)]
euidaccess: Rename LIB_EACCESS to EUIDACCESS_LIBGEN.

* m4/euidaccess.m4: Rename LIB_EACCESS to EUIDACCESS_LIBGEN.
All uses changed.
* NEWS: Mention the change.

2 years agoduplocale: Rename LIB_DUPLOCALE to DUPLOCALE_LIB.
Bruno Haible [Sat, 7 Jan 2023 10:13:35 +0000 (11:13 +0100)]
duplocale: Rename LIB_DUPLOCALE to DUPLOCALE_LIB.

* m4/duplocale.m4: Rename LIB_DUPLOCALE to DUPLOCALE_LIB.
All uses changed.
* NEWS: Mention the change.

2 years agoclock_time: Rename LIB_CLOCK_GETTIME to CLOCK_TIME_LIB.
Bruno Haible [Sat, 7 Jan 2023 10:10:34 +0000 (11:10 +0100)]
clock_time: Rename LIB_CLOCK_GETTIME to CLOCK_TIME_LIB.

* m4/clock_time.m4: Rename LIB_CLOCK_GETTIME to CLOCK_TIME_LIB.
All uses changed.
* NEWS: Mention the change.

2 years agoautoupdate
Karl Berry [Sat, 7 Jan 2023 16:25:56 +0000 (08:25 -0800)]
autoupdate

2 years agofile-has-acl: don’t bother setting LIB_HAS_ACL
Paul Eggert [Sat, 7 Jan 2023 01:25:02 +0000 (17:25 -0800)]
file-has-acl: don’t bother setting LIB_HAS_ACL

* m4/acl.m4 (gl_FUNC_ACL, gl_FILE_HAS_ACL): Don’t set LIB_HAS_ACL.
I think only Coreutils and Tar used it, and I’ve updated them.

2 years agobootstrap: suppress stray message from --pull
Paul Eggert [Fri, 6 Jan 2023 19:20:05 +0000 (11:20 -0800)]
bootstrap: suppress stray message from --pull

* build-aux/bootstrap: Regenerate.
* top/bootstrap-funclib.sh (autopull): Suggest running autogen.sh
only if it exists (i.e., the package is using autopull.sh/autogen.sh).
Suggest the same name for autogen.sh that is used in the test.

2 years agostring: Fix compilation errors in C++ mode on Android.
Bruno Haible [Thu, 5 Jan 2023 16:35:34 +0000 (17:35 +0100)]
string: Fix compilation errors in C++ mode on Android.

* lib/string.in.h (memrchr, strchrnul, strcasestr): Disable
_GL_CXXALIASWARN invocation on non-glibc systems.

2 years agogetpass: Fix compilation error on Android.
Bruno Haible [Thu, 5 Jan 2023 16:16:09 +0000 (17:16 +0100)]
getpass: Fix compilation error on Android.

* m4/getpass.m4 (gl_FUNC_GETPASS): Define NO_INLINE_GETPASS.
* doc/glibc-functions/getpass.texi: Mention the Android problem.

2 years agoRecognize functions added in future versions of Android.
Bruno Haible [Thu, 5 Jan 2023 15:36:52 +0000 (16:36 +0100)]
Recognize functions added in future versions of Android.

* m4/gnulib-common.m4 (gl_CHECK_FUNCS_ANDROID): New macro.
* m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Use
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/freading.m4 (gl_FUNC_FREADING): Likewise.
* m4/fseterr.m4 (gl_FUNC_FSETERR): Likewise.
* m4/fwriting.m4 (gl_FUNC_FWRITING): Likewise.
* m4/getentropy.m4 (gl_FUNC_GETENTROPY): Likewise.
* m4/getlogin_r.m4 (gl_CHECK_FUNCS_ANDROID): Likewise.
* m4/getrandom.m4 (gl_FUNC_GETRANDOM): Likewise.
* m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
* m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): Likewise.
* doc/glibc-functions/getentropy.texi: Mark function as existing in
Android 9.0.
* doc/glibc-functions/getrandom.texi: Likewise.
* doc/posix-functions/pthread_attr_getinheritsched.texi: Likewise.
* doc/posix-functions/pthread_attr_setinheritsched.texi: Likewise.

2 years agocopy-file, supersede: Fix link-time requirements.
Bruno Haible [Thu, 5 Jan 2023 10:26:04 +0000 (11:26 +0100)]
copy-file, supersede: Fix link-time requirements.

* modules/copy-file (Link): Add $(LIB_ACL).
* modules/supersede (Link): Likewise.

2 years agoMore systematic naming of LIB variables.
Bruno Haible [Thu, 5 Jan 2023 10:11:50 +0000 (11:11 +0100)]
More systematic naming of LIB variables.

* m4/acl.m4 (gl_FUNC_ACL, gl_FILE_HAS_ACL): Set FILE_HAS_ACL_LIB to the
same value as LIB_HAS_ACL.
* modules/file-has-acl (Link): Use FILE_HAS_ACL_LIB instead of
LIB_HAS_ACL.
* modules/file-has-acl-tests (Makefile.am): Likewise.

2 years agoautoupdate
Karl Berry [Wed, 4 Jan 2023 16:36:46 +0000 (08:36 -0800)]
autoupdate

2 years agodoc: Update regarding Android.
Bruno Haible [Wed, 4 Jan 2023 07:07:03 +0000 (08:07 +0100)]
doc: Update regarding Android.

* doc/glibc-functions/getdtablesize.texi: Update Android information.
* doc/glibc-functions/wait3.texi: Likewise.
* doc/pastposix-functions/ftime.texi: Likewise.
* doc/pastposix-functions/index.texi: Likewise.
* doc/pastposix-functions/pthread_attr_getstackaddr.texi: Likewise.
* doc/pastposix-functions/pthread_attr_setstackaddr.texi: Likewise.
* doc/pastposix-functions/wcswcs.texi: Likewise.

2 years agoffsl, ffsll: Fix compilation error on Android.
Bruno Haible [Tue, 3 Jan 2023 20:33:32 +0000 (21:33 +0100)]
ffsl, ffsll: Fix compilation error on Android.

* lib/string.in.h: On Android as well, include <strings.h>.
* m4/ffsl.m4 (gl_FUNC_FFSL): Use a specific link test instead of
AC_CHECK_FUNCS_ONCE.
* m4/ffsll.m4 (gl_FUNC_FFSLL): Likewise.
* doc/glibc-functions/ffsl.texi: Mention Android problems.
* doc/glibc-functions/ffsll.texi: Likewise.

2 years agoffs: Document Android problem.
Bruno Haible [Tue, 3 Jan 2023 18:48:59 +0000 (19:48 +0100)]
ffs: Document Android problem.

* doc/posix-functions/ffs.texi: Mention Android problem.
* m4/ffs.m4: Update comment.

2 years agostdio: Fix error in C++ mode on Android, due to putw.
Bruno Haible [Tue, 3 Jan 2023 16:14:33 +0000 (17:14 +0100)]
stdio: Fix error in C++ mode on Android, due to putw.

* lib/stdio.in.h (putw): Don't declare in the C++ namespace if putw is
not declared.
* m4/stdio_h.m4 (gl_STDIO_H): Test whether putw is declared.
(gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_PUTW.
* modules/stdio (Makefile.am): Substitute HAVE_DECL_PUTW.
* doc/glibc-functions/putw.texi: Update regarding Android.

2 years agostdio: Fix error in C++ mode on Android, due to getw.
Bruno Haible [Tue, 3 Jan 2023 16:11:19 +0000 (17:11 +0100)]
stdio: Fix error in C++ mode on Android, due to getw.

* lib/stdio.in.h (getw): Don't declare in the C++ namespace if getw is
not declared.
* m4/stdio_h.m4 (gl_STDIO_H): Test whether getw is declared.
(gl_STDIO_H_DEFAULTS): Initialize HAVE_DECL_GETW.
* modules/stdio (Makefile.am): Substitute HAVE_DECL_GETW.

2 years agoautoupdate
Karl Berry [Tue, 3 Jan 2023 15:59:49 +0000 (07:59 -0800)]
autoupdate