diff options
author | Janne Blomqvist <jb@gcc.gnu.org> | 2014-11-10 02:17:16 +0200 |
---|---|---|
committer | Janne Blomqvist <jb@gcc.gnu.org> | 2014-11-10 02:17:16 +0200 |
commit | 9cbecd06be8bba398595990b0ecb4156d4a19aad (patch) | |
tree | 632705719333408c765e7eddf68dc9b1418b8854 /libgfortran/configure | |
parent | f8df4b4e2b524b2f35fe93dd935c175c495a7fd0 (diff) |
PR 47007 and 61847 Locale failures in libgfortran.
2014-11-10 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/47007
PR libfortran/61847
* config.h.in: Regenerated.
* configure: Regenerated.
* configure.ac (AC_CHECK_HEADERS_ONCE): Check for xlocale.h.
(AC_CHECK_FUNCS_ONCE): Check for newlocale, freelocale, uselocale,
strerror_l.
* io/io.h (locale.h): Include.
(xlocale.h): Include if present.
(c_locale): New variable.
(old_locale): New variable.
(old_locale_ctr): New variable.
(old_locale_lock): New variable.
(st_parameter_dt): Add old_locale member.
* io/transfer.c (data_transfer_init): Set locale to "C" if doing
formatted transfer.
(finalize_transfer): Reset locale to previous.
* io/unit.c (c_locale): New variable.
(old_locale): New variable.
(old_locale_ctr): New variable.
(old_locale_lock): New variable.
(init_units): Init c_locale, init old_locale_lock.
(close_units): Free c_locale.
* runtime/error.c (locale.h): Include.
(xlocale.h): Include if present.
(gf_strerror): Use strerror_l if available. Reset locale to
LC_GLOBAL_LOCALE for strerror_r branch.
2014-11-10 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/47007
PR libfortran/61847
* gfortran.texi: Add note about locale issues to thread-safety
section.
From-SVN: r217273
Diffstat (limited to 'libgfortran/configure')
-rwxr-xr-x | libgfortran/configure | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/libgfortran/configure b/libgfortran/configure index df1782929ac..e75fbffcb96 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -2549,6 +2549,7 @@ as_fn_append ac_header_list " fptrap.h" as_fn_append ac_header_list " fpxcp.h" as_fn_append ac_header_list " pwd.h" as_fn_append ac_header_list " complex.h" +as_fn_append ac_header_list " xlocale.h" as_fn_append ac_func_list " getrusage" as_fn_append ac_func_list " times" as_fn_append ac_func_list " mkstemp" @@ -2605,6 +2606,10 @@ as_fn_append ac_func_list " mkostemp" as_fn_append ac_func_list " strnlen" as_fn_append ac_func_list " strndup" as_fn_append ac_func_list " strtok_r" +as_fn_append ac_func_list " newlocale" +as_fn_append ac_func_list " freelocale" +as_fn_append ac_func_list " uselocale" +as_fn_append ac_func_list " strerror_l" as_fn_append ac_header_list " math.h" # Check that the precious variables saved in the cache have kept the same # value. @@ -12350,7 +12355,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12353 "configure" +#line 12358 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12456,7 +12461,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12459 "configure" +#line 12464 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -16019,6 +16024,8 @@ done + + inttype_headers=`echo inttypes.h sys/inttypes.h | sed -e 's/,/ /g'` acx_cv_header_stdint=stddef.h @@ -16627,6 +16634,14 @@ done + + + + + + + + fi # Check strerror_r, cannot be above as versions with two and three arguments exist |