+2011-05-04 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/locale/lmessages.h (__messages_load_locale): Declare. Remove
+ accidental declaration of __numeric_load_locale.
+ * libc/locale/locale.c: Include timelocal.h to get declaration of
+ __time_load_locale.
+ (__set_locale_from_locale_alias): Fix return type.
+ (__locale_msgcharset): Avoid compiler warnings.
+ (_localeconv_r): Ditto.
+
2011-05-04 Andy Koppe <andy.koppe@gmail.com>
* libc/locale/locale.c (current_categories): On Cygwin, set LC_CTYPE
#include "lmonetary.h"
#include "lnumeric.h"
#include "lctype.h"
+#include "timelocal.h"
#include "../stdlib/local.h"
#define _LC_LAST 7
#ifdef _MB_CAPABLE
#ifdef __CYGWIN__
extern void __set_charset_from_locale (const char *locale, char *charset);
-extern int __set_locale_from_locale_alias (const char *, char *);
+extern char *__set_locale_from_locale_alias (const char *, char *);
extern int __collate_load_locale (const char *, void *, const char *);
#endif /* __CYGWIN__ */
_DEFUN_VOID(__locale_msgcharset)
{
#ifdef __HAVE_LOCALE_INFO__
- return __get_current_messages_locale ()->codeset;
+ return (char *) __get_current_messages_locale ()->codeset;
#else
return lc_message_charset;
#endif
if (__nlocale_changed)
{
struct lc_numeric_T *n = __get_current_numeric_locale ();
- lconv.decimal_point = n->decimal_point;
- lconv.thousands_sep = n->thousands_sep;
- lconv.grouping = n->grouping;
+ lconv.decimal_point = (char *) n->decimal_point;
+ lconv.thousands_sep = (char *) n->thousands_sep;
+ lconv.grouping = (char *) n->grouping;
__nlocale_changed = 0;
}
if (__mlocale_changed)
{
struct lc_monetary_T *m = __get_current_monetary_locale ();
- lconv.int_curr_symbol = m->int_curr_symbol;
- lconv.currency_symbol = m->currency_symbol;
- lconv.mon_decimal_point = m->mon_decimal_point;
- lconv.mon_thousands_sep = m->mon_thousands_sep;
- lconv.mon_grouping = m->mon_grouping;
- lconv.positive_sign = m->positive_sign;
- lconv.negative_sign = m->negative_sign;
+ lconv.int_curr_symbol = (char *) m->int_curr_symbol;
+ lconv.currency_symbol = (char *) m->currency_symbol;
+ lconv.mon_decimal_point = (char *) m->mon_decimal_point;
+ lconv.mon_thousands_sep = (char *) m->mon_thousands_sep;
+ lconv.mon_grouping = (char *) m->mon_grouping;
+ lconv.positive_sign = (char *) m->positive_sign;
+ lconv.negative_sign = (char *) m->negative_sign;
lconv.int_frac_digits = m->int_frac_digits[0];
lconv.frac_digits = m->frac_digits[0];
lconv.p_cs_precedes = m->p_cs_precedes[0];