summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-08-29 06:59:05 +0200
committerGuido Günther <agx@sigxcpu.org>2016-08-29 06:59:05 +0200
commit7772549c5b773273fb39eb99a04a290983a6c2a6 (patch)
tree06598aa7a1630872b6ef61584fbbb6f333f2e42a /m4
parentf7ed747ba054fc6bc88aeb22e272e27522ee6c1e (diff)
New upstream version 2.2.0~rc1
Diffstat (limited to 'm4')
-rw-r--r--m4/fclose.m47
-rw-r--r--m4/stdbool.m428
-rw-r--r--m4/wchar_h.m414
3 files changed, 33 insertions, 16 deletions
diff --git a/m4/fclose.m4 b/m4/fclose.m4
index 363b7fee8..3fa25b105 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-2016 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/stdbool.m4 b/m4/stdbool.m4
index a55615318..2a9b1db86 100644
--- a/m4/stdbool.m4
+++ b/m4/stdbool.m4
@@ -5,7 +5,7 @@ dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-#serial 6
+#serial 7
# Prepare for substituting <stdbool.h> if it is not supported.
@@ -44,7 +44,10 @@ AC_DEFUN([AC_CHECK_HEADER_STDBOOL],
[[
#include <stdbool.h>
- #if __cplusplus < 201103
+ #ifdef __cplusplus
+ typedef bool Bool;
+ #else
+ typedef _Bool Bool;
#ifndef bool
"error: bool is not defined"
#endif
@@ -66,37 +69,38 @@ AC_DEFUN([AC_CHECK_HEADER_STDBOOL],
"error: __bool_true_false_are_defined is not defined"
#endif
- struct s { _Bool s: 1; _Bool t; } s;
+ struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
char a[true == 1 ? 1 : -1];
char b[false == 0 ? 1 : -1];
char c[__bool_true_false_are_defined == 1 ? 1 : -1];
char d[(bool) 0.5 == true ? 1 : -1];
/* See body of main program for 'e'. */
- char f[(_Bool) 0.0 == false ? 1 : -1];
+ char f[(Bool) 0.0 == false ? 1 : -1];
char g[true];
- char h[sizeof (_Bool)];
+ char h[sizeof (Bool)];
char i[sizeof s.t];
enum { j = false, k = true, l = false * true, m = true * 256 };
/* The following fails for
HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
- _Bool n[m];
+ Bool n[m];
char o[sizeof n == m * sizeof n[0] ? 1 : -1];
- char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+ char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
/* Catch a bug in an HP-UX C compiler. See
http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
*/
- _Bool q = true;
- _Bool *pq = &q;
+ Bool q = true;
+ Bool *pq = &q;
+ bool *qq = &q;
]],
[[
bool e = &s;
- *pq |= q;
- *pq |= ! q;
+ *pq |= q; *pq |= ! q;
+ *qq |= q; *qq |= ! q;
/* Refer to every declared value, to avoid compiler optimizations. */
return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
- + !m + !n + !o + !p + !q + !pq);
+ + !m + !n + !o + !p + !q + !pq + !qq);
]])],
[ac_cv_header_stdbool_h=yes],
[ac_cv_header_stdbool_h=no])])
diff --git a/m4/wchar_h.m4 b/m4/wchar_h.m4
index b40b73237..16017a59f 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: <stdio.h> must be included before
@@ -95,8 +101,9 @@ int main () { return zero(); }
#include <wchar.h>
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