While testing GNU sed's bootstrap mode (where it handcrafts a minimal
config.h to work around system without a sed, or whose sed is not powerful enough to run configure), I found a bug in quotearg.c.

If HAVE_WCHAR_H and HAVE_MBRTOWC are not set, various functions are
#defined to work only on single-byte locales, but a mbstate_t variable
is defined around line 420.  Fixed with the attached trivial patch.

Paolo

2006-10-02  Paolo Bonzini  <[EMAIL PROTECTED]>  (tiny change)

        * lib/quotearg.c [!HAVE_MBRTOWC]: Define mbstate_t to int.

--- ../gnulib/lib/quotearg.c    2006-09-27 13:39:12.000000000 +0200
+++ ../lib/quotearg.c   2006-10-02 14:15:16.000000000 +0200
@@ -51,5 +51,7 @@
    syntax.  */
 # undef MB_CUR_MAX
+# undef mbstate_t
 # define MB_CUR_MAX 1
+# define mbstate_t int 
 # define mbrtowc(pwc, s, n, ps) ((*(pwc) = *(s)) != 0)
 # define iswprint(wc) isprint ((unsigned char) (wc))

Reply via email to