Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2011-05-04 12:54:34 +0400
committerCorinna Vinschen <corinna@vinschen.de>2011-05-04 12:54:34 +0400
commitf737a4edba836d4e1fd48952d8e6827d85874e90 (patch)
treeca83bdcbd1a72c45a944ae383c5dc2359e63cfc2 /newlib/libc/locale/locale.c
parent6e16da9dec940886d173af96c83935dc4431ba5c (diff)
* 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.
Diffstat (limited to 'newlib/libc/locale/locale.c')
-rw-r--r--newlib/libc/locale/locale.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c
index 9f9b63962..ee24872b2 100644
--- a/newlib/libc/locale/locale.c
+++ b/newlib/libc/locale/locale.c
@@ -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];