4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-22 00:38:06 +08:00

Get rid of LCID, reformat type definitions in setlocale.h

Definition of LCID results in build problems on 32 bit Cygwin

Signed-off by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2016-07-25 12:30:25 +02:00
parent 7156bf842e
commit ac7f1d5e93

View File

@ -44,123 +44,127 @@ __BEGIN_DECLS
#define _LC_LAST 7 #define _LC_LAST 7
#ifdef __CYGWIN__ #ifdef __CYGWIN__
typedef __uint32_t LCID;
struct lc_collate_T struct lc_collate_T
{ {
LCID lcid; __uint32_t lcid;
int (*mbtowc) (struct _reent *, wchar_t *, const char *, size_t, mbstate_t *); int (*mbtowc) (struct _reent *, wchar_t *, const char *, size_t,
char codeset[ENCODING_LEN + 1]; mbstate_t *);
char codeset[ENCODING_LEN + 1];
}; };
extern const struct lc_collate_T _C_collate_locale; extern const struct lc_collate_T _C_collate_locale;
#endif #endif
struct lc_ctype_T { struct lc_ctype_T
const char *codeset; /* codeset for mbtowc conversion */ {
const char *mb_cur_max; const char *codeset; /* codeset for mbtowc conversion */
const char *mb_cur_max;
#ifdef __HAVE_LOCALE_INFO_EXTENDED__ #ifdef __HAVE_LOCALE_INFO_EXTENDED__
const char *outdigits[10]; const char *outdigits[10];
const wchar_t *woutdigits[10]; const wchar_t *woutdigits[10];
#endif #endif
}; };
extern const struct lc_ctype_T _C_ctype_locale; extern const struct lc_ctype_T _C_ctype_locale;
struct lc_monetary_T { struct lc_monetary_T
const char *int_curr_symbol; {
const char *currency_symbol; const char *int_curr_symbol;
const char *mon_decimal_point; const char *currency_symbol;
const char *mon_thousands_sep; const char *mon_decimal_point;
const char *mon_grouping; const char *mon_thousands_sep;
const char *positive_sign; const char *mon_grouping;
const char *negative_sign; const char *positive_sign;
const char *int_frac_digits; const char *negative_sign;
const char *frac_digits; const char *int_frac_digits;
const char *p_cs_precedes; const char *frac_digits;
const char *p_sep_by_space; const char *p_cs_precedes;
const char *n_cs_precedes; const char *p_sep_by_space;
const char *n_sep_by_space; const char *n_cs_precedes;
const char *p_sign_posn; const char *n_sep_by_space;
const char *n_sign_posn; const char *p_sign_posn;
const char *n_sign_posn;
#ifdef __HAVE_LOCALE_INFO_EXTENDED__ #ifdef __HAVE_LOCALE_INFO_EXTENDED__
const char *int_p_cs_precedes; const char *int_p_cs_precedes;
const char *int_p_sep_by_space; const char *int_p_sep_by_space;
const char *int_n_cs_precedes; const char *int_n_cs_precedes;
const char *int_n_sep_by_space; const char *int_n_sep_by_space;
const char *int_p_sign_posn; const char *int_p_sign_posn;
const char *int_n_sign_posn; const char *int_n_sign_posn;
const char *codeset; /* codeset for mbtowc conversion */ const char *codeset; /* codeset for mbtowc conversion */
const wchar_t *wint_curr_symbol; const wchar_t *wint_curr_symbol;
const wchar_t *wcurrency_symbol; const wchar_t *wcurrency_symbol;
const wchar_t *wmon_decimal_point; const wchar_t *wmon_decimal_point;
const wchar_t *wmon_thousands_sep; const wchar_t *wmon_thousands_sep;
const wchar_t *wpositive_sign; const wchar_t *wpositive_sign;
const wchar_t *wnegative_sign; const wchar_t *wnegative_sign;
#endif #endif
}; };
extern const struct lc_monetary_T _C_monetary_locale; extern const struct lc_monetary_T _C_monetary_locale;
struct lc_numeric_T { struct lc_numeric_T
const char *decimal_point; {
const char *thousands_sep; const char *decimal_point;
const char *grouping; const char *thousands_sep;
const char *grouping;
#ifdef __HAVE_LOCALE_INFO_EXTENDED__ #ifdef __HAVE_LOCALE_INFO_EXTENDED__
const char *codeset; /* codeset for mbtowc conversion */ const char *codeset; /* codeset for mbtowc conversion */
const wchar_t *wdecimal_point; const wchar_t *wdecimal_point;
const wchar_t *wthousands_sep; const wchar_t *wthousands_sep;
#endif #endif
}; };
extern const struct lc_numeric_T _C_numeric_locale; extern const struct lc_numeric_T _C_numeric_locale;
struct lc_time_T { struct lc_time_T
const char *mon[12]; {
const char *month[12]; const char *mon[12];
const char *wday[7]; const char *month[12];
const char *weekday[7]; const char *wday[7];
const char *X_fmt; const char *weekday[7];
const char *x_fmt; const char *X_fmt;
const char *c_fmt; const char *x_fmt;
const char *am_pm[2]; const char *c_fmt;
const char *date_fmt; const char *am_pm[2];
const char *alt_month[12]; /* unused */ const char *date_fmt;
const char *md_order; const char *alt_month[12]; /* unused */
const char *ampm_fmt; const char *md_order;
const char *era; const char *ampm_fmt;
const char *era_d_fmt; const char *era;
const char *era_d_t_fmt; const char *era_d_fmt;
const char *era_t_fmt; const char *era_d_t_fmt;
const char *alt_digits; const char *era_t_fmt;
const char *alt_digits;
#ifdef __HAVE_LOCALE_INFO_EXTENDED__ #ifdef __HAVE_LOCALE_INFO_EXTENDED__
const char *codeset; /* codeset for mbtowc conversion */ const char *codeset; /* codeset for mbtowc conversion */
const wchar_t *wmon[12]; const wchar_t *wmon[12];
const wchar_t *wmonth[12]; const wchar_t *wmonth[12];
const wchar_t *wwday[7]; const wchar_t *wwday[7];
const wchar_t *wweekday[7]; const wchar_t *wweekday[7];
const wchar_t *wX_fmt; const wchar_t *wX_fmt;
const wchar_t *wx_fmt; const wchar_t *wx_fmt;
const wchar_t *wc_fmt; const wchar_t *wc_fmt;
const wchar_t *wam_pm[2]; const wchar_t *wam_pm[2];
const wchar_t *wdate_fmt; const wchar_t *wdate_fmt;
const wchar_t *wampm_fmt; const wchar_t *wampm_fmt;
const wchar_t *wera; const wchar_t *wera;
const wchar_t *wera_d_fmt; const wchar_t *wera_d_fmt;
const wchar_t *wera_d_t_fmt; const wchar_t *wera_d_t_fmt;
const wchar_t *wera_t_fmt; const wchar_t *wera_t_fmt;
const wchar_t *walt_digits; const wchar_t *walt_digits;
#endif #endif
}; };
extern const struct lc_time_T _C_time_locale; extern const struct lc_time_T _C_time_locale;
struct lc_messages_T { struct lc_messages_T
const char *yesexpr; {
const char *noexpr; const char *yesexpr;
const char *yesstr; const char *noexpr;
const char *nostr; const char *yesstr;
const char *nostr;
#ifdef __HAVE_LOCALE_INFO_EXTENDED__ #ifdef __HAVE_LOCALE_INFO_EXTENDED__
const char *codeset; /* codeset for mbtowc conversion */ const char *codeset; /* codeset for mbtowc conversion */
const wchar_t *wyesexpr; const wchar_t *wyesexpr;
const wchar_t *wnoexpr; const wchar_t *wnoexpr;
const wchar_t *wyesstr; const wchar_t *wyesstr;
const wchar_t *wnostr; const wchar_t *wnostr;
#endif #endif
}; };
extern const struct lc_messages_T _C_messages_locale; extern const struct lc_messages_T _C_messages_locale;