diff options
Diffstat (limited to 'gl/m4/btowc.m4')
| -rw-r--r-- | gl/m4/btowc.m4 | 13 |
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 |
| 3 | dnl Copyright (C) 2008-2024 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2008-2025 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | 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. |
| 7 | dnl This file is offered as-is, without any warranty. | ||
| 7 | 8 | ||
| 8 | AC_DEFUN([gl_FUNC_BTOWC], | 9 | AC_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 ;; |
