https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61847

--- Comment #16 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Tue, Jul 22, 2014 at 04:27:58AM +0000, jvdelisle at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61847
> 
> --- Comment #15 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
> Maybe something like this:

I think that you'll need to use configure to check for locale.h.

> 
> Index: open.c
> ===================================================================
> --- open.c    (revision 212498)
> +++ open.c    (working copy)
> @@ -26,6 +26,7 @@ see the files COPYING3 and COPYING.RUNTIME respect
>  #include "io.h"
>  #include "fbuf.h"
>  #include "unix.h"
> +#include "locale.h"

#ifdef HAVE_LOCALE_H
#include <locale.h>
#endif

> 
>  #ifdef HAVE_UNISTD_H
>  #include <unistd.h>
> @@ -725,6 +726,10 @@ st_open (st_parameter_open *opp)
> 
>    library_start (&opp->common);

#ifdef HAVE_LOCALE_H

> +  /* For portability, set locale to "POSIX".  */
> +
> +  setlocale(LC_ALL, "POSIX");
> +

#endif

Reply via email to