diff options
author | Jim Meyering <jim@meyering.net> | 2000-11-09 08:32:52 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-11-09 08:32:52 +0000 |
commit | 48a83af35c232967c813e9a1c5f7e1af983b6117 (patch) | |
tree | 7382754c14d195f5a033734e3b99332ef8ebca9b /lib/unicodeio.c | |
parent | bb73f9b20edb182cacffb8f926703efbfb9034ea (diff) | |
download | coreutils-48a83af35c232967c813e9a1c5f7e1af983b6117.tar.xz |
(MB_LEN_MAX): Make sure it's at least 6, to avoid buggy C libraries.
Diffstat (limited to 'lib/unicodeio.c')
-rw-r--r-- | lib/unicodeio.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/unicodeio.c b/lib/unicodeio.c index b70c5b476..c753e3d50 100644 --- a/lib/unicodeio.c +++ b/lib/unicodeio.c @@ -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 |