# HG changeset patch # User Jim Meyering # Date 973758772 0 # Node ID cfb7d72826f8dc86d7d3780a0299df405774e1a0 # Parent a90a381a26a8d1310e11c5ba8858678b5339ecc4 (MB_LEN_MAX): Make sure it's at least 6, to avoid buggy C libraries. diff --git a/lib/unicodeio.c b/lib/unicodeio.c --- a/lib/unicodeio.c +++ b/lib/unicodeio.c @@ -42,8 +42,12 @@ #if HAVE_LIMITS_H # include #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