* 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.
This commit is contained in:
parent
6e16da9dec
commit
f737a4edba
|
@ -1,3 +1,13 @@
|
|||
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
|
||||
|
|
|
@ -50,7 +50,7 @@ struct lc_messages_T {
|
|||
};
|
||||
|
||||
struct lc_messages_T *__get_current_messages_locale(void);
|
||||
int __numeric_load_locale(const char *, void *, const char *);
|
||||
int __messages_load_locale(const char *, void *, const char *);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
|
|
@ -182,6 +182,7 @@ No supporting OS subroutines are required.
|
|||
#include "lmonetary.h"
|
||||
#include "lnumeric.h"
|
||||
#include "lctype.h"
|
||||
#include "timelocal.h"
|
||||
#include "../stdlib/local.h"
|
||||
|
||||
#define _LC_LAST 7
|
||||
|
@ -435,7 +436,7 @@ currentlocale()
|
|||
#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__ */
|
||||
|
||||
|
@ -951,7 +952,7 @@ char *
|
|||
_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
|
||||
|
@ -971,21 +972,21 @@ _DEFUN(_localeconv_r, (data),
|
|||
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];
|
||||
|
|
Loading…
Reference in New Issue