[uClibc-cvs] uClibc/libc/misc/locale locale.c,1.16,1.17
Manuel Novoa III
mjn3 at uclibc.org
Mon Sep 1 18:32:26 UTC 2003
Update of /var/cvs/uClibc/libc/misc/locale
In directory winder:/tmp/cvs-serv13000
Modified Files:
locale.c
Log Message:
Hack around bg_BG bug; grouping specified but no thousands separator.
Also, disable the locale link_warnings for now, as they generate a
lot of noise when using libstd++.
Index: locale.c
===================================================================
RCS file: /var/cvs/uClibc/libc/misc/locale/locale.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- locale.c 28 Aug 2003 17:16:52 -0000 1.16
+++ locale.c 1 Sep 2003 18:32:22 -0000 1.17
@@ -32,6 +32,11 @@
* Bug in duplocale... collation data wasn't copied.
* Bug in newlocale... translate 1<<LC_ALL to LC_ALL_MASK.
* Bug in _wchar_utf8sntowcs... fix cut-n-paste error.
+ *
+ * Aug 31, 2003
+ * Hack around bg_BG bug; grouping specified but no thousands separator.
+ * Also, disable the locale link_warnings for now, as they generate a
+ * lot of noise when using libstd++.
*/
@@ -56,6 +61,14 @@
#include <ctype.h>
#include <stdio.h>
+#ifdef __UCLIBC_MJN3_ONLY__
+#ifdef L_setlocale
+#warning TODO: Make the link_warning()s a config option?
+#endif
+#endif
+#undef link_warning
+#define link_warning(A,B)
+
#undef __LOCALE_C_ONLY
#ifndef __UCLIBC_HAS_LOCALE__
#define __LOCALE_C_ONLY
@@ -778,8 +791,19 @@
base->thousands_sep_len
= __locale_mbrtowc_l(&base->thousands_sep_wc,
base->thousands_sep, base);
+#if 1
+#ifdef __UCLIBC_MJN3_ONLY__
+#warning TODO: Remove hack involving grouping without a thousep char (bg_BG).
+#endif
+ assert(base->thousands_sep_len >= 0);
+ if (base->thousands_sep_len == 0) {
+ base->grouping = base->thousands_sep; /* empty string */
+ }
+ assert(base->thousands_sep[base->thousands_sep_len] == 0);
+#else
assert(base->thousands_sep_len > 0);
assert(base->thousands_sep[base->thousands_sep_len] == 0);
+#endif
}
/* } else if (i == LC_COLLATE) { */
More information about the uClibc-cvs
mailing list