------- Comment #3 from kargl at gcc dot gnu dot org 2008-07-19 18:28 ------- This is untested, but you get the idea.
Index: gcc/fortran/f95-lang.c =================================================================== --- gcc/fortran/f95-lang.c (revision 137549) +++ gcc/fortran/f95-lang.c (working copy) @@ -50,6 +50,10 @@ along with GCC; see the file COPYING3. #include "trans-types.h" #include "trans-const.h" +#ifndef _LOCALE_H_ +#include <locale.h> +#endif + /* Language-dependent contents of an identifier. */ struct lang_identifier @@ -250,6 +254,9 @@ gfc_be_parse_file (int set_yydebug ATTRI static bool gfc_init (void) { + + setlocale(LC_ALL, "POSIX"); + if (!gfc_cpp_enabled ()) { linemap_add (line_table, LC_ENTER, false, gfc_source_file, 1); Index: libgfortran/runtime/main.c =================================================================== --- libgfortran/runtime/main.c (revision 137549) +++ libgfortran/runtime/main.c (working copy) @@ -28,6 +28,7 @@ the Free Software Foundation, 51 Frankli Boston, MA 02110-1301, USA. */ #include "libgfortran.h" +#include <locale.h> #include <stdlib.h> #include <string.h> #include <limits.h> @@ -144,6 +145,8 @@ full_exe_path (void) static void __attribute__((constructor)) init (void) { + setlocale(LC_ALL, "POSIX"); + /* Figure out the machine endianness. */ determine_endianness (); -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36857