]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Don't inspect MB_LEN_MAX. Paul Eggert says it's
authorJim Meyering <jim@meyering.net>
Wed, 4 Apr 2001 14:50:47 +0000 (14:50 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 4 Apr 2001 14:50:47 +0000 (14:50 +0000)
not always defined correctly.

src/ls.c

index f35aede6880615fa6f0a987a8d1022f6fe3b3e0d..c69012635703e5cb7fa8977005fdec10375938bd 100644 (file)
--- a/src/ls.c
+++ b/src/ls.c
 #include <pwd.h>
 #include <getopt.h>
 
-/* Get MB_LEN_MAX.  */
-#if HAVE_LIMITS_H
-# include <limits.h>
-#endif
-
 /* Get MB_CUR_MAX.  */
 #if HAVE_STDLIB_H
 # include <stdlib.h>
@@ -2644,7 +2639,7 @@ quote_name (FILE *out, const char *name, struct quoting_options const *options)
 
   if (qmark_funny_chars)
     {
-#if HAVE_MBRTOWC && (MB_LEN_MAX > 1)
+#if HAVE_MBRTOWC
       if (MB_CUR_MAX > 1)
        {
          const char *p = buf;
@@ -2765,7 +2760,7 @@ quote_name (FILE *out, const char *name, struct quoting_options const *options)
   else
     {
       /* Assume unprintable characters have a displayed_width of 1.  */
-#if HAVE_MBRTOWC && (MB_LEN_MAX > 1)
+#if HAVE_MBRTOWC
       if (MB_CUR_MAX > 1)
        displayed_width = mbsnwidth (buf, len,
                                     (MBSW_ACCEPT_INVALID