2025-09-10 Bruno Haible <bruno@clisp.org>
+ btowc: Remove support for IRIX.
+ * m4/btowc.m4 (gl_FUNC_BTOWC): Remove test of btowc (EOF).
+
assert-h: Remove support for IRIX.
* m4/assert_h.m4 (gl_ASSERT_H): Remove workaround for IRIX.
# btowc.m4
-# serial 15
+# serial 16
dnl Copyright (C) 2008-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
])
])
- dnl IRIX 6.5 btowc(EOF) is 0xFF, not WEOF.
- AC_CACHE_CHECK([whether btowc(EOF) is correct],
- [gl_cv_func_btowc_eof],
- [
- dnl Initial guess, used when cross-compiling or when no suitable locale
- dnl is present.
-changequote(,)dnl
- case "$host_os" in
- # Guess no on IRIX.
- irix*) gl_cv_func_btowc_eof="guessing no" ;;
- # Guess yes on native Windows.
- mingw* | windows*) gl_cv_func_btowc_eof="guessing yes" ;;
- # Guess yes otherwise.
- *) gl_cv_func_btowc_eof="guessing yes" ;;
- esac
-changequote([,])dnl
- if test $LOCALE_FR != none; then
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include <locale.h>
-#include <stdio.h>
-#include <wchar.h>
-int main ()
-{
- if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
- {
- if (btowc (EOF) != WEOF)
- return 1;
- }
- return 0;
-}]])],
- [gl_cv_func_btowc_eof=yes],
- [gl_cv_func_btowc_eof=no],
- [:])
- fi
- ])
-
dnl On mingw, in the C locale, btowc is inconsistent with mbrtowc:
dnl mbrtowc avoids calling MultiByteToWideChar when MB_CUR_MAX is 1 and
dnl ___lc_codepage_func() is 0, but btowc is lacking this special case.
*yes) ;;
*) REPLACE_BTOWC=1 ;;
esac
- case "$gl_cv_func_btowc_eof" in
- *yes) ;;
- *) REPLACE_BTOWC=1 ;;
- esac
case "$gl_cv_func_btowc_consistent" in
*yes) ;;
*) REPLACE_BTOWC=1 ;;