summaryrefslogtreecommitdiffstats
path: root/gl/m4/btowc.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/btowc.m4')
-rw-r--r--gl/m4/btowc.m413
1 files changed, 11 insertions, 2 deletions
diff --git a/gl/m4/btowc.m4 b/gl/m4/btowc.m4
index d9dd7036..59d52be6 100644
--- a/gl/m4/btowc.m4
+++ b/gl/m4/btowc.m4
@@ -1,13 +1,15 @@
1# btowc.m4 1# btowc.m4
2# serial 14 2# serial 15
3dnl Copyright (C) 2008-2024 Free Software Foundation, Inc. 3dnl Copyright (C) 2008-2025 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
7dnl This file is offered as-is, without any warranty.
7 8
8AC_DEFUN([gl_FUNC_BTOWC], 9AC_DEFUN([gl_FUNC_BTOWC],
9[ 10[
10 AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) 11 AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
12 AC_REQUIRE([gt_TYPE_WINT_T])
11 13
12 dnl Check whether <wchar.h> is usable at all, first. Otherwise the test 14 dnl Check whether <wchar.h> is usable at all, first. Otherwise the test
13 dnl program below may lead to an endless loop. See 15 dnl program below may lead to an endless loop. See
@@ -133,6 +135,13 @@ int main ()
133 ]) 135 ])
134 ]) 136 ])
135 137
138 if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
139 dnl On mingw/ucrt, we override the return type of btowc().
140 dnl While the original wint_t (= unsigned short) and the overridden wint_t
141 dnl (= unsigned int) are equivalent in function parameters, this is not
142 dnl the case for function return types.
143 REPLACE_BTOWC=1
144 fi
136 case "$gl_cv_func_btowc_nul" in 145 case "$gl_cv_func_btowc_nul" in
137 *yes) ;; 146 *yes) ;;
138 *) REPLACE_BTOWC=1 ;; 147 *) REPLACE_BTOWC=1 ;;