]> Savannah Git Hosting - gnulib.git/log
gnulib.git
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

2 years agosigsegv: Fix compilation error on Android 4.3.
Bruno Haible [Mon, 2 Jan 2023 15:57:31 +0000 (16:57 +0100)]
sigsegv: Fix compilation error on Android 4.3.

* lib/sigsegv.in.h: For Android, don't include <ucontext.h> and don't
reference ucontext_t.
* lib/sigsegv.c (SIGSEGV_FAULT_): For Android, use a plain POSIX fault
handler (cf. libsigsegv/src/fault-posix.h).

2 years agodfa: work around Clang 15 bug
Paul Eggert [Mon, 2 Jan 2023 06:06:10 +0000 (22:06 -0800)]
dfa: work around Clang 15 bug

Problem reported by Kenton Groombridge in:
https://lists.gnu.org/archive/html/bug-gawk/2022-12/msg00010.html
On x86-64, Clang 15 gets confused by a call (X ? dfaerror :
dfawarn) (Y) and generates the wrong code, presumably because
dfaerror is _Noreturn and dfawarn is not.
* lib/dfa.c (parse_bracket_exp): Reword to have one call for
dfaerror, the other for dfawarn.

2 years agodoc: Update regarding stable branches.
Bruno Haible [Sun, 1 Jan 2023 19:11:51 +0000 (20:11 +0100)]
doc: Update regarding stable branches.

* doc/gnulib-readme.texi (Stable Branches): Mention new branch
stable-202301. Mention that stable-202201 is no longer updated.

2 years agoFix typo in ChangeLog.
Bruno Haible [Sun, 1 Jan 2023 19:06:25 +0000 (20:06 +0100)]
Fix typo in ChangeLog.

2 years agomaint: use UTC when updating copyright date
Paul Eggert [Sun, 1 Jan 2023 02:40:56 +0000 (18:40 -0800)]
maint: use UTC when updating copyright date

Problem reported by Simon Joseffson in:
https://lists.gnu.org/r/bug-gnulib/2022-12/msg00125.html
* Makefile (COPYRIGHT_TZ): New macro.
(update-copyright): Use it.

2 years agomaint: run 'make update-copyright'
Simon Josefsson [Sun, 1 Jan 2023 00:14:21 +0000 (01:14 +0100)]
maint: run 'make update-copyright'

2 years agoassert-h: port static_assert to strict C99
Paul Eggert [Wed, 28 Dec 2022 22:15:43 +0000 (14:15 -0800)]
assert-h: port static_assert to strict C99

* lib/verify.h (_GL_VERIFY): Port MSVC hack back to C99.
Problem found when testing bleeding-edge gzip on IBM XL C for AIX,
V12.1 (5765-J02, 5725-C72), which complained ‘"malloca.c", line
42.56: 1506-041 (E) The invocation of macro _Static_assert
contains fewer arguments than are required by the macro
definition.’  This diagnostic is valid because C99 requires
that if you #define _Static_assert(R, ...) you must call
_Static_assert with at least two arguments.  I found a similar
problem with Sun C 5.9 SunOS_sparc Patch 124867-12 2009/11/22.

2 years agofile-has-acl: fix recently-introduced NFSv4 bug
Paul Eggert [Wed, 28 Dec 2022 04:00:58 +0000 (20:00 -0800)]
file-has-acl: fix recently-introduced NFSv4 bug

* lib/file-has-acl.c (acl_nfs4_nontrivial): Fix off-by-one
error when rounding WHOLEN up to next multiple of 4.
Pacify GCC 12.2.1 -Wcast-align.

2 years agofdatasync: fix comment
Paul Eggert [Tue, 27 Dec 2022 19:49:59 +0000 (11:49 -0800)]
fdatasync: fix comment

2 years agoAdd --pull, --gen options to build-aux/bootstrap
Paul Eggert [Tue, 27 Dec 2022 16:15:38 +0000 (08:15 -0800)]
Add --pull, --gen options to build-aux/bootstrap

This supports a single bootstrap script with --pull and --gen
options, as an alternative to separate autogen.sh and autopull.sh
and bootstrap-funclib.sh auxiliary files.
* top/bootstrap: With --version, also output library version.
Support update of package that has only the bootstrap script,
and not the other three files.

2 years agoSupport packages with just 'bootstrap'
Paul Eggert [Tue, 27 Dec 2022 16:15:38 +0000 (08:15 -0800)]
Support packages with just 'bootstrap'

