summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2024-12-17 14:02:41 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2024-12-17 14:13:54 -0800
commitb1e5f6d6ef8432a9cce0664238de72d387730bd1 (patch)
tree7eb50047793367bf8f2483e28fb716cfc4334c13 /m4
parent22806c65f4f8d68547d33997d017039763b4bf6a (diff)
Update from Gnulib by running admin/merge-gnulib
* admin/merge-gnulib (AVOIDED_MODULES): Avoid gnulib-i18n. * lib/stdlib.c, m4/selinux-selinux-h.m4: New files, taken from Gnulib.
Diffstat (limited to 'm4')
-rw-r--r--m4/00gnulib.m41
-rw-r--r--m4/__inline.m41
-rw-r--r--m4/absolute-header.m41
-rw-r--r--m4/acl.m445
-rw-r--r--m4/alloca.m41
-rw-r--r--m4/assert_h.m472
-rw-r--r--m4/builtin-expect.m41
-rw-r--r--m4/byteswap.m41
-rw-r--r--m4/c-bool.m418
-rw-r--r--m4/canonicalize.m41
-rw-r--r--m4/clock_time.m41
-rw-r--r--m4/codeset.m41
-rw-r--r--m4/copy-file-range.m41
-rw-r--r--m4/d-type.m41
-rw-r--r--m4/dirent_h.m41
-rw-r--r--m4/dirfd.m41
-rw-r--r--m4/double-slash-root.m41
-rw-r--r--m4/dup2.m41
-rw-r--r--m4/endian_h.m41
-rw-r--r--m4/environ.m41
-rw-r--r--m4/errno_h.m41
-rw-r--r--m4/euidaccess.m41
-rw-r--r--m4/execinfo.m41
-rw-r--r--m4/extensions-aix.m41
-rw-r--r--m4/extensions.m41
-rw-r--r--m4/extern-inline.m41
-rw-r--r--m4/faccessat.m41
-rw-r--r--m4/fchmodat.m41
-rw-r--r--m4/fcntl.m41
-rw-r--r--m4/fcntl_h.m41
-rw-r--r--m4/fdopendir.m41
-rw-r--r--m4/filemode.m41
-rw-r--r--m4/flexmember.m41
-rw-r--r--m4/fpending.m41
-rw-r--r--m4/fpieee.m41
-rw-r--r--m4/free.m41
-rw-r--r--m4/fstatat.m41
-rw-r--r--m4/fsusage.m41
-rw-r--r--m4/fsync.m41
-rw-r--r--m4/futimens.m41
-rw-r--r--m4/getdelim.m41
-rw-r--r--m4/getdtablesize.m41
-rw-r--r--m4/getgroups.m41
-rw-r--r--m4/getline.m41
-rw-r--r--m4/getloadavg.m41
-rw-r--r--m4/getopt.m43
-rw-r--r--m4/getrandom.m41
-rw-r--r--m4/gettime.m41
-rw-r--r--m4/gettimeofday.m41
-rw-r--r--m4/gnulib-common.m436
-rw-r--r--m4/gnulib-comp.m483
-rw-r--r--m4/group-member.m41
-rw-r--r--m4/ieee754-h.m41
-rw-r--r--m4/include_next.m41
-rw-r--r--m4/inttypes.m41
-rw-r--r--m4/largefile.m43
-rw-r--r--m4/lchmod.m41
-rw-r--r--m4/libgmp.m41
-rw-r--r--m4/limits-h.m41
-rw-r--r--m4/locale-en.m41
-rw-r--r--m4/lstat.m41
-rw-r--r--m4/malloc.m4133
-rw-r--r--m4/manywarnings.m46
-rw-r--r--m4/mbstate_t.m41
-rw-r--r--m4/md5.m41
-rw-r--r--m4/memmem.m41
-rw-r--r--m4/mempcpy.m41
-rw-r--r--m4/memrchr.m41
-rw-r--r--m4/memset_explicit.m433
-rw-r--r--m4/minmax.m41
-rw-r--r--m4/mkostemp.m41
-rw-r--r--m4/mktime.m43
-rw-r--r--m4/mode_t.m41
-rw-r--r--m4/multiarch.m41
-rw-r--r--m4/musl.m41
-rw-r--r--m4/nanosleep.m41
-rw-r--r--m4/nocrash.m41
-rw-r--r--m4/nproc.m41
-rw-r--r--m4/nstrftime.m41
-rw-r--r--m4/off_t.m41
-rw-r--r--m4/open-cloexec.m41
-rw-r--r--m4/open-slash.m41
-rw-r--r--m4/open.m41
-rw-r--r--m4/pathmax.m41
-rw-r--r--m4/pid_t.m41
-rw-r--r--m4/pipe2.m41
-rw-r--r--m4/pselect.m41
-rw-r--r--m4/pthread_sigmask.m41
-rw-r--r--m4/rawmemchr.m41
-rw-r--r--m4/readlink.m41
-rw-r--r--m4/readlinkat.m41
-rw-r--r--m4/readutmp.m41
-rw-r--r--m4/realloc.m4115
-rw-r--r--m4/regex.m419
-rw-r--r--m4/selinux-selinux-h.m497
-rw-r--r--m4/sha1.m41
-rw-r--r--m4/sha256.m41
-rw-r--r--m4/sha512.m41
-rw-r--r--m4/sig2str.m41
-rw-r--r--m4/sigdescr_np.m41
-rw-r--r--m4/signal_h.m41
-rw-r--r--m4/socklen.m41
-rw-r--r--m4/ssize_t.m41
-rw-r--r--m4/stat-time.m41
-rw-r--r--m4/stdalign.m45
-rw-r--r--m4/stdbit_h.m41
-rw-r--r--m4/stddef_h.m41
-rw-r--r--m4/stdint.m41
-rw-r--r--m4/stdio_h.m41
-rw-r--r--m4/stdlib_h.m45
-rw-r--r--m4/stpcpy.m41
-rw-r--r--m4/string_h.m41
-rw-r--r--m4/strnlen.m41
-rw-r--r--m4/strtoimax.m41
-rw-r--r--m4/strtoll.m41
-rw-r--r--m4/symlink.m41
-rw-r--r--m4/sys_cdefs_h.m41
-rw-r--r--m4/sys_random_h.m41
-rw-r--r--m4/sys_select_h.m41
-rw-r--r--m4/sys_socket_h.m41
-rw-r--r--m4/sys_stat_h.m41
-rw-r--r--m4/sys_time_h.m41
-rw-r--r--m4/sys_types_h.m41
-rw-r--r--m4/tempname.m41
-rw-r--r--m4/time_h.m41
-rw-r--r--m4/time_r.m41
-rw-r--r--m4/time_rz.m41
-rw-r--r--m4/timegm.m41
-rw-r--r--m4/timer_time.m41
-rw-r--r--m4/timespec.m41
-rw-r--r--m4/tm_gmtoff.m41
-rw-r--r--m4/unistd_h.m41
-rw-r--r--m4/unlocked-io.m41
-rw-r--r--m4/utimens.m41
-rw-r--r--m4/utimensat.m41
-rw-r--r--m4/utimes.m41
-rw-r--r--m4/vararrays.m41
-rw-r--r--m4/warnings.m41
-rw-r--r--m4/xattr.m41
-rw-r--r--m4/zzgnulib.m41
140 files changed, 582 insertions, 218 deletions
diff --git a/m4/00gnulib.m4 b/m4/00gnulib.m4
index cd16771848c..aac283b3287 100644
--- a/m4/00gnulib.m4
+++ b/m4/00gnulib.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl This file must be named something that sorts before all other
dnl gnulib-provided .m4 files. It is needed until the clang fix has
diff --git a/m4/__inline.m4 b/m4/__inline.m4
index 20baf16437f..d4887e31102 100644
--- a/m4/__inline.m4
+++ b/m4/__inline.m4
@@ -4,6 +4,7 @@ dnl Copyright 2017-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Test for __inline keyword
diff --git a/m4/absolute-header.m4 b/m4/absolute-header.m4
index 0abd6d9002c..5314bcc0e80 100644
--- a/m4/absolute-header.m4
+++ b/m4/absolute-header.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Derek Price.
diff --git a/m4/acl.m4 b/m4/acl.m4
index be88f1b8313..68d7799b668 100644
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -1,9 +1,10 @@
# acl.m4
-# serial 31
+# serial 34
dnl Copyright (C) 2002, 2004-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Check for access control list (ACL) primitives
@@ -15,9 +16,12 @@ AC_DEFUN([gl_FUNC_ACL_ARG],
AC_ARG_ENABLE([acl],
AS_HELP_STRING([[--disable-acl]], [do not support ACLs]),
, [enable_acl=auto])
+ AC_ARG_WITH([libsmack],
+ [AS_HELP_STRING([--without-libsmack],
+ [do not use libsmack, even on systems that have it])]
+ [], [with_libsmack=maybe])
])
-
AC_DEFUN_ONCE([gl_FUNC_ACL],
[
AC_REQUIRE([gl_FUNC_ACL_ARG])
@@ -30,8 +34,8 @@ AC_DEFUN_ONCE([gl_FUNC_ACL],
if test $ac_cv_header_sys_acl_h = yes; then
gl_saved_LIBS=$LIBS
- dnl Test for POSIX-draft-like API (GNU/Linux, FreeBSD, Mac OS X,
- dnl IRIX, Tru64, Cygwin >= 2.5).
+ dnl Test for POSIX-draft-like API (GNU/Linux, FreeBSD, NetBSD >= 10,
+ dnl Mac OS X, IRIX, Tru64, Cygwin >= 2.5).
dnl -lacl is needed on GNU/Linux, -lpacl on OSF/1.
if test $use_acl = 0; then
AC_SEARCH_LIBS([acl_get_file], [acl pacl],
@@ -40,6 +44,7 @@ AC_DEFUN_ONCE([gl_FUNC_ACL],
fi
AC_CHECK_FUNCS(
[acl_get_file acl_get_fd acl_set_file acl_set_fd \
+ acl_get_link_np \
acl_free acl_from_mode acl_from_text \
acl_delete_def_file acl_extended_file \
acl_delete_fd_np acl_delete_file_np \
@@ -189,9 +194,35 @@ AC_DEFUN([gl_FILE_HAS_ACL],
AC_CHECK_HEADERS_ONCE([linux/xattr.h])
AC_CHECK_FUNCS_ONCE([listxattr])
FILE_HAS_ACL_LIB=
- AS_CASE([$enable_acl,$ac_cv_header_linux_xattr_h,$ac_cv_func_listxattr],
- [no,*,*], [],
- [*,yes,yes], [],
+
+ gl_file_has_acl_uses_smack=no
+ AS_CASE([$enable_acl,$with_libsmack,$ac_cv_header_linux_xattr_h,$ac_cv_func_listxattr],
+ [no,* | *,no,*], [],
+ [*,*,yes,yes],
+ [AC_CHECK_HEADER([sys/smack.h],
+ [gl_saved_LIBS=$LIBS
+ AC_SEARCH_LIBS([smack_new_label_from_path], [smack],
+ [AC_DEFINE([HAVE_SMACK], [1],
+ [Define to 1 if libsmack is usable.])
+ AS_CASE([$ac_cv_search_smack_new_label_from_path],
+ ["none required"], [],
+ [FILE_HAS_ACL_LIB=$ac_cv_search_new_label_from_path])
+ gl_file_has_acl_uses_smack=yes],
+ [AS_CASE([$with_libsmack],
+ [yes], [AC_MSG_ERROR([libsmack not found or unusable])])])
+ LIBS=$gl_saved_LIBS])])
+
+ gl_file_has_acl_uses_selinux=no
+ AS_CASE([$enable_acl,$with_selinux,$ac_cv_header_linux_xattr_h,$ac_cv_func_listxattr],
+ [no,* | *,no,*], [],
+ [*,*,yes,yes],
+ [AC_REQUIRE([gl_CHECK_HEADER_SELINUX_SELINUX_H])
+ AS_IF([test $USE_SELINUX_SELINUX_H = 1],
+ [FILE_HAS_ACL_LIB="$FILE_HAS_ACL_LIB $LIB_SELINUX"
+ gl_file_has_acl_uses_selinux=yes])])
+
+ AS_CASE([$enable_acl,$gl_file_has_acl_uses_selinux,$gl_file_has_acl_uses_smack],
+ [no,* | *,yes,* | *,yes], [],
[*],
[dnl Set gl_need_lib_has_acl to a nonempty value, so that any
dnl later gl_FUNC_ACL call will set FILE_HAS_ACL_LIB=$LIB_ACL.
diff --git a/m4/alloca.m4 b/m4/alloca.m4
index dc78dc19a87..d746131352e 100644
--- a/m4/alloca.m4
+++ b/m4/alloca.m4
@@ -5,6 +5,7 @@ dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_ALLOCA],
[
diff --git a/m4/assert_h.m4 b/m4/assert_h.m4
index b90d0f19390..02f24db5350 100644
--- a/m4/assert_h.m4
+++ b/m4/assert_h.m4
@@ -1,9 +1,10 @@
# assert_h.m4
-# serial 1
+# serial 4
dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Paul Eggert.
@@ -12,30 +13,31 @@ AC_DEFUN([gl_ASSERT_H],
AC_CACHE_CHECK([for static_assert], [gl_cv_static_assert],
[gl_saved_CFLAGS=$CFLAGS
for gl_working in "yes, a keyword" "yes, an <assert.h> macro"; do
- AS_CASE([$gl_working],
- [*assert.h*], [CFLAGS="$gl_saved_CFLAGS -DINCLUDE_ASSERT_H"])
-
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#if defined __clang__ && __STDC_VERSION__ < 202311
- #pragma clang diagnostic error "-Wc2x-extensions"
- #pragma clang diagnostic error "-Wc++1z-extensions"
- #endif
- #ifdef INCLUDE_ASSERT_H
- #include <assert.h>
- #endif
- static_assert (2 + 2 == 4, "arithmetic does not work");
- static_assert (2 + 2 == 4);
- ]],
- [[
- static_assert (sizeof (char) == 1, "sizeof does not work");
- static_assert (sizeof (char) == 1);
- ]])],
- [gl_cv_static_assert=$gl_working],
- [gl_cv_static_assert=no])
- CFLAGS=$gl_saved_CFLAGS
- test "$gl_cv_static_assert" != no && break
- done])
+ AS_CASE([$gl_working],
+ [*assert.h*], [CFLAGS="$gl_saved_CFLAGS -DINCLUDE_ASSERT_H"])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#if defined __clang__ && __STDC_VERSION__ < 202311
+ #pragma clang diagnostic error "-Wc2x-extensions"
+ #pragma clang diagnostic error "-Wc++1z-extensions"
+ #endif
+ #ifdef INCLUDE_ASSERT_H
+ #include <assert.h>
+ #endif
+ static_assert (2 + 2 == 4, "arithmetic does not work");
+ static_assert (2 + 2 == 4);
+ ]],
+ [[
+ static_assert (sizeof (char) == 1, "sizeof does not work");
+ static_assert (sizeof (char) == 1);
+ ]])
+ ],
+ [gl_cv_static_assert=$gl_working],
+ [gl_cv_static_assert=no])
+ CFLAGS=$gl_saved_CFLAGS
+ test "$gl_cv_static_assert" != no && break
+ done
+ ])
GL_GENERATE_ASSERT_H=false
AS_CASE([$gl_cv_static_assert],
@@ -48,6 +50,10 @@ AC_DEFUN([gl_ASSERT_H],
dnl The "zz" puts this toward config.h's end, to avoid potential
dnl collisions with other definitions.
+ dnl Hardcode the known configuration results for GCC and clang, so that
+ dnl a configuration made with the C compiler works also with the C++ compiler
+ dnl and vice versa.
+ dnl The seemingly redundant parentheses are necessary for MSVC 14.
dnl #undef assert so that programs are not tempted to use it without
dnl specifically including assert.h.
dnl #undef __ASSERT_H__ so that on IRIX, when programs later include
@@ -55,7 +61,16 @@ AC_DEFUN([gl_ASSERT_H],
dnl Break the #undef_s apart with a comment so that 'configure' does
dnl not comment them out.
AH_VERBATIM([zzstatic_assert],
-[#if (!defined HAVE_C_STATIC_ASSERT && !defined assert \
+[#if (!(defined __clang__ \
+ ? (defined __cplusplus \
+ ? __cplusplus >= 201703L \
+ : __STDC_VERSION__ >= 202000L && __clang_major__ >= 16) \
+ : (defined __GNUC__ \
+ ? (defined __cplusplus \
+ ? __cplusplus >= 201103L && __GNUG__ >= 6 \
+ : __STDC_VERSION__ >= 202000L && __GNUC__ >= 13) \
+ : defined HAVE_C_STATIC_ASSERT)) \
+ && !defined assert \
&& (!defined __cplusplus \
|| (__cpp_static_assert < 201411 \
&& __GNUG__ < 6 && __clang_major__ < 6)))
@@ -65,8 +80,9 @@ AC_DEFUN([gl_ASSERT_H],
#undef/**/__ASSERT_H__
#endif
/* Solaris 11.4 <assert.h> defines static_assert as a macro with 2 arguments.
- We need it also to be invocable with a single argument. */
- #if defined __sun && (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus
+ We need it also to be invocable with a single argument.
+ Haiku 2022 <assert.h> does not define static_assert at all. */
+ #if (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus
#undef/**/static_assert
#define static_assert _Static_assert
#endif
diff --git a/m4/builtin-expect.m4 b/m4/builtin-expect.m4
index 33f255e9f56..917a98d3261 100644
--- a/m4/builtin-expect.m4
+++ b/m4/builtin-expect.m4
@@ -4,6 +4,7 @@ dnl Copyright 2016-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Provide a GCC-compatible __builtin_expect macro in <config.h>.
diff --git a/m4/byteswap.m4 b/m4/byteswap.m4
index e91da97b958..825b5a08b71 100644
--- a/m4/byteswap.m4
+++ b/m4/byteswap.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2005, 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Written by Oskar Liljeblad.
diff --git a/m4/c-bool.m4 b/m4/c-bool.m4
index 0fb0de3b59e..fa792b12a14 100644
--- a/m4/c-bool.m4
+++ b/m4/c-bool.m4
@@ -1,9 +1,10 @@
# c-bool.m4
-# serial 1
+# serial 3
dnl Copyright 2022-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Check for bool that conforms to C2023.
@@ -29,12 +30,23 @@ AC_DEFUN([gl_C_BOOL],
dnl The "zz" puts this toward config.h's end, to avoid potential
dnl collisions with other definitions.
dnl If 'bool', 'true' and 'false' do not work, arrange for them to work.
- dnl In C, this means including <stdbool.h> if it is not already included.
+ dnl Hardcode the known configuration results for GCC and clang, so that
+ dnl a configuration made with the C compiler works also with the C++ compiler
+ dnl and vice versa.
+ dnl The seemingly redundant parentheses are necessary for MSVC 14.
+ dnl "Arrange for them to work", in C, means including <stdbool.h> if it is
+ dnl not already included.
dnl However, if the preprocessor mistakenly treats 'true' as 0,
dnl define it to a bool expression equal to 1; this is needed in
dnl Sun C++ 5.11 (Oracle Solaris Studio 12.2, 2010) and older.
AH_VERBATIM([zzbool],
-[#ifndef HAVE_C_BOOL
+[#if !(defined __cplusplus \
+ ? 1 \
+ : (defined __clang__ \
+ ? __STDC_VERSION__ >= 202000L && __clang_major__ >= 15 \
+ : (defined __GNUC__ \
+ ? __STDC_VERSION__ >= 202000L && __GNUC__ >= 13 \
+ : defined HAVE_C_BOOL)))
# if !defined __cplusplus && !defined __bool_true_false_are_defined
# if HAVE_STDBOOL_H
# include <stdbool.h>
diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4
index ec7aac47089..74a5f95df5d 100644
--- a/m4/canonicalize.m4
+++ b/m4/canonicalize.m4
@@ -6,6 +6,7 @@ dnl Copyright (C) 2003-2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Provides canonicalize_file_name and canonicalize_filename_mode, but does
# not provide or fix realpath.
diff --git a/m4/clock_time.m4 b/m4/clock_time.m4
index 27f6fd153a3..330883f7b86 100644
--- a/m4/clock_time.m4
+++ b/m4/clock_time.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2002-2006, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Check for clock_getres, clock_gettime and clock_settime,
# and set CLOCK_TIME_LIB.
diff --git a/m4/codeset.m4 b/m4/codeset.m4
index e69b7402fc2..69c7046f94d 100644
--- a/m4/codeset.m4
+++ b/m4/codeset.m4
@@ -5,6 +5,7 @@ dnl Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
diff --git a/m4/copy-file-range.m4 b/m4/copy-file-range.m4
index 4ef75f62d40..dc13ff422fe 100644
--- a/m4/copy-file-range.m4
+++ b/m4/copy-file-range.m4
@@ -4,6 +4,7 @@ dnl Copyright 2019-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_COPY_FILE_RANGE],
[
diff --git a/m4/d-type.m4 b/m4/d-type.m4
index 0ef89b86b15..d6de386363d 100644
--- a/m4/d-type.m4
+++ b/m4/d-type.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 1997, 1999-2004, 2006, 2009-2024 Free Software Foundation, Inc
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering.
dnl
diff --git a/m4/dirent_h.m4 b/m4/dirent_h.m4
index 037ae369a2d..20fa69f78e8 100644
--- a/m4/dirent_h.m4
+++ b/m4/dirent_h.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Written by Bruno Haible.
diff --git a/m4/dirfd.m4 b/m4/dirfd.m4
index 605cb706c0a..f7ff53a9283 100644
--- a/m4/dirfd.m4
+++ b/m4/dirfd.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2001-2006, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Find out how to get the file descriptor associated with an open DIR*.
diff --git a/m4/double-slash-root.m4 b/m4/double-slash-root.m4
index 3437c699ada..93572ac99a5 100644
--- a/m4/double-slash-root.m4
+++ b/m4/double-slash-root.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2006, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_DOUBLE_SLASH_ROOT],
[
diff --git a/m4/dup2.m4 b/m4/dup2.m4
index 786121fd8f3..ed08cc526ed 100644
--- a/m4/dup2.m4
+++ b/m4/dup2.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2002, 2005, 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_DUP2],
[
diff --git a/m4/endian_h.m4 b/m4/endian_h.m4
index 3149b492270..c205a44464b 100644
--- a/m4/endian_h.m4
+++ b/m4/endian_h.m4
@@ -4,6 +4,7 @@ dnl Copyright 2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl A placeholder for <endian.h>, for platforms that have issues.
diff --git a/m4/environ.m4 b/m4/environ.m4
index 107960b2e77..6823dd405ba 100644
--- a/m4/environ.m4
+++ b/m4/environ.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2001-2004, 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_ENVIRON],
[
diff --git a/m4/errno_h.m4 b/m4/errno_h.m4
index 920ea6cc653..9f8e8341c86 100644
--- a/m4/errno_h.m4
+++ b/m4/errno_h.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2004, 2006, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_PREREQ([2.61])
diff --git a/m4/euidaccess.m4 b/m4/euidaccess.m4
index 3ade282f4ec..9052b9fa60a 100644
--- a/m4/euidaccess.m4
+++ b/m4/euidaccess.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2002-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_NONREENTRANT_EUIDACCESS],
[
diff --git a/m4/execinfo.m4 b/m4/execinfo.m4
index 9dc8d6d489d..dcec42f9d20 100644
--- a/m4/execinfo.m4
+++ b/m4/execinfo.m4
@@ -4,6 +4,7 @@ dnl Copyright 2012-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Check for GNU-style execinfo.h.
diff --git a/m4/extensions-aix.m4 b/m4/extensions-aix.m4
index 990a7ac3ef0..e2b85224a25 100644
--- a/m4/extensions-aix.m4
+++ b/m4/extensions-aix.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# On AIX, most extensions are already enabled through the _ALL_SOURCE macro,
# defined by gl_USE_SYSTEM_EXTENSIONS. gl_USE_AIX_EXTENSIONS additionally
diff --git a/m4/extensions.m4 b/m4/extensions.m4
index 1fb68956b33..7c35419da2c 100644
--- a/m4/extensions.m4
+++ b/m4/extensions.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2003, 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Enable extensions on systems that normally disable them.
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
index 547da82afa5..5e13812a97c 100644
--- a/m4/extern-inline.m4
+++ b/m4/extern-inline.m4
@@ -4,6 +4,7 @@ dnl Copyright 2012-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl 'extern inline' a la ISO C99.
diff --git a/m4/faccessat.m4 b/m4/faccessat.m4
index c5f40e52900..a47129353d0 100644
--- a/m4/faccessat.m4
+++ b/m4/faccessat.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# See if we need to provide faccessat replacement.
diff --git a/m4/fchmodat.m4 b/m4/fchmodat.m4
index 99dcf58aa7a..51505ebec5b 100644
--- a/m4/fchmodat.m4
+++ b/m4/fchmodat.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2004-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Written by Jim Meyering.
diff --git a/m4/fcntl.m4 b/m4/fcntl.m4
index f6d0f377319..130403b6567 100644
--- a/m4/fcntl.m4
+++ b/m4/fcntl.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# For now, this module ensures that fcntl()
# - supports F_DUPFD correctly
diff --git a/m4/fcntl_h.m4 b/m4/fcntl_h.m4
index b69f7a0ca81..a9af001a95c 100644
--- a/m4/fcntl_h.m4
+++ b/m4/fcntl_h.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2006-2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Configure fcntl.h.
diff --git a/m4/fdopendir.m4 b/m4/fdopendir.m4
index e9268378d6e..c4c5628fee8 100644
--- a/m4/fdopendir.m4
+++ b/m4/fdopendir.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# See if we need to provide fdopendir.
diff --git a/m4/filemode.m4 b/m4/filemode.m4
index cb87a564cfd..66bb70d8eaf 100644
--- a/m4/filemode.m4
+++ b/m4/filemode.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2002, 2005-2006, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FILEMODE],
[
diff --git a/m4/flexmember.m4 b/m4/flexmember.m4
index 73fb6142faf..605c42cb8ee 100644
--- a/m4/flexmember.m4
+++ b/m4/flexmember.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2006, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Check for flexible array member support.
diff --git a/m4/fpending.m4 b/m4/fpending.m4
index 9f2d83fb117..b8d544f7552 100644
--- a/m4/fpending.m4
+++ b/m4/fpending.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2000-2001, 2004-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering
dnl Using code from emacs, based on suggestions from Paul Eggert
diff --git a/m4/fpieee.m4 b/m4/fpieee.m4
index 086d51ddf5b..3f6a3aad1f7 100644
--- a/m4/fpieee.m4
+++ b/m4/fpieee.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl IEEE 754 standardized three items:
dnl - The formats of single-float and double-float - nowadays commonly
diff --git a/m4/free.m4 b/m4/free.m4
index a2b596d67f7..ed2f606c814 100644
--- a/m4/free.m4
+++ b/m4/free.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2003-2005, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Written by Paul Eggert and Bruno Haible.
diff --git a/m4/fstatat.m4 b/m4/fstatat.m4
index c5ef7dfb197..be635c5268c 100644
--- a/m4/fstatat.m4
+++ b/m4/fstatat.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2004-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Written by Jim Meyering.
diff --git a/m4/fsusage.m4 b/m4/fsusage.m4
index 1ce90660858..69d2a65494e 100644
--- a/m4/fsusage.m4
+++ b/m4/fsusage.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 1997-1998, 2000-2001, 2003-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Obtaining file system usage information.
diff --git a/m4/fsync.m4 b/m4/fsync.m4
index 6f49321c2db..288d93fd713 100644
--- a/m4/fsync.m4
+++ b/m4/fsync.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_FSYNC],
[
diff --git a/m4/futimens.m4 b/m4/futimens.m4
index b5f22605f49..d9910a61ce8 100644
--- a/m4/futimens.m4
+++ b/m4/futimens.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# See if we need to provide futimens replacement.
diff --git a/m4/getdelim.m4 b/m4/getdelim.m4
index 61139039554..7587db7f941 100644
--- a/m4/getdelim.m4
+++ b/m4/getdelim.m4
@@ -6,6 +6,7 @@ dnl
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_PREREQ([2.59])
diff --git a/m4/getdtablesize.m4 b/m4/getdtablesize.m4
index aaefe9b2983..b16e486c028 100644
--- a/m4/getdtablesize.m4
+++ b/m4/getdtablesize.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_GETDTABLESIZE],
[
diff --git a/m4/getgroups.m4 b/m4/getgroups.m4
index 5457275e9e1..e91916edb45 100644
--- a/m4/getgroups.m4
+++ b/m4/getgroups.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 1996-1997, 1999-2004, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering.
dnl A wrapper around AC_FUNC_GETGROUPS.
diff --git a/m4/getline.m4 b/m4/getline.m4
index 36513cd4171..a7d0a9308b0 100644
--- a/m4/getline.m4
+++ b/m4/getline.m4
@@ -7,6 +7,7 @@ dnl
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_PREREQ([2.59])
diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4
index 0918bcd21ec..e1a4d9be659 100644
--- a/m4/getloadavg.m4
+++ b/m4/getloadavg.m4
@@ -5,6 +5,7 @@ dnl Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Check for getloadavg.
diff --git a/m4/getopt.m4 b/m4/getopt.m4
index 53cab8bef93..a5451c7e7c3 100644
--- a/m4/getopt.m4
+++ b/m4/getopt.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2002-2006, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Request a POSIX compliant getopt function.
AC_DEFUN([gl_FUNC_GETOPT_POSIX],
@@ -77,7 +78,7 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
fi
dnl POSIX 2008 does not specify leading '+' behavior, but see
- dnl http://austingroupbugs.net/view.php?id=191 for a recommendation on
+ dnl https://austingroupbugs.net/view.php?id=191 for a recommendation on
dnl the next version of POSIX. For now, we only guarantee leading '+'
dnl behavior with getopt-gnu.
if test -z "$gl_replace_getopt"; then
diff --git a/m4/getrandom.m4 b/m4/getrandom.m4
index 0051c9c4218..312d2c92e75 100644
--- a/m4/getrandom.m4
+++ b/m4/getrandom.m4
@@ -4,6 +4,7 @@ dnl Copyright 2020-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Written by Paul Eggert.
diff --git a/m4/gettime.m4 b/m4/gettime.m4
index 299f3d1b788..1e964ab6d4a 100644
--- a/m4/gettime.m4
+++ b/m4/gettime.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2002, 2004-2006, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_GETTIME],
[
diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4
index 8135f89e584..65963fbafa7 100644
--- a/m4/gettimeofday.m4
+++ b/m4/gettimeofday.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2001-2003, 2005, 2007, 2009-2024 Free Software Foundation, Inc
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering.
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index d985522893f..0a5cbd55ecf 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,9 +1,10 @@
# gnulib-common.m4
-# serial 103
+# serial 106
dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_PREREQ([2.62])
@@ -842,6 +843,35 @@ AC_DEFUN([gl_COMMON_BODY], [
# define _GL_UNUSED_LABEL
# endif
#endif
+
+/* The following attributes enable detection of multithread-safety problems
+ and resource leaks at compile-time, by clang ≥ 15, when the warning option
+ -Wthread-safety is enabled. For usage, see
+ <https://clang.llvm.org/docs/ThreadSafetyAnalysis.html>. */
+#ifndef _GL_ATTRIBUTE_CAPABILITY_TYPE
+# if __clang_major__ >= 15
+# define _GL_ATTRIBUTE_CAPABILITY_TYPE(concept) \
+ __attribute__ ((__capability__ (concept)))
+# else
+# define _GL_ATTRIBUTE_CAPABILITY_TYPE(concept)
+# endif
+#endif
+#ifndef _GL_ATTRIBUTE_ACQUIRE_CAPABILITY
+# if __clang_major__ >= 15
+# define _GL_ATTRIBUTE_ACQUIRE_CAPABILITY(resource) \
+ __attribute__ ((__acquire_capability__ (resource)))
+# else
+# define _GL_ATTRIBUTE_ACQUIRE_CAPABILITY(resource)
+# endif
+#endif
+#ifndef _GL_ATTRIBUTE_RELEASE_CAPABILITY
+# if __clang_major__ >= 15
+# define _GL_ATTRIBUTE_RELEASE_CAPABILITY(resource) \
+ __attribute__ ((__release_capability__ (resource)))
+# else
+# define _GL_ATTRIBUTE_RELEASE_CAPABILITY(resource)
+# endif
+#endif
])
AH_VERBATIM([c_linkage],
[/* In C++, there is the concept of "language linkage", that encompasses
@@ -1351,6 +1381,7 @@ AC_DEFUN([gl_CC_GNULIB_WARNINGS],
dnl -Wno-type-limits >= 4.3 >= 3.9
dnl -Wno-undef >= 3 >= 3.9
dnl -Wno-unsuffixed-float-constants >= 4.5
+ dnl -Wno-unused-const-variable >= 4.4 >= 3.9
dnl -Wno-unused-function >= 3 >= 3.9
dnl -Wno-unused-parameter >= 3 >= 3.9
dnl
@@ -1380,6 +1411,9 @@ AC_DEFUN([gl_CC_GNULIB_WARNINGS],
-Wno-sign-conversion
-Wno-type-limits
#endif
+ #if (__GNUC__ + (__GNUC_MINOR__ >= 4) > 4 && !defined __clang__) || (__clang_major__ + (__clang_minor__ >= 9) > 3)
+ -Wno-unused-const-variable
+ #endif
#if (__GNUC__ + (__GNUC_MINOR__ >= 5) > 4 && !defined __clang__)
-Wno-unsuffixed-float-constants
#endif
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 31784600d44..5c28ea8b3b2 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -162,7 +162,6 @@ AC_DEFUN([gl_EARLY],
# Code from module rawmemchr:
# Code from module readlink:
# Code from module readlinkat:
- # Code from module realloc-gnu:
# Code from module realloc-posix:
# Code from module regex:
# Code from module root-uid:
@@ -221,7 +220,6 @@ AC_DEFUN([gl_EARLY],
# Code from module verify:
# Code from module vla:
# Code from module warnings:
- # Code from module xalloc-oversized:
# Code from module year2038:
AC_REQUIRE([AC_SYS_YEAR2038])
])
@@ -424,6 +422,11 @@ AC_DEFUN([gl_INIT],
])
gl_SYS_STAT_MODULE_INDICATOR([lstat])
gl_MODULE_INDICATOR([lstat])
+ AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
+ if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
+ AC_LIBOBJ([malloc])
+ fi
+ gl_STDLIB_MODULE_INDICATOR([malloc-posix])
gl_FUNC_MEMMEM_SIMPLE
if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
AC_LIBOBJ([memmem])
@@ -681,18 +684,15 @@ AC_DEFUN([gl_INIT],
gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
gl_gnulib_enabled_lchmod=false
gl_gnulib_enabled_e80bf6f757095d2e5fc94dafb8f8fc8b=false
- gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866=false
gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31=false
gl_gnulib_enabled_open=false
gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false
gl_gnulib_enabled_rawmemchr=false
- gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b=false
gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4=false
gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false
gl_gnulib_enabled_strtoll=false
gl_gnulib_enabled_utimens=false
gl_gnulib_enabled_verify=false
- gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false
func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b ()
{
if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then :; else
@@ -788,9 +788,6 @@ AC_DEFUN([gl_INIT],
[test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1])
gl_UNISTD_MODULE_INDICATOR([getgroups])
gl_gnulib_enabled_getgroups=true
- if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
- func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866
- fi
fi
}
func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
@@ -813,7 +810,6 @@ AC_DEFUN([gl_INIT],
if $gl_gnulib_enabled_8444034ea779b88768865bb60b4fb8c9; then :; else
AC_PROG_MKDIR_P
gl_gnulib_enabled_8444034ea779b88768865bb60b4fb8c9=true
- func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866
func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4
fi
}
@@ -831,7 +827,7 @@ AC_DEFUN([gl_INIT],
func_gl_gnulib_m4code_getgroups
fi
if test $HAVE_GROUP_MEMBER = 0; then
- func_gl_gnulib_m4code_d3b2383720ee0e541357aa2aac598e2b
+ func_gl_gnulib_m4code_e80bf6f757095d2e5fc94dafb8f8fc8b
fi
fi
}
@@ -856,24 +852,6 @@ AC_DEFUN([gl_INIT],
fi
gl_STDLIB_MODULE_INDICATOR([malloc-gnu])
gl_gnulib_enabled_e80bf6f757095d2e5fc94dafb8f8fc8b=true
- func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866
- if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 1; then
- func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
- fi
- fi
- }
- func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866 ()
- {
- if $gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866; then :; else
- AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
- if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
- AC_LIBOBJ([malloc])
- fi
- gl_STDLIB_MODULE_INDICATOR([malloc-posix])
- gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866=true
- if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
- func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
- fi
fi
}
func_gl_gnulib_m4code_5264294aa0a5557541b53c8c741f7f31 ()
@@ -920,39 +898,15 @@ AC_DEFUN([gl_INIT],
gl_gnulib_enabled_rawmemchr=true
fi
}
- func_gl_gnulib_m4code_d3b2383720ee0e541357aa2aac598e2b ()
- {
- if $gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b; then :; else
- gl_FUNC_REALLOC_GNU
- if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then
- AC_LIBOBJ([realloc])
- fi
- gl_STDLIB_MODULE_INDICATOR([realloc-gnu])
- gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b=true
- if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then
- func_gl_gnulib_m4code_e80bf6f757095d2e5fc94dafb8f8fc8b
- fi
- func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4
- if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then
- func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
- fi
- fi
- }
func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4 ()
{
if $gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4; then :; else
gl_FUNC_REALLOC_POSIX
- if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then
- AC_LIBOBJ([realloc])
- fi
+ gl_FUNC_REALLOC_0_NONNULL
+ gl_CONDITIONAL([GL_COND_OBJ_REALLOC_POSIX],
+ [test $REPLACE_REALLOC_FOR_REALLOC_POSIX != 0])
gl_STDLIB_MODULE_INDICATOR([realloc-posix])
gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4=true
- if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then
- func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866
- fi
- if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then
- func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
- fi
fi
}
func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c ()
@@ -987,12 +941,6 @@ AC_DEFUN([gl_INIT],
gl_gnulib_enabled_verify=true
fi
}
- func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec ()
- {
- if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then :; else
- gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true
- fi
- }
if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
func_gl_gnulib_m4code_925677f0343de64b89a9f0c790b4104c
fi
@@ -1053,9 +1001,6 @@ AC_DEFUN([gl_INIT],
if $GL_GENERATE_IEEE754_H; then
func_gl_gnulib_m4code_endian
fi
- if test $REPLACE_MKTIME = 1; then
- func_gl_gnulib_m4code_verify
- fi
if test $HAVE_READLINKAT = 0 || test $REPLACE_READLINKAT = 1; then
func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
fi
@@ -1066,6 +1011,9 @@ AC_DEFUN([gl_INIT],
func_gl_gnulib_m4code_fd38c7e463b54744b77b98aeafb4fa7c
fi
if test $ac_use_included_regex = yes; then
+ func_gl_gnulib_m4code_e80bf6f757095d2e5fc94dafb8f8fc8b
+ fi
+ if test $ac_use_included_regex = yes; then
func_gl_gnulib_m4code_verify
fi
if test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
@@ -1099,18 +1047,15 @@ AC_DEFUN([gl_INIT],
AM_CONDITIONAL([gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1], [$gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1])
AM_CONDITIONAL([gl_GNULIB_ENABLED_lchmod], [$gl_gnulib_enabled_lchmod])
AM_CONDITIONAL([gl_GNULIB_ENABLED_e80bf6f757095d2e5fc94dafb8f8fc8b], [$gl_gnulib_enabled_e80bf6f757095d2e5fc94dafb8f8fc8b])
- AM_CONDITIONAL([gl_GNULIB_ENABLED_ef455225c00f5049c808c2eda3e76866], [$gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866])
AM_CONDITIONAL([gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31], [$gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31])
AM_CONDITIONAL([gl_GNULIB_ENABLED_open], [$gl_gnulib_enabled_open])
AM_CONDITIONAL([gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7], [$gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7])
AM_CONDITIONAL([gl_GNULIB_ENABLED_rawmemchr], [$gl_gnulib_enabled_rawmemchr])
- AM_CONDITIONAL([gl_GNULIB_ENABLED_d3b2383720ee0e541357aa2aac598e2b], [$gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b])
AM_CONDITIONAL([gl_GNULIB_ENABLED_61bcaca76b3e6f9ae55d57a1c3193bc4], [$gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4])
AM_CONDITIONAL([gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c], [$gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c])
AM_CONDITIONAL([gl_GNULIB_ENABLED_strtoll], [$gl_gnulib_enabled_strtoll])
AM_CONDITIONAL([gl_GNULIB_ENABLED_utimens], [$gl_gnulib_enabled_utimens])
AM_CONDITIONAL([gl_GNULIB_ENABLED_verify], [$gl_gnulib_enabled_verify])
- AM_CONDITIONAL([gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec], [$gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec])
# End of code from modules
m4_ifval(gl_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
@@ -1468,6 +1413,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/stdio-read.c
lib/stdio-write.c
lib/stdio.in.h
+ lib/stdlib.c
lib/stdlib.in.h
lib/stpcpy.c
lib/str-two-way.h
@@ -1506,7 +1452,6 @@ AC_DEFUN([gl_FILE_LIST], [
lib/verify.h
lib/vla.h
lib/warn-on-use.h
- lib/xalloc-oversized.h
m4/00gnulib.m4
m4/__inline.m4
m4/absolute-header.m4
@@ -1525,7 +1470,6 @@ AC_DEFUN([gl_FILE_LIST], [
m4/dirfd.m4
m4/double-slash-root.m4
m4/dup2.m4
- m4/eealloc.m4
m4/endian_h.m4
m4/environ.m4
m4/errno_h.m4
@@ -1605,6 +1549,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/readutmp.m4
m4/realloc.m4
m4/regex.m4
+ m4/selinux-selinux-h.m4
m4/sha1.m4
m4/sha256.m4
m4/sha512.m4
diff --git a/m4/group-member.m4 b/m4/group-member.m4
index f8ceb1d8186..7e0230dcecb 100644
--- a/m4/group-member.m4
+++ b/m4/group-member.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 1999-2001, 2003-2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Written by Jim Meyering
diff --git a/m4/ieee754-h.m4 b/m4/ieee754-h.m4
index fa41db5c945..227a90dbdf4 100644
--- a/m4/ieee754-h.m4
+++ b/m4/ieee754-h.m4
@@ -4,6 +4,7 @@ dnl Copyright 2018-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Configure ieee754-h module
diff --git a/m4/include_next.m4 b/m4/include_next.m4
index 03e852518e4..0043d560af9 100644
--- a/m4/include_next.m4
+++ b/m4/include_next.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Paul Eggert and Derek Price.
diff --git a/m4/inttypes.m4 b/m4/inttypes.m4
index c43cd16207b..2173995ea6f 100644
--- a/m4/inttypes.m4
+++ b/m4/inttypes.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Derek Price, Bruno Haible.
dnl Test whether <inttypes.h> is supported or must be substituted.
diff --git a/m4/largefile.m4 b/m4/largefile.m4
index 28813483594..2d30b8471b7 100644
--- a/m4/largefile.m4
+++ b/m4/largefile.m4
@@ -4,6 +4,7 @@ dnl Copyright 1992-1996, 1998-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Enable large files on systems where this is not the default.
# Enable support for files on Linux file systems with 64-bit inode numbers.
@@ -294,7 +295,7 @@ AC_CONFIG_COMMANDS_PRE([_AC_SYS_YEAR2038_ENABLE])])
# By default, many hosts won't let programs access large files;
# one must use special compiler options to get large-file access to work.
# For more details about this brain damage please see:
-# http://www.unix.org/version2/whatsnew/lfs20mar.html
+# https://www.unix.org/version2/whatsnew/lfs20mar.html
# Additionally, on Linux file systems with 64-bit inodes a file that happens
# to have a 64-bit inode number cannot be accessed by 32-bit applications on
# Linux x86/x86_64. This can occur with file systems such as XFS and NFS.
diff --git a/m4/lchmod.m4 b/m4/lchmod.m4
index 797cb446938..29f06a22847 100644
--- a/m4/lchmod.m4
+++ b/m4/lchmod.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2005-2006, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Paul Eggert.
dnl Provide a replacement for lchmod on hosts that lack a working version.
diff --git a/m4/libgmp.m4 b/m4/libgmp.m4
index a82a6fa1b71..e6dad10051f 100644
--- a/m4/libgmp.m4
+++ b/m4/libgmp.m4
@@ -5,6 +5,7 @@ dnl Copyright 2020-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl gl_LIBGMP
dnl Search for an installed libgmp.
diff --git a/m4/limits-h.m4 b/m4/limits-h.m4
index 1b619e1eb2e..55dea94c9bf 100644
--- a/m4/limits-h.m4
+++ b/m4/limits-h.m4
@@ -4,6 +4,7 @@ dnl Copyright 2016-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Check whether limits.h has needed features.
diff --git a/m4/locale-en.m4 b/m4/locale-en.m4
index 39d08a23b0b..a194894a43d 100644
--- a/m4/locale-en.m4
+++ b/m4/locale-en.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2003-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
diff --git a/m4/lstat.m4 b/m4/lstat.m4
index f838e2cc1e8..530d99b3a15 100644
--- a/m4/lstat.m4
+++ b/m4/lstat.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 1997-2001, 2003-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering.
diff --git a/m4/malloc.m4 b/m4/malloc.m4
index ee6df5c3fb6..a854ade93b3 100644
--- a/m4/malloc.m4
+++ b/m4/malloc.m4
@@ -1,12 +1,24 @@
# malloc.m4
-# serial 34
+# serial 43
dnl Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
-# This is adapted with modifications from upstream Autoconf here:
-# https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/functions.m4?id=v2.70#n949
+m4_version_prereq([2.73], [], [
+# Modules that use this macro directly or indirectly should depend
+# on extensions-aix, so that _LINUX_SOURCE_COMPAT gets defined
+# before this macro gets invoked. This helps on AIX 7.2 and earlier
+# if !(__VEC__ || __AIXVEC), and doesn't hurt otherwise.
+#
+# This is copied from upstream Autoconf here:
+# https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/functions.m4?id=1f38316f6af7bf63e5e7dd187ff6456e07ad743e#n971
+# _AC_FUNC_MALLOC_IF(IF-WORKS, IF-NOT[, UNKNOWN-ASSUME])
+# ------------------------------------------------------
+# If 'malloc (0)' returns nonnull, run IF-WORKS, otherwise, IF-NOT.
+# If it is not known whether it works, assume the shell word UNKNOWN-ASSUME,
+# which should end in "yes" or in something else (the latter is the default).
AC_DEFUN([_AC_FUNC_MALLOC_IF],
[
AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
@@ -15,61 +27,81 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stdlib.h>
- ]],
- [[void *p = malloc (0);
- void * volatile vp = p;
- int result = !vp;
+ /* Use pmalloc to test; 'volatile' prevents the compiler
+ from optimizing the malloc call away. */
+ void *(*volatile pmalloc) (size_t) = malloc;]],
+ [[void *p = pmalloc (0);
+ int result = !p;
free (p);
- return result;]])
- ],
+ return result;]])],
[ac_cv_func_malloc_0_nonnull=yes],
[ac_cv_func_malloc_0_nonnull=no],
- [case "$host_os" in
- # Guess yes on platforms where we know the result.
- *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
- | gnu* | *-musl* | midipix* | midnightbsd* \
- | hpux* | solaris* | cygwin* | mingw* | windows* | msys* )
- ac_cv_func_malloc_0_nonnull="guessing yes" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
- esac
- ])
- ])
+ [AS_CASE([$host_os],
+ [# Guess yes on platforms where we know the result.
+ *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
+ | gnu* | *-musl* | midipix* | midnightbsd* \
+ | hpux* | solaris* | cygwin* | mingw* | windows* | msys*],
+ [ac_cv_func_malloc_0_nonnull="guessing yes"],
+ [# Guess as follows if we don't know.
+ ac_cv_func_malloc_0_nonnull=m4_default([$3], ["guessing no"])])])])
AS_CASE([$ac_cv_func_malloc_0_nonnull], [*yes], [$1], [$2])
])# _AC_FUNC_MALLOC_IF
+])
+
+# gl_FUNC_MALLOC_0_NONNULL
+# ------------------------
+# If 'malloc (0)' returns nonnull define HAVE_MALLOC_0_NONNULL.
+# Also, set ac_cv_func_malloc_0_nonnull to a string that ends in
+# "yes", otherwise set it to something else. If unknown whether
+# malloc (0) works, guess as normal for cross-builds.
+AC_DEFUN([gl_FUNC_MALLOC_0_NONNULL],
+[
+ _AC_FUNC_MALLOC_IF(
+ [AC_DEFINE([HAVE_MALLOC_0_NONNULL], [1],
+ [Define to 1 if malloc (0) returns nonnull.])],
+ [],
+ ["$gl_cross_guess_normal"])
+])
# gl_FUNC_MALLOC_GNU
# ------------------
-# Replace malloc if it is not compatible with GNU libc.
+# Test whether malloc (0) is compatible with GNU libc.
+# Replace malloc if not.
+# Define HAVE_MALLOC_0_NONNULL if malloc (0) returns nonnull (except upon
+# out-of-memory).
+# Define HAVE_MALLOC_PTRDIFF if malloc (N) reliably fails when N exceeds
+# PTRDIFF_MAX.
AC_DEFUN([gl_FUNC_MALLOC_GNU],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
+ AC_REQUIRE([gl_FUNC_MALLOC_0_NONNULL])
- dnl Through the dependency on module extensions-aix, _LINUX_SOURCE_COMPAT
- dnl gets defined already before this macro gets invoked. This helps
- dnl if !(__VEC__ || __AIXVEC), and doesn't hurt otherwise.
-
- REPLACE_MALLOC_FOR_MALLOC_GNU="$REPLACE_MALLOC_FOR_MALLOC_POSIX"
- if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 0; then
- _AC_FUNC_MALLOC_IF([], [REPLACE_MALLOC_FOR_MALLOC_GNU=1])
- fi
+ AS_CASE([$ac_cv_func_malloc_0_nonnull],
+ [*yes],
+ [REPLACE_MALLOC_FOR_MALLOC_GNU=$REPLACE_MALLOC_FOR_MALLOC_POSIX],
+ [REPLACE_MALLOC_FOR_MALLOC_GNU=1])
])
# gl_FUNC_MALLOC_PTRDIFF
# ----------------------
-# Test whether malloc (N) reliably fails when N exceeds PTRDIFF_MAX,
-# and replace malloc otherwise.
+# Test whether malloc (N) reliably fails when N exceeds PTRDIFF_MAX.
+# Define HAVE_MALLOC_PTRDIFF if yes.
+# Replace malloc if not.
AC_DEFUN([gl_FUNC_MALLOC_PTRDIFF],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF])
- test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC_FOR_MALLOC_POSIX=1
+ AS_IF([test "$gl_cv_malloc_ptrdiff" = yes],
+ [AC_DEFINE([HAVE_MALLOC_PTRDIFF], 1,
+ [Define to 1 if malloc-like functions do not allocate objects
+ larger than PTRDIFF_MAX bytes.])],
+ [REPLACE_MALLOC_FOR_MALLOC_POSIX=1])
])
# Test whether malloc, realloc, calloc refuse to create objects
# larger than what can be expressed in ptrdiff_t.
-# Set gl_cv_func_malloc_gnu to yes or no accordingly.
+# Set gl_cv_func_malloc_gnu.
AC_DEFUN([gl_CHECK_MALLOC_PTRDIFF],
[
AC_CACHE_CHECK([whether malloc is ptrdiff_t safe],
@@ -113,16 +145,19 @@ AC_DEFUN([gl_FUNC_MALLOC_POSIX],
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_FUNC_MALLOC_PTRDIFF])
AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
- if test "$gl_cv_func_malloc_posix" = yes; then
- AC_DEFINE([HAVE_MALLOC_POSIX], [1],
- [Define if malloc, realloc, and calloc set errno on allocation failure.])
- else
- REPLACE_MALLOC_FOR_MALLOC_POSIX=1
- fi
+ case "$gl_cv_func_malloc_posix" in
+ *yes)
+ AC_DEFINE([HAVE_MALLOC_POSIX], [1],
+ [Define if malloc, realloc, and calloc set errno on allocation failure.])
+ ;;
+ *)
+ REPLACE_MALLOC_FOR_MALLOC_POSIX=1
+ ;;
+ esac
])
# Test whether malloc, realloc, calloc set errno to ENOMEM on failure.
-# Set gl_cv_func_malloc_posix to yes or no accordingly.
+# Set gl_cv_func_malloc_posix to *yes or *no accordingly.
AC_DEFUN([gl_CHECK_MALLOC_POSIX],
[
AC_REQUIRE([AC_CANONICAL_HOST])
@@ -133,10 +168,24 @@ AC_DEFUN([gl_CHECK_MALLOC_POSIX],
dnl some systems go to their knees when you do that. So assume that
dnl all Unix implementations of the function set errno on failure,
dnl except on those platforms where we have seen 'test-malloc-gnu',
- dnl 'test-realloc-gnu', 'test-calloc-gnu' fail.
+ dnl 'test-realloc-posix', 'test-calloc-gnu' fail.
case "$host_os" in
mingw* | windows*)
- gl_cv_func_malloc_posix=no ;;
+ dnl Old MSVCRT from 2001 did not set errno=ENOMEM when malloc failed.
+ dnl More recent MSVCRT from 2019 does so.
+ dnl UCRT is the successor of MSVCRT. Assume that UCRT does so as well.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdio.h>
+ #ifndef _UCRT
+ msvcrt yuck
+ #endif
+ ]],
+ [[]])
+ ],
+ [gl_cv_func_malloc_posix="guessing yes"],
+ [gl_cv_func_malloc_posix="guessing no"])
+ ;;
irix* | solaris*)
dnl On IRIX 6.5, the three functions return NULL with errno unset
dnl when the argument is larger than PTRDIFF_MAX.
diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4
index 5b0baee2057..912f6aafd11 100644
--- a/m4/manywarnings.m4
+++ b/m4/manywarnings.m4
@@ -1,9 +1,10 @@
# manywarnings.m4
-# serial 27
+# serial 28
dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Simon Josefsson
@@ -185,6 +186,9 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
esac
fi
+ # These options are not supported by gcc, but are useful with clang.
+ AS_VAR_APPEND([$1], [' -Wthread-safety'])
+
# Disable specific options as needed.
if test "$gl_cv_cc_nomfi_needed" = yes; then
AS_VAR_APPEND([$1], [' -Wno-missing-field-initializers'])
diff --git a/m4/mbstate_t.m4 b/m4/mbstate_t.m4
index 66d65cd7c11..ae11afa9821 100644
--- a/m4/mbstate_t.m4
+++ b/m4/mbstate_t.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2000-2002, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# From Paul Eggert.
diff --git a/m4/md5.m4 b/m4/md5.m4
index a7b33d771ff..e081a6b42c6 100644
--- a/m4/md5.m4
+++ b/m4/md5.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2002-2006, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_MD5],
[
diff --git a/m4/memmem.m4 b/m4/memmem.m4
index e6b1d91cbb1..fba98ab759b 100644
--- a/m4/memmem.m4
+++ b/m4/memmem.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2002-2004, 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Check that memmem is present and functional.
AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE],
diff --git a/m4/mempcpy.m4 b/m4/mempcpy.m4
index 377fda3caca..d73b40fa2b3 100644
--- a/m4/mempcpy.m4
+++ b/m4/mempcpy.m4
@@ -5,6 +5,7 @@ dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_MEMPCPY],
[
diff --git a/m4/memrchr.m4 b/m4/memrchr.m4
index d8c931e90cc..a0c8a996640 100644
--- a/m4/memrchr.m4
+++ b/m4/memrchr.m4
@@ -5,6 +5,7 @@ dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_MEMRCHR],
[
diff --git a/m4/memset_explicit.m4 b/m4/memset_explicit.m4
index 499a95968ab..abdabffcfa9 100644
--- a/m4/memset_explicit.m4
+++ b/m4/memset_explicit.m4
@@ -1,9 +1,10 @@
# memset_explicit.m4
-# serial 3
+# serial 4
dnl Copyright 2022-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_MEMSET_EXPLICIT],
[
@@ -22,6 +23,36 @@ AC_DEFUN([gl_FUNC_MEMSET_EXPLICIT],
AC_DEFUN([gl_PREREQ_MEMSET_EXPLICIT],
[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS([explicit_memset])
AC_CHECK_FUNCS_ONCE([memset_s])
+ if test $ac_cv_func_memset_s = yes; then
+ AC_CACHE_CHECK([for working memset_s],
+ [gl_cv_func_memset_s_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <string.h>
+ #include <stddef.h>
+ ]], [[
+ (void) memset_s (NULL, 0, '?', 0);
+ ]])
+ ],
+ [gl_cv_func_memset_s_works=yes],
+ [gl_cv_func_memset_s_works=no],
+ [case "$host_os" in
+ # Guess no on Solaris.
+ solaris*)
+ gl_cv_func_memset_s_works="guessing no" ;;
+ *)
+ gl_cv_func_memset_s_works="guessing yes" ;;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_memset_s_works" in
+ *yes)
+ AC_DEFINE([HAVE_MEMSET_S_SUPPORTS_ZERO], [1],
+ [Define to 1 if memset_s support zero-length operations.])
+ ;;
+ esac
+ fi
])
diff --git a/m4/minmax.m4 b/m4/minmax.m4
index bc7d0c345fa..2ce09e07774 100644
--- a/m4/minmax.m4
+++ b/m4/minmax.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2005, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_PREREQ([2.53])
diff --git a/m4/mkostemp.m4 b/m4/mkostemp.m4
index 57a033b859e..4656612b0ba 100644
--- a/m4/mkostemp.m4
+++ b/m4/mkostemp.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_MKOSTEMP],
[
diff --git a/m4/mktime.m4 b/m4/mktime.m4
index 85c52454aa5..cc4998804ed 100644
--- a/m4/mktime.m4
+++ b/m4/mktime.m4
@@ -1,9 +1,10 @@
# mktime.m4
-# serial 39
+# serial 42
dnl Copyright (C) 2002-2003, 2005-2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering.
diff --git a/m4/mode_t.m4 b/m4/mode_t.m4
index 0d5c2808289..159ef755d0d 100644
--- a/m4/mode_t.m4
+++ b/m4/mode_t.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# For using mode_t, it's sufficient to use AC_TYPE_MODE_T and
# include <sys/types.h>.
diff --git a/m4/multiarch.m4 b/m4/multiarch.m4
index 3af29d39a0b..bddff28e7c4 100644
--- a/m4/multiarch.m4
+++ b/m4/multiarch.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Determine whether the compiler is or may be producing universal binaries.
#
diff --git a/m4/musl.m4 b/m4/musl.m4
index 0d4de8926a2..6dccf1049f9 100644
--- a/m4/musl.m4
+++ b/m4/musl.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2019-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Test for musl libc, despite the musl libc authors don't like it
# <https://wiki.musl-libc.org/faq.html>
diff --git a/m4/nanosleep.m4 b/m4/nanosleep.m4
index a7281b8ac5f..569da93c01a 100644
--- a/m4/nanosleep.m4
+++ b/m4/nanosleep.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 1999-2001, 2003-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering.
dnl Check for the nanosleep function.
diff --git a/m4/nocrash.m4 b/m4/nocrash.m4
index cbe8fe82d5d..dee7d74c727 100644
--- a/m4/nocrash.m4
+++ b/m4/nocrash.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2005, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Based on libsigsegv, from Bruno Haible and Paolo Bonzini.
diff --git a/m4/nproc.m4 b/m4/nproc.m4
index 317741d9b8d..9226560f6b2 100644
--- a/m4/nproc.m4
+++ b/m4/nproc.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_NPROC],
[
diff --git a/m4/nstrftime.m4 b/m4/nstrftime.m4
index 534507d300b..f6b614a3d04 100644
--- a/m4/nstrftime.m4
+++ b/m4/nstrftime.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 1996-1997, 1999-2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Written by Jim Meyering and Paul Eggert.
diff --git a/m4/off_t.m4 b/m4/off_t.m4
index db6035dbeb3..42cd98fbfb8 100644
--- a/m4/off_t.m4
+++ b/m4/off_t.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2012-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Check whether to override the 'off_t' type.
dnl Set WINDOWS_64_BIT_OFF_T.
diff --git a/m4/open-cloexec.m4 b/m4/open-cloexec.m4
index 6defdfb4005..91aa6efbea6 100644
--- a/m4/open-cloexec.m4
+++ b/m4/open-cloexec.m4
@@ -4,6 +4,7 @@ dnl Copyright 2017-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Test whether O_CLOEXEC is defined.
diff --git a/m4/open-slash.m4 b/m4/open-slash.m4
index 03460e422d9..9d5c21ce1fb 100644
--- a/m4/open-slash.m4
+++ b/m4/open-slash.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Tests whether open() and creat() recognize a trailing slash.
dnl Sets gl_cv_func_open_slash.
diff --git a/m4/open.m4 b/m4/open.m4
index 62a11a110c5..600c2ec80dd 100644
--- a/m4/open.m4
+++ b/m4/open.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_OPEN],
[
diff --git a/m4/pathmax.m4 b/m4/pathmax.m4
index 4280837f1e1..958089e2d3a 100644
--- a/m4/pathmax.m4
+++ b/m4/pathmax.m4
@@ -5,6 +5,7 @@ dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_PATHMAX],
[
diff --git a/m4/pid_t.m4 b/m4/pid_t.m4
index 8bedcc6bcd3..e014c0bd8f5 100644
--- a/m4/pid_t.m4
+++ b/m4/pid_t.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2020-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# The following implementation works around a problem in autoconf <= 2.69.
m4_version_prereq([2.70], [], [
diff --git a/m4/pipe2.m4 b/m4/pipe2.m4
index e8ace7f077e..2bee623c005 100644
--- a/m4/pipe2.m4
+++ b/m4/pipe2.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_PIPE2],
[
diff --git a/m4/pselect.m4 b/m4/pselect.m4
index 23d1fadd637..546235ec6a5 100644
--- a/m4/pselect.m4
+++ b/m4/pselect.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_PSELECT],
[
diff --git a/m4/pthread_sigmask.m4 b/m4/pthread_sigmask.m4
index 437869f6dbe..2de8ebebf16 100644
--- a/m4/pthread_sigmask.m4
+++ b/m4/pthread_sigmask.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
[
diff --git a/m4/rawmemchr.m4 b/m4/rawmemchr.m4
index 6e0fa0a55e8..ffef17e982f 100644
--- a/m4/rawmemchr.m4
+++ b/m4/rawmemchr.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_RAWMEMCHR],
[
diff --git a/m4/readlink.m4 b/m4/readlink.m4
index 7ebdb6ca14f..a7eb43504ab 100644
--- a/m4/readlink.m4
+++ b/m4/readlink.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2003, 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_READLINK],
[
diff --git a/m4/readlinkat.m4 b/m4/readlinkat.m4
index 4c4e3588e0a..81e389a1117 100644
--- a/m4/readlinkat.m4
+++ b/m4/readlinkat.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# See if we need to provide readlinkat replacement.
diff --git a/m4/readutmp.m4 b/m4/readutmp.m4
index 1d9071fe65a..c11c2970609 100644
--- a/m4/readutmp.m4
+++ b/m4/readutmp.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2002-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_READUTMP],
[
diff --git a/m4/realloc.m4 b/m4/realloc.m4
index cc91102836f..6401f22847c 100644
--- a/m4/realloc.m4
+++ b/m4/realloc.m4
@@ -1,59 +1,22 @@
# realloc.m4
-# serial 32
+# serial 39
dnl Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
-# This is adapted with modifications from upstream Autoconf here:
-# https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/functions.m4?id=v2.70#n1455
-AC_DEFUN([_AC_FUNC_REALLOC_IF],
+# An an experimental option, the user can request a sanitized realloc()
+# implementation, i.e. one that aborts upon undefined behaviour,
+# by setting
+# gl_cv_func_realloc_sanitize=yes
+# at configure time.
+AC_DEFUN([gl_FUNC_REALLOC_SANITIZED],
[
- AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
- AC_CACHE_CHECK([whether realloc (0, 0) returns nonnull],
- [ac_cv_func_realloc_0_nonnull],
- [AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <stdlib.h>
- ]],
- [[void *p = realloc (0, 0);
- void * volatile vp = p;
- int result = !vp;
- free (p);
- return result;]])
- ],
- [ac_cv_func_realloc_0_nonnull=yes],
- [ac_cv_func_realloc_0_nonnull=no],
- [case "$host_os" in
- # Guess yes on platforms where we know the result.
- *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
- | gnu* | *-musl* | midipix* | midnightbsd* \
- | hpux* | solaris* | cygwin* | mingw* | windows* | msys* )
- ac_cv_func_realloc_0_nonnull="guessing yes" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) ac_cv_func_realloc_0_nonnull="$gl_cross_guess_normal" ;;
- esac
- ])
- ])
- AS_CASE([$ac_cv_func_realloc_0_nonnull], [*yes], [$1], [$2])
-])# AC_FUNC_REALLOC
-
-# gl_FUNC_REALLOC_GNU
-# -------------------
-# Replace realloc if it is not compatible with GNU libc.
-AC_DEFUN([gl_FUNC_REALLOC_GNU],
-[
- AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
- AC_REQUIRE([gl_FUNC_REALLOC_POSIX])
-
- dnl Through the dependency on module extensions-aix, _LINUX_SOURCE_COMPAT
- dnl gets defined already before this macro gets invoked. This helps
- dnl if !(__VEC__ || __AIXVEC), and doesn't hurt otherwise.
-
- if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 0; then
- _AC_FUNC_REALLOC_IF([], [REPLACE_REALLOC_FOR_REALLOC_GNU=1])
- fi
-])# gl_FUNC_REALLOC_GNU
+ AC_CACHE_CHECK([whether realloc should abort upon undefined behaviour],
+ [gl_cv_func_realloc_sanitize],
+ [test -n "$gl_cv_func_realloc_sanitize" || gl_cv_func_realloc_sanitize=no])
+])
# gl_FUNC_REALLOC_POSIX
# ---------------------
@@ -64,7 +27,59 @@ AC_DEFUN([gl_FUNC_REALLOC_POSIX],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
- if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
+ AC_REQUIRE([gl_FUNC_REALLOC_SANITIZED])
+ if test "$gl_cv_func_realloc_sanitize" != no; then
REPLACE_REALLOC_FOR_REALLOC_POSIX=1
+ AC_DEFINE([NEED_SANITIZED_REALLOC], [1],
+ [Define to 1 if realloc should abort upon undefined behaviour.])
+ else
+ REPLACE_REALLOC_FOR_REALLOC_POSIX=$REPLACE_MALLOC_FOR_MALLOC_POSIX
fi
])
+
+# gl_FUNC_REALLOC_0_NONNULL
+# -------------------------
+# Replace realloc if realloc (..., 0) returns null.
+# Modules that use this macro directly or indirectly should depend
+# on extensions-aix, so that _LINUX_SOURCE_COMPAT gets defined
+# before this macro gets invoked. This helps if !(__VEC__ || __AIXVEC),
+# and doesn't hurt otherwise.
+AC_DEFUN([gl_FUNC_REALLOC_0_NONNULL],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
+ AC_REQUIRE([gl_FUNC_REALLOC_POSIX])
+ AC_CACHE_CHECK([whether realloc (..., 0) returns nonnull],
+ [gl_cv_func_realloc_0_nonnull],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdlib.h>
+ /* Use prealloc to test; "volatile" prevents the compiler
+ from optimizing the realloc call away. */
+ void *(*volatile prealloc) (void *, size_t) = realloc;]],
+ [[void *p = prealloc (0, 0);
+ int result = !p;
+ p = prealloc (p, 0);
+ result |= !p;
+ free (p);
+ return result;]])],
+ [gl_cv_func_realloc_0_nonnull=yes],
+ [gl_cv_func_realloc_0_nonnull=no],
+ [AS_CASE([$host_os],
+ [# Guess yes on platforms where we know the result.
+ freebsd* | netbsd* | openbsd* | darwin* | bitrig* \
+ | *-musl* | midipix* | midnightbsd* \
+ | hpux* | solaris* | cygwin*],
+ [gl_cv_func_realloc_0_nonnull="guessing yes"],
+ [# Guess as follows if we don't know.
+ gl_cv_func_realloc_0_nonnull=$gl_cross_guess_normal])])])
+ AS_CASE([$gl_cv_func_realloc_0_nonnull],
+ [*yes],
+ [AC_DEFINE([HAVE_REALLOC_0_NONNULL], [1],
+ [Define to 1 if realloc (..., 0) returns nonnull.])],
+ [AS_CASE([$gl_cv_func_realloc_sanitize,$gl_cv_malloc_ptrdiff,$gl_cv_func_malloc_posix,$host],
+ [yes,*,*,* | *,no,*,* | *,*,*no,* | *,*,*,aarch64c-*-freebsd*],
+ [REPLACE_REALLOC_FOR_REALLOC_POSIX=1],
+ [# Optimize for common case of glibc 2.1.1+ and compatibles.
+ REPLACE_REALLOC_FOR_REALLOC_POSIX=2])])
+])
diff --git a/m4/regex.m4 b/m4/regex.m4
index f0101fe67c6..1060a8e8987 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -1,9 +1,10 @@
# regex.m4
-# serial 75
+# serial 78
dnl Copyright (C) 1996-2001, 2003-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Initially derived from code in GNU grep.
dnl Mostly written by Jim Meyering.
@@ -39,16 +40,16 @@ AC_DEFUN([gl_REGEX],
#include <limits.h>
#include <string.h>
- #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
- # include <signal.h>
- # include <unistd.h>
+ #if HAVE_MALLOC_H
+ # include <malloc.h> /* defines M_CHECK_ACTION on glibc */
#endif
- #if HAVE_MALLOC_H
- # include <malloc.h>
+ #if defined __HAIKU__ || defined M_CHECK_ACTION || HAVE_DECL_ALARM
+ # include <signal.h>
+ # include <unistd.h>
#endif
- #ifdef M_CHECK_ACTION
+ #if defined __HAIKU__ || defined M_CHECK_ACTION
/* Exit with distinguishable exit code. */
static void sigabrt_no_core (int sig) { raise (SIGTERM); }
#endif
@@ -67,6 +68,9 @@ AC_DEFUN([gl_REGEX],
signal (SIGALRM, SIG_DFL);
alarm (2);
#endif
+#ifdef __HAIKU__
+ signal (SIGABRT, sigabrt_no_core);
+#endif
#ifdef M_CHECK_ACTION
signal (SIGABRT, sigabrt_no_core);
mallopt (M_CHECK_ACTION, 2);
@@ -388,7 +392,6 @@ AC_DEFUN([gl_PREREQ_REGEX],
AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([AC_TYPE_MBSTATE_T])
- AC_REQUIRE([gl_EEMALLOC])
AC_CHECK_HEADERS([libintl.h])
AC_CHECK_FUNCS_ONCE([isblank iswctype])
AC_CHECK_DECLS([isblank], [], [], [[#include <ctype.h>]])
diff --git a/m4/selinux-selinux-h.m4 b/m4/selinux-selinux-h.m4
new file mode 100644
index 00000000000..c06a59415a3
--- /dev/null
+++ b/m4/selinux-selinux-h.m4
@@ -0,0 +1,97 @@
+# selinux-selinux-h.m4
+# serial 10 -*- Autoconf -*-
+dnl Copyright (C) 2006-2007, 2009-2024 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
+
+# From Jim Meyering
+# Provide <selinux/selinux.h>, if necessary.
+# If it is already present, provide wrapper functions to guard against
+# misbehavior from getfilecon, lgetfilecon, and fgetfilecon.
+
+AC_DEFUN([gl_HEADERS_SELINUX_SELINUX_H],
+[
+ AC_REQUIRE([gl_CHECK_HEADER_SELINUX_SELINUX_H])
+ if test "$with_selinux" != no; then
+ if test "$ac_cv_header_selinux_selinux_h" = yes; then
+ # We do have <selinux/selinux.h>, so do compile getfilecon.c
+ # and arrange to use its wrappers.
+ gl_CHECK_NEXT_HEADERS([selinux/selinux.h])
+ AC_DEFINE([getfilecon], [rpl_getfilecon],
+ [Always use our getfilecon wrapper.])
+ AC_DEFINE([getfilecon_raw], [rpl_getfilecon_raw],
+ [Always use our getfilecon_raw wrapper.])
+ AC_DEFINE([lgetfilecon], [rpl_lgetfilecon],
+ [Always use our lgetfilecon wrapper.])
+ AC_DEFINE([lgetfilecon_raw], [rpl_lgetfilecon_raw],
+ [Always use our lgetfilecon_raw wrapper.])
+ AC_DEFINE([fgetfilecon], [rpl_fgetfilecon],
+ [Always use our fgetfilecon wrapper.])
+ AC_DEFINE([fgetfilecon_raw], [rpl_fgetfilecon_raw],
+ [Always use our fgetfilecon_raw wrapper.])
+ fi
+ fi
+])
+
+# Check for <selinux/selinux.h>, if necessary.
+
+AC_DEFUN([gl_CHECK_HEADER_SELINUX_SELINUX_H],
+[
+ AC_REQUIRE([gl_LIBSELINUX])
+ if test "$with_selinux" != no; then
+ AC_CHECK_HEADERS_ONCE([selinux/selinux.h])
+
+ if test $ac_cv_header_selinux_selinux_h = yes; then
+ USE_SELINUX_SELINUX_H=1
+ else
+ USE_SELINUX_SELINUX_H=0
+ fi
+
+ case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in
+ no:*) # already warned
+ ;;
+ *:no)
+ AC_MSG_WARN([libselinux was found but selinux/selinux.h is missing.])
+ AC_MSG_WARN([AC_PACKAGE_NAME will be compiled without SELinux support.])
+ ;;
+ esac
+ else
+ # Do as if <selinux/selinux.h> does not exist, even if
+ # AC_CHECK_HEADERS_ONCE has already determined that it exists.
+ USE_SELINUX_SELINUX_H=0
+ fi
+ AC_SUBST([USE_SELINUX_SELINUX_H])
+ AC_DEFINE_UNQUOTED([USE_SELINUX_SELINUX_H], [$USE_SELINUX_SELINUX_H],
+ [Define to 1 if <selinux/selinux.h> should be used, to 0 otherwise.])
+])
+
+AC_DEFUN([gl_LIBSELINUX],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_CANONICAL_BUILD])
+
+ AC_ARG_WITH([selinux],
+ AS_HELP_STRING([[--without-selinux]], [do not use SELinux, even on systems with SELinux]),
+ [], [with_selinux=maybe])
+
+ LIB_SELINUX=
+ if test "$with_selinux" != no; then
+ gl_saved_LIBS=$LIBS
+ AC_SEARCH_LIBS([setfilecon], [selinux],
+ [test "$ac_cv_search_setfilecon" = "none required" ||
+ LIB_SELINUX=$ac_cv_search_setfilecon])
+ LIBS=$gl_saved_LIBS
+ fi
+ AC_SUBST([LIB_SELINUX])
+
+ # Warn if SELinux is found but libselinux is absent;
+ if test "$ac_cv_search_setfilecon" = no; then
+ if test "$host" = "$build" && test -d /selinux; then
+ AC_MSG_WARN([This system supports SELinux but libselinux is missing.])
+ AC_MSG_WARN([AC_PACKAGE_NAME will be compiled without SELinux support.])
+ fi
+ with_selinux=no
+ fi
+])
diff --git a/m4/sha1.m4 b/m4/sha1.m4
index 51f2afe8d0d..61189d260c4 100644
--- a/m4/sha1.m4
+++ b/m4/sha1.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2002-2006, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_SHA1],
[
diff --git a/m4/sha256.m4 b/m4/sha256.m4
index ad5596a488f..95070a15516 100644
--- a/m4/sha256.m4
+++ b/m4/sha256.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2005, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_SHA256],
[
diff --git a/m4/sha512.m4 b/m4/sha512.m4
index 86e5518beec..d882973801b 100644
--- a/m4/sha512.m4
+++ b/m4/sha512.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2005-2006, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_SHA512],
[
diff --git a/m4/sig2str.m4 b/m4/sig2str.m4
index acef58a6a40..5e95f491b59 100644
--- a/m4/sig2str.m4
+++ b/m4/sig2str.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2002, 2005-2006, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_SIG2STR],
[
diff --git a/m4/sigdescr_np.m4 b/m4/sigdescr_np.m4
index 72da5e957ca..4f8f8cd58cf 100644
--- a/m4/sigdescr_np.m4
+++ b/m4/sigdescr_np.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2020-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_SIGDESCR_NP],
[
diff --git a/m4/signal_h.m4 b/m4/signal_h.m4
index 7a7d2b3c526..ef6c5df949c 100644
--- a/m4/signal_h.m4
+++ b/m4/signal_h.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_SIGNAL_H],
[
diff --git a/m4/socklen.m4 b/m4/socklen.m4
index 9ece0abb6d0..a2aca10e715 100644
--- a/m4/socklen.m4
+++ b/m4/socklen.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2005-2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Albert Chin, Windows fixes from Simon Josefsson.
diff --git a/m4/ssize_t.m4 b/m4/ssize_t.m4
index c15f948adb7..437f066c92c 100644
--- a/m4/ssize_t.m4
+++ b/m4/ssize_t.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2001-2003, 2006, 2010-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
dnl Define ssize_t if it does not already exist.
diff --git a/m4/stat-time.m4 b/m4/stat-time.m4
index e8ee7d5125e..c192addd439 100644
--- a/m4/stat-time.m4
+++ b/m4/stat-time.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2024 Free Software Foun
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Checks for stat-related time functions.
diff --git a/m4/stdalign.m4 b/m4/stdalign.m4
index 1c29d1e4fb9..fd6112b2d38 100644
--- a/m4/stdalign.m4
+++ b/m4/stdalign.m4
@@ -4,6 +4,7 @@ dnl Copyright 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Check for alignas and alignof that conform to C23.
@@ -81,10 +82,10 @@ AC_DEFUN([gl_ALIGNASOF],
References:
ISO C23 (latest free draft
- <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf>)
+ <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf>)
sections 6.5.3.4, 6.7.5, 7.15.
C++11 (latest free draft
- <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>)
+ <https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>)
section 18.10. */
/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment
diff --git a/m4/stdbit_h.m4 b/m4/stdbit_h.m4
index 6af813f39dc..0aa9a634610 100644
--- a/m4/stdbit_h.m4
+++ b/m4/stdbit_h.m4
@@ -4,6 +4,7 @@ dnl Copyright 2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl A placeholder for <stdbit.h>, for platforms that have issues.
diff --git a/m4/stddef_h.m4 b/m4/stddef_h.m4
index c7f75b37fa0..e80b56eef69 100644
--- a/m4/stddef_h.m4
+++ b/m4/stddef_h.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl A placeholder for <stddef.h>, for platforms that have issues.
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index 2dea846914b..0a078e64d58 100644
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2001-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Paul Eggert and Bruno Haible.
dnl Test whether <stdint.h> is supported or must be substituted.
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4
index ec52ae92ff4..14fb0d34c65 100644
--- a/m4/stdio_h.m4
+++ b/m4/stdio_h.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_STDIO_H_EARLY],
[
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4
index 5d9b3017c44..87b63ff54e3 100644
--- a/m4/stdlib_h.m4
+++ b/m4/stdlib_h.m4
@@ -1,9 +1,10 @@
# stdlib_h.m4
-# serial 81
+# serial 82
dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_STDLIB_H],
[
@@ -140,7 +141,6 @@ AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM_R])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOCARRAY])
- gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOC_GNU])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOC_POSIX])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALPATH])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RPMATCH])
@@ -247,7 +247,6 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
REPLACE_RAND=0; AC_SUBST([REPLACE_RAND])
REPLACE_RANDOM=0; AC_SUBST([REPLACE_RANDOM])
REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R])
- REPLACE_REALLOC_FOR_REALLOC_GNU=0; AC_SUBST([REPLACE_REALLOC_FOR_REALLOC_GNU])
REPLACE_REALLOC_FOR_REALLOC_POSIX=0; AC_SUBST([REPLACE_REALLOC_FOR_REALLOC_POSIX])
REPLACE_REALLOCARRAY=0; AC_SUBST([REPLACE_REALLOCARRAY])
REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH])
diff --git a/m4/stpcpy.m4 b/m4/stpcpy.m4
index c4d71dd9fa5..0d7dca3dc6f 100644
--- a/m4/stpcpy.m4
+++ b/m4/stpcpy.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2002, 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_STPCPY],
[
diff --git a/m4/string_h.m4 b/m4/string_h.m4
index f31264ae85b..68464f0d083 100644
--- a/m4/string_h.m4
+++ b/m4/string_h.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Configure a GNU-like replacement for <string.h>.
diff --git a/m4/strnlen.m4 b/m4/strnlen.m4
index 83a75c0c327..ecd25598196 100644
--- a/m4/strnlen.m4
+++ b/m4/strnlen.m4
@@ -5,6 +5,7 @@ dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
m4_version_prereq([2.73], [], [
# Replace AC_FUNC_STRNLEN from Autoconf 2.72 and earlier,
diff --git a/m4/strtoimax.m4 b/m4/strtoimax.m4
index 2a0b50b3428..f4c6eb7e709 100644
--- a/m4/strtoimax.m4
+++ b/m4/strtoimax.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2002-2004, 2006, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_STRTOIMAX],
[
diff --git a/m4/strtoll.m4 b/m4/strtoll.m4
index 03a50dec2f1..e7f7654d91d 100644
--- a/m4/strtoll.m4
+++ b/m4/strtoll.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2002, 2004, 2006, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_STRTOLL],
[
diff --git a/m4/symlink.m4 b/m4/symlink.m4
index 47968a1d33f..e56c96e6e0a 100644
--- a/m4/symlink.m4
+++ b/m4/symlink.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# See if we need to provide symlink replacement.
diff --git a/m4/sys_cdefs_h.m4 b/m4/sys_cdefs_h.m4
index 22fa6c3849e..95c9c722160 100644
--- a/m4/sys_cdefs_h.m4
+++ b/m4/sys_cdefs_h.m4
@@ -4,6 +4,7 @@ dnl Copyright 2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Written by Paul Eggert.
diff --git a/m4/sys_random_h.m4 b/m4/sys_random_h.m4
index 62fd519e365..6d40452462a 100644
--- a/m4/sys_random_h.m4
+++ b/m4/sys_random_h.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2020-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_SYS_RANDOM_H],
[
diff --git a/m4/sys_select_h.m4 b/m4/sys_select_h.m4
index 550e066e171..9828237f622 100644
--- a/m4/sys_select_h.m4
+++ b/m4/sys_select_h.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_SYS_SELECT_H],
[
diff --git a/m4/sys_socket_h.m4 b/m4/sys_socket_h.m4
index 3bf3cb47778..2f1edcef1ad 100644
--- a/m4/sys_socket_h.m4
+++ b/m4/sys_socket_h.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2005-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Simon Josefsson.
diff --git a/m4/sys_stat_h.m4 b/m4/sys_stat_h.m4
index 3cc50ce6776..2971bc526f3 100644
--- a/m4/sys_stat_h.m4
+++ b/m4/sys_stat_h.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Eric Blake.
dnl Provide a GNU-like <sys/stat.h>.
diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4
index d3203088934..6954319e4b4 100644
--- a/m4/sys_time_h.m4
+++ b/m4/sys_time_h.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Configure a replacement for <sys/time.h>.
diff --git a/m4/sys_types_h.m4 b/m4/sys_types_h.m4
index 7c7f2655272..a7b289c206a 100644
--- a/m4/sys_types_h.m4
+++ b/m4/sys_types_h.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_SYS_TYPES_H],
[
diff --git a/m4/tempname.m4 b/m4/tempname.m4
index 795a9803fd0..2179cbe14bf 100644
--- a/m4/tempname.m4
+++ b/m4/tempname.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2006-2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# glibc provides __gen_tempname as a wrapper for mk[ds]temp. Expose
# it as a public API, and provide it on systems that are lacking.
diff --git a/m4/time_h.m4 b/m4/time_h.m4
index 88c76c03c02..28d698a1f0b 100644
--- a/m4/time_h.m4
+++ b/m4/time_h.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2000-2001, 2003-2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Configure a more-standard replacement for <time.h>.
diff --git a/m4/time_r.m4 b/m4/time_r.m4
index 3675390e871..05eaba31d90 100644
--- a/m4/time_r.m4
+++ b/m4/time_r.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2003, 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Reentrant time functions: localtime_r, gmtime_r.
diff --git a/m4/time_rz.m4 b/m4/time_rz.m4
index 1a3dd3befb1..2e2ecab4867 100644
--- a/m4/time_rz.m4
+++ b/m4/time_rz.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2015-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Time zone functions: tzalloc, localtime_rz, etc.
diff --git a/m4/timegm.m4 b/m4/timegm.m4
index c1ff26777b8..9b12f1e4fda 100644
--- a/m4/timegm.m4
+++ b/m4/timegm.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2003, 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_TIMEGM],
[
diff --git a/m4/timer_time.m4 b/m4/timer_time.m4
index 59a4cade539..8eb9f8e1a64 100644
--- a/m4/timer_time.m4
+++ b/m4/timer_time.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Check for timer_settime, and set TIMER_TIME_LIB.
diff --git a/m4/timespec.m4 b/m4/timespec.m4
index 5333920ef5e..39255320c7f 100644
--- a/m4/timespec.m4
+++ b/m4/timespec.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2000-2001, 2003-2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering
diff --git a/m4/tm_gmtoff.m4 b/m4/tm_gmtoff.m4
index 3d97edb7a7f..341127746a4 100644
--- a/m4/tm_gmtoff.m4
+++ b/m4/tm_gmtoff.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2002, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Check for tm_gmtoff and tm_zone in struct tm, and #define
dnl HAVE_STRUCT_TM_TM_GMTOFF and HAVE_STRUCT_TM_TM_ZONE accordingly.
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
index 04fa79c9ca6..6fcbc242e47 100644
--- a/m4/unistd_h.m4
+++ b/m4/unistd_h.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Written by Simon Josefsson, Bruno Haible.
diff --git a/m4/unlocked-io.m4 b/m4/unlocked-io.m4
index e96cf5f8736..1e515a0f4d7 100644
--- a/m4/unlocked-io.m4
+++ b/m4/unlocked-io.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 1998-2006, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering.
dnl
diff --git a/m4/utimens.m4 b/m4/utimens.m4
index b8200deaa25..5730b55feb5 100644
--- a/m4/utimens.m4
+++ b/m4/utimens.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2003-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_UTIMENS],
[
diff --git a/m4/utimensat.m4 b/m4/utimensat.m4
index a583f376687..8ed658d223b 100644
--- a/m4/utimensat.m4
+++ b/m4/utimensat.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# See if we need to provide utimensat replacement.
diff --git a/m4/utimes.m4 b/m4/utimes.m4
index 05b23cbb736..807b4600f09 100644
--- a/m4/utimes.m4
+++ b/m4/utimes.m4
@@ -5,6 +5,7 @@ dnl Copyright (C) 2003-2005, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# See if we need to work around bugs in glibc's implementation of
# utimes from 2003-07-12 to 2003-09-17.
diff --git a/m4/vararrays.m4 b/m4/vararrays.m4
index 9211f69d4d8..6681ce9d699 100644
--- a/m4/vararrays.m4
+++ b/m4/vararrays.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2001, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Check for variable-length arrays.
diff --git a/m4/warnings.m4 b/m4/warnings.m4
index fe7af01fc50..7350a400f1e 100644
--- a/m4/warnings.m4
+++ b/m4/warnings.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Simon Josefsson
diff --git a/m4/xattr.m4 b/m4/xattr.m4
index d8c08486834..9b2dd8d2453 100644
--- a/m4/xattr.m4
+++ b/m4/xattr.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2003-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Check for Extended Attributes (Linux)
diff --git a/m4/zzgnulib.m4 b/m4/zzgnulib.m4
index 710fba4e297..c23127a97fb 100644
--- a/m4/zzgnulib.m4
+++ b/m4/zzgnulib.m4
@@ -4,6 +4,7 @@ dnl Copyright (C) 2020-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl This file must be named something that sorts after all other
dnl package- or gnulib-provided .m4 files - at least for those packages