diff options
author | Po Lu <luangruo@yahoo.com> | 2023-01-24 10:46:53 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2023-01-24 10:46:53 +0800 |
commit | 3267a2d6d2b1f5b62f12f849712ead7016e71976 (patch) | |
tree | fd90ea113e3e043c4c1c90401d5d4bd38de344a9 /m4 | |
parent | 2b00f66926ac954d0250202d3086f29866163d96 (diff) | |
download | emacs-3267a2d6d2b1f5b62f12f849712ead7016e71976.tar.gz |
Update from gnulib
Update from gnulib. In addition,
* admin/merge-gnulib: Fix paths for rename.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/faccessat.m4 | 5 | ||||
-rw-r--r-- | m4/futimens.m4 | 5 | ||||
-rw-r--r-- | m4/getdelim.m4 | 5 | ||||
-rw-r--r-- | m4/getline.m4 | 5 | ||||
-rw-r--r-- | m4/getloadavg.m4 | 6 | ||||
-rw-r--r-- | m4/getrandom.m4 | 5 | ||||
-rw-r--r-- | m4/gettime.m4 | 35 | ||||
-rw-r--r-- | m4/gnulib-common.m4 | 73 | ||||
-rw-r--r-- | m4/gnulib-comp.m4 | 14 | ||||
-rw-r--r-- | m4/inttypes.m4 | 6 | ||||
-rw-r--r-- | m4/mempcpy.m4 | 5 | ||||
-rw-r--r-- | m4/mkostemp.m4 | 5 | ||||
-rw-r--r-- | m4/pipe2.m4 | 7 | ||||
-rw-r--r-- | m4/readlinkat.m4 | 5 | ||||
-rw-r--r-- | m4/stdlib_h.m4 | 13 | ||||
-rw-r--r-- | m4/stpcpy.m4 | 5 | ||||
-rw-r--r-- | m4/string_h.m4 | 4 | ||||
-rw-r--r-- | m4/time_h.m4 | 3 | ||||
-rw-r--r-- | m4/timegm.m4 | 5 | ||||
-rw-r--r-- | m4/unistd_h.m4 | 7 | ||||
-rw-r--r-- | m4/utimensat.m4 | 5 |
21 files changed, 178 insertions, 45 deletions
diff --git a/m4/faccessat.m4 b/m4/faccessat.m4 index 958c4978b7d..a858bfee33d 100644 --- a/m4/faccessat.m4 +++ b/m4/faccessat.m4 @@ -1,4 +1,4 @@ -# serial 11 +# serial 12 # See if we need to provide faccessat replacement. dnl Copyright (C) 2009-2023 Free Software Foundation, Inc. @@ -19,6 +19,9 @@ AC_DEFUN([gl_FUNC_FACCESSAT], gl_CHECK_FUNCS_ANDROID([faccessat], [[#include <unistd.h>]]) if test $ac_cv_func_faccessat = no; then HAVE_FACCESSAT=0 + case "$gl_cv_onwards_func_faccessat" in + future*) REPLACE_FACCESSAT=1 ;; + esac else case $gl_cv_func_lstat_dereferences_slashed_symlink in *yes) ;; diff --git a/m4/futimens.m4 b/m4/futimens.m4 index 8e997d6ea63..dc0b21b9d51 100644 --- a/m4/futimens.m4 +++ b/m4/futimens.m4 @@ -1,4 +1,4 @@ -# serial 10 +# serial 11 # See if we need to provide futimens replacement. dnl Copyright (C) 2009-2023 Free Software Foundation, Inc. @@ -16,6 +16,9 @@ AC_DEFUN([gl_FUNC_FUTIMENS], gl_CHECK_FUNCS_ANDROID([futimens], [[#include <sys/stat.h>]]) if test $ac_cv_func_futimens = no; then HAVE_FUTIMENS=0 + case "$gl_cv_onwards_func_futimens" in + future*) REPLACE_FUTIMENS=1 ;; + esac else AC_CACHE_CHECK([whether futimens works], [gl_cv_func_futimens_works], diff --git a/m4/getdelim.m4 b/m4/getdelim.m4 index bbd7c03bcba..d89aae5dffc 100644 --- a/m4/getdelim.m4 +++ b/m4/getdelim.m4 @@ -1,4 +1,4 @@ -# getdelim.m4 serial 17 +# getdelim.m4 serial 18 dnl Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc. dnl @@ -96,6 +96,9 @@ AC_DEFUN([gl_FUNC_GETDELIM], esac else HAVE_GETDELIM=0 + case "$gl_cv_onwards_func_getdelim" in + future*) REPLACE_GETDELIM=1 ;; + esac fi if test $ac_cv_have_decl_getdelim = no; then diff --git a/m4/getline.m4 b/m4/getline.m4 index f68fa3a1acf..1f2825c3361 100644 --- a/m4/getline.m4 +++ b/m4/getline.m4 @@ -1,4 +1,4 @@ -# getline.m4 serial 31 +# getline.m4 serial 32 dnl Copyright (C) 1998-2003, 2005-2007, 2009-2023 Free Software Foundation, dnl Inc. @@ -84,6 +84,9 @@ AC_DEFUN([gl_FUNC_GETLINE], ]) else am_cv_func_working_getline=no + case "$gl_cv_onwards_func_getline" in + future*) REPLACE_GETLINE=1 ;; + esac fi if test $ac_cv_have_decl_getline = no; then diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4 index 067f142abce..ee83b32f1e0 100644 --- a/m4/getloadavg.m4 +++ b/m4/getloadavg.m4 @@ -7,7 +7,7 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -#serial 11 +#serial 12 # Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent. # New applications should use gl_GETLOADAVG instead. @@ -27,6 +27,10 @@ gl_save_LIBS=$LIBS HAVE_GETLOADAVG=1 gl_CHECK_FUNCS_ANDROID([getloadavg], [[#include <stdlib.h>]]) if test $ac_cv_func_getloadavg != yes; then + case "$gl_cv_onwards_func_getloadavg" in + future*) REPLACE_GETLOADAVG=1 ;; + esac + gl_func_getloadavg_done=no # Some systems with -lutil have (and need) -lkvm as well, some do not. diff --git a/m4/getrandom.m4 b/m4/getrandom.m4 index c508f1a55c3..7b7f9ce2ee8 100644 --- a/m4/getrandom.m4 +++ b/m4/getrandom.m4 @@ -1,4 +1,4 @@ -# getrandom.m4 serial 10 +# getrandom.m4 serial 11 dnl Copyright 2020-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -18,6 +18,9 @@ AC_DEFUN([gl_FUNC_GETRANDOM], ]]) if test "$ac_cv_func_getrandom" != yes; then HAVE_GETRANDOM=0 + case "$gl_cv_onwards_func_getrandom" in + future*) REPLACE_GETRANDOM=1 ;; + esac else dnl On Solaris 11.4 the return type is 'int', not 'ssize_t'. AC_CACHE_CHECK([whether getrandom is compatible with its GNU+BSD signature], diff --git a/m4/gettime.m4 b/m4/gettime.m4 index 7e353fcd00e..ec1f97ee0d5 100644 --- a/m4/gettime.m4 +++ b/m4/gettime.m4 @@ -1,4 +1,4 @@ -# gettime.m4 serial 13 +# gettime.m4 serial 14 dnl Copyright (C) 2002, 2004-2006, 2009-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -18,9 +18,11 @@ AC_DEFUN([gl_GETTIME], ]) dnl Tests whether the function timespec_get exists. -dnl Sets gl_cv_func_timespec_get. +dnl Sets gl_cv_func_timespec_get and gl_cv_onwards_func_timespec_get. AC_DEFUN([gl_CHECK_FUNC_TIMESPEC_GET], [ + AC_REQUIRE([AC_CANONICAL_HOST]) + dnl Persuade OpenBSD <time.h> to declare timespec_get(). AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) @@ -29,21 +31,32 @@ AC_DEFUN([gl_CHECK_FUNC_TIMESPEC_GET], dnl But at the same time, we need to notice a missing declaration, like dnl gl_CHECK_FUNCS_ANDROID does. AC_CHECK_DECL([timespec_get], , , [[#include <time.h>]]) - if test $ac_cv_have_decl_timespec_get = yes; then - AC_CACHE_CHECK([for timespec_get], [gl_cv_func_timespec_get], - [AC_LINK_IFELSE( + AC_CACHE_CHECK([for timespec_get], [gl_cv_onwards_func_timespec_get], + [if test $ac_cv_have_decl_timespec_get = yes; then + AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include <time.h> struct timespec ts; ]], [[return timespec_get (&ts, 0);]]) ], - [gl_cv_func_timespec_get=yes], - [gl_cv_func_timespec_get=no]) - ]) - else - gl_cv_func_timespec_get=no - fi + [gl_cv_onwards_func_timespec_get=yes], + [gl_cv_onwards_func_timespec_get=no]) + else + gl_cv_onwards_func_timespec_get=no + fi + case "$host_os" in + linux*-android*) + if test $gl_cv_onwards_func_timespec_get = no; then + gl_cv_onwards_func_timespec_get='future OS version' + fi + ;; + esac + ]) + case "$gl_cv_onwards_func_timespec_get" in + future*) gl_cv_func_timespec_get=no ;; + *) gl_cv_func_timespec_get=$gl_cv_onwards_func_timespec_get ;; + esac ]) AC_DEFUN([gl_GETTIME_RES], diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index fa814222ce8..d5b2f7c4e50 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 76 +# gnulib-common.m4 serial 77 dnl Copyright (C) 2007-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -1031,8 +1031,21 @@ AC_DEFUN([gl_CONDITIONAL_HEADER], dnl gl_CHECK_FUNCS_ANDROID([func], [[#include <foo.h>]]) dnl is like AC_CHECK_FUNCS([func]), taking into account a portability problem dnl on Android. -dnl Namely, if func was added to Android API level, say, 28, then the libc.so -dnl has the symbol func always, whereas the header file <foo.h> declares func +dnl +dnl When code is compiled on Android, it is in the context of a certain +dnl "Android API level", which indicates the minimum version of Android on +dnl which the app can be installed. In other words, you don't compile for a +dnl specific version of Android. You compile for all versions of Android, +dnl onwards from the given API level. +dnl Thus, the question "does the OS have the function func" has three possible +dnl answers: +dnl - yes, in all versions starting from the given API level, +dnl - no, in no version, +dnl - not in the given API level, but in a later version of Android. +dnl +dnl In detail, this works as follows: +dnl If func was added to Android API level, say, 28, then the libc.so has the +dnl symbol func always, whereas the header file <foo.h> declares func dnl conditionally: dnl #if __ANDROID_API__ >= 28 dnl ... func (...) __INTRODUCED_IN(28); @@ -1040,15 +1053,55 @@ dnl #endif dnl Thus, when compiling with "clang -target armv7a-unknown-linux-android28", dnl the function func is declared and exists in libc. dnl Whereas when compiling with "clang -target armv7a-unknown-linux-android27", -dnl the function func is not declared but exists in libc. We need to treat this -dnl case like the case where func does not exist. +dnl the function func is not declared but exists in libc. +dnl +dnl This macro sets two variables: +dnl - gl_cv_onwards_func_<func> to yes / no / "future OS version" +dnl - ac_cv_func_<func> to yes / no / no +dnl The first variable allows to distinguish all three cases. +dnl The second variable is set, so that an invocation +dnl gl_CHECK_FUNCS_ANDROID([func], [[#include <foo.h>]]) +dnl can be used as a drop-in replacement for +dnl AC_CHECK_FUNCS([func]). AC_DEFUN([gl_CHECK_FUNCS_ANDROID], [ - AC_CHECK_DECL([$1], , , [$2]) - if test $ac_cv_have_decl_[$1] = yes; then - AC_CHECK_FUNCS([$1]) - else - ac_cv_func_[$1]=no + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_CACHE_CHECK([for [$1]], + [[gl_cv_onwards_func_][$1]], + [gl_SILENT([ + case "$host_os" in + linux*-android*) + AC_CHECK_DECL([$1], , , [$2]) + if test $[ac_cv_have_decl_][$1] = yes; then + AC_CHECK_FUNC([[$1]]) + if test $[ac_cv_func_][$1] = yes; then + [gl_cv_onwards_func_][$1]=yes + else + dnl The function is declared but does not exist. This should not + dnl happen normally. But anyway, we know that a future version + dnl of Android will have the function. + [gl_cv_onwards_func_][$1]='future OS version' + fi + else + [gl_cv_onwards_func_][$1]='future OS version' + fi + ;; + *) + AC_CHECK_FUNC([$1]) + [gl_cv_onwards_func_][$1]=$[ac_cv_func_][$1] + ;; + esac + ]) + ]) + case "$[gl_cv_onwards_func_][$1]" in + future*) [ac_cv_func_][$1]=no ;; + *) [ac_cv_func_][$1]=$[gl_cv_onwards_func_][$1] ;; + esac + if test $[ac_cv_func_][$1] = yes; then + AC_DEFINE([HAVE_]m4_translit([[$1]], + [abcdefghijklmnopqrstuvwxyz], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ]), + [1], [Define to 1 if you have the `$1' function.]) fi ]) diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index 1e4eccff712..b90fe6f562a 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -354,7 +354,8 @@ AC_DEFUN([gl_INIT], gl_STDIO_MODULE_INDICATOR([getline]) AC_REQUIRE([AC_CANONICAL_HOST]) gl_GETLOADAVG - gl_CONDITIONAL([GL_COND_OBJ_GETLOADAVG], [test $HAVE_GETLOADAVG = 0]) + gl_CONDITIONAL([GL_COND_OBJ_GETLOADAVG], + [test $HAVE_GETLOADAVG = 0 || test $REPLACE_GETLOADAVG = 1]) AM_COND_IF([GL_COND_OBJ_GETLOADAVG], [ gl_PREREQ_GETLOADAVG ]) @@ -414,7 +415,8 @@ AC_DEFUN([gl_INIT], fi gl_STRING_MODULE_INDICATOR([memmem]) gl_FUNC_MEMPCPY - gl_CONDITIONAL([GL_COND_OBJ_MEMPCPY], [test $HAVE_MEMPCPY = 0]) + gl_CONDITIONAL([GL_COND_OBJ_MEMPCPY], + [test $HAVE_MEMPCPY = 0 || test $REPLACE_MEMPCPY = 1]) AM_COND_IF([GL_COND_OBJ_MEMPCPY], [ gl_PREREQ_MEMPCPY ]) @@ -433,7 +435,8 @@ AC_DEFUN([gl_INIT], gl_STRING_MODULE_INDICATOR([memset_explicit]) gl_MINMAX gl_FUNC_MKOSTEMP - gl_CONDITIONAL([GL_COND_OBJ_MKOSTEMP], [test $HAVE_MKOSTEMP = 0]) + gl_CONDITIONAL([GL_COND_OBJ_MKOSTEMP], + [test $HAVE_MKOSTEMP = 0 || test $REPLACE_MKOSTEMP = 1]) AM_COND_IF([GL_COND_OBJ_MKOSTEMP], [ gl_PREREQ_MKOSTEMP ]) @@ -558,7 +561,8 @@ AC_DEFUN([gl_INIT], gl_STDLIB_H_REQUIRE_DEFAULTS AC_PROG_MKDIR_P gl_FUNC_STPCPY - gl_CONDITIONAL([GL_COND_OBJ_STPCPY], [test $HAVE_STPCPY = 0]) + gl_CONDITIONAL([GL_COND_OBJ_STPCPY], + [test $HAVE_STPCPY = 0 || test $REPLACE_STPCPY = 1]) AM_COND_IF([GL_COND_OBJ_STPCPY], [ gl_PREREQ_STPCPY ]) @@ -1000,7 +1004,7 @@ AC_DEFUN([gl_INIT], if test $REPLACE_GETLINE = 1; then func_gl_gnulib_m4code_getdelim fi - if case $host_os in mingw*) false;; *) test $HAVE_GETLOADAVG = 0;; esac; then + if case $host_os in mingw*) false;; *) test $HAVE_GETLOADAVG = 0 || test $REPLACE_GETLOADAVG = 1;; esac; then func_gl_gnulib_m4code_open fi if test $REPLACE_GETOPT = 1; then diff --git a/m4/inttypes.m4 b/m4/inttypes.m4 index bf2eab2ba31..e7efbe94167 100644 --- a/m4/inttypes.m4 +++ b/m4/inttypes.m4 @@ -1,4 +1,4 @@ -# inttypes.m4 serial 36 +# inttypes.m4 serial 37 dnl Copyright (C) 2006-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -170,6 +170,10 @@ AC_DEFUN([gl_INTTYPES_H_DEFAULTS], HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX]) HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX]) HAVE_IMAXDIV_T=1; AC_SUBST([HAVE_IMAXDIV_T]) + HAVE_IMAXABS=1; AC_SUBST([HAVE_IMAXABS]) + HAVE_IMAXDIV=1; AC_SUBST([HAVE_IMAXDIV]) + REPLACE_IMAXABS=0; AC_SUBST([REPLACE_IMAXABS]) + REPLACE_IMAXDIV=0; AC_SUBST([REPLACE_IMAXDIV]) REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX]) REPLACE_STRTOUMAX=0; AC_SUBST([REPLACE_STRTOUMAX]) INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX]) diff --git a/m4/mempcpy.m4 b/m4/mempcpy.m4 index d663b671749..612b77b3c11 100644 --- a/m4/mempcpy.m4 +++ b/m4/mempcpy.m4 @@ -1,4 +1,4 @@ -# mempcpy.m4 serial 13 +# mempcpy.m4 serial 14 dnl Copyright (C) 2003-2004, 2006-2007, 2009-2023 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -17,6 +17,9 @@ AC_DEFUN([gl_FUNC_MEMPCPY], gl_CHECK_FUNCS_ANDROID([mempcpy], [[#include <string.h>]]) if test $ac_cv_func_mempcpy = no; then HAVE_MEMPCPY=0 + case "$gl_cv_onwards_func_mempcpy" in + future*) REPLACE_MEMPCPY=1 ;; + esac fi ]) diff --git a/m4/mkostemp.m4 b/m4/mkostemp.m4 index 9424f85f430..1b0d0d55946 100644 --- a/m4/mkostemp.m4 +++ b/m4/mkostemp.m4 @@ -1,4 +1,4 @@ -# mkostemp.m4 serial 3 +# mkostemp.m4 serial 4 dnl Copyright (C) 2009-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -14,6 +14,9 @@ AC_DEFUN([gl_FUNC_MKOSTEMP], gl_CHECK_FUNCS_ANDROID([mkostemp], [[#include <stdlib.h>]]) if test $ac_cv_func_mkostemp != yes; then HAVE_MKOSTEMP=0 + case "$gl_cv_onwards_func_mkostemp" in + future*) REPLACE_MKOSTEMP=1 ;; + esac fi ]) diff --git a/m4/pipe2.m4 b/m4/pipe2.m4 index c7ec02e8736..79de69cd1a4 100644 --- a/m4/pipe2.m4 +++ b/m4/pipe2.m4 @@ -1,4 +1,4 @@ -# pipe2.m4 serial 3 +# pipe2.m4 serial 4 dnl Copyright (C) 2009-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -14,5 +14,10 @@ AC_DEFUN([gl_FUNC_PIPE2], gl_CHECK_FUNCS_ANDROID([pipe2], [[#include <unistd.h>]]) if test $ac_cv_func_pipe2 != yes; then HAVE_PIPE2=0 + case "$gl_cv_onwards_func_pipe2" in + future*) REPLACE_PIPE2=1 ;; + esac + else + REPLACE_PIPE2=1 fi ]) diff --git a/m4/readlinkat.m4 b/m4/readlinkat.m4 index 416f9c0d640..5c513562919 100644 --- a/m4/readlinkat.m4 +++ b/m4/readlinkat.m4 @@ -1,4 +1,4 @@ -# serial 7 +# serial 8 # See if we need to provide readlinkat replacement. dnl Copyright (C) 2009-2023 Free Software Foundation, Inc. @@ -16,6 +16,9 @@ AC_DEFUN([gl_FUNC_READLINKAT], AC_REQUIRE([gl_FUNC_READLINK]) if test $ac_cv_func_readlinkat = no; then HAVE_READLINKAT=0 + case "$gl_cv_onwards_func_readlinkat" in + future*) REPLACE_READLINKAT=1 ;; + esac else AC_CACHE_CHECK([whether readlinkat signature is correct], [gl_cv_decl_readlinkat_works], diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4 index e96be22f583..249ef657224 100644 --- a/m4/stdlib_h.m4 +++ b/m4/stdlib_h.m4 @@ -1,4 +1,4 @@ -# stdlib_h.m4 serial 66 +# stdlib_h.m4 serial 71 dnl Copyright (C) 2007-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -23,7 +23,7 @@ AC_DEFUN_ONCE([gl_STDLIB_H], # include <random.h> #endif ]], [_Exit aligned_alloc atoll canonicalize_file_name free - getloadavg getsubopt grantpt + getloadavg getprogname getsubopt grantpt initstate initstate_r mbtowc mkdtemp mkostemp mkostemps mkstemp mkstemps posix_memalign posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray realpath rpmatch secure_getenv setenv @@ -73,6 +73,7 @@ AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS], gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CANONICALIZE_FILE_NAME]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREE_POSIX]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOADAVG]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPROGNAME]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSUBOPT]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GRANTPT]) gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MALLOC_GNU]) @@ -130,6 +131,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], HAVE_DECL_FCVT=1; AC_SUBST([HAVE_DECL_FCVT]) HAVE_DECL_GCVT=1; AC_SUBST([HAVE_DECL_GCVT]) HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) + HAVE_GETPROGNAME=1; AC_SUBST([HAVE_GETPROGNAME]) HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT]) HAVE_INITSTATE=1; AC_SUBST([HAVE_INITSTATE]) @@ -166,17 +168,24 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV]) + REPLACE__EXIT=0; AC_SUBST([REPLACE__EXIT]) REPLACE_ALIGNED_ALLOC=0; AC_SUBST([REPLACE_ALIGNED_ALLOC]) REPLACE_CALLOC_FOR_CALLOC_GNU=0; AC_SUBST([REPLACE_CALLOC_FOR_CALLOC_GNU]) REPLACE_CALLOC_FOR_CALLOC_POSIX=0; AC_SUBST([REPLACE_CALLOC_FOR_CALLOC_POSIX]) REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) REPLACE_FREE=0; AC_SUBST([REPLACE_FREE]) + REPLACE_GETLOADAVG=0; AC_SUBST([REPLACE_GETLOADAVG]) + REPLACE_GETPROGNAME=0; AC_SUBST([REPLACE_GETPROGNAME]) + REPLACE_GETSUBOPT=0; AC_SUBST([REPLACE_GETSUBOPT]) REPLACE_INITSTATE=0; AC_SUBST([REPLACE_INITSTATE]) REPLACE_MALLOC_FOR_MALLOC_GNU=0; AC_SUBST([REPLACE_MALLOC_FOR_MALLOC_GNU]) REPLACE_MALLOC_FOR_MALLOC_POSIX=0; AC_SUBST([REPLACE_MALLOC_FOR_MALLOC_POSIX]) REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC]) + REPLACE_MKOSTEMP=0; AC_SUBST([REPLACE_MKOSTEMP]) + REPLACE_MKOSTEMPS=0; AC_SUBST([REPLACE_MKOSTEMPS]) REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) REPLACE_POSIX_MEMALIGN=0; AC_SUBST([REPLACE_POSIX_MEMALIGN]) + REPLACE_POSIX_OPENPT=0; AC_SUBST([REPLACE_POSIX_OPENPT]) REPLACE_PTSNAME=0; AC_SUBST([REPLACE_PTSNAME]) REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R]) REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) diff --git a/m4/stpcpy.m4 b/m4/stpcpy.m4 index 462f511d25d..f3acbee7be9 100644 --- a/m4/stpcpy.m4 +++ b/m4/stpcpy.m4 @@ -1,4 +1,4 @@ -# stpcpy.m4 serial 10 +# stpcpy.m4 serial 11 dnl Copyright (C) 2002, 2007, 2009-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -16,6 +16,9 @@ AC_DEFUN([gl_FUNC_STPCPY], gl_CHECK_FUNCS_ANDROID([stpcpy], [[#include <string.h>]]) if test $ac_cv_func_stpcpy = no; then HAVE_STPCPY=0 + case "$gl_cv_onwards_func_stpcpy" in + future*) REPLACE_STPCPY=1 ;; + esac fi ]) diff --git a/m4/string_h.m4 b/m4/string_h.m4 index 5da3cc25291..7f51391cbff 100644 --- a/m4/string_h.m4 +++ b/m4/string_h.m4 @@ -5,7 +5,7 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 35 +# serial 37 # Written by Paul Eggert. @@ -131,6 +131,8 @@ AC_DEFUN([gl_STRING_H_DEFAULTS], REPLACE_FFSLL=0; AC_SUBST([REPLACE_FFSLL]) REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR]) REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM]) + REPLACE_MEMPCPY=0; AC_SUBST([REPLACE_MEMPCPY]) + REPLACE_STPCPY=0; AC_SUBST([REPLACE_STPCPY]) REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY]) REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL]) REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP]) diff --git a/m4/time_h.m4 b/m4/time_h.m4 index f6bf3a4f30e..b74870c3d0e 100644 --- a/m4/time_h.m4 +++ b/m4/time_h.m4 @@ -2,7 +2,7 @@ # Copyright (C) 2000-2001, 2003-2007, 2009-2023 Free Software Foundation, Inc. -# serial 20 +# serial 21 # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -170,6 +170,7 @@ AC_DEFUN([gl_TIME_H_DEFAULTS], REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP]) REPLACE_STRFTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_STRFTIME]) REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM]) + REPLACE_TIMESPEC_GET=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMESPEC_GET]) REPLACE_TZSET=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TZSET]) dnl Hack so that the time module doesn't depend on the sys_time module. diff --git a/m4/timegm.m4 b/m4/timegm.m4 index fa84e98db3e..8ab265e65fe 100644 --- a/m4/timegm.m4 +++ b/m4/timegm.m4 @@ -1,4 +1,4 @@ -# timegm.m4 serial 14 +# timegm.m4 serial 15 dnl Copyright (C) 2003, 2007, 2009-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -17,6 +17,9 @@ AC_DEFUN([gl_FUNC_TIMEGM], fi else HAVE_TIMEGM=0 + case "$gl_cv_onwards_func_timegm" in + future*) REPLACE_TIMEGM=1 ;; + esac fi ]) diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4 index f4384027e37..1c96158155a 100644 --- a/m4/unistd_h.m4 +++ b/m4/unistd_h.m4 @@ -1,4 +1,4 @@ -# unistd_h.m4 serial 90 +# unistd_h.m4 serial 94 dnl Copyright (C) 2006-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -225,6 +225,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], REPLACE_COPY_FILE_RANGE=0; AC_SUBST([REPLACE_COPY_FILE_RANGE]) REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) + REPLACE_DUP3=0; AC_SUBST([REPLACE_DUP3]) REPLACE_EXECL=0; AC_SUBST([REPLACE_EXECL]) REPLACE_EXECLE=0; AC_SUBST([REPLACE_EXECLE]) REPLACE_EXECLP=0; AC_SUBST([REPLACE_EXECLP]) @@ -234,10 +235,12 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], REPLACE_EXECVPE=0; AC_SUBST([REPLACE_EXECVPE]) REPLACE_FACCESSAT=0; AC_SUBST([REPLACE_FACCESSAT]) REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) + REPLACE_FDATASYNC=0; AC_SUBST([REPLACE_FDATASYNC]) REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE]) REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE]) + REPLACE_GETENTROPY=0; AC_SUBST([REPLACE_GETENTROPY]) REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) @@ -248,12 +251,14 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) + REPLACE_PIPE2=0; AC_SUBST([REPLACE_PIPE2]) REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD]) REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE]) REPLACE_READ=0; AC_SUBST([REPLACE_READ]) REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) REPLACE_READLINKAT=0; AC_SUBST([REPLACE_READLINKAT]) REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) + REPLACE_SETHOSTNAME=0; AC_SUBST([REPLACE_SETHOSTNAME]) REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT]) diff --git a/m4/utimensat.m4 b/m4/utimensat.m4 index 1d3db2efa23..1a670bb7b78 100644 --- a/m4/utimensat.m4 +++ b/m4/utimensat.m4 @@ -1,4 +1,4 @@ -# serial 10 +# serial 11 # See if we need to provide utimensat replacement. dnl Copyright (C) 2009-2023 Free Software Foundation, Inc. @@ -16,6 +16,9 @@ AC_DEFUN([gl_FUNC_UTIMENSAT], gl_CHECK_FUNCS_ANDROID([utimensat], [[#include <sys/stat.h>]]) if test $ac_cv_func_utimensat = no; then HAVE_UTIMENSAT=0 + case "$gl_cv_onwards_func_utimensat" in + future*) REPLACE_UTIMENSAT=1 ;; + esac else AC_CACHE_CHECK([whether utimensat works], [gl_cv_func_utimensat_works], |