* top/bootstrap: With --version, also output library version.
Support update of package that has only the bootstrap script,
and not the other three files.
* top/bootstrap-funclib.sh (scriptlibversion): Rename
from scriptversion.  All uses changed.  This way we
can distinguish script from script library versions.
(upgrade_bootstrap): If the package currently has only
the bootstrap script, just update that.

2 years agoBootstrap with functions, not scripts
Paul Eggert [Tue, 27 Dec 2022 16:15:37 +0000 (08:15 -0800)]
Bootstrap with functions, not scripts

* top/bootstrap: Use autopull and autogen functions, not
shell scripts.  This lets build-aux/bootstrap become a
standalone script.  It does not change the behavior of
top/bootstrap, except for minor rewording of disagnostics.

2 years agoMake autopull a shell function too
Paul Eggert [Tue, 27 Dec 2022 16:15:37 +0000 (08:15 -0800)]
Make autopull a shell function too

This does not change behavior.  It is helpful for future changes.
* top/autopull.sh: Call autopull to do the actual work.
(usage, download_po_files, update_po_files):
Move to top/bootstrap-funclib.sh.
* top/bootstrap-funclib.sh (autopull_usage): Rename from ‘usage’.
(autopull): New function, containing the top level of the
old top/autopull.sh.

2 years agoMake autogen a shell function too
Paul Eggert [Tue, 27 Dec 2022 16:15:37 +0000 (08:15 -0800)]
Make autogen a shell function too

This does not change behavior.  It is helpful for future changes.
* top/autogen.sh: Call autogen to do the actual work.
(usage, version_controlled_file, gitignore_entries, insert_if_absent):
(insert_vc_ignore, symlink_to_dir): Move to top/bootstrap-funclib.sh.
* top/bootstrap-funclib.sh (autogen_usage): Rename from ‘usage’.
(autogen): New function, containing the top level of the
old top/autogen.sh.

2 years agoMove scriptversion= lines up in scripts
Paul Eggert [Tue, 27 Dec 2022 16:15:37 +0000 (08:15 -0800)]
Move scriptversion= lines up in scripts

By default they need to be in the first 8 lines to be updated.

2 years agoFix compilation errors in C++ mode on Solaris 11 OpenIndiana.
Bruno Haible [Tue, 27 Dec 2022 10:21:45 +0000 (11:21 +0100)]
Fix compilation errors in C++ mode on Solaris 11 OpenIndiana.

* m4/gnulib-common.m4 (gl_COMMON_BODY): In _GL_ATTRIBUTE_DEALLOC_FREE,
with GNU C++, cast the 'free' function.
* lib/string.in.h (_GL_ATTRIBUTE_DEALLOC_FREE): With GNU C++, cast the
'free' function.
* lib/wchar.in.h (_GL_ATTRIBUTE_DEALLOC_FREE): Likewise.

2 years agostdnoreturn: Mark as deprecated, not obsolete. (Regression 2022-12-24.)
Bruno Haible [Tue, 27 Dec 2022 10:13:05 +0000 (11:13 +0100)]
stdnoreturn: Mark as deprecated, not obsolete. (Regression 2022-12-24.)

* modules/stdnoreturn (Status): Remove.
(Notice): Say that it is deprecated, not obsolete.
* doc/noreturn.texi: Fix a typo.

2 years agostdbool-c99: fix typo
Paul Eggert [Mon, 26 Dec 2022 18:17:17 +0000 (10:17 -0800)]
stdbool-c99: fix typo

Reported against Autoconf by Todd C. Miller in:
https://lists.gnu.org/r/autoconf/2022-12/msg00001.html
* m4/stdbool.m4 (AC_CHECK_HEADER_STDBOOL): Sync from Autoconf master.

2 years agoctime: Mark as deprecated, not obsolete. (Regression 2022-12-21.)
Bruno Haible [Mon, 26 Dec 2022 17:12:45 +0000 (18:12 +0100)]
ctime: Mark as deprecated, not obsolete. (Regression 2022-12-21.)

* modules/ctime (Status): Remove.
(Notice): Say that it is deprecated, not obsolete.

2 years agolargefile: sync from Autoconf master
Paul Eggert [Sun, 25 Dec 2022 19:41:57 +0000 (11:41 -0800)]
largefile: sync from Autoconf master

