diff --git a/m4/fclose.m4 b/m4/fclose.m4 index 6bd1ad8..e939d30 100644 --- a/m4/fclose.m4 +++ b/m4/fclose.m4 @@ -1,4 +1,4 @@ -# fclose.m4 serial 6 +# fclose.m4 serial 7 dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FCLOSE], [ AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) gl_FUNC_FFLUSH_STDIN if test $gl_cv_func_fflush_stdin != yes; then @@ -17,4 +18,8 @@ AC_DEFUN([gl_FUNC_FCLOSE], if test $REPLACE_CLOSE = 1; then REPLACE_FCLOSE=1 fi + + case "$host_os" in + openedition) REPLACE_FCLOSE=1 ;; + esac ]) diff --git a/m4/strstr.m4 b/m4/strstr.m4 index 040c0b9..e3e528d 100644 --- a/m4/strstr.m4 +++ b/m4/strstr.m4 @@ -1,4 +1,4 @@ -# strstr.m4 serial 16 +# strstr.m4 serial 17 dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -67,6 +67,12 @@ AC_DEFUN([gl_FUNC_STRSTR], AC_CACHE_CHECK([whether strstr works in linear time], [gl_cv_func_strstr_linear], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +#ifdef __MVS__ +/* z/OS does not deliver signals while strstr() is running (thanks to + restrictions on its LE runtime), which prevents us from limiting the + running time of this test. */ +# error "This test does not work properly on z/OS" +#endif #include /* for signal */ #include /* for strstr */ #include /* for malloc */ diff --git a/m4/wchar_h.m4 b/m4/wchar_h.m4 index 9d1b0f8..c926c4b 100644 --- a/m4/wchar_h.m4 +++ b/m4/wchar_h.m4 @@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved. dnl Written by Eric Blake. -# wchar_h.m4 serial 39 +# wchar_h.m4 serial 40 AC_DEFUN([gl_WCHAR_H], [ @@ -81,8 +81,14 @@ AC_DEFUN([gl_WCHAR_H_INLINE_OK], extern int zero (void); int main () { return zero(); } ]])]) + dnl Do not rename the object file from conftest.$ac_objext to + dnl conftest1.$ac_objext, as this will cause the link to fail on + dnl z/OS when using the XPLINK object format (due to duplicate + dnl CSECT names). Instead, temporarily redefine $ac_compile so + dnl that the object file has the latter name from the start. + save_ac_compile="$ac_compile" + ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/` if AC_TRY_EVAL([ac_compile]); then - mv conftest.$ac_objext conftest1.$ac_objext AC_LANG_CONFTEST([ AC_LANG_SOURCE([[#define wcstod renamed_wcstod /* Tru64 with Desktop Toolkit C has a bug: must be included before @@ -95,8 +101,9 @@ int main () { return zero(); } #include int zero (void) { return 0; } ]])]) + dnl See note above about renaming object files. + ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/` if AC_TRY_EVAL([ac_compile]); then - mv conftest.$ac_objext conftest2.$ac_objext if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then : else @@ -104,6 +111,7 @@ int zero (void) { return 0; } fi fi fi + ac_compile="$save_ac_compile" rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext ]) if test $gl_cv_header_wchar_h_correct_inline = no; then