unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Eli Zaretskii <eliz@gnu.org>
Cc: guile-devel@gnu.org
Subject: Re: MinGW vs. setlocale
Date: Sat, 21 Jun 2014 17:02:30 +0200	[thread overview]
Message-ID: <87a996i9vd.fsf@gnu.org> (raw)
In-Reply-To: <83ppiaulx6.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 15 Jun 2014 20:23:17 +0300")

Hi Eli,

(Sorry for the delay, I switched contexts, and I’m not using fair
scheduling I suppose.  ;-))

Eli Zaretskii <eliz@gnu.org> 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.



  parent reply	other threads:[~2014-06-21 15:02 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-08 15:04 MinGW issues in Guile 2.0.11 Eli Zaretskii
2014-06-09 15:47 ` Eli Zaretskii
2014-06-09 18:01 ` Mark H Weaver
2014-06-09 18:25   ` Eli Zaretskii
2014-06-09 19:30 ` MinGW vs. setlocale Ludovic Courtès
2014-06-10 16:17   ` Eli Zaretskii
2014-06-11 13:13     ` Ludovic Courtès
2014-06-11 15:33       ` Eli Zaretskii
2014-06-12  8:39         ` Ludovic Courtès
2014-06-12 18:18           ` Eli Zaretskii
2014-06-15 17:23             ` Eli Zaretskii
2014-06-21 11:17               ` Eli Zaretskii
2014-06-21 15:02               ` Ludovic Courtès [this message]
2014-06-21 15:11                 ` Eli Zaretskii
2014-06-21 21:23                   ` Ludovic Courtès
2014-06-22 16:13                     ` Eli Zaretskii
2014-06-19  4:53       ` Doug Evans
2014-06-19  8:16         ` Ludovic Courtès
2014-06-09 19:32 ` MinGW vs. c-api.test Ludovic Courtès
2014-06-10  9:05   ` Neil Jerram
2014-06-10 11:42     ` Ludovic Courtès
2014-06-10 15:32     ` Eli Zaretskii
2014-06-10 15:56       ` David Kastrup
2014-06-10 18:00         ` Eli Zaretskii
2014-06-11  0:36           ` dsmich
2014-06-11  2:52             ` Eli Zaretskii
2014-06-10 11:44   ` Ludovic Courtès
2014-06-10 15:39     ` Eli Zaretskii
2014-06-11 12:37       ` Ludovic Courtès
2014-06-11 15:08         ` Eli Zaretskii
2014-06-12  8:29           ` Ludovic Courtès
2014-06-12 17:16             ` Eli Zaretskii
2014-06-12 19:48               ` Ludovic Courtès
2014-06-12 19:59                 ` Eli Zaretskii
2014-06-12 21:20                   ` Ludovic Courtès
2014-06-13  9:15                     ` Neil Jerram
2014-06-13 16:04                       ` Ludovic Courtès
2014-06-13 16:19                         ` Eli Zaretskii
2014-06-13 16:26                           ` Neil Jerram
2014-06-13 16:31                         ` Mike Gerwitz
2014-06-13 18:09                           ` Eli Zaretskii
2014-06-09 19:42 ` Windows file name separators Ludovic Courtès
2014-06-10 16:00   ` Eli Zaretskii
2014-06-30 11:15     ` Ludovic Courtès
2014-06-30 14:56       ` Eli Zaretskii
2014-07-01  9:36         ` Ludovic Courtès
2014-07-01 15:30           ` Eli Zaretskii
2014-07-01 15:38             ` Ludovic Courtès
2014-07-02 16:04               ` Eli Zaretskii
2014-07-02 20:56                 ` Ludovic Courtès
2014-07-02 20:57                 ` Ludovic Courtès
2014-07-03 15:10                   ` Eli Zaretskii
2014-07-03 17:11                     ` Ludovic Courtès
2014-07-03 18:09                       ` Eli Zaretskii
2014-07-07 20:53                         ` Mark H Weaver
2014-07-08  2:37                           ` Eli Zaretskii
2014-07-02 16:13               ` Fix 'dirname' and 'basename' on MS-Windows Eli Zaretskii
2014-07-09 14:22                 ` Ludovic Courtès
2014-07-09 14:53                   ` Eli Zaretskii
2014-07-02 16:16               ` Provide reasonable stack limit " Eli Zaretskii
2014-07-02 21:02                 ` Ludovic Courtès
2014-07-03 16:28                   ` Eli Zaretskii
2014-07-02 16:30               ` Bug in scm_getaffinity Eli Zaretskii
2014-07-02 21:04                 ` Ludovic Courtès
2014-07-03 16:31                   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a996i9vd.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=eliz@gnu.org \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).