diff options
Diffstat (limited to 'gl/m4/stdio_h.m4')
-rw-r--r-- | gl/m4/stdio_h.m4 | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4 index 94271e1..8eb5816 100644 --- a/gl/m4/stdio_h.m4 +++ b/gl/m4/stdio_h.m4 | |||
@@ -1,12 +1,23 @@ | |||
1 | # stdio_h.m4 serial 59 | 1 | # stdio_h.m4 |
2 | dnl Copyright (C) 2007-2023 Free Software Foundation, Inc. | 2 | # serial 63 |
3 | dnl Copyright (C) 2007-2024 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
6 | 7 | ||
7 | AC_DEFUN_ONCE([gl_STDIO_H], | 8 | AC_DEFUN([gl_STDIO_H_EARLY], |
8 | [ | 9 | [ |
9 | AC_REQUIRE([gl_STDIO_H_DEFAULTS]) | 10 | dnl Defining __USE_MINGW_ANSI_STDIO to 1 must be done early, because |
11 | dnl the results of several configure tests depend on it: The tests | ||
12 | dnl - checking whether snprintf returns a byte count as in C99... | ||
13 | dnl - checking whether snprintf truncates the result as in C99... | ||
14 | dnl - checking whether printf supports the 'F' directive... | ||
15 | dnl - checking whether printf supports the grouping flag... | ||
16 | dnl - checking whether printf supports the zero flag correctly... | ||
17 | dnl - checking whether printf supports infinite 'double' arguments... | ||
18 | dnl - checking whether printf supports large precisions... | ||
19 | dnl report 'yes' if __USE_MINGW_ANSI_STDIO is 1 but 'no' if | ||
20 | dnl __USE_MINGW_ANSI_STDIO is not set. | ||
10 | AH_VERBATIM([MINGW_ANSI_STDIO], | 21 | AH_VERBATIM([MINGW_ANSI_STDIO], |
11 | [/* Use GNU style printf and scanf. */ | 22 | [/* Use GNU style printf and scanf. */ |
12 | #ifndef __USE_MINGW_ANSI_STDIO | 23 | #ifndef __USE_MINGW_ANSI_STDIO |
@@ -14,6 +25,11 @@ AC_DEFUN_ONCE([gl_STDIO_H], | |||
14 | #endif | 25 | #endif |
15 | ]) | 26 | ]) |
16 | AC_DEFINE([__USE_MINGW_ANSI_STDIO]) | 27 | AC_DEFINE([__USE_MINGW_ANSI_STDIO]) |
28 | ]) | ||
29 | |||
30 | AC_DEFUN_ONCE([gl_STDIO_H], | ||
31 | [ | ||
32 | AC_REQUIRE([gl_STDIO_H_DEFAULTS]) | ||
17 | gl_NEXT_HEADERS([stdio.h]) | 33 | gl_NEXT_HEADERS([stdio.h]) |
18 | 34 | ||
19 | dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and | 35 | dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and |
@@ -40,6 +56,9 @@ AC_DEFUN_ONCE([gl_STDIO_H], | |||
40 | attribute "__gnu_printf__" instead of "__printf__"]) | 56 | attribute "__gnu_printf__" instead of "__printf__"]) |
41 | fi | 57 | fi |
42 | 58 | ||
59 | dnl For defining _PRINTF_NAN_LEN_MAX. | ||
60 | gl_MUSL_LIBC | ||
61 | |||
43 | dnl This ifdef is an optimization, to avoid performing a configure check whose | 62 | dnl This ifdef is an optimization, to avoid performing a configure check whose |
44 | dnl result is not used. But it does not make the test of | 63 | dnl result is not used. But it does not make the test of |
45 | dnl GNULIB_STDIO_H_NONBLOCKING or GNULIB_NONBLOCKING redundant. | 64 | dnl GNULIB_STDIO_H_NONBLOCKING or GNULIB_NONBLOCKING redundant. |
@@ -82,6 +101,16 @@ AC_DEFUN_ONCE([gl_STDIO_H], | |||
82 | if test $ac_cv_have_decl_fcloseall = no; then | 101 | if test $ac_cv_have_decl_fcloseall = no; then |
83 | HAVE_DECL_FCLOSEALL=0 | 102 | HAVE_DECL_FCLOSEALL=0 |
84 | fi | 103 | fi |
104 | |||
105 | AC_CHECK_DECLS_ONCE([getw]) | ||
106 | if test $ac_cv_have_decl_getw = no; then | ||
107 | HAVE_DECL_GETW=0 | ||
108 | fi | ||
109 | |||
110 | AC_CHECK_DECLS_ONCE([putw]) | ||
111 | if test $ac_cv_have_decl_putw = no; then | ||
112 | HAVE_DECL_PUTW=0 | ||
113 | fi | ||
85 | ]) | 114 | ]) |
86 | 115 | ||
87 | # gl_STDIO_MODULE_INDICATOR([modulename]) | 116 | # gl_STDIO_MODULE_INDICATOR([modulename]) |
@@ -178,7 +207,9 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS], | |||
178 | HAVE_DECL_FTELLO=1; AC_SUBST([HAVE_DECL_FTELLO]) | 207 | HAVE_DECL_FTELLO=1; AC_SUBST([HAVE_DECL_FTELLO]) |
179 | HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM]) | 208 | HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM]) |
180 | HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE]) | 209 | HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE]) |
210 | HAVE_DECL_GETW=1; AC_SUBST([HAVE_DECL_GETW]) | ||
181 | HAVE_DECL_OBSTACK_PRINTF=1; AC_SUBST([HAVE_DECL_OBSTACK_PRINTF]) | 211 | HAVE_DECL_OBSTACK_PRINTF=1; AC_SUBST([HAVE_DECL_OBSTACK_PRINTF]) |
212 | HAVE_DECL_PUTW=1; AC_SUBST([HAVE_DECL_PUTW]) | ||
182 | HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF]) | 213 | HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF]) |
183 | HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF]) | 214 | HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF]) |
184 | HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF]) | 215 | HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF]) |