summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/locale/lmonetary.c4
-rw-r--r--lib/libc/locale/lnumeric.c4
-rw-r--r--lib/libc/locale/localeconv.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/libc/locale/lmonetary.c b/lib/libc/locale/lmonetary.c
index 3db39fa..715790e 100644
--- a/lib/libc/locale/lmonetary.c
+++ b/lib/libc/locale/lmonetary.c
@@ -26,8 +26,6 @@
* $FreeBSD$
*/
-#include <limits.h>
-#include <sys/cdefs.h>
#include "lmonetary.h"
#include "ldpart.h"
@@ -36,7 +34,7 @@ extern int __mlocale_changed;
#define LCMONETARY_SIZE (sizeof(struct lc_monetary_T) / sizeof(char *))
static char empty[] = "";
-static char numempty[] = __XSTRING(CHAR_MAX);
+static char numempty[] = "-1";
static const struct lc_monetary_T _C_monetary_locale = {
empty , /* int_curr_symbol */
diff --git a/lib/libc/locale/lnumeric.c b/lib/libc/locale/lnumeric.c
index 60949b0..0de5a32 100644
--- a/lib/libc/locale/lnumeric.c
+++ b/lib/libc/locale/lnumeric.c
@@ -26,8 +26,6 @@
* $FreeBSD$
*/
-#include <limits.h>
-#include <sys/cdefs.h>
#include "lnumeric.h"
#include "ldpart.h"
@@ -35,7 +33,7 @@ extern int __nlocale_changed;
#define LCNUMERIC_SIZE (sizeof(struct lc_numeric_T) / sizeof(char *))
-static char numempty[] = __XSTRING(CHAR_MAX);
+static char numempty[] = "-1";
static const struct lc_numeric_T _C_numeric_locale = {
".", /* decimal_point */
diff --git a/lib/libc/locale/localeconv.c b/lib/libc/locale/localeconv.c
index 6e62388..24ff28f 100644
--- a/lib/libc/locale/localeconv.c
+++ b/lib/libc/locale/localeconv.c
@@ -34,6 +34,7 @@ static char rcsid[] = "$FreeBSD$";
#include <locale.h>
#include <stdlib.h>
+#include <limits.h>
#include "lmonetary.h"
#include "lnumeric.h"
@@ -51,7 +52,10 @@ int __nlocale_changed = 1;
static char
cnv(char *str) {
- return (char)strtol(str, NULL, 0);
+ int i = strtol(str, NULL, 10);
+ if (i == -1)
+ i = CHAR_MAX;
+ return (char)i;
}
/*
OpenPOWER on IntegriCloud