* m4/largefile.m4 (gl_SET_LARGEFILE_SOURCE): Test whether
AC_SYS_YEAR2038 is defined when this macro is defined, not when it
is used, as we now define AC_SYS_YEAR2038 later.
(_AC_SYS_LARGEFILE_MACRO_VALUE): Remove.
(_AC_SYS_YEAR2038_TEST_CODE, _AC_SYS_YEAR2038_OPTIONS)
(_AC_SYS_YEAR2038_PROBE, _AC_SYS_YEAR2038_ENABLE)
(_AC_SYS_YEAR2038_OPT_IN, AC_SYS_YEAR2038)
(_AC_SYS_LARGEFILE_TEST_CODE, _AC_SYS_LARGEFILE_OPTIONS)
(_AC_SYS_LARGEFILE_PROBE, _AC_SYS_LARGEFILE_ENABLE): New macros.
(AC_SYS_LARGEFILE): Use them.
* m4/year2038.m4: Remove.  All mentions removed.
* modules/largefile, modules/year2038 (configure.ac-early):
Do not require gl_YEAR2038_EARLY.
* modules/year2038 (Depends-on): Depend on largefile.
(configure.ac): Require AC_SYS_YEAR2038, not gl_YEAR2038.

2 years agoextensions: enable some C23 Annex F functions
Paul Eggert [Sun, 25 Dec 2022 07:39:41 +0000 (23:39 -0800)]
extensions: enable some C23 Annex F functions

* m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS):
Also define __STDC_WANT_IEC_60559_EXT__, for C23 Annex F
functions like totalorder.  This syncs from Autoconf master.

2 years agostdnoreturn: deprecate
Paul Eggert [Sat, 24 Dec 2022 09:29:29 +0000 (01:29 -0800)]
stdnoreturn: deprecate

C23 says <stdnoreturn.h> is obsolescent, so deprecate the
stdnoreturn module.  I don't think it was being used anyway
as it had too many problems.
* modules/stdnoreturn: Mark as obsolete.

2 years agodoc: C2x → C23
Paul Eggert [Sat, 24 Dec 2022 08:10:23 +0000 (00:10 -0800)]
doc: C2x → C23

2 years agofile-has-acl: improve recent NFSv4 support
Paul Eggert [Fri, 23 Dec 2022 23:18:29 +0000 (15:18 -0800)]
file-has-acl: improve recent NFSv4 support

This fixes a link failure with emacsclient on GNU/Linux.  This
program wants file_has_acl but none of the other ACL primitives,
so it doesn’t link acl-internal.o; this way it doesn’t need to
link with -lacl.  While I was at it I reviewed the recent changes,
fixed some unlikely overflow bugs, and adjusted to GNU style.
* doc/acl-nfsv4.txt: Remove.  Its contents are now in a
comment in lib/file-has-acl.c.
* lib/acl-internal.c, lib/acl-internal.h: Move recent changes
relating to acl_nfs4_nontrivial to lib/file-has-acl.c, so that
there is no trouble linking programs that need only file_has_acl.
* lib/file-has-acl.c (acl_nfs4_nontrivial): Move here from
lib/acl-internal.c, so that we needn't link -lacl in
programs that want only file_has_acl, such as emacsclient.
Do not assume a char buffer is aligned for uint32_t.
Check more carefully for buffer read overrun.
Allow up to 6 ACEs, since other code does; but check
that they’re distinct.  Avoid integer overflow.
Use memcmp rather than strncmp to compare memory blocks.
(file_has_acl): Preserve initial errno instead of setting to 0.
Allocate a bit more room for trivial ACL buffer.
Use EINVAL for botchedk NFSv4 ACLs (which shouldn’t happen).

2 years agoposix_spawnp-tests: fix filename typo
Paul Eggert [Fri, 23 Dec 2022 05:19:34 +0000 (21:19 -0800)]
posix_spawnp-tests: fix filename typo

Problem reported for GNU m4 by Mitchell Dorrell in:
https://lists.gnu.org/r/bug-m4/2022-12/msg00000.html
* tests/test-posix_spawnp-script.c (DATA_FILENAME):
Fix typo in file name that caused race with
test-posix_spawn-script.c.

2 years agofile-has-acl: Basic support for checking NFSv4 ACLs in Linux.
Ondrej Valousek [Fri, 2 Dec 2022 12:40:19 +0000 (13:40 +0100)]
file-has-acl: Basic support for checking NFSv4 ACLs in Linux.

* lib/acl-internal.h (acl_nfs4_nontrivial): New declaration.
* lib/acl-internal.c (acl_nfs4_nontrivial): New function.
* lib/file-has-acl.c: Include <arpa/inet.h>.
(XATTR_NAME_NFSV4_ACL, TRIVIAL_NFS4_ACL_MAX_LENGTH): New macros.
(file_has_acl): Test for NFSv4 ACLs.
* doc/acl-nfsv4.txt: New file.

