[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MinGW vs. setlocale
From: |
Ludovic Courtès |
Subject: |
Re: MinGW vs. setlocale |
Date: |
Sat, 21 Jun 2014 17:02:30 +0200 |
User-agent: |
Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux) |
Hi Eli,
(Sorry for the delay, I switched contexts, and I’m not using fair
scheduling I suppose. ;-))
Eli Zaretskii <address@hidden> skribis:
> Here are the changes I needed for i18n.c to get the tests to succeed.
> They have to do with non-portable assumptions about when the various
> nl_langinfo constants are defined. E.g., there's no reason to assume
> that if INT_FRAC_DIGITS isn't defined, neither will be FRAC_DIGITS.
> As luck would have it, MinGW has some of these, but not the others, so
> the conditionals failed, and Guile failed to convert P_SIGN_POSN to
> one of the symbolic values, instead leaving it at its numerical value.
>
> --- libguile/i18n.c~2 2014-06-15 14:21:53 +0300
> +++ libguile/i18n.c 2014-06-15 14:58:09 +0300
> @@ -1583,9 +1583,13 @@ SCM_DEFINE (scm_nl_langinfo, "nl-langinf
> }
> #endif
>
> -#if (defined FRAC_DIGITS) && (defined INT_FRAC_DIGITS)
> +#if defined FRAC_DIGITS || defined INT_FRAC_DIGITS
> +#ifdef FRAC_DIGITS
> case FRAC_DIGITS:
> +#endif
> +#ifdef INT_FRAC_DIGITS
> case INT_FRAC_DIGITS:
> +#endif
> /* This is to be interpreted as a single integer. */
> if (*c_result == CHAR_MAX)
> /* Unspecified. */
> @@ -1597,12 +1601,18 @@ SCM_DEFINE (scm_nl_langinfo, "nl-langinf
> break;
> #endif
>
> -#if (defined P_CS_PRECEDES) && (defined INT_N_CS_PRECEDES)
> +#if defined P_CS_PRECEDES || defined N_CS_PRECEDES || \
> + defined INT_P_CS_PRECEDES || defined INT_N_CS_PRECEDES || \
> + defined P_SEP_BY_SPACE || defined N_SEP_BY_SPACE
> +#ifdef P_CS_PRECEDES
> case P_CS_PRECEDES:
> case N_CS_PRECEDES:
> +#endif
> +#ifdef INT_N_CS_PRECEDES
> case INT_P_CS_PRECEDES:
> case INT_N_CS_PRECEDES:
> -#if (defined P_SEP_BY_SPACE) && (defined N_SEP_BY_SPACE)
> +#endif
> +#ifdef P_SEP_BY_SPACE
> case P_SEP_BY_SPACE:
> case N_SEP_BY_SPACE:
> #endif
> @@ -1613,11 +1623,16 @@ SCM_DEFINE (scm_nl_langinfo, "nl-langinf
> break;
> #endif
>
> -#if (defined P_SIGN_POSN) && (defined INT_N_SIGN_POSN)
> +#if defined P_SIGN_POSN || defined N_SIGN_POSN || \
> + defined INT_P_SIGN_POSN || defined INT_N_SIGN_POSN
> +#ifdef P_SIGN_POSN
> case P_SIGN_POSN:
> case N_SIGN_POSN:
> +#endif
> +#ifdef INT_P_SIGN_POSN
> case INT_P_SIGN_POSN:
> case INT_N_SIGN_POSN:
> +#endif
> /* See `(libc) Sign of Money Amount' for the interpretation of the
> return value here. */
> switch (*c_result)
This change looks OK to me. Can you commit it yourself?
Note that we don’t have ChangeLog files. Instead, we write
ChangeLog-style commit logs. Please see previous commit logs to get an
idea.
Ludo’.
PS: I still have a bunch of messages from you marked as to be processed.
I’ll try to get back to it ASAP.
- Re: MinGW issues in Guile 2.0.11, (continued)
- Re: MinGW issues in Guile 2.0.11, Mark H Weaver, 2014/06/09
- MinGW vs. setlocale, Ludovic Courtès, 2014/06/09
- Re: MinGW vs. setlocale, Eli Zaretskii, 2014/06/10
- Re: MinGW vs. setlocale, Ludovic Courtès, 2014/06/11
- Re: MinGW vs. setlocale, Eli Zaretskii, 2014/06/11
- Re: MinGW vs. setlocale, Ludovic Courtès, 2014/06/12
- Re: MinGW vs. setlocale, Eli Zaretskii, 2014/06/12
- Re: MinGW vs. setlocale, Eli Zaretskii, 2014/06/15
- Re: MinGW vs. setlocale, Eli Zaretskii, 2014/06/21
- Re: MinGW vs. setlocale,
Ludovic Courtès <=
- Re: MinGW vs. setlocale, Eli Zaretskii, 2014/06/21
- Re: MinGW vs. setlocale, Ludovic Courtès, 2014/06/21
- Re: MinGW vs. setlocale, Eli Zaretskii, 2014/06/22
- Re: MinGW vs. setlocale, Doug Evans, 2014/06/19
- Re: MinGW vs. setlocale, Ludovic Courtès, 2014/06/19
MinGW vs. c-api.test, Ludovic Courtès, 2014/06/09