diff options
author | Bruno Haible <bruno@clisp.org> | 2018-06-24 16:19:31 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2018-06-24 16:19:31 +0200 |
commit | 7903cdbf6022f3f28a94d484926672e865311905 (patch) | |
tree | eeb583547973a92c3daa3562466d7ce0c23024ae /modules/wcwidth | |
parent | 58ee14c1ec71f63018db2e8f2d0e3d9cde4f3019 (diff) | |
download | gnulib-7903cdbf6022f3f28a94d484926672e865311905.tar.gz |
mbrtowc, wcwidth: Fix MT-safety bug (regression from 2018-06-23).
* lib/mbrtowc.c (enc_t): New enum type.
(locale_enc, locale_enc_cached): New functions.
(mbrtowc): Eliminate static variables. Use locale_enc_cached instead.
* lib/wcwidth.c (is_locale_utf8, is_locale_utf8_cached): New functions.
(wcwidth): Eliminate static variables. Use is_locale_utf8_cached
instead.
* m4/mbrtowc.m4 (gl_PREREQ_MBRTOWC): Require AC_C_INLINE.
* m4/wcwidth.m4 (gl_PREREQ_WCWIDTH): New macro.
* modules/wcwidth (configure.ac): Invoke it.
Diffstat (limited to 'modules/wcwidth')
-rw-r--r-- | modules/wcwidth | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/wcwidth b/modules/wcwidth index 5a27713dcc..372c21041a 100644 --- a/modules/wcwidth +++ b/modules/wcwidth @@ -19,6 +19,7 @@ configure.ac: gl_FUNC_WCWIDTH if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then AC_LIBOBJ([wcwidth]) + gl_PREREQ_WCWIDTH fi gl_WCHAR_MODULE_INDICATOR([wcwidth]) |