summaryrefslogtreecommitdiff
path: root/gl/m4
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2014-12-23 12:40:17 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2014-12-23 13:12:07 +0200
commitf8fef13d33dbe80c44f800ca0312c0e03c5ae137 (patch)
treebf3650597de0825ae181122b7bcdfd67475af7d1 /gl/m4
parent23d96f1b9613d33a6fb50bf892a7accbab1332ba (diff)
downloadgnutls-f8fef13d33dbe80c44f800ca0312c0e03c5ae137.tar.gz
updated gnulib
Diffstat (limited to 'gl/m4')
-rw-r--r--gl/m4/extensions.m45
-rw-r--r--gl/m4/extern-inline.m49
-rw-r--r--gl/m4/gnulib-comp.m42
-rw-r--r--gl/m4/iconv.m461
-rw-r--r--gl/m4/printf.m42
-rw-r--r--gl/m4/stdalign.m48
-rw-r--r--gl/m4/stddef_h.m48
-rw-r--r--gl/m4/stdio_h.m43
8 files changed, 59 insertions, 39 deletions
diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4
index 37f55ca3d1..cf285ba273 100644
--- a/gl/m4/extensions.m4
+++ b/gl/m4/extensions.m4
@@ -68,6 +68,10 @@ dnl configure.ac when using autoheader 2.62.
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
+/* Use GNU style printf and scanf. */
+#ifndef __USE_MINGW_ANSI_STDIO
+# undef __USE_MINGW_ANSI_STDIO
+#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
@@ -100,6 +104,7 @@ dnl configure.ac when using autoheader 2.62.
AC_DEFINE([_ALL_SOURCE])
AC_DEFINE([_DARWIN_C_SOURCE])
AC_DEFINE([_GNU_SOURCE])
+ AC_DEFINE([__USE_MINGW_ANSI_STDIO])
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
AC_DEFINE([_TANDEM_SOURCE])
AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined],
diff --git a/gl/m4/extern-inline.m4 b/gl/m4/extern-inline.m4
index 7f1bb397c4..0edbe3c81c 100644
--- a/gl/m4/extern-inline.m4
+++ b/gl/m4/extern-inline.m4
@@ -74,6 +74,11 @@ AC_DEFUN([gl_EXTERN_INLINE],
# define _GL_EXTERN_INLINE static _GL_UNUSED
#endif
+/* In GCC, suppress bogus "no previous prototype for 'FOO'"
+ and "no previous declaration for 'FOO'" diagnostics,
+ when FOO is an inline function in the header; see
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>. */
#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
# define _GL_INLINE_HEADER_CONST_PRAGMA
@@ -81,10 +86,6 @@ AC_DEFUN([gl_EXTERN_INLINE],
# define _GL_INLINE_HEADER_CONST_PRAGMA \
_Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
# endif
- /* Suppress GCC's bogus "no previous prototype for 'FOO'"
- and "no previous declaration for 'FOO'" diagnostics,
- when FOO is an inline function in the header; see
- <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>. */
# define _GL_INLINE_HEADER_BEGIN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 613c7dea6c..981bca2f2c 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -366,7 +366,7 @@ AC_SUBST([LTALLOCA])
gl_PREREQ_STRVERSCMP
fi
gl_STRING_MODULE_INDICATOR([strverscmp])
- gl_HEADER_SYS_SOCKET
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
AC_PROG_MKDIR_P
gl_HEADER_SYS_STAT_H
AC_PROG_MKDIR_P
diff --git a/gl/m4/iconv.m4 b/gl/m4/iconv.m4
index 4b29c5f2c2..4e37363156 100644
--- a/gl/m4/iconv.m4
+++ b/gl/m4/iconv.m4
@@ -1,4 +1,4 @@
-# iconv.m4 serial 18 (gettext-0.18.2)
+# iconv.m4 serial 19 (gettext-0.18.2)
dnl Copyright (C) 2000-2002, 2007-2014 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -72,27 +72,33 @@ AC_DEFUN([AM_ICONV_LINK],
if test $am_cv_lib_iconv = yes; then
LIBS="$LIBS $LIBICONV"
fi
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
+ am_cv_func_iconv_works=no
+ for ac_iconv_const in '' 'const'; do
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
#include <iconv.h>
#include <string.h>
-int main ()
-{
- int result = 0;
+
+#ifndef ICONV_CONST
+# define ICONV_CONST $ac_iconv_const
+#endif
+ ]],
+ [[int result = 0;
/* Test against AIX 5.1 bug: Failures are not distinguishable from successful
returns. */
{
iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
if (cd_utf8_to_88591 != (iconv_t)(-1))
{
- static const char input[] = "\342\202\254"; /* EURO SIGN */
+ static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
char buf[10];
- const char *inptr = input;
+ ICONV_CONST char *inptr = input;
size_t inbytesleft = strlen (input);
char *outptr = buf;
size_t outbytesleft = sizeof (buf);
size_t res = iconv (cd_utf8_to_88591,
- (char **) &inptr, &inbytesleft,
+ &inptr, &inbytesleft,
&outptr, &outbytesleft);
if (res == 0)
result |= 1;
@@ -105,14 +111,14 @@ int main ()
iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
if (cd_ascii_to_88591 != (iconv_t)(-1))
{
- static const char input[] = "\263";
+ static ICONV_CONST char input[] = "\263";
char buf[10];
- const char *inptr = input;
+ ICONV_CONST char *inptr = input;
size_t inbytesleft = strlen (input);
char *outptr = buf;
size_t outbytesleft = sizeof (buf);
size_t res = iconv (cd_ascii_to_88591,
- (char **) &inptr, &inbytesleft,
+ &inptr, &inbytesleft,
&outptr, &outbytesleft);
if (res == 0)
result |= 2;
@@ -124,14 +130,14 @@ int main ()
iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
if (cd_88591_to_utf8 != (iconv_t)(-1))
{
- static const char input[] = "\304";
+ static ICONV_CONST char input[] = "\304";
static char buf[2] = { (char)0xDE, (char)0xAD };
- const char *inptr = input;
+ ICONV_CONST char *inptr = input;
size_t inbytesleft = 1;
char *outptr = buf;
size_t outbytesleft = 1;
size_t res = iconv (cd_88591_to_utf8,
- (char **) &inptr, &inbytesleft,
+ &inptr, &inbytesleft,
&outptr, &outbytesleft);
if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
result |= 4;
@@ -144,14 +150,14 @@ int main ()
iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
if (cd_88591_to_utf8 != (iconv_t)(-1))
{
- static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
char buf[50];
- const char *inptr = input;
+ ICONV_CONST char *inptr = input;
size_t inbytesleft = strlen (input);
char *outptr = buf;
size_t outbytesleft = sizeof (buf);
size_t res = iconv (cd_88591_to_utf8,
- (char **) &inptr, &inbytesleft,
+ &inptr, &inbytesleft,
&outptr, &outbytesleft);
if ((int)res > 0)
result |= 8;
@@ -171,17 +177,14 @@ int main ()
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
result |= 16;
return result;
-}]])],
- [am_cv_func_iconv_works=yes],
- [am_cv_func_iconv_works=no],
- [
-changequote(,)dnl
- case "$host_os" in
- aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
- *) am_cv_func_iconv_works="guessing yes" ;;
- esac
-changequote([,])dnl
- ])
+]])],
+ [am_cv_func_iconv_works=yes], ,
+ [case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac])
+ test "$am_cv_func_iconv_works" = no || break
+ done
LIBS="$am_save_LIBS"
])
case "$am_cv_func_iconv_works" in
diff --git a/gl/m4/printf.m4 b/gl/m4/printf.m4
index 3d7b381efd..652fa1cdc1 100644
--- a/gl/m4/printf.m4
+++ b/gl/m4/printf.m4
@@ -328,7 +328,7 @@ int main ()
# ifdef WORDS_BIGENDIAN
# define LDBL80_WORDS(exponent,manthi,mantlo) \
{ ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
- ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
(unsigned int) (mantlo) << 16 \
}
# else
diff --git a/gl/m4/stdalign.m4 b/gl/m4/stdalign.m4
index 9efafe5c5b..f60257f16a 100644
--- a/gl/m4/stdalign.m4
+++ b/gl/m4/stdalign.m4
@@ -32,8 +32,12 @@ AC_DEFUN([gl_STDALIGN_H],
/* Test _Alignas only on platforms where gnulib can help. */
#if \
((defined __cplusplus && 201103 <= __cplusplus) \
- || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \
- || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
+ || (defined __APPLE__ && defined __MACH__ \
+ ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
+ : __GNUC__) \
+ || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
+ || __ICC || 0x5110 <= __SUNPRO_C \
+ || 1300 <= _MSC_VER)
struct alignas_test { char c; char alignas (8) alignas_8; };
char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
? 1 : -1];
diff --git a/gl/m4/stddef_h.m4 b/gl/m4/stddef_h.m4
index c555e29524..9659813bda 100644
--- a/gl/m4/stddef_h.m4
+++ b/gl/m4/stddef_h.m4
@@ -1,5 +1,5 @@
-dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues.
-# stddef_h.m4 serial 4
+dnl A placeholder for <stddef.h>, for platforms that have issues.
+# stddef_h.m4 serial 5
dnl Copyright (C) 2009-2014 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -10,6 +10,9 @@ AC_DEFUN([gl_STDDEF_H],
AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
AC_REQUIRE([gt_TYPE_WCHAR_T])
STDDEF_H=
+ AC_CHECK_TYPE([max_align_t], [], [HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h],
+ [[#include <stddef.h>
+ ]])
if test $gt_cv_c_wchar_t = no; then
HAVE_WCHAR_T=0
STDDEF_H=stddef.h
@@ -43,5 +46,6 @@ AC_DEFUN([gl_STDDEF_H_DEFAULTS],
[
dnl Assume proper GNU behavior unless another module says otherwise.
REPLACE_NULL=0; AC_SUBST([REPLACE_NULL])
+ HAVE_MAX_ALIGN_T=1; AC_SUBST([HAVE_MAX_ALIGN_T])
HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T])
])
diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4
index d15913a3ca..ef0dcc12d2 100644
--- a/gl/m4/stdio_h.m4
+++ b/gl/m4/stdio_h.m4
@@ -6,6 +6,9 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_STDIO_H],
[
+ dnl For __USE_MINGW_ANSI_STDIO
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
gl_NEXT_HEADERS([stdio.h])