diff options
author | Tobias Burnus <burnus@net-b.de> | 2012-05-23 10:34:06 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2012-05-23 10:34:06 +0200 |
commit | 4179e59afafbe4c5eb00b0a82da11db7cc5a1a8c (patch) | |
tree | d08f712df5fe7cd79a42d70f17fd6a12386816f3 /libgfortran/configure | |
parent | f883872b10c06e67e59d3e0f192b804dc5ec3121 (diff) | |
download | gcc-4179e59afafbe4c5eb00b0a82da11db7cc5a1a8c.zip gcc-4179e59afafbe4c5eb00b0a82da11db7cc5a1a8c.tar.gz gcc-4179e59afafbe4c5eb00b0a82da11db7cc5a1a8c.tar.bz2 |
re PR libfortran/53444 (Accommodate non-compliant strerror_r() on VxWorks.)
2012-05-23 Tobias Burnus <burnus@net-b.de>
PR libfortran/53444
* acinclude.m4 (LIBGFOR_CHECK_STRERROR_R): Add configure checks
* for
two- and three-argument versions of strerror_r.
* configure.ac (LIBGFOR_CHECK_STRERROR_R): Use it.
* runtime/error.c (gf_strerror): Handle two-argument version
of strerror_r.
* config.h.in: Regenerate.
* configure: Regenerate.
From-SVN: r187796
Diffstat (limited to 'libgfortran/configure')
-rwxr-xr-x | libgfortran/configure | 52 |
1 files changed, 49 insertions, 3 deletions
diff --git a/libgfortran/configure b/libgfortran/configure index 80bfe84..ca33870 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -2581,7 +2581,6 @@ as_fn_append ac_func_list " dup" as_fn_append ac_func_list " getcwd" as_fn_append ac_func_list " localtime_r" as_fn_append ac_func_list " gmtime_r" -as_fn_append ac_func_list " strerror_r" as_fn_append ac_func_list " getpwuid_r" as_fn_append ac_func_list " ttyname_r" as_fn_append ac_func_list " clock_gettime" @@ -12328,7 +12327,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12331 "configure" +#line 12330 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12434,7 +12433,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12437 "configure" +#line 12436 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -16547,6 +16546,53 @@ done +# Check strerror_r, cannot be above as versions with two and three arguments exist + + ac_save_CFLAGS="$CFLAGS" + CFLAGS="-Wimplicit-function-declaration -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _GNU_SOURCE 1 + #include <string.h> + #include <locale.h> +int +main () +{ +char s[128]; strerror_r(5, s, 128); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define HAVE_STRERROR_R 1" >>confdefs.h + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$ac_save_CFLAGS" + + ac_save_CFLAGS="$CFLAGS" + CFLAGS="-Wimplicit-function-declaration -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _GNU_SOURCE 1 + #include <string.h> + #include <locale.h> +int +main () +{ +char s[128]; strerror_r(5, s); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define HAVE_STRERROR_R_2ARGS 1" >>confdefs.h + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$ac_save_CFLAGS" # Check for C99 (and other IEEE) math functions |