From a1db5cd0412169ffd98f44feca8a4ba7a9a201ea Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Thu, 28 Feb 2019 20:31:18 -0500 Subject: handle differences between C89/95 and C99+ --- src/nonstd/_locale.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/nonstd/_locale.h b/src/nonstd/_locale.h index ebed8ea6..036fd836 100644 --- a/src/nonstd/_locale.h +++ b/src/nonstd/_locale.h @@ -127,12 +127,22 @@ static char * (__load_locale)(struct __locale_t *loc, int mask, const char *name loc->mn.n_sign_posn = CHAR_MAX; loc->mn.int_curr_symbol = ""; loc->mn.int_frac_digits = CHAR_MAX; + + #if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ loc->mn.int_p_cs_precedes = CHAR_MAX; loc->mn.int_n_cs_precedes = CHAR_MAX; loc->mn.int_p_sep_by_space = CHAR_MAX; loc->mn.int_n_sep_by_space = CHAR_MAX; loc->mn.int_p_sign_posn = CHAR_MAX; loc->mn.int_n_sign_posn = CHAR_MAX; + #else + loc->mn.__int_p_cs_precedes = CHAR_MAX; + loc->mn.__int_n_cs_precedes = CHAR_MAX; + loc->mn.__int_p_sep_by_space = CHAR_MAX; + loc->mn.__int_n_sep_by_space = CHAR_MAX; + loc->mn.__int_p_sign_posn = CHAR_MAX; + loc->mn.__int_n_sign_posn = CHAR_MAX; + #endif } else { /* loc->mn.monetary fields; -- cgit v1.2.1