mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
Update gnulib to a3a946f670718d0dee5a7425ad5ac0a29fb46ea1
This fixes https://lists.gnu.org/archive/html/guile-devel/2021-04/msg00009.html
This commit is contained in:
parent
88e7030845
commit
bdb07f8fc7
54 changed files with 1075 additions and 302 deletions
|
@ -1,4 +1,4 @@
|
|||
# canonicalize.m4 serial 36
|
||||
# canonicalize.m4 serial 37
|
||||
|
||||
dnl Copyright (C) 2003-2007, 2009-2021 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -78,15 +78,20 @@ AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE],
|
|||
# so is the latter.
|
||||
AC_DEFUN([gl_FUNC_REALPATH_WORKS],
|
||||
[
|
||||
AC_CHECK_FUNCS_ONCE([realpath])
|
||||
AC_CHECK_FUNCS_ONCE([realpath lstat])
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
|
||||
AC_CACHE_CHECK([whether realpath works], [gl_cv_func_realpath_works], [
|
||||
rm -rf conftest.a conftest.d
|
||||
touch conftest.a
|
||||
# Assume that if we have lstat, we can also check symlinks.
|
||||
if test $ac_cv_func_lstat = yes; then
|
||||
ln -s conftest.a conftest.l
|
||||
fi
|
||||
mkdir conftest.d
|
||||
AC_RUN_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
]GL_NOCRASH[
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
]], [[
|
||||
|
@ -98,17 +103,27 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS],
|
|||
result |= 1;
|
||||
free (name);
|
||||
}
|
||||
/* This test fails on older versions of Cygwin. */
|
||||
{
|
||||
char *name = realpath ("conftest.b/../conftest.a", NULL);
|
||||
if (name != NULL)
|
||||
result |= 2;
|
||||
free (name);
|
||||
}
|
||||
/* This test fails on Cygwin 2.9. */
|
||||
#if HAVE_LSTAT
|
||||
{
|
||||
char *name = realpath ("conftest.l/../conftest.a", NULL);
|
||||
if (name != NULL || errno != ENOTDIR)
|
||||
result |= 4;
|
||||
free (name);
|
||||
}
|
||||
#endif
|
||||
/* This test fails on Mac OS X 10.13, OpenBSD 6.0. */
|
||||
{
|
||||
char *name = realpath ("conftest.a/", NULL);
|
||||
if (name != NULL)
|
||||
result |= 4;
|
||||
result |= 8;
|
||||
free (name);
|
||||
}
|
||||
/* This test fails on AIX 7, Solaris 10. */
|
||||
|
@ -116,7 +131,7 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS],
|
|||
char *name1 = realpath (".", NULL);
|
||||
char *name2 = realpath ("conftest.d//./..", NULL);
|
||||
if (! name1 || ! name2 || strcmp (name1, name2))
|
||||
result |= 8;
|
||||
result |= 16;
|
||||
free (name1);
|
||||
free (name2);
|
||||
}
|
||||
|
@ -127,7 +142,7 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS],
|
|||
{
|
||||
char *name = realpath ("//", NULL);
|
||||
if (! name || strcmp (name, "/"))
|
||||
result |= 16;
|
||||
result |= 32;
|
||||
free (name);
|
||||
}
|
||||
#endif
|
||||
|
@ -136,7 +151,7 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS],
|
|||
],
|
||||
[gl_cv_func_realpath_works=yes],
|
||||
[case $? in
|
||||
16) gl_cv_func_realpath_works=nearly ;;
|
||||
32) gl_cv_func_realpath_works=nearly ;;
|
||||
*) gl_cv_func_realpath_works=no ;;
|
||||
esac
|
||||
],
|
||||
|
@ -145,13 +160,15 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS],
|
|||
*-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
|
||||
# Guess 'nearly' on musl systems.
|
||||
*-musl*) gl_cv_func_realpath_works="guessing nearly" ;;
|
||||
# Guess no on Cygwin.
|
||||
cygwin*) gl_cv_func_realpath_works="guessing no" ;;
|
||||
# Guess no on native Windows.
|
||||
mingw*) gl_cv_func_realpath_works="guessing no" ;;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
|
||||
esac
|
||||
])
|
||||
rm -rf conftest.a conftest.d
|
||||
rm -rf conftest.a conftest.l conftest.d
|
||||
])
|
||||
case "$gl_cv_func_realpath_works" in
|
||||
*yes)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# free.m4 serial 5
|
||||
# free.m4 serial 6
|
||||
# Copyright (C) 2003-2005, 2009-2021 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -40,7 +40,10 @@ AC_DEFUN([gl_FUNC_FREE],
|
|||
])
|
||||
|
||||
case $gl_cv_func_free_preserves_errno in
|
||||
*yes) ;;
|
||||
*yes)
|
||||
AC_DEFINE([HAVE_FREE_POSIX], [1],
|
||||
[Define if the 'free' function is guaranteed to preserve errno.])
|
||||
;;
|
||||
*) REPLACE_FREE=1 ;;
|
||||
esac
|
||||
])
|
||||
|
|
|
@ -67,7 +67,9 @@ AC_DEFUN([gl_COMMON_BODY], [
|
|||
#endif])
|
||||
AH_VERBATIM([attribute],
|
||||
[/* Attributes. */
|
||||
#ifdef __has_attribute
|
||||
#if (defined __has_attribute \
|
||||
&& (!defined __clang_minor__ \
|
||||
|| 3 < __clang_major__ + (5 <= __clang_minor__)))
|
||||
# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
|
||||
#else
|
||||
# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr
|
||||
|
|
|
@ -191,6 +191,7 @@ AC_DEFUN([gl_EARLY],
|
|||
# Code from module rawmemchr:
|
||||
# Code from module read:
|
||||
# Code from module readlink:
|
||||
# Code from module realloc-posix:
|
||||
# Code from module recv:
|
||||
# Code from module recvfrom:
|
||||
# Code from module regex:
|
||||
|
@ -365,6 +366,12 @@ AC_DEFUN([gl_INIT],
|
|||
AC_LIBOBJ([floor])
|
||||
fi
|
||||
gl_MATH_MODULE_INDICATOR([floor])
|
||||
gl_FUNC_FREE
|
||||
if test $REPLACE_FREE = 1; then
|
||||
AC_LIBOBJ([free])
|
||||
gl_PREREQ_FREE
|
||||
fi
|
||||
gl_STDLIB_MODULE_INDICATOR([free-posix])
|
||||
AC_REQUIRE([gl_FUNC_FREXP])
|
||||
if test $gl_func_frexp != yes; then
|
||||
AC_LIBOBJ([frexp])
|
||||
|
@ -540,6 +547,7 @@ AC_DEFUN([gl_INIT],
|
|||
AC_LIBOBJ([malloc])
|
||||
fi
|
||||
gl_STDLIB_MODULE_INDICATOR([malloc-posix])
|
||||
gl_MODULE_INDICATOR([malloc-posix])
|
||||
gl_MALLOCA
|
||||
gl_MATH_H
|
||||
gl_MINMAX
|
||||
|
@ -758,7 +766,6 @@ AC_DEFUN([gl_INIT],
|
|||
gl_gnulib_enabled_925677f0343de64b89a9f0c790b4104c=false
|
||||
gl_gnulib_enabled_fcntl=false
|
||||
gl_gnulib_enabled_43fe87a341d9b4b93c47c3ad819a5239=false
|
||||
gl_gnulib_enabled_ef07dc4b3077c11ea9cef586db4e5955=false
|
||||
gl_gnulib_enabled_getdtablesize=false
|
||||
gl_gnulib_enabled_getrandom=false
|
||||
gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
|
||||
|
@ -781,6 +788,7 @@ AC_DEFUN([gl_INIT],
|
|||
gl_gnulib_enabled_pathmax=false
|
||||
gl_gnulib_enabled_raise=false
|
||||
gl_gnulib_enabled_rawmemchr=false
|
||||
gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4=false
|
||||
gl_gnulib_enabled_round=false
|
||||
gl_gnulib_enabled_9bc5f216d57e231e4834049d67d0db62=false
|
||||
gl_gnulib_enabled_scratch_buffer=false
|
||||
|
@ -905,18 +913,6 @@ AC_SUBST([LTALLOCA])
|
|||
gl_gnulib_enabled_43fe87a341d9b4b93c47c3ad819a5239=true
|
||||
fi
|
||||
}
|
||||
func_gl_gnulib_m4code_ef07dc4b3077c11ea9cef586db4e5955 ()
|
||||
{
|
||||
if ! $gl_gnulib_enabled_ef07dc4b3077c11ea9cef586db4e5955; then
|
||||
gl_FUNC_FREE
|
||||
if test $REPLACE_FREE = 1; then
|
||||
AC_LIBOBJ([free])
|
||||
gl_PREREQ_FREE
|
||||
fi
|
||||
gl_STDLIB_MODULE_INDICATOR([free-posix])
|
||||
gl_gnulib_enabled_ef07dc4b3077c11ea9cef586db4e5955=true
|
||||
fi
|
||||
}
|
||||
func_gl_gnulib_m4code_getdtablesize ()
|
||||
{
|
||||
if ! $gl_gnulib_enabled_getdtablesize; then
|
||||
|
@ -1177,6 +1173,18 @@ AC_SUBST([LTALLOCA])
|
|||
gl_gnulib_enabled_rawmemchr=true
|
||||
fi
|
||||
}
|
||||
func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4 ()
|
||||
{
|
||||
if ! $gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4; then
|
||||
gl_FUNC_REALLOC_POSIX
|
||||
if test $REPLACE_REALLOC = 1; then
|
||||
AC_LIBOBJ([realloc])
|
||||
fi
|
||||
gl_STDLIB_MODULE_INDICATOR([realloc-posix])
|
||||
gl_MODULE_INDICATOR([realloc-posix])
|
||||
gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4=true
|
||||
fi
|
||||
}
|
||||
func_gl_gnulib_m4code_round ()
|
||||
{
|
||||
if ! $gl_gnulib_enabled_round; then
|
||||
|
@ -1199,6 +1207,7 @@ AC_SUBST([LTALLOCA])
|
|||
if ! $gl_gnulib_enabled_scratch_buffer; then
|
||||
gl_gnulib_enabled_scratch_buffer=true
|
||||
func_gl_gnulib_m4code_21ee726a3540c09237a8e70c0baf7467
|
||||
func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4
|
||||
fi
|
||||
}
|
||||
func_gl_gnulib_m4code_servent ()
|
||||
|
@ -1421,9 +1430,6 @@ AC_SUBST([LTALLOCA])
|
|||
if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
|
||||
func_gl_gnulib_m4code_925677f0343de64b89a9f0c790b4104c
|
||||
fi
|
||||
if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
|
||||
func_gl_gnulib_m4code_ef07dc4b3077c11ea9cef586db4e5955
|
||||
fi
|
||||
if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
|
||||
func_gl_gnulib_m4code_idx
|
||||
fi
|
||||
|
@ -1610,7 +1616,6 @@ AC_SUBST([LTALLOCA])
|
|||
AM_CONDITIONAL([gl_GNULIB_ENABLED_925677f0343de64b89a9f0c790b4104c], [$gl_gnulib_enabled_925677f0343de64b89a9f0c790b4104c])
|
||||
AM_CONDITIONAL([gl_GNULIB_ENABLED_fcntl], [$gl_gnulib_enabled_fcntl])
|
||||
AM_CONDITIONAL([gl_GNULIB_ENABLED_43fe87a341d9b4b93c47c3ad819a5239], [$gl_gnulib_enabled_43fe87a341d9b4b93c47c3ad819a5239])
|
||||
AM_CONDITIONAL([gl_GNULIB_ENABLED_ef07dc4b3077c11ea9cef586db4e5955], [$gl_gnulib_enabled_ef07dc4b3077c11ea9cef586db4e5955])
|
||||
AM_CONDITIONAL([gl_GNULIB_ENABLED_getdtablesize], [$gl_gnulib_enabled_getdtablesize])
|
||||
AM_CONDITIONAL([gl_GNULIB_ENABLED_getrandom], [$gl_gnulib_enabled_getrandom])
|
||||
AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [$gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36])
|
||||
|
@ -1633,6 +1638,7 @@ AC_SUBST([LTALLOCA])
|
|||
AM_CONDITIONAL([gl_GNULIB_ENABLED_pathmax], [$gl_gnulib_enabled_pathmax])
|
||||
AM_CONDITIONAL([gl_GNULIB_ENABLED_raise], [$gl_gnulib_enabled_raise])
|
||||
AM_CONDITIONAL([gl_GNULIB_ENABLED_rawmemchr], [$gl_gnulib_enabled_rawmemchr])
|
||||
AM_CONDITIONAL([gl_GNULIB_ENABLED_61bcaca76b3e6f9ae55d57a1c3193bc4], [$gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4])
|
||||
AM_CONDITIONAL([gl_GNULIB_ENABLED_round], [$gl_gnulib_enabled_round])
|
||||
AM_CONDITIONAL([gl_GNULIB_ENABLED_9bc5f216d57e231e4834049d67d0db62], [$gl_gnulib_enabled_9bc5f216d57e231e4834049d67d0db62])
|
||||
AM_CONDITIONAL([gl_GNULIB_ENABLED_scratch_buffer], [$gl_gnulib_enabled_scratch_buffer])
|
||||
|
@ -1976,6 +1982,7 @@ AC_DEFUN([gl_FILE_LIST], [
|
|||
lib/rawmemchr.valgrind
|
||||
lib/read.c
|
||||
lib/readlink.c
|
||||
lib/realloc.c
|
||||
lib/recv.c
|
||||
lib/recvfrom.c
|
||||
lib/regcomp.c
|
||||
|
@ -2194,6 +2201,7 @@ AC_DEFUN([gl_FILE_LIST], [
|
|||
m4/rawmemchr.m4
|
||||
m4/read.m4
|
||||
m4/readlink.m4
|
||||
m4/realloc.m4
|
||||
m4/regex.m4
|
||||
m4/rename.m4
|
||||
m4/rmdir.m4
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# host-cpu-c-abi.m4 serial 13
|
||||
# host-cpu-c-abi.m4 serial 14
|
||||
dnl Copyright (C) 2002-2021 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -211,7 +211,7 @@ changequote([,])dnl
|
|||
# be generating 64-bit code.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if defined __powerpc64__ || defined _ARCH_PPC64
|
||||
[[#if defined __powerpc64__ || defined __LP64__
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
|
@ -605,7 +605,7 @@ changequote([,])dnl
|
|||
# be generating 64-bit code.
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if defined __powerpc64__ || defined _ARCH_PPC64
|
||||
[[#if defined __powerpc64__ || defined __LP64__
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# lib-ld.m4 serial 9
|
||||
# lib-ld.m4 serial 10
|
||||
dnl Copyright (C) 1996-2003, 2009-2021 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -122,7 +122,7 @@ else
|
|||
*-*-aix*)
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE(
|
||||
[[#if defined __powerpc64__ || defined _ARCH_PPC64
|
||||
[[#if defined __powerpc64__ || defined __LP64__
|
||||
int ok;
|
||||
#else
|
||||
error fail
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# malloc.m4 serial 21
|
||||
# malloc.m4 serial 22
|
||||
dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -24,7 +24,7 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF],
|
|||
[ac_cv_func_malloc_0_nonnull=no],
|
||||
[case "$host_os" in
|
||||
# Guess yes on platforms where we know the result.
|
||||
*-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \
|
||||
*-gnu* | gnu* | *-musl* | freebsd* | midnightbsd* | netbsd* | openbsd* \
|
||||
| hpux* | solaris* | cygwin* | mingw*)
|
||||
ac_cv_func_malloc_0_nonnull="guessing yes" ;;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
|
|
10
m4/printf.m4
10
m4/printf.m4
|
@ -1,4 +1,4 @@
|
|||
# printf.m4 serial 71
|
||||
# printf.m4 serial 72
|
||||
dnl Copyright (C) 2003, 2007-2021 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -67,6 +67,7 @@ changequote(,)dnl
|
|||
# Guess yes on FreeBSD >= 5.
|
||||
freebsd[1-4].*) gl_cv_func_printf_sizes_c99="guessing no";;
|
||||
freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
|
||||
midnightbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
|
||||
# Guess yes on Mac OS X >= 10.3.
|
||||
darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
|
||||
darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
|
||||
|
@ -247,6 +248,7 @@ changequote(,)dnl
|
|||
# Guess yes on FreeBSD >= 6.
|
||||
freebsd[1-5].*) gl_cv_func_printf_infinite="guessing no";;
|
||||
freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
|
||||
midnightbsd*) gl_cv_func_printf_infinite="guessing yes";;
|
||||
# Guess yes on Mac OS X >= 10.3.
|
||||
darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
|
||||
darwin*) gl_cv_func_printf_infinite="guessing yes";;
|
||||
|
@ -469,6 +471,7 @@ changequote(,)dnl
|
|||
# Guess yes on FreeBSD >= 6.
|
||||
freebsd[1-5].*) gl_cv_func_printf_infinite_long_double="guessing no";;
|
||||
freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
|
||||
midnightbsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
|
||||
# Guess yes on HP-UX >= 11.
|
||||
hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
|
||||
hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";;
|
||||
|
@ -644,6 +647,7 @@ changequote(,)dnl
|
|||
# Guess yes on FreeBSD >= 6.
|
||||
freebsd[1-5].*) gl_cv_func_printf_directive_f="guessing no";;
|
||||
freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
|
||||
midnightbsd*) gl_cv_func_printf_directive_f="guessing yes";;
|
||||
# Guess yes on Mac OS X >= 10.3.
|
||||
darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
|
||||
darwin*) gl_cv_func_printf_directive_f="guessing yes";;
|
||||
|
@ -1239,6 +1243,7 @@ changequote(,)dnl
|
|||
# Guess yes on FreeBSD >= 5.
|
||||
freebsd[1-4].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
|
||||
freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
|
||||
midnightbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
|
||||
# Guess yes on Mac OS X >= 10.3.
|
||||
darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
|
||||
darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
|
||||
|
@ -1343,6 +1348,7 @@ changequote(,)dnl
|
|||
# Guess yes on FreeBSD >= 5.
|
||||
freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";;
|
||||
freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
|
||||
midnightbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
|
||||
# Guess yes on Mac OS X >= 10.3.
|
||||
darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
|
||||
darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
|
||||
|
@ -1445,6 +1451,7 @@ changequote(,)dnl
|
|||
# Guess yes on FreeBSD >= 5.
|
||||
freebsd[1-4].*) gl_cv_func_snprintf_directive_n="guessing no";;
|
||||
freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
|
||||
midnightbsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
|
||||
# Guess yes on Mac OS X >= 10.3.
|
||||
darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";;
|
||||
darwin*) gl_cv_func_snprintf_directive_n="guessing yes";;
|
||||
|
@ -1601,6 +1608,7 @@ changequote(,)dnl
|
|||
# Guess yes on FreeBSD >= 5.
|
||||
freebsd[1-4].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
|
||||
freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
|
||||
midnightbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
|
||||
# Guess yes on Mac OS X >= 10.3.
|
||||
darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
|
||||
darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
|
||||
|
|
76
m4/realloc.m4
Normal file
76
m4/realloc.m4
Normal file
|
@ -0,0 +1,76 @@
|
|||
# realloc.m4 serial 20
|
||||
dnl Copyright (C) 2007, 2009-2021 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.
|
||||
|
||||
# This is adapted with modifications from upstream Autoconf here:
|
||||
# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
|
||||
AC_DEFUN([_AC_FUNC_REALLOC_IF],
|
||||
[
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
|
||||
AC_CACHE_CHECK([for GNU libc compatible realloc],
|
||||
[ac_cv_func_realloc_0_nonnull],
|
||||
[AC_RUN_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <stdlib.h>
|
||||
]],
|
||||
[[char *p = realloc (0, 0);
|
||||
int result = !p;
|
||||
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* | gnu* | *-musl* | freebsd* | midnightbsd* | netbsd* | openbsd* \
|
||||
| hpux* | solaris* | cygwin* | mingw*)
|
||||
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
|
||||
])
|
||||
])
|
||||
case "$ac_cv_func_realloc_0_nonnull" in
|
||||
*yes)
|
||||
$1
|
||||
;;
|
||||
*)
|
||||
$2
|
||||
;;
|
||||
esac
|
||||
])# AC_FUNC_REALLOC
|
||||
|
||||
# gl_FUNC_REALLOC_GNU
|
||||
# -------------------
|
||||
# Test whether 'realloc (0, 0)' is handled like in GNU libc, and replace
|
||||
# realloc if it is not.
|
||||
AC_DEFUN([gl_FUNC_REALLOC_GNU],
|
||||
[
|
||||
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
|
||||
dnl _AC_FUNC_REALLOC_IF is defined in Autoconf.
|
||||
_AC_FUNC_REALLOC_IF(
|
||||
[AC_DEFINE([HAVE_REALLOC_GNU], [1],
|
||||
[Define to 1 if your system has a GNU libc compatible 'realloc'
|
||||
function, and to 0 otherwise.])],
|
||||
[AC_DEFINE([HAVE_REALLOC_GNU], [0])
|
||||
REPLACE_REALLOC=1
|
||||
])
|
||||
])# gl_FUNC_REALLOC_GNU
|
||||
|
||||
# gl_FUNC_REALLOC_POSIX
|
||||
# ---------------------
|
||||
# Test whether 'realloc' is POSIX compliant (sets errno to ENOMEM when it
|
||||
# fails), and replace realloc if it is not.
|
||||
AC_DEFUN([gl_FUNC_REALLOC_POSIX],
|
||||
[
|
||||
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
|
||||
AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
|
||||
if test $gl_cv_func_malloc_posix = yes; then
|
||||
AC_DEFINE([HAVE_REALLOC_POSIX], [1],
|
||||
[Define if the 'realloc' function is POSIX compliant.])
|
||||
else
|
||||
REPLACE_REALLOC=1
|
||||
fi
|
||||
])
|
|
@ -1,4 +1,4 @@
|
|||
# setlocale_null.m4 serial 4
|
||||
# setlocale_null.m4 serial 5
|
||||
dnl Copyright (C) 2019-2021 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,7 +14,7 @@ AC_DEFUN([gl_FUNC_SETLOCALE_NULL],
|
|||
[gl_cv_func_setlocale_null_all_mtsafe],
|
||||
[case "$host_os" in
|
||||
# Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
|
||||
*-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
|
||||
*-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
|
||||
gl_cv_func_setlocale_null_all_mtsafe=no ;;
|
||||
# Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
|
||||
*-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
|
||||
|
@ -48,7 +48,7 @@ AC_DEFUN([gl_FUNC_SETLOCALE_NULL],
|
|||
openbsd* | aix*)
|
||||
gl_cv_func_setlocale_null_one_mtsafe=no ;;
|
||||
# Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
|
||||
*-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
|
||||
*-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
|
||||
gl_cv_func_setlocale_null_one_mtsafe=yes ;;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*)
|
||||
|
|
|
@ -13,7 +13,8 @@ AC_DEFUN([gl_STDALIGN_H],
|
|||
[gl_cv_header_working_stdalign_h],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <stdalign.h>
|
||||
[[#include <stdint.h>
|
||||
#include <stdalign.h>
|
||||
#include <stddef.h>
|
||||
|
||||
/* Test that alignof yields a result consistent with offsetof.
|
||||
|
@ -32,6 +33,7 @@ AC_DEFUN([gl_STDALIGN_H],
|
|||
/* Test _Alignas only on platforms where gnulib can help. */
|
||||
#if \
|
||||
((defined __cplusplus && 201103 <= __cplusplus) \
|
||||
|| (__TINYC__ && defined __attribute__) \
|
||||
|| (defined __APPLE__ && defined __MACH__ \
|
||||
? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
|
||||
: __GNUC__) \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# stdlib_h.m4 serial 55
|
||||
# stdlib_h.m4 serial 59
|
||||
dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -28,7 +28,7 @@ AC_DEFUN([gl_STDLIB_H],
|
|||
posix_memalign posix_openpt ptsname ptsname_r qsort_r
|
||||
random random_r reallocarray realpath rpmatch secure_getenv setenv
|
||||
setstate setstate_r srandom srandom_r
|
||||
strtod strtold strtoll strtoull unlockpt unsetenv])
|
||||
strtod strtol strtold strtoll strtoul strtoull unlockpt unsetenv])
|
||||
|
||||
AC_REQUIRE([AC_C_RESTRICT])
|
||||
|
||||
|
@ -88,8 +88,10 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
|
|||
GNULIB_SECURE_GETENV=0; AC_SUBST([GNULIB_SECURE_GETENV])
|
||||
GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV])
|
||||
GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD])
|
||||
GNULIB_STRTOL=0; AC_SUBST([GNULIB_STRTOL])
|
||||
GNULIB_STRTOLD=0; AC_SUBST([GNULIB_STRTOLD])
|
||||
GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL])
|
||||
GNULIB_STRTOUL=0; AC_SUBST([GNULIB_STRTOUL])
|
||||
GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL])
|
||||
GNULIB_SYSTEM_POSIX=0; AC_SUBST([GNULIB_SYSTEM_POSIX])
|
||||
GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT])
|
||||
|
@ -137,8 +139,10 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
|
|||
HAVE_SETSTATE=1; AC_SUBST([HAVE_SETSTATE])
|
||||
HAVE_DECL_SETSTATE=1; AC_SUBST([HAVE_DECL_SETSTATE])
|
||||
HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD])
|
||||
HAVE_STRTOL=1; AC_SUBST([HAVE_STRTOL])
|
||||
HAVE_STRTOLD=1; AC_SUBST([HAVE_STRTOLD])
|
||||
HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL])
|
||||
HAVE_STRTOUL=1; AC_SUBST([HAVE_STRTOUL])
|
||||
HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL])
|
||||
HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA])
|
||||
HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H])
|
||||
|
@ -164,7 +168,11 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
|
|||
REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV])
|
||||
REPLACE_SETSTATE=0; AC_SUBST([REPLACE_SETSTATE])
|
||||
REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD])
|
||||
REPLACE_STRTOL=0; AC_SUBST([REPLACE_STRTOL])
|
||||
REPLACE_STRTOLD=0; AC_SUBST([REPLACE_STRTOLD])
|
||||
REPLACE_STRTOLL=0; AC_SUBST([REPLACE_STRTOLL])
|
||||
REPLACE_STRTOUL=0; AC_SUBST([REPLACE_STRTOUL])
|
||||
REPLACE_STRTOULL=0; AC_SUBST([REPLACE_STRTOULL])
|
||||
REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV])
|
||||
REPLACE_WCTOMB=0; AC_SUBST([REPLACE_WCTOMB])
|
||||
])
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# threadlib.m4 serial 29
|
||||
# threadlib.m4 serial 30
|
||||
dnl Copyright (C) 2005-2021 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -126,7 +126,7 @@ int main ()
|
|||
case "$gl_cv_have_weak" in
|
||||
*yes)
|
||||
case "$host_os" in
|
||||
freebsd* | dragonfly*)
|
||||
freebsd* | dragonfly* | midnightbsd*)
|
||||
: > conftest1.c
|
||||
$CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&AS_MESSAGE_LOG_FD 2>&1
|
||||
cat <<EOF > conftest2.c
|
||||
|
@ -488,7 +488,7 @@ AC_DEFUN([gl_THREADLIB_BODY],
|
|||
LIBTHREAD= LTLIBTHREAD=
|
||||
else
|
||||
case "$host_os" in
|
||||
freebsd* | dragonfly*)
|
||||
freebsd* | dragonfly* | midnightbsd*)
|
||||
if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
|
||||
dnl If weak symbols can't tell whether pthread_create(), pthread_key_create()
|
||||
dnl etc. will succeed, we need a runtime test.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# visibility.m4 serial 6
|
||||
# visibility.m4 serial 7
|
||||
dnl Copyright (C) 2005, 2008, 2010-2021 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -58,6 +58,7 @@ AC_DEFUN([gl_VISIBILITY],
|
|||
extern __attribute__((__visibility__("default"))) int exportedvar;
|
||||
extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
|
||||
extern __attribute__((__visibility__("default"))) int exportedfunc (void);
|
||||
void dummyfunc (void);
|
||||
void dummyfunc (void) {}
|
||||
]],
|
||||
[[]])],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue