>From 952b15d9daae382f03ab10725d01e8a4b2a55dfc Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 4 Jan 2020 15:54:02 +0100 Subject: [PATCH 2/4] mbrtowc, mbrtoc32: Tighten dependendies. * modules/mbrtowc (Depends-on): Disable hard-locale, mbsinit if REPLACE_MBSTATE_T is 1. (configure.ac): Don't compile lc-charset-dispatch.c and mbtowc-lock.c if REPLACE_MBSTATE_T is 0. * modules/mbrtoc32 (Depends-on): Remove hard-locale, mbsinit. Disable mbrtowc dependency if REPLACE_MBSTATE_T is 1. (configure.ac): Don't compile lc-charset-dispatch.c and mbtowc-lock.c if REPLACE_MBSTATE_T is 0. --- ChangeLog | 12 ++++++++++++ modules/mbrtoc32 | 12 ++++++------ modules/mbrtowc | 12 +++++++----- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index f35de0f..91bcb3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,17 @@ 2020-01-04 Bruno Haible + mbrtowc, mbrtoc32: Tighten dependendies. + * modules/mbrtowc (Depends-on): Disable hard-locale, mbsinit if + REPLACE_MBSTATE_T is 1. + (configure.ac): Don't compile lc-charset-dispatch.c and mbtowc-lock.c if + REPLACE_MBSTATE_T is 0. + * modules/mbrtoc32 (Depends-on): Remove hard-locale, mbsinit. Disable + mbrtowc dependency if REPLACE_MBSTATE_T is 1. + (configure.ac): Don't compile lc-charset-dispatch.c and mbtowc-lock.c if + REPLACE_MBSTATE_T is 0. + +2020-01-04 Bruno Haible + uchar: Decide about _GL_LARGE_CHAR32_T at configure time. * m4/uchar.m4 (gl_UCHAR_H): Set SMALL_WCHAR_T. * modules/uchar (Files): Add stdint.m4. diff --git a/modules/mbrtoc32 b/modules/mbrtoc32 index 011b7a9..2575394 100644 --- a/modules/mbrtoc32 +++ b/modules/mbrtoc32 @@ -18,9 +18,7 @@ m4/visibility.m4 Depends-on: uchar -hard-locale [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1] -mbrtowc [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1] -mbsinit [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1] +mbrtowc [{ test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1; } && test $REPLACE_MBSTATE_T = 0] localcharset [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1] streq [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1] verify [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1] @@ -29,10 +27,12 @@ configure.ac: gl_FUNC_MBRTOC32 if test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1; then AC_LIBOBJ([mbrtoc32]) - AC_LIBOBJ([lc-charset-dispatch]) - AC_LIBOBJ([mbtowc-lock]) + if test $REPLACE_MBSTATE_T = 1; then + AC_LIBOBJ([lc-charset-dispatch]) + AC_LIBOBJ([mbtowc-lock]) + gl_PREREQ_MBTOWC_LOCK + fi gl_PREREQ_MBRTOC32 - gl_PREREQ_MBTOWC_LOCK fi gl_UCHAR_MODULE_INDICATOR([mbrtoc32]) diff --git a/modules/mbrtowc b/modules/mbrtowc index ee2e649..294050f 100644 --- a/modules/mbrtowc +++ b/modules/mbrtowc @@ -23,8 +23,8 @@ Depends-on: wchar extensions stdint [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1] -hard-locale [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1] -mbsinit [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1] +hard-locale [{ test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; } && test $REPLACE_MBSTATE_T = 0] +mbsinit [{ test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; } && test $REPLACE_MBSTATE_T = 0] localcharset [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1] streq [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1] verify [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1] @@ -33,10 +33,12 @@ configure.ac: gl_FUNC_MBRTOWC if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then AC_LIBOBJ([mbrtowc]) - AC_LIBOBJ([lc-charset-dispatch]) - AC_LIBOBJ([mbtowc-lock]) + if test $REPLACE_MBSTATE_T = 1; then + AC_LIBOBJ([lc-charset-dispatch]) + AC_LIBOBJ([mbtowc-lock]) + gl_PREREQ_MBTOWC_LOCK + fi gl_PREREQ_MBRTOWC - gl_PREREQ_MBTOWC_LOCK fi gl_WCHAR_MODULE_INDICATOR([mbrtowc]) -- 2.7.4