From: Jim Meyering Date: Mon, 24 Jul 2000 06:14:19 +0000 (+0000) Subject: Include even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX), X-Git-Tag: cvs-readonly~6403 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=8ed25ee69927e755445a4d9b8dcc5d03044c709a;p=gnulib.git Include even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX), so that mbstate_t is always defined. Do not inspect MB_LEN_MAX, since it's incorrectly defined to be 1 in at least one GCC installation, and this configuration error is likely to be common. Ignoring MB_LEN_MAX hurts performance on hosts that have mbrtowc but have only unibyte locales, but I assume these hosts are rare. --- diff --git a/lib/quotearg.c b/lib/quotearg.c index 47152bca4..9ed8a5fb1 100644 --- a/lib/quotearg.c +++ b/lib/quotearg.c @@ -59,11 +59,12 @@ # include #endif -#if HAVE_MBRTOWC && 1 < MB_LEN_MAX +#if HAVE_WCHAR_H +# include +#endif + +#if HAVE_MBRTOWC size_t mbrtowc (); -# if HAVE_WCHAR_H -# include -# endif # ifdef mbstate_t # define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) # define mbsinit(ps) 1