diff options
author | Daniel Llorens <lloda@sarc.name> | 2021-08-16 13:23:27 +0200 |
---|---|---|
committer | Daniel Llorens <lloda@sarc.name> | 2021-08-16 13:23:27 +0200 |
commit | b4a80f4239b19fea4d2cc3e9d197f24b809f0624 (patch) | |
tree | b4dc728ec96391e302df4f7c733bf592a3976ff2 /m4/sys_random_h.m4 | |
parent | 5df5555d12f1408a66a5368a918abb981edf5445 (diff) | |
download | guile-b4a80f4239b19fea4d2cc3e9d197f24b809f0624.tar.gz |
Update gnulib to 8f4538a53d64054ae2fc8b86c0f87c418c6176e6
Includes gnulib:0c907f7da13232908f05c415b8cec56024071906 to fix #49930
https://lists.gnu.org/archive/html/bug-guile/2021-08/msg00003.html.
Diffstat (limited to 'm4/sys_random_h.m4')
-rw-r--r-- | m4/sys_random_h.m4 | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/m4/sys_random_h.m4 b/m4/sys_random_h.m4 index 45e0469ba..37bc31606 100644 --- a/m4/sys_random_h.m4 +++ b/m4/sys_random_h.m4 @@ -1,10 +1,10 @@ -# sys_random_h.m4 serial 5 +# sys_random_h.m4 serial 8 dnl Copyright (C) 2020-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. -AC_DEFUN([gl_HEADER_SYS_RANDOM], +AC_DEFUN_ONCE([gl_SYS_RANDOM_H], [ AC_REQUIRE([gl_SYS_RANDOM_H_DEFAULTS]) dnl <sys/random.h> is always overridden, because of GNULIB_POSIXCHECK. @@ -35,18 +35,33 @@ AC_DEFUN([gl_HEADER_SYS_RANDOM], [getrandom]) ]) +# gl_SYS_RANDOM_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given module +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_SYS_RANDOM_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_SYS_RANDOM_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_SYS_RANDOM_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_SYS_RANDOM_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_RANDOM_H_MODULE_INDICATOR_DEFAULTS], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETRANDOM]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_RANDOM_H_MODULE_INDICATOR_DEFAULTS]) + AC_REQUIRE([gl_SYS_RANDOM_H_DEFAULTS]) +]) + AC_DEFUN([gl_SYS_RANDOM_H_DEFAULTS], [ - GNULIB_GETRANDOM=0; AC_SUBST([GNULIB_GETRANDOM]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_GETRANDOM=1; AC_SUBST([HAVE_GETRANDOM]) REPLACE_GETRANDOM=0; AC_SUBST([REPLACE_GETRANDOM]) |