mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2026-10-24 00:48:56 +03:00
wctob: Make consistent with wcrtomb.
* m4/wctob.m4 (gl_FUNC_WCTOB): Require gl_MBRTOWC_C_LOCALE and, if needed, set REPLACE_WCTOB. * modules/wctob (Files): Add mbrtowc.m4.
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
2026-09-20 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
wctob: Make consistent with wcrtomb.
|
||||
* m4/wctob.m4 (gl_FUNC_WCTOB): Require gl_MBRTOWC_C_LOCALE and, if
|
||||
needed, set REPLACE_WCTOB.
|
||||
* modules/wctob (Files): Add mbrtowc.m4.
|
||||
|
||||
wctob: Make thread-safe if possible.
|
||||
* m4/wctob.m4 (gl_PREREQ_WCTOB): Test for wcrtomb.
|
||||
* lib/wctob.c (wctob): Use wcrtomb instead of wctomb if possible.
|
||||
|
||||
10
m4/wctob.m4
10
m4/wctob.m4
@@ -1,5 +1,5 @@
|
||||
# wctob.m4
|
||||
# serial 16
|
||||
# serial 17
|
||||
dnl Copyright (C) 2008-2026 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
@@ -91,6 +91,14 @@ int main ()
|
||||
*yes) ;;
|
||||
*) REPLACE_WCTOB=1 ;;
|
||||
esac
|
||||
dnl When we adjust mbrtowc in the C locale, we need to adjust wctob as well,
|
||||
dnl for consistency.
|
||||
AC_REQUIRE([gl_MBRTOWC_C_LOCALE])
|
||||
case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
|
||||
*yes) ;;
|
||||
*) REPLACE_WCTOB=1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ wctob() function: convert wide character to unibyte character.
|
||||
Files:
|
||||
lib/wctob.c
|
||||
m4/wctob.m4
|
||||
m4/mbrtowc.m4
|
||||
m4/locale-en.m4
|
||||
m4/locale-fr.m4
|
||||
m4/codeset.m4
|
||||
|
||||
Reference in New Issue
Block a user