changeset 2770:afedfb0793df

Include <wchar.h> 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.
author Jim Meyering <jim@meyering.net>
date Mon, 24 Jul 2000 06:14:19 +0000
parents 9207b6865a8c
children 669ce16c1793
files lib/quotearg.c
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lib/quotearg.c	Sun Jul 23 21:48:28 2000 +0000
+++ b/lib/quotearg.c	Mon Jul 24 06:14:19 2000 +0000
@@ -59,11 +59,12 @@
 # include <string.h>
 #endif
 
-#if HAVE_MBRTOWC && 1 < MB_LEN_MAX
+#if HAVE_WCHAR_H
+# include <wchar.h>
+#endif
+
+#if HAVE_MBRTOWC
 size_t mbrtowc ();
-# if HAVE_WCHAR_H
-#  include <wchar.h>
-# endif
 # ifdef mbstate_t
 #  define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
 #  define mbsinit(ps) 1