summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-02-23 11:11:52 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2022-02-23 11:41:02 -0800
commit308e63ccfcc6a6b1285bb17eff641f48639fb329 (patch)
treee3f1daf0bdfb7180fc1f007280fa2a4ee43c259c /m4
parent995aed477dc9be708920cc46442673126ed75760 (diff)
downloademacs-308e63ccfcc6a6b1285bb17eff641f48639fb329.tar.gz
Update from Gnulib by running admin/merge-gnulib
Diffstat (limited to 'm4')
-rw-r--r--m4/copy-file-range.m425
-rw-r--r--m4/extern-inline.m419
-rw-r--r--m4/gnulib-common.m495
-rw-r--r--m4/gnulib-comp.m4312
-rw-r--r--m4/libgmp.m46
-rw-r--r--m4/mktime.m429
-rw-r--r--m4/stdio_h.m429
-rw-r--r--m4/unistd_h.m41
8 files changed, 337 insertions, 179 deletions
diff --git a/m4/copy-file-range.m4 b/m4/copy-file-range.m4
index 4c7ec4eaafa..1b8b9d88589 100644
--- a/m4/copy-file-range.m4
+++ b/m4/copy-file-range.m4
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_COPY_FILE_RANGE],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
dnl Persuade glibc <unistd.h> to declare copy_file_range.
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
@@ -21,7 +22,7 @@ AC_DEFUN([gl_FUNC_COPY_FILE_RANGE],
[AC_LANG_PROGRAM(
[[#include <unistd.h>
]],
- [[ssize_t (*func) (int, off_t *, int, off_t, size_t, unsigned)
+ [[ssize_t (*func) (int, off_t *, int, off_t *, size_t, unsigned)
= copy_file_range;
return func (0, 0, 0, 0, 0, 0) & 127;
]])
@@ -32,5 +33,27 @@ AC_DEFUN([gl_FUNC_COPY_FILE_RANGE],
if test "$gl_cv_func_copy_file_range" != yes; then
HAVE_COPY_FILE_RANGE=0
+ else
+ AC_DEFINE([HAVE_COPY_FILE_RANGE], 1,
+ [Define to 1 if the function copy_file_range exists.])
+
+ case $host_os in
+ linux*)
+ AC_CACHE_CHECK([whether copy_file_range is known to work],
+ [gl_cv_copy_file_range_known_to_work],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <linux/version.h>
+ ]],
+ [[#if LINUX_VERSION_CODE < KERNEL_VERSION (5, 3, 0)
+ #error "copy_file_range is buggy"
+ #endif
+ ]])],
+ [gl_cv_copy_file_range_known_to_work=yes],
+ [gl_cv_copy_file_range_known_to_work=no])])
+ if test "$gl_cv_copy_file_range_known_to_work" = no; then
+ REPLACE_COPY_FILE_RANGE=1
+ fi;;
+ esac
fi
])
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
index 2e914dbc070..8a12bddd571 100644
--- a/m4/extern-inline.m4
+++ b/m4/extern-inline.m4
@@ -7,7 +7,22 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_EXTERN_INLINE],
[
- AH_VERBATIM([extern_inline],
+ AC_CACHE_CHECK([whether ctype.h defines __header_inline],
+ [gl_cv_have___header_inline],
+ [AC_PREPROC_IFELSE(
+ [AC_LANG_SOURCE([[#include <ctype.h>
+ #ifndef __header_inline
+ #error "<ctype.h> does not define __header_inline"
+ #endif
+ ]])],
+ [gl_cv_have___header_inline=yes],
+ [gl_cv_have___header_inline=no])])
+ if test "$gl_cv_have___header_inline" = yes; then
+ AC_DEFINE([HAVE___HEADER_INLINE], [1],
+ [Define to 1 if ctype.h defines __header_inline.])
+ fi
+
+ AH_VERBATIM([HAVE___HEADER_INLINE_1],
[/* Please see the Gnulib manual for how to use these macros.
Suppress extern inline with HP-UX cc, as it appears to be broken; see
@@ -54,7 +69,7 @@ AC_DEFUN([gl_EXTERN_INLINE],
*/
#if (((defined __APPLE__ && defined __MACH__) \
|| defined __DragonFly__ || defined __FreeBSD__) \
- && (defined __header_inline \
+ && (defined HAVE___HEADER_INLINE \
? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
&& ! defined __clang__) \
: ((! defined _DONT_USE_CTYPE_INLINE_ \
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index 87a9a751b6a..dbc40796148 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 69
+# gnulib-common.m4 serial 72
dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -181,7 +181,12 @@ AC_DEFUN([gl_COMMON_BODY], [
#else
# define _GL_ATTRIBUTE_DEALLOC(f, i)
#endif
-#define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
+/* If gnulib's <string.h> or <wchar.h> has already defined this macro, continue
+ to use this earlier definition, since <stdlib.h> may not have been included
+ yet. */
+#ifndef _GL_ATTRIBUTE_DEALLOC_FREE
+# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
+#endif
/* _GL_ATTRIBUTE_DEPRECATED: Declares that an entity is deprecated.
The compiler may warn if the entity is used. */
@@ -813,6 +818,24 @@ AC_DEFUN([gl_CACHE_VAL_SILENT],
])
])
+# gl_CONDITIONAL(conditional, condition)
+# is like AM_CONDITIONAL(conditional, condition), except that it does not
+# produce an error
+# configure: error: conditional "..." was never defined.
+# Usually this means the macro was only invoked conditionally.
+# when only invoked conditionally. Instead, in that case, both the _TRUE
+# and the _FALSE case are disabled.
+AC_DEFUN([gl_CONDITIONAL],
+[
+ pushdef([AC_CONFIG_COMMANDS_PRE], [:])dnl
+ AM_CONDITIONAL([$1], [$2])
+ popdef([AC_CONFIG_COMMANDS_PRE])dnl
+ if test -z "${[$1]_TRUE}" && test -z "${[$1]_FALSE}"; then
+ [$1]_TRUE='#'
+ [$1]_FALSE='#'
+ fi
+])
+
# gl_CC_ALLOW_WARNINGS
# sets and substitutes a variable GL_CFLAG_ALLOW_WARNINGS, to a $(CC) option
# that reverts a preceding '-Werror' option, if available.
@@ -879,6 +902,72 @@ AC_DEFUN([gl_CXX_ALLOW_WARNINGS],
AC_SUBST([GL_CXXFLAG_ALLOW_WARNINGS])
])
+# gl_CC_GNULIB_WARNINGS
+# sets and substitutes a variable GL_CFLAG_GNULIB_WARNINGS, to a $(CC) option
+# set that enables or disables warnings as suitable for the Gnulib coding style.
+AC_DEFUN([gl_CC_GNULIB_WARNINGS],
+[
+ AC_REQUIRE([gl_CC_ALLOW_WARNINGS])
+ dnl Assume that the compiler supports -Wno-* options only if it also supports
+ dnl -Wno-error.
+ GL_CFLAG_GNULIB_WARNINGS=''
+ if test -n "$GL_CFLAG_ALLOW_WARNINGS"; then
+ dnl Enable these warning options:
+ dnl
+ dnl GCC clang
+ dnl -Wno-cast-qual >= 3 >= 3.9
+ dnl -Wno-conversion >= 3 >= 3.9
+ dnl -Wno-float-conversion >= 4.9 >= 3.9
+ dnl -Wno-float-equal >= 3 >= 3.9
+ dnl -Wimplicit-fallthrough >= 7 >= 3.9
+ dnl -Wno-pedantic >= 4.8 >= 3.9
+ dnl -Wno-sign-compare >= 3 >= 3.9
+ dnl -Wno-sign-conversion >= 4.3 >= 3.9
+ dnl -Wno-type-limits >= 4.3 >= 3.9
+ dnl -Wno-undef >= 3 >= 3.9
+ dnl -Wno-unsuffixed-float-constants >= 4.5
+ dnl -Wno-unused-function >= 3 >= 3.9
+ dnl -Wno-unused-parameter >= 3 >= 3.9
+ dnl
+ cat > conftest.c <<\EOF
+ #if __GNUC__ >= 3 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
+ -Wno-cast-qual
+ -Wno-conversion
+ -Wno-float-equal
+ -Wno-sign-compare
+ -Wno-undef
+ -Wno-unused-function
+ -Wno-unused-parameter
+ #endif
+ #if __GNUC__ + (__GNUC_MINOR__ >= 9) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
+ -Wno-float-conversion
+ #endif
+ #if __GNUC__ >= 7 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
+ -Wimplicit-fallthrough
+ #endif
+ #if __GNUC__ + (__GNUC_MINOR__ >= 8) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
+ -Wno-pedantic
+ #endif
+ #if __GNUC__ + (__GNUC_MINOR__ >= 3) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
+ -Wno-sign-conversion
+ -Wno-type-limits
+ #endif
+ #if __GNUC__ + (__GNUC_MINOR__ >= 5) > 4
+ -Wno-unsuffixed-float-constants
+ #endif
+EOF
+ gl_command="$CC $CFLAGS $CPPFLAGS -E conftest.c > conftest.out"
+ if AC_TRY_EVAL([gl_command]); then
+ gl_options=`grep -v '#' conftest.out`
+ for word in $gl_options; do
+ GL_CFLAG_GNULIB_WARNINGS="$GL_CFLAG_GNULIB_WARNINGS $word"
+ done
+ fi
+ rm -f conftest.c conftest.out
+ fi
+ AC_SUBST([GL_CFLAG_GNULIB_WARNINGS])
+])
+
dnl gl_CONDITIONAL_HEADER([foo.h])
dnl takes a shell variable GL_GENERATE_FOO_H (with value true or false) as input
dnl and produces
@@ -903,7 +992,7 @@ AC_DEFUN([gl_CONDITIONAL_HEADER],
*) echo "*** gl_generate_var is not set correctly" 1>&2; exit 1 ;;
esac
AC_SUBST(gl_header_name)
- AM_CONDITIONAL(gl_generate_cond, [$gl_generate_var])
+ gl_CONDITIONAL(gl_generate_cond, [$gl_generate_var])
m4_popdef([gl_generate_cond])
m4_popdef([gl_generate_var])
m4_popdef([gl_header_name])
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index c47ea915f14..1d31239d2db 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -3,7 +3,7 @@
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This file is distributed in the hope that it will be useful,
@@ -236,9 +236,8 @@ AC_DEFUN([gl_INIT],
gl_CONDITIONAL_HEADER([byteswap.h])
AC_PROG_MKDIR_P
gl_CANONICALIZE_LGPL
- if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
- AC_LIBOBJ([canonicalize-lgpl])
- fi
+ gl_CONDITIONAL([GL_COND_OBJ_CANONICALIZE_LGPL],
+ [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1])
gl_MODULE_INDICATOR([canonicalize-lgpl])
gl_STDLIB_MODULE_INDICATOR([canonicalize_file_name])
gl_STDLIB_MODULE_INDICATOR([realpath])
@@ -247,9 +246,9 @@ AC_DEFUN([gl_INIT],
gl_CLOCK_TIME
gl_MODULE_INDICATOR([close-stream])
gl_FUNC_COPY_FILE_RANGE
- if test $HAVE_COPY_FILE_RANGE = 0; then
- AC_LIBOBJ([copy-file-range])
- fi
+ gl_CONDITIONAL([GL_COND_OBJ_COPY_FILE_RANGE],
+ [test $HAVE_COPY_FILE_RANGE = 0 ||
+ test $REPLACE_COPY_FILE_RANGE = 1])
gl_UNISTD_MODULE_INDICATOR([copy-file-range])
AC_REQUIRE([AC_C_RESTRICT])
gl_MD5
@@ -265,10 +264,10 @@ AC_DEFUN([gl_INIT],
AC_PROG_MKDIR_P
gl_DOUBLE_SLASH_ROOT
gl_FUNC_DUP2
- if test $REPLACE_DUP2 = 1; then
- AC_LIBOBJ([dup2])
+ gl_CONDITIONAL([GL_COND_OBJ_DUP2], [test $REPLACE_DUP2 = 1])
+ AM_COND_IF([GL_COND_OBJ_DUP2], [
gl_PREREQ_DUP2
- fi
+ ])
gl_UNISTD_MODULE_INDICATOR([dup2])
gl_ENVIRON
gl_UNISTD_MODULE_INDICATOR([environ])
@@ -278,83 +277,77 @@ AC_DEFUN([gl_INIT],
gl_EXECINFO_H
gl_CONDITIONAL_HEADER([execinfo.h])
AC_PROG_MKDIR_P
- if $GL_GENERATE_EXECINFO_H; then
- AC_LIBOBJ([execinfo])
- fi
+ gl_CONDITIONAL([GL_COND_OBJ_EXECINFO], [$GL_GENERATE_EXECINFO_H])
gl_FUNC_EXPLICIT_BZERO
- if test $HAVE_EXPLICIT_BZERO = 0; then
- AC_LIBOBJ([explicit_bzero])
+ gl_CONDITIONAL([GL_COND_OBJ_EXPLICIT_BZERO], [test $HAVE_EXPLICIT_BZERO = 0])
+ AM_COND_IF([GL_COND_OBJ_EXPLICIT_BZERO], [
gl_PREREQ_EXPLICIT_BZERO
- fi
+ ])
gl_STRING_MODULE_INDICATOR([explicit_bzero])
AC_REQUIRE([gl_EXTERN_INLINE])
gl_FUNC_FACCESSAT
- if test $HAVE_FACCESSAT = 0 || test $REPLACE_FACCESSAT = 1; then
- AC_LIBOBJ([faccessat])
+ gl_CONDITIONAL([GL_COND_OBJ_FACCESSAT],
+ [test $HAVE_FACCESSAT = 0 || test $REPLACE_FACCESSAT = 1])
+ AM_COND_IF([GL_COND_OBJ_FACCESSAT], [
gl_PREREQ_FACCESSAT
- fi
+ ])
gl_MODULE_INDICATOR([faccessat])
gl_UNISTD_MODULE_INDICATOR([faccessat])
gl_FUNC_FCHMODAT
- if test $HAVE_FCHMODAT = 0 || test $REPLACE_FCHMODAT = 1; then
- AC_LIBOBJ([fchmodat])
+ gl_CONDITIONAL([GL_COND_OBJ_FCHMODAT],
+ [test $HAVE_FCHMODAT = 0 || test $REPLACE_FCHMODAT = 1])
+ AM_COND_IF([GL_COND_OBJ_FCHMODAT], [
gl_PREREQ_FCHMODAT
- fi
+ ])
gl_SYS_STAT_MODULE_INDICATOR([fchmodat])
gl_FUNC_FCNTL
- if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
- AC_LIBOBJ([fcntl])
- fi
+ gl_CONDITIONAL([GL_COND_OBJ_FCNTL],
+ [test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1])
gl_FCNTL_MODULE_INDICATOR([fcntl])
gl_FCNTL_H
gl_FCNTL_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
gl_FUNC_FDOPENDIR
- if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
- AC_LIBOBJ([fdopendir])
- fi
+ gl_CONDITIONAL([GL_COND_OBJ_FDOPENDIR],
+ [test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1])
gl_DIRENT_MODULE_INDICATOR([fdopendir])
gl_MODULE_INDICATOR([fdopendir])
gl_FILE_HAS_ACL
gl_FILEMODE
AC_C_FLEXIBLE_ARRAY_MEMBER
gl_FUNC_FPENDING
- if test $gl_cv_func___fpending = no; then
- AC_LIBOBJ([fpending])
- fi
+ gl_CONDITIONAL([GL_COND_OBJ_FPENDING], [test $gl_cv_func___fpending = no])
gl_FUNC_FREE
- if test $REPLACE_FREE = 1; then
- AC_LIBOBJ([free])
+ gl_CONDITIONAL([GL_COND_OBJ_FREE], [test $REPLACE_FREE = 1])
+ AM_COND_IF([GL_COND_OBJ_FREE], [
gl_PREREQ_FREE
- fi
+ ])
gl_STDLIB_MODULE_INDICATOR([free-posix])
gl_FUNC_FSTATAT
- if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
- AC_LIBOBJ([fstatat])
- fi
+ gl_CONDITIONAL([GL_COND_OBJ_FSTATAT],
+ [test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1])
gl_SYS_STAT_MODULE_INDICATOR([fstatat])
gl_FSUSAGE
- if test $gl_cv_fs_space = yes; then
- AC_LIBOBJ([fsusage])
+ gl_CONDITIONAL([GL_COND_OBJ_FSUSAGE], [test $gl_cv_fs_space = yes])
+ AM_COND_IF([GL_COND_OBJ_FSUSAGE], [
gl_PREREQ_FSUSAGE_EXTRA
- fi
+ ])
gl_FUNC_FSYNC
- if test $HAVE_FSYNC = 0; then
- AC_LIBOBJ([fsync])
+ gl_CONDITIONAL([GL_COND_OBJ_FSYNC], [test $HAVE_FSYNC = 0])
+ AM_COND_IF([GL_COND_OBJ_FSYNC], [
gl_PREREQ_FSYNC
- fi
+ ])
gl_UNISTD_MODULE_INDICATOR([fsync])
gl_FUNC_FUTIMENS
- if test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1; then
- AC_LIBOBJ([futimens])
- fi
+ gl_CONDITIONAL([GL_COND_OBJ_FUTIMENS],
+ [test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1])
gl_SYS_STAT_MODULE_INDICATOR([futimens])
AC_REQUIRE([AC_CANONICAL_HOST])
gl_GETLOADAVG
- if test $HAVE_GETLOADAVG = 0; then
- AC_LIBOBJ([getloadavg])
+ gl_CONDITIONAL([GL_COND_OBJ_GETLOADAVG], [test $HAVE_GETLOADAVG = 0])
+ AM_COND_IF([GL_COND_OBJ_GETLOADAVG], [
gl_PREREQ_GETLOADAVG
- fi
+ ])
gl_STDLIB_MODULE_INDICATOR([getloadavg])
gl_FUNC_GETOPT_GNU
dnl Because of the way gl_FUNC_GETOPT_GNU is implemented (the gl_getopt_required
@@ -364,26 +357,25 @@ AC_DEFUN([gl_INIT],
gl_CONDITIONAL_HEADER([getopt.h])
gl_CONDITIONAL_HEADER([getopt-cdefs.h])
AC_PROG_MKDIR_P
- if test $REPLACE_GETOPT = 1; then
- AC_LIBOBJ([getopt])
- AC_LIBOBJ([getopt1])
+ gl_CONDITIONAL([GL_COND_OBJ_GETOPT], [test $REPLACE_GETOPT = 1])
+ AM_COND_IF([GL_COND_OBJ_GETOPT], [
dnl Define the substituted variable GNULIB_UNISTD_H_GETOPT to 1.
gl_UNISTD_H_REQUIRE_DEFAULTS
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT], [1])
- fi
+ ])
gl_UNISTD_MODULE_INDICATOR([getopt-posix])
AC_REQUIRE([AC_CANONICAL_HOST])
gl_FUNC_GETRANDOM
- if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
- AC_LIBOBJ([getrandom])
- fi
+ gl_CONDITIONAL([GL_COND_OBJ_GETRANDOM],
+ [test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1])
gl_SYS_RANDOM_MODULE_INDICATOR([getrandom])
gl_GETTIME
gl_FUNC_GETTIMEOFDAY
- if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
- AC_LIBOBJ([gettimeofday])
+ gl_CONDITIONAL([GL_COND_OBJ_GETTIMEOFDAY],
+ [test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1])
+ AM_COND_IF([GL_COND_OBJ_GETTIMEOFDAY], [
gl_PREREQ_GETTIMEOFDAY
- fi
+ ])
gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
gl_IEEE754_H
gl_CONDITIONAL_HEADER([ieee754.h])
@@ -396,17 +388,15 @@ AC_DEFUN([gl_INIT],
gl_LIBGMP
gl_CONDITIONAL_HEADER([gmp.h])
AC_PROG_MKDIR_P
- if test $HAVE_LIBGMP != yes; then
- AC_LIBOBJ([mini-gmp-gnulib])
- fi
+ gl_CONDITIONAL([GL_COND_OBJ_MINI_GMP_GNULIB], [test $HAVE_LIBGMP != yes])
gl_LIMITS_H
gl_CONDITIONAL_HEADER([limits.h])
AC_PROG_MKDIR_P
gl_FUNC_LSTAT
- if test $REPLACE_LSTAT = 1; then
- AC_LIBOBJ([lstat])
+ gl_CONDITIONAL([GL_COND_OBJ_LSTAT], [test $REPLACE_LSTAT = 1])
+ AM_COND_IF([GL_COND_OBJ_LSTAT], [
gl_PREREQ_LSTAT
- fi
+ ])
gl_SYS_STAT_MODULE_INDICATOR([lstat])
gl_FUNC_MEMMEM_SIMPLE
if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
@@ -414,23 +404,23 @@ AC_DEFUN([gl_INIT],
fi
gl_STRING_MODULE_INDICATOR([memmem])
gl_FUNC_MEMPCPY
- if test $HAVE_MEMPCPY = 0; then
- AC_LIBOBJ([mempcpy])
+ gl_CONDITIONAL([GL_COND_OBJ_MEMPCPY], [test $HAVE_MEMPCPY = 0])
+ AM_COND_IF([GL_COND_OBJ_MEMPCPY], [
gl_PREREQ_MEMPCPY
- fi
+ ])
gl_STRING_MODULE_INDICATOR([mempcpy])
gl_FUNC_MEMRCHR
- if test $ac_cv_func_memrchr = no; then
- AC_LIBOBJ([memrchr])
+ gl_CONDITIONAL([GL_COND_OBJ_MEMRCHR], [test $ac_cv_func_memrchr = no])
+ AM_COND_IF([GL_COND_OBJ_MEMRCHR], [
gl_PREREQ_MEMRCHR
- fi
+ ])
gl_STRING_MODULE_INDICATOR([memrchr])
gl_MINMAX
gl_FUNC_MKOSTEMP
- if test $HAVE_MKOSTEMP = 0; then
- AC_LIBOBJ([mkostemp])
+ gl_CONDITIONAL([GL_COND_OBJ_MKOSTEMP], [test $HAVE_MKOSTEMP = 0])
+ AM_COND_IF([GL_COND_OBJ_MKOSTEMP], [
gl_PREREQ_MKOSTEMP
- fi
+ ])
gl_MODULE_INDICATOR([mkostemp])
gl_STDLIB_MODULE_INDICATOR([mkostemp])
gl_FUNC_MKTIME
@@ -446,41 +436,39 @@ AC_DEFUN([gl_INIT],
gl_FUNC_PIPE2
gl_UNISTD_MODULE_INDICATOR([pipe2])
gl_FUNC_PSELECT
- if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
- AC_LIBOBJ([pselect])
- fi
+ gl_CONDITIONAL([GL_COND_OBJ_PSELECT],
+ [test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1])
gl_SYS_SELECT_MODULE_INDICATOR([pselect])
gl_FUNC_PTHREAD_SIGMASK
- if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
- AC_LIBOBJ([pthread_sigmask])
+ gl_CONDITIONAL([GL_COND_OBJ_PTHREAD_SIGMASK],
+ [test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1])
+ AM_COND_IF([GL_COND_OBJ_PTHREAD_SIGMASK], [
gl_PREREQ_PTHREAD_SIGMASK
- fi
+ ])
gl_SIGNAL_MODULE_INDICATOR([pthread_sigmask])
gl_FUNC_READLINK
- if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
- AC_LIBOBJ([readlink])
+ gl_CONDITIONAL([GL_COND_OBJ_READLINK],
+ [test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1])
+ AM_COND_IF([GL_COND_OBJ_READLINK], [
gl_PREREQ_READLINK
- fi
+ ])
gl_UNISTD_MODULE_INDICATOR([readlink])
gl_FUNC_READLINKAT
- if test $HAVE_READLINKAT = 0 || test $REPLACE_READLINKAT = 1; then
- AC_LIBOBJ([readlinkat])
- fi
+ gl_CONDITIONAL([GL_COND_OBJ_READLINKAT],
+ [test $HAVE_READLINKAT = 0 || test $REPLACE_READLINKAT = 1])
gl_UNISTD_MODULE_INDICATOR([readlinkat])
gl_REGEX
- if test $ac_use_included_regex = yes; then
- AC_LIBOBJ([regex])
+ gl_CONDITIONAL([GL_COND_OBJ_REGEX], [test $ac_use_included_regex = yes])
+ AM_COND_IF([GL_COND_OBJ_REGEX], [
gl_PREREQ_REGEX
- fi
+ ])
gl_FUNC_SIG2STR
- if test $ac_cv_func_sig2str = no; then
- AC_LIBOBJ([sig2str])
+ gl_CONDITIONAL([GL_COND_OBJ_SIG2STR], [test $ac_cv_func_sig2str = no])
+ AM_COND_IF([GL_COND_OBJ_SIG2STR], [
gl_PREREQ_SIG2STR
- fi
+ ])
gl_FUNC_SIGDESCR_NP
- if test $HAVE_SIGDESCR_NP = 0; then
- AC_LIBOBJ([sigdescr_np])
- fi
+ gl_CONDITIONAL([GL_COND_OBJ_SIGDESCR_NP], [test $HAVE_SIGDESCR_NP = 0])
gl_STRING_MODULE_INDICATOR([sigdescr_np])
gl_SIGNAL_H
gl_SIGNAL_H_REQUIRE_DEFAULTS
@@ -504,6 +492,8 @@ AC_DEFUN([gl_INIT],
gl_STDIO_H
gl_STDIO_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
+ gl_CONDITIONAL([GL_COND_OBJ_STDIO_READ], [test $REPLACE_STDIO_READ_FUNCS = 1])
+ gl_CONDITIONAL([GL_COND_OBJ_STDIO_WRITE], [test $REPLACE_STDIO_WRITE_FUNCS = 1])
dnl No need to create extra modules for these functions. Everyone who uses
dnl <stdio.h> likely needs them.
gl_STDIO_MODULE_INDICATOR([fscanf])
@@ -531,30 +521,31 @@ AC_DEFUN([gl_INIT],
gl_STDLIB_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
gl_FUNC_STPCPY
- if test $HAVE_STPCPY = 0; then
- AC_LIBOBJ([stpcpy])
+ gl_CONDITIONAL([GL_COND_OBJ_STPCPY], [test $HAVE_STPCPY = 0])
+ AM_COND_IF([GL_COND_OBJ_STPCPY], [
gl_PREREQ_STPCPY
- fi
+ ])
gl_STRING_MODULE_INDICATOR([stpcpy])
gl_STRING_H
gl_STRING_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
gl_FUNC_STRNLEN
- if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
- AC_LIBOBJ([strnlen])
+ gl_CONDITIONAL([GL_COND_OBJ_STRNLEN],
+ [test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1])
+ AM_COND_IF([GL_COND_OBJ_STRNLEN], [
gl_PREREQ_STRNLEN
- fi
+ ])
gl_STRING_MODULE_INDICATOR([strnlen])
gl_FUNC_STRTOIMAX
- if test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
- AC_LIBOBJ([strtoimax])
+ gl_CONDITIONAL([GL_COND_OBJ_STRTOIMAX],
+ [test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1])
+ AM_COND_IF([GL_COND_OBJ_STRTOIMAX], [
gl_PREREQ_STRTOIMAX
- fi
+ ])
gl_INTTYPES_MODULE_INDICATOR([strtoimax])
gl_FUNC_SYMLINK
- if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
- AC_LIBOBJ([symlink])
- fi
+ gl_CONDITIONAL([GL_COND_OBJ_SYMLINK],
+ [test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1])
gl_UNISTD_MODULE_INDICATOR([symlink])
gl_SYS_RANDOM_H
gl_SYS_RANDOM_H_REQUIRE_DEFAULTS
@@ -577,21 +568,21 @@ AC_DEFUN([gl_INIT],
gl_TIME_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
gl_TIME_R
- if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
- AC_LIBOBJ([time_r])
+ gl_CONDITIONAL([GL_COND_OBJ_TIME_R],
+ [test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1])
+ AM_COND_IF([GL_COND_OBJ_TIME_R], [
gl_PREREQ_TIME_R
- fi
+ ])
gl_TIME_MODULE_INDICATOR([time_r])
gl_TIME_RZ
- if test $HAVE_TIMEZONE_T = 0; then
- AC_LIBOBJ([time_rz])
- fi
+ gl_CONDITIONAL([GL_COND_OBJ_TIME_RZ], [test $HAVE_TIMEZONE_T = 0])
gl_TIME_MODULE_INDICATOR([time_rz])
gl_FUNC_TIMEGM
- if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then
- AC_LIBOBJ([timegm])
+ gl_CONDITIONAL([GL_COND_OBJ_TIMEGM],
+ [test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1])
+ AM_COND_IF([GL_COND_OBJ_TIMEGM], [
gl_PREREQ_TIMEGM
- fi
+ ])
gl_TIME_MODULE_INDICATOR([timegm])
gl_TIMER_TIME
gl_TIMESPEC
@@ -610,9 +601,8 @@ AC_DEFUN([gl_INIT],
[An alias of GNULIB_STDIO_SINGLE_THREAD.])
gl_FUNC_GLIBC_UNLOCKED_IO
gl_FUNC_UTIMENSAT
- if test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1; then
- AC_LIBOBJ([utimensat])
- fi
+ gl_CONDITIONAL([GL_COND_OBJ_UTIMENSAT],
+ [test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1])
gl_SYS_STAT_MODULE_INDICATOR([utimensat])
AC_C_VARARRAYS
gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
@@ -660,11 +650,11 @@ AC_DEFUN([gl_INIT],
{
if ! $gl_gnulib_enabled_dirfd; then
gl_FUNC_DIRFD
- if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
- || test $REPLACE_DIRFD = 1; then
- AC_LIBOBJ([dirfd])
+ gl_CONDITIONAL([GL_COND_OBJ_DIRFD],
+ [test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no || test $REPLACE_DIRFD = 1])
+ AM_COND_IF([GL_COND_OBJ_DIRFD], [
gl_PREREQ_DIRFD
- fi
+ ])
gl_DIRENT_MODULE_INDICATOR([dirfd])
gl_gnulib_enabled_dirfd=true
fi
@@ -686,10 +676,10 @@ AC_DEFUN([gl_INIT],
{
if ! $gl_gnulib_enabled_euidaccess; then
gl_FUNC_EUIDACCESS
- if test $HAVE_EUIDACCESS = 0; then
- AC_LIBOBJ([euidaccess])
+ gl_CONDITIONAL([GL_COND_OBJ_EUIDACCESS], [test $HAVE_EUIDACCESS = 0])
+ AM_COND_IF([GL_COND_OBJ_EUIDACCESS], [
gl_PREREQ_EUIDACCESS
- fi
+ ])
gl_UNISTD_MODULE_INDICATOR([euidaccess])
gl_gnulib_enabled_euidaccess=true
if test $HAVE_EUIDACCESS = 0; then
@@ -702,10 +692,11 @@ AC_DEFUN([gl_INIT],
{
if ! $gl_gnulib_enabled_getdtablesize; then
gl_FUNC_GETDTABLESIZE
- if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
- AC_LIBOBJ([getdtablesize])
+ gl_CONDITIONAL([GL_COND_OBJ_GETDTABLESIZE],
+ [test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1])
+ AM_COND_IF([GL_COND_OBJ_GETDTABLESIZE], [
gl_PREREQ_GETDTABLESIZE
- fi
+ ])
gl_UNISTD_MODULE_INDICATOR([getdtablesize])
gl_gnulib_enabled_getdtablesize=true
fi
@@ -714,9 +705,8 @@ AC_DEFUN([gl_INIT],
{
if ! $gl_gnulib_enabled_getgroups; then
gl_FUNC_GETGROUPS
- if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
- AC_LIBOBJ([getgroups])
- fi
+ gl_CONDITIONAL([GL_COND_OBJ_GETGROUPS],
+ [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
@@ -736,10 +726,10 @@ AC_DEFUN([gl_INIT],
{
if ! $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
gl_FUNC_GROUP_MEMBER
- if test $HAVE_GROUP_MEMBER = 0; then
- AC_LIBOBJ([group-member])
+ gl_CONDITIONAL([GL_COND_OBJ_GROUP_MEMBER], [test $HAVE_GROUP_MEMBER = 0])
+ AM_COND_IF([GL_COND_OBJ_GROUP_MEMBER], [
gl_PREREQ_GROUP_MEMBER
- fi
+ ])
gl_UNISTD_MODULE_INDICATOR([group-member])
gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=true
if test $HAVE_GROUP_MEMBER = 0; then
@@ -754,10 +744,10 @@ AC_DEFUN([gl_INIT],
{
if ! $gl_gnulib_enabled_lchmod; then
gl_FUNC_LCHMOD
- if test $HAVE_LCHMOD = 0; then
- AC_LIBOBJ([lchmod])
+ gl_CONDITIONAL([GL_COND_OBJ_LCHMOD], [test $HAVE_LCHMOD = 0])
+ AM_COND_IF([GL_COND_OBJ_LCHMOD], [
gl_PREREQ_LCHMOD
- fi
+ ])
gl_SYS_STAT_MODULE_INDICATOR([lchmod])
gl_gnulib_enabled_lchmod=true
fi
@@ -806,10 +796,10 @@ AC_DEFUN([gl_INIT],
{
if ! $gl_gnulib_enabled_open; then
gl_FUNC_OPEN
- if test $REPLACE_OPEN = 1; then
- AC_LIBOBJ([open])
+ gl_CONDITIONAL([GL_COND_OBJ_OPEN], [test $REPLACE_OPEN = 1])
+ AM_COND_IF([GL_COND_OBJ_OPEN], [
gl_PREREQ_OPEN
- fi
+ ])
gl_FCNTL_MODULE_INDICATOR([open])
gl_gnulib_enabled_open=true
if test $REPLACE_OPEN = 1; then
@@ -827,10 +817,10 @@ AC_DEFUN([gl_INIT],
{
if ! $gl_gnulib_enabled_rawmemchr; then
gl_FUNC_RAWMEMCHR
- if test $HAVE_RAWMEMCHR = 0; then
- AC_LIBOBJ([rawmemchr])
+ gl_CONDITIONAL([GL_COND_OBJ_RAWMEMCHR], [test $HAVE_RAWMEMCHR = 0])
+ AM_COND_IF([GL_COND_OBJ_RAWMEMCHR], [
gl_PREREQ_RAWMEMCHR
- fi
+ ])
gl_STRING_MODULE_INDICATOR([rawmemchr])
gl_gnulib_enabled_rawmemchr=true
fi
@@ -889,10 +879,11 @@ AC_DEFUN([gl_INIT],
{
if ! $gl_gnulib_enabled_strtoll; then
gl_FUNC_STRTOLL
- if test $HAVE_STRTOLL = 0 || test $REPLACE_STRTOLL = 1; then
- AC_LIBOBJ([strtoll])
+ gl_CONDITIONAL([GL_COND_OBJ_STRTOLL],
+ [test $HAVE_STRTOLL = 0 || test $REPLACE_STRTOLL = 1])
+ AM_COND_IF([GL_COND_OBJ_STRTOLL], [
gl_PREREQ_STRTOLL
- fi
+ ])
gl_STDLIB_MODULE_INDICATOR([strtoll])
gl_gnulib_enabled_strtoll=true
fi
@@ -1035,16 +1026,28 @@ AC_DEFUN([gl_INIT],
AC_CONFIG_COMMANDS_PRE([
gl_libobjs=
gl_ltlibobjs=
+ gl_libobjdeps=
if test -n "$gl_LIBOBJS"; then
# Remove the extension.
+changequote(,)dnl
sed_drop_objext='s/\.o$//;s/\.obj$//'
+ sed_dirname1='s,//*,/,g'
+ sed_dirname2='s,\(.\)/$,\1,'
+ sed_dirname3='s,^[^/]*$,.,'
+ sed_dirname4='s,\(.\)/[^/]*$,\1,'
+ sed_basename1='s,.*/,,'
+changequote([, ])dnl
for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
gl_libobjs="$gl_libobjs $i.$ac_objext"
gl_ltlibobjs="$gl_ltlibobjs $i.lo"
+ i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
+ i_base=`echo "$i" | sed -e "$sed_basename1"`
+ gl_libobjdeps="$gl_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
done
fi
AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
+ AC_SUBST([gl_LIBOBJDEPS], [$gl_libobjdeps])
])
gltests_libdeps=
gltests_ltlibdeps=
@@ -1087,17 +1090,30 @@ changequote([, ])dnl
AC_CONFIG_COMMANDS_PRE([
gltests_libobjs=
gltests_ltlibobjs=
+ gltests_libobjdeps=
if test -n "$gltests_LIBOBJS"; then
# Remove the extension.
+changequote(,)dnl
sed_drop_objext='s/\.o$//;s/\.obj$//'
+ sed_dirname1='s,//*,/,g'
+ sed_dirname2='s,\(.\)/$,\1,'
+ sed_dirname3='s,^[^/]*$,.,'
+ sed_dirname4='s,\(.\)/[^/]*$,\1,'
+ sed_basename1='s,.*/,,'
+changequote([, ])dnl
for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
gltests_libobjs="$gltests_libobjs $i.$ac_objext"
gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
+ i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
+ i_base=`echo "$i" | sed -e "$sed_basename1"`
+ gltests_libobjdeps="$gltests_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
done
fi
AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
+ AC_SUBST([gltests_LIBOBJDEPS], [$gltests_libobjdeps])
])
+ AC_REQUIRE([gl_CC_GNULIB_WARNINGS])
LIBGNU_LIBDEPS="$gl_libdeps"
AC_SUBST([LIBGNU_LIBDEPS])
LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
@@ -1330,6 +1346,8 @@ AC_DEFUN([gl_FILE_LIST], [
lib/stddef.in.h
lib/stdint.in.h
lib/stdio-impl.h
+ lib/stdio-read.c
+ lib/stdio-write.c
lib/stdio.in.h
lib/stdlib.in.h
lib/stpcpy.c
diff --git a/m4/libgmp.m4 b/m4/libgmp.m4
index a2dee933829..d69dcc7237a 100644
--- a/m4/libgmp.m4
+++ b/m4/libgmp.m4
@@ -1,4 +1,4 @@
-# libgmp.m4 serial 6
+# libgmp.m4 serial 7
# Configure the GMP library or a replacement.
dnl Copyright 2020-2022 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
@@ -63,8 +63,8 @@ AC_DEFUN([gl_LIBGMP],
else
GL_GENERATE_GMP_H=true
fi
- AM_CONDITIONAL([GL_GENERATE_MINI_GMP_H],
+ gl_CONDITIONAL([GL_GENERATE_MINI_GMP_H],
[test $HAVE_LIBGMP != yes])
- AM_CONDITIONAL([GL_GENERATE_GMP_GMP_H],
+ gl_CONDITIONAL([GL_GENERATE_GMP_GMP_H],
[test $HAVE_LIBGMP = yes && test "$ac_cv_header_gmp_h" != yes])
])
diff --git a/m4/mktime.m4 b/m4/mktime.m4
index d48f40d187b..431b17dcb0d 100644
--- a/m4/mktime.m4
+++ b/m4/mktime.m4
@@ -1,4 +1,4 @@
-# serial 36
+# serial 37
dnl Copyright (C) 2002-2003, 2005-2007, 2009-2022 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
@@ -82,7 +82,8 @@ spring_forward_gap ()
instead of "TZ=America/Vancouver" in order to detect the bug even
on systems that don't support the Olson extension, or don't have the
full zoneinfo tables installed. */
- putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
+ if (putenv ("TZ=PST8PDT,M4.1.0,M10.5.0") != 0)
+ return -1;
tm.tm_year = 98;
tm.tm_mon = 3;
@@ -170,7 +171,8 @@ year_2050_test ()
instead of "TZ=America/Vancouver" in order to detect the bug even
on systems that don't support the Olson extension, or don't have the
full zoneinfo tables installed. */
- putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
+ if (putenv ("TZ=PST8PDT,M4.1.0,M10.5.0") != 0)
+ return -1;
t = mktime (&tm);
@@ -181,6 +183,25 @@ year_2050_test ()
|| (0 < t && answer - 120 <= t && t <= answer + 120));
}
+static int
+indiana_test ()
+{
+ if (putenv ("TZ=America/Indiana/Indianapolis") != 0)
+ return -1;
+ struct tm tm;
+ tm.tm_year = 1986 - 1900; tm.tm_mon = 4 - 1; tm.tm_mday = 28;
+ tm.tm_hour = 16; tm.tm_min = 24; tm.tm_sec = 50; tm.tm_isdst = 0;
+ time_t std = mktime (&tm);
+ if (! (std == 515107490 || std == 515107503))
+ return 1;
+
+ /* This platform supports TZDB, either without or with leap seconds.
+ Return true if GNU Bug#48085 is absent. */
+ tm.tm_isdst = 1;
+ time_t dst = mktime (&tm);
+ return std - dst == 60 * 60;
+}
+
int
main ()
{
@@ -236,7 +257,7 @@ main ()
result |= 16;
if (! spring_forward_gap ())
result |= 32;
- if (! year_2050_test ())
+ if (! year_2050_test () || ! indiana_test ())
result |= 64;
return result;
}]])],
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4
index cc80e77365f..42e96071f8b 100644
--- a/m4/stdio_h.m4
+++ b/m4/stdio_h.m4
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 57
+# stdio_h.m4 serial 59
dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -40,41 +40,32 @@ AC_DEFUN_ONCE([gl_STDIO_H],
attribute "__gnu_printf__" instead of "__printf__"])
fi
- dnl This ifdef is necessary to avoid an error "missing file lib/stdio-read.c"
- dnl "expected source file, required through AC_LIBSOURCES, not found". It is
- dnl also an optimization, to avoid performing a configure check whose result
- dnl is not used. But it does not make the test of GNULIB_STDIO_H_NONBLOCKING
- dnl or GNULIB_NONBLOCKING redundant.
+ dnl This ifdef is an optimization, to avoid performing a configure check whose
+ dnl result is not used. But it does not make the test of
+ dnl GNULIB_STDIO_H_NONBLOCKING or GNULIB_NONBLOCKING redundant.
m4_ifdef([gl_NONBLOCKING_IO], [
gl_NONBLOCKING_IO
if test $gl_cv_have_nonblocking != yes; then
REPLACE_STDIO_READ_FUNCS=1
- AC_LIBOBJ([stdio-read])
fi
])
- dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c"
- dnl "expected source file, required through AC_LIBSOURCES, not found". It is
- dnl also an optimization, to avoid performing a configure check whose result
- dnl is not used. But it does not make the test of GNULIB_STDIO_H_SIGPIPE or
- dnl GNULIB_SIGPIPE redundant.
+ dnl This ifdef is an optimization, to avoid performing a configure check whose
+ dnl result is not used. But it does not make the test of
+ dnl GNULIB_STDIO_H_SIGPIPE or GNULIB_SIGPIPE redundant.
m4_ifdef([gl_SIGNAL_SIGPIPE], [
gl_SIGNAL_SIGPIPE
if test $gl_cv_header_signal_h_SIGPIPE != yes; then
REPLACE_STDIO_WRITE_FUNCS=1
- AC_LIBOBJ([stdio-write])
fi
])
- dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c"
- dnl "expected source file, required through AC_LIBSOURCES, not found". It is
- dnl also an optimization, to avoid performing a configure check whose result
- dnl is not used. But it does not make the test of GNULIB_STDIO_H_NONBLOCKING
- dnl or GNULIB_NONBLOCKING redundant.
+ dnl This ifdef is an optimization, to avoid performing a configure check whose
+ dnl result is not used. But it does not make the test of
+ dnl GNULIB_STDIO_H_NONBLOCKING or GNULIB_NONBLOCKING redundant.
m4_ifdef([gl_NONBLOCKING_IO], [
gl_NONBLOCKING_IO
if test $gl_cv_have_nonblocking != yes; then
REPLACE_STDIO_WRITE_FUNCS=1
- AC_LIBOBJ([stdio-write])
fi
])
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
index f93f97a1bda..4c66ccc0a40 100644
--- a/m4/unistd_h.m4
+++ b/m4/unistd_h.m4
@@ -222,6 +222,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
REPLACE_ACCESS=0; AC_SUBST([REPLACE_ACCESS])
REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN])
REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE])
+ 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_EXECL=0; AC_SUBST([REPLACE_EXECL])