aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/configure
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/configure')
-rwxr-xr-xlibgfortran/configure52
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