]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Assume <locale.h> exists.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 2 Dec 2004 06:52:10 +0000 (06:52 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 2 Dec 2004 06:52:10 +0000 (06:52 +0000)
(human_readable): Assume localeconv exists.

lib/human.c

index 4960876dd470abd338787ce8f496cb4433adf653..295e6de3c1343d872c5a60533613372d9be95ff4 100644 (file)
 # define UINTMAX_MAX ((uintmax_t) -1)
 #endif
 
-#if HAVE_LOCALE_H && HAVE_LOCALECONV
-# include <locale.h>
-#endif
-
+#include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -193,7 +190,6 @@ human_readable (uintmax_t n, char *buf, int opts,
   size_t decimal_pointlen = 1;
   char const *grouping = "";
   char const *thousands_sep = "";
-#if HAVE_LOCALE_H && HAVE_LOCALECONV
   struct lconv const *l = localeconv ();
   size_t pointlen = strlen (l->decimal_point);
   if (0 < pointlen && pointlen <= MB_LEN_MAX)
@@ -204,7 +200,6 @@ human_readable (uintmax_t n, char *buf, int opts,
   grouping = l->grouping;
   if (strlen (l->thousands_sep) <= MB_LEN_MAX)
     thousands_sep = l->thousands_sep;
-#endif
 
   psuffix = buf + LONGEST_HUMAN_READABLE - HUMAN_READABLE_SUFFIX_LENGTH_MAX;
   p = psuffix;