summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2022-01-03 16:17:18 +0100
committerBruno Haible <bruno@clisp.org>2022-01-03 16:17:18 +0100
commita690f1be8debcbe5d5265915233d533a7f9dcbaf (patch)
treed95f02000227834221e0a0eeec51039e1adb62e8 /m4
parent918e06951df709672d744e7600cc808b065a8e9e (diff)
downloadgnulib-a690f1be8debcbe5d5265915233d533a7f9dcbaf.tar.gz
fopen-gnu: Allow use as dependency from test modules.
* m4/fopen.m4 (gl_FUNC_FOPEN_GNU): Set REPLACE_FOPEN_FOR_FOPEN_GNU instead of REPLACE_FOPEN. * m4/stdio_h.m4 (gl_STDIO_H_REQUIRE_DEFAULTS): Initialize the fopen-gnu module indicator. (gl_STDIO_H_DEFAULTS): Initialize REPLACE_FOPEN_FOR_FOPEN_GNU. * modules/stdio (Makefile.am): Substitute GNULIB_FOPEN_GNU, REPLACE_FOPEN_FOR_FOPEN_GNU. * modules/fopen-gnu (Depends-on): Add more dependencies. (configure.ac): Test REPLACE_FOPEN_FOR_FOPEN_GNU instead of REPLACE_FOPEN. * lib/stdio.in.h (fopen): Test REPLACE_FOPEN, REPLACE_FOPEN_FOR_FOPEN_GNU, and the respective module indicators instead of just REPLACE_FOPEN.
Diffstat (limited to 'm4')
-rw-r--r--m4/fopen.m47
-rw-r--r--m4/stdio_h.m44
2 files changed, 7 insertions, 4 deletions
diff --git a/m4/fopen.m4 b/m4/fopen.m4
index a177197433..50767f8288 100644
--- a/m4/fopen.m4
+++ b/m4/fopen.m4
@@ -1,4 +1,4 @@
-# fopen.m4 serial 12
+# fopen.m4 serial 13
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,
@@ -136,11 +136,12 @@ int main ()
])
rm -f conftest.x
])
+ REPLACE_FOPEN_FOR_FOPEN_GNU="$REPLACE_FOPEN"
case "$gl_cv_func_fopen_mode_x" in
- *no) REPLACE_FOPEN=1 ;;
+ *no) REPLACE_FOPEN_FOR_FOPEN_GNU=1 ;;
esac
case "$gl_cv_func_fopen_mode_e" in
- *no) REPLACE_FOPEN=1 ;;
+ *no) REPLACE_FOPEN_FOR_FOPEN_GNU=1 ;;
esac
])
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4
index 3180d43f4a..cc80e77365 100644
--- a/m4/stdio_h.m4
+++ b/m4/stdio_h.m4
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 56
+# stdio_h.m4 serial 57
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,
@@ -119,6 +119,7 @@ AC_DEFUN([gl_STDIO_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FGETC])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FGETS])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FOPEN])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FOPEN_GNU])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPRINTF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPRINTF_POSIX])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPURGE])
@@ -202,6 +203,7 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
REPLACE_FDOPEN=0; AC_SUBST([REPLACE_FDOPEN])
REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH])
REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN])
+ REPLACE_FOPEN_FOR_FOPEN_GNU=0; AC_SUBST([REPLACE_FOPEN_FOR_FOPEN_GNU])
REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF])
REPLACE_FPURGE=0; AC_SUBST([REPLACE_FPURGE])
REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN])