(MB_LEN_MAX): Make sure it's at least 6, to avoid buggy C libraries.
authorJim Meyering <jim@meyering.net>
Thu, 9 Nov 2000 08:32:52 +0000 (08:32 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 9 Nov 2000 08:32:52 +0000 (08:32 +0000)
lib/unicodeio.c

index b70c5b4..c753e3d 100644 (file)
@@ -42,8 +42,12 @@ extern int errno;
 #if HAVE_LIMITS_H
 # include <limits.h>
 #endif
-#ifndef MB_LEN_MAX
-# define MB_LEN_MAX 1
+
+/* MB_LEN_MAX is incorrectly defined to be 1 in at least one GCC
+   installation; work around this configuration error.  */
+#if MB_LEN_MAX < 6
+# undef MB_LEN_MAX
+# define MB_LEN_MAX 6
 #endif
 
 #if HAVE_ICONV