2 years agoPort __has_c_attribute to strict C23
Paul Eggert [Thu, 22 Dec 2022 05:45:18 +0000 (21:45 -0800)]
Port __has_c_attribute to strict C23

* m4/gnulib-common.m4 (_GL_HAS_C_ATTRIBUTE): Remove, as C23 says
behavior is undefined if __has_c_attribute appears anywhere other
than at the top level of an #if or #ifdef.  All uses replaced by
wordier invocations of __has_c_attribute.

2 years agoasctime, ctime: deprecate
Paul Eggert [Wed, 21 Dec 2022 21:25:39 +0000 (13:25 -0800)]
asctime, ctime: deprecate

C23 deprecates asctime and ctime, so deprecate them in Gnulib too.
* NEWS, doc/posix-functions/asctime.texi:
* doc/posix-functions/ctime.texi: Mention this.
* lib/time.in.h (ctime): Deprecate any ctime replacement.
* modules/ctime: Now obsolete.

2 years agoautoupdate
Karl Berry [Tue, 20 Dec 2022 21:03:38 +0000 (13:03 -0800)]
autoupdate

2 years agomemset_explicit: port to older MS-Windows
Paul Eggert [Sun, 18 Dec 2022 07:45:56 +0000 (23:45 -0800)]
memset_explicit: port to older MS-Windows

* lib/memset_explicit.c (memset_explicit):
Remove special case for C==0 and MS-Windows.  The code isn’t
needed for correctness and it’s more trouble than it’s worth as it
prevents this module from being used with GNU Emacs, which wants
to port to MS-Windows versions so old that they lack
SecureZeroMemory.

2 years agoUpdate users.txt.
Bruno Haible [Fri, 9 Dec 2022 23:58:37 +0000 (00:58 +0100)]
Update users.txt.

* users.txt: Add lbzip2.

2 years agofts: make debug version compilable again
Paul Eggert [Fri, 9 Dec 2022 23:31:33 +0000 (15:31 -0800)]
fts: make debug version compilable again

This fixes things in what I hope is a better way than the
fd-only approach proposed by Kamil Dudka here:
https://lists.gnu.org/archive/html/bug-gnulib/2018-03/msg00079.html
https://lists.gnu.org/archive/html/bug-gnulib/2018-03/msg00080.html
* lib/fts.c (GNULIB_FTS_DEBUG): Rename from FTS_DEBUG,
to avoid collision with coreutils symbol.
Do not include <stdint.h> (not needed, since we include <stdint.h>)
or "getcwdat.h" (no longer exists).
(fd_ring_check, fd_ring_print): Add forward decls.
(struct devino): New type.
(PRINT_DEVINO): New macro.
(getdevino): New static function.
(fd_ring_print): Do nothing if not debugging.
(fd_ring_print, fd_ring_check): Use getdevino instead of getcwdat.
The output isn’t as good, but at least it compiles and runs.

2 years agoverify: update __STDC_VERSION__ as per C23
Paul Eggert [Thu, 8 Dec 2022 00:34:26 +0000 (16:34 -0800)]
verify: update __STDC_VERSION__ as per C23

This shouldn’t affect anything; it’s merely a refactoring.
* lib/verify.h (_GL_HAVE__STATIC_ASSERT1): Require
__STDC_VERSION__ to be at least 202311, instead of at least
202000.  The latter number was put in in 2019 because we didn’t
yet know C23’s __STDC_VERSION__ value.

2 years agofts: fix race + mishandling of fstatat failure
Paul Eggert [Tue, 6 Dec 2022 18:27:43 +0000 (10:27 -0800)]
fts: fix race + mishandling of fstatat failure

I hope this fixes a Luke Dashjr coreutils bug report about ext4
ramdisks; see “9.1: du Aborted (corrupt filesystem)”
<https://debbugs.gnu.org/59821>.
* lib/fts.c (fts_build): Fix two bugs.  First, fts_stat was being
called without checking its return value, causing a later abort.
Second, there was a race between opening a directory and statting
it, fixed by using fstat on the file descriptor rather than
fstatat on the directory name.

2 years agofts: omit goto break_without_closedir
Paul Eggert [Tue, 6 Dec 2022 18:03:56 +0000 (10:03 -0800)]
fts: omit goto break_without_closedir

* lib/fts.c (fts_build): Refactor to omit goto.