]> Savannah Git Hosting - gnulib.git/commitdiff
mbrtowc, mbrtoc32: Tighten dependendies.
authorBruno Haible <bruno@clisp.org>
Sat, 4 Jan 2020 14:54:02 +0000 (15:54 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 4 Jan 2020 14:55:13 +0000 (15:55 +0100)
* 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
modules/mbrtoc32
modules/mbrtowc

index f35de0f6a282263fffc2eb9a2ab71350d2725fee..91bcb3eedc94b37d850f37bc05a55995ac2b2dd4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2020-01-04  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        uchar: Decide about _GL_LARGE_CHAR32_T at configure time.
index 011b7a91c39e672eaf571188115fe17355f7377e..2575394ce24de40fa275ab954b01fc8f08d9bdb7 100644 (file)
@@ -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])
 
index ee2e6497671767d64450bd9a5503f20a8d1c0086..294050f94bec4b0b7f191bc6ce6a5e69c33331e6 100644 (file)
@@ -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])