diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2026-03-26 12:53:53 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-26 12:53:53 +0100 |
| commit | 13e14a6bfd9f29cbfeab0c5161d2a994f97532e7 (patch) | |
| tree | 3aa7186fe092e42783dc7e981dc39a74ea61c466 /gl/m4/btowc.m4 | |
| parent | 9d8503f90ef25b2cecd324dc118e441f40233ea8 (diff) | |
| download | monitoring-plugins-13e14a6bfd9f29cbfeab0c5161d2a994f97532e7.tar.gz | |
* Sync with the 202601-stable Gnulib code (4a3650d887)
* Ignore more deps stuff in gnulib
* Remove autogenerated gnulib files
* Ignore more gnulib generated headers
Diffstat (limited to 'gl/m4/btowc.m4')
| -rw-r--r-- | gl/m4/btowc.m4 | 47 |
1 files changed, 3 insertions, 44 deletions
diff --git a/gl/m4/btowc.m4 b/gl/m4/btowc.m4 index 59d52be6..93c9d769 100644 --- a/gl/m4/btowc.m4 +++ b/gl/m4/btowc.m4 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # btowc.m4 | 1 | # btowc.m4 |
| 2 | # serial 15 | 2 | # serial 16 |
| 3 | dnl Copyright (C) 2008-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2008-2026 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. |
| @@ -13,7 +13,7 @@ AC_DEFUN([gl_FUNC_BTOWC], | |||
| 13 | 13 | ||
| 14 | 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 |
| 15 | dnl program below may lead to an endless loop. See | 15 | dnl program below may lead to an endless loop. See |
| 16 | dnl <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>. | 16 | dnl <https://gcc.gnu.org/PR42440>. |
| 17 | AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) | 17 | AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) |
| 18 | 18 | ||
| 19 | AC_CHECK_FUNCS_ONCE([btowc]) | 19 | AC_CHECK_FUNCS_ONCE([btowc]) |
| @@ -54,43 +54,6 @@ changequote([,])dnl | |||
| 54 | ]) | 54 | ]) |
| 55 | ]) | 55 | ]) |
| 56 | 56 | ||
| 57 | dnl IRIX 6.5 btowc(EOF) is 0xFF, not WEOF. | ||
| 58 | AC_CACHE_CHECK([whether btowc(EOF) is correct], | ||
| 59 | [gl_cv_func_btowc_eof], | ||
| 60 | [ | ||
| 61 | dnl Initial guess, used when cross-compiling or when no suitable locale | ||
| 62 | dnl is present. | ||
| 63 | changequote(,)dnl | ||
| 64 | case "$host_os" in | ||
| 65 | # Guess no on IRIX. | ||
| 66 | irix*) gl_cv_func_btowc_eof="guessing no" ;; | ||
| 67 | # Guess yes on native Windows. | ||
| 68 | mingw* | windows*) gl_cv_func_btowc_eof="guessing yes" ;; | ||
| 69 | # Guess yes otherwise. | ||
| 70 | *) gl_cv_func_btowc_eof="guessing yes" ;; | ||
| 71 | esac | ||
| 72 | changequote([,])dnl | ||
| 73 | if test $LOCALE_FR != none; then | ||
| 74 | AC_RUN_IFELSE( | ||
| 75 | [AC_LANG_SOURCE([[ | ||
| 76 | #include <locale.h> | ||
| 77 | #include <stdio.h> | ||
| 78 | #include <wchar.h> | ||
| 79 | int main () | ||
| 80 | { | ||
| 81 | if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) | ||
| 82 | { | ||
| 83 | if (btowc (EOF) != WEOF) | ||
| 84 | return 1; | ||
| 85 | } | ||
| 86 | return 0; | ||
| 87 | }]])], | ||
| 88 | [gl_cv_func_btowc_eof=yes], | ||
| 89 | [gl_cv_func_btowc_eof=no], | ||
| 90 | [:]) | ||
| 91 | fi | ||
| 92 | ]) | ||
| 93 | |||
| 94 | dnl On mingw, in the C locale, btowc is inconsistent with mbrtowc: | 57 | dnl On mingw, in the C locale, btowc is inconsistent with mbrtowc: |
| 95 | dnl mbrtowc avoids calling MultiByteToWideChar when MB_CUR_MAX is 1 and | 58 | dnl mbrtowc avoids calling MultiByteToWideChar when MB_CUR_MAX is 1 and |
| 96 | dnl ___lc_codepage_func() is 0, but btowc is lacking this special case. | 59 | dnl ___lc_codepage_func() is 0, but btowc is lacking this special case. |
| @@ -146,10 +109,6 @@ int main () | |||
| 146 | *yes) ;; | 109 | *yes) ;; |
| 147 | *) REPLACE_BTOWC=1 ;; | 110 | *) REPLACE_BTOWC=1 ;; |
| 148 | esac | 111 | esac |
| 149 | case "$gl_cv_func_btowc_eof" in | ||
| 150 | *yes) ;; | ||
| 151 | *) REPLACE_BTOWC=1 ;; | ||
| 152 | esac | ||
| 153 | case "$gl_cv_func_btowc_consistent" in | 112 | case "$gl_cv_func_btowc_consistent" in |
| 154 | *yes) ;; | 113 | *yes) ;; |
| 155 | *) REPLACE_BTOWC=1 ;; | 114 | *) REPLACE_BTOWC=1 ;; |
