]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Revert "updated gnulib"
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Fri, 29 May 2015 14:37:36 +0000 (16:37 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Fri, 29 May 2015 14:37:36 +0000 (16:37 +0200)
This reverts commit c040ce6dd05b48b971d8dcc8fc8f23957ed15f9c.

24 files changed:
gl/m4/codeset.m4
gl/m4/extern-inline.m4
gl/m4/gettext.m4
gl/m4/iconv.m4
gl/m4/intl.m4
gl/m4/intldir.m4
gl/m4/intlmacosx.m4
gl/m4/lcmessage.m4
gl/m4/manywarnings.m4
gl/m4/nls.m4
gl/m4/po.m4
gl/m4/stdio_h.m4
gl/stddef.in.h
gl/string.in.h
gl/tests/inttypes.in.h
gl/tests/test-read-file.c
gl/tests/test-stddef.c
src/gl/error.h
src/gl/fseeko.c
src/gl/m4/extern-inline.m4
src/gl/m4/stdio_h.m4
src/gl/stddef.in.h
src/gl/string.in.h
src/gl/xalloc.h

index d7de8d67e0d2c0a70dcdb911f6ac7893d2c3bca4..1c52ffc1be16d1e3408f085cb2d062b3779ef13b 100644 (file)
@@ -1,5 +1,5 @@
 # codeset.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2006, 2008-2014 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2006, 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,
 dnl with or without modifications, as long as this notice is preserved.
index 72800650e6f23e481623892512083d6f5071b06a..e74339a165e0a78085d550a30a119ad012a1ca2e 100644 (file)
@@ -74,13 +74,12 @@ AC_DEFUN([gl_EXTERN_INLINE],
 # define _GL_EXTERN_INLINE static _GL_UNUSED
 #endif
 
-/* In GCC 4.6 (inclusive) to 5.1 (exclusive),
-   suppress bogus "no previous prototype for 'FOO'"
+/* 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 __GNUC__ == 4 && 6 <= __GNUC_MINOR__
+#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
 # if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
 #  define _GL_INLINE_HEADER_CONST_PRAGMA
 # else
index be247bf7b88860d0f565884bd192d44f6e23e9ec..ce5f5ea93a5b438017154fed8f5b48c440df17e2 100644 (file)
@@ -1,5 +1,5 @@
 # gettext.m4 serial 66 (gettext-0.18.2)
-dnl Copyright (C) 1995-2014 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-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,
 dnl with or without modifications, as long as this notice is preserved.
index 4e37363156620d7b2dd33996846464ae3a3c4b2c..5a6c29bd8960adc3dc658d7a1ad9c3bf526fb780 100644 (file)
@@ -1,5 +1,5 @@
 # iconv.m4 serial 19 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2007-2014 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2007-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,
 dnl with or without modifications, as long as this notice is preserved.
index 0c29ad0df8e312a12bade9faa525bbe6acc542be..24e7ed938920bc478220015b4593ba1b955d3829 100644 (file)
@@ -1,5 +1,5 @@
-# intl.m4 serial 28 (gettext-0.19)
-dnl Copyright (C) 1995-2014 Free Software Foundation, Inc.
+# intl.m4 serial 27 (gettext-0.18.3)
+dnl Copyright (C) 1995-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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -42,8 +42,6 @@ AC_DEFUN([AM_INTL_SUBDIR],
   AC_REQUIRE([gl_XSIZE])dnl
   AC_REQUIRE([gl_FCNTL_O_FLAGS])dnl
   AC_REQUIRE([gt_INTL_MACOSX])dnl
-  AC_REQUIRE([gl_EXTERN_INLINE])dnl
-  AC_REQUIRE([gt_GL_ATTRIBUTE])dnl
 
   dnl Support for automake's --enable-silent-rules.
   case "$enable_silent_rules" in
@@ -242,7 +240,8 @@ AC_DEFUN([gt_INTL_SUBDIR_CORE],
 
   dnl intl/plural.c is generated from intl/plural.y. It requires bison,
   dnl because plural.y uses bison specific features. It requires at least
-  dnl bison-2.7 for %define api.pure.
+  dnl bison-1.26 because earlier versions generate a plural.c that doesn't
+  dnl compile.
   dnl bison is only needed for the maintainer (who touches plural.y). But in
   dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
   dnl the rule in general Makefile. Now, some people carelessly touch the
@@ -259,7 +258,7 @@ changequote(<<,>>)dnl
     ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
     case $ac_prog_version in
       '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
-      2.[7-9]* | [3-9].*)
+      1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
 changequote([,])dnl
          ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
       *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
@@ -270,29 +269,3 @@ changequote([,])dnl
     INTLBISON=:
   fi
 ])
-
-dnl Copies _GL_UNUSED and _GL_ATTRIBUTE_PURE definitions from
-dnl gnulib-common.m4 as a fallback, if the project isn't using Gnulib.
-AC_DEFUN([gt_GL_ATTRIBUTE], [
-  m4_ifndef([gl_[]COMMON],
-    AH_VERBATIM([gt_gl_attribute],
-[/* Define as a marker that can be attached to declarations that might not
-    be used.  This helps to reduce warnings, such as from
-    GCC -Wunused-parameter.  */
-#ifndef _GL_UNUSED
-# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-#  define _GL_UNUSED __attribute__ ((__unused__))
-# else
-#  define _GL_UNUSED
-# endif
-#endif
-
-/* The __pure__ attribute was added in gcc 2.96.  */
-#ifndef _GL_ATTRIBUTE_PURE
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-#  define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
-# else
-#  define _GL_ATTRIBUTE_PURE /* empty */
-# endif
-#endif
-]))])
index 73b672a576864378bf9be74652f32d86953d0cef..11641483811e8bc9ea79dfb19bb333166d009f35 100644 (file)
@@ -1,5 +1,5 @@
 # intldir.m4 serial 2 (gettext-0.18)
-dnl Copyright (C) 2006, 2009-2014 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-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,
 dnl with or without modifications, as long as this notice is preserved.
index 8a045f6a295781c3c08e38df8d053e30011b65f1..0d8d2988c9b6cf78e9aaf1b8be9afb589e9b5462 100644 (file)
@@ -1,5 +1,5 @@
 # intlmacosx.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2004-2014 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-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,
 dnl with or without modifications, as long as this notice is preserved.
index 7470ec5973ad7e98438b1786153ce76505583c05..2fcce61be849ad12a68f61c29b9f1b6aaabca470 100644 (file)
@@ -1,5 +1,5 @@
 # lcmessage.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014 Free Software Foundation,
+dnl Copyright (C) 1995-2002, 2004-2005, 2008-2015 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
index b4e38d94463183d8626dd59d74506c138c027cff..44da98e38daf981525e88d802e8bb04fd3f22133 100644 (file)
@@ -108,13 +108,12 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
     -Waddress \
     -Waggressive-loop-optimizations \
     -Wall \
+    -Warray-bounds \
     -Wattributes \
     -Wbad-function-cast \
-    -Wbool-compare \
     -Wbuiltin-macro-redefined \
     -Wcast-align \
     -Wchar-subscripts \
-    -Wchkp \
     -Wclobbered \
     -Wcomment \
     -Wcomments \
@@ -123,10 +122,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
     -Wdate-time \
     -Wdeprecated \
     -Wdeprecated-declarations \
-    -Wdesignated-init \
     -Wdisabled-optimization \
-    -Wdiscarded-array-qualifiers \
-    -Wdiscarded-qualifiers \
     -Wdiv-by-zero \
     -Wdouble-promotion \
     -Wempty-body \
@@ -137,7 +133,6 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
     -Wformat-extra-args \
     -Wformat-nonliteral \
     -Wformat-security \
-    -Wformat-signedness \
     -Wformat-y2k \
     -Wformat-zero-length \
     -Wfree-nonheap-object \
@@ -145,19 +140,15 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
     -Wimplicit \
     -Wimplicit-function-declaration \
     -Wimplicit-int \
-    -Wincompatible-pointer-types \
     -Winit-self \
     -Winline \
-    -Wint-conversion \
     -Wint-to-pointer-cast \
     -Winvalid-memory-model \
     -Winvalid-pch \
     -Wjump-misses-init \
-    -Wlogical-not-parentheses \
     -Wlogical-op \
     -Wmain \
     -Wmaybe-uninitialized \
-    -Wmemset-transposed-args \
     -Wmissing-braces \
     -Wmissing-declarations \
     -Wmissing-field-initializers \
@@ -168,7 +159,6 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
     -Wnarrowing \
     -Wnested-externs \
     -Wnonnull \
-    -Wodr \
     -Wold-style-declaration \
     -Wold-style-definition \
     -Wopenmp-simd \
@@ -186,9 +176,6 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
     -Wreturn-type \
     -Wsequence-point \
     -Wshadow \
-    -Wshift-count-negative \
-    -Wshift-count-overflow \
-    -Wsizeof-array-argument \
     -Wsizeof-pointer-memaccess \
     -Wstack-protector \
     -Wstrict-aliasing \
@@ -198,10 +185,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
     -Wsuggest-attribute=format \
     -Wsuggest-attribute=noreturn \
     -Wsuggest-attribute=pure \
-    -Wsuggest-final-methods \
-    -Wsuggest-final-types \
     -Wswitch \
-    -Wswitch-bool \
     -Wswitch-default \
     -Wsync-nand \
     -Wsystem-headers \
@@ -233,9 +217,8 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
     gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
   done
 
-  # gcc --help=warnings outputs an unusual form for these options; list
-  # them here so that the above 'comm' command doesn't report a false match.
-  gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
+  # gcc --help=warnings outputs an unusual form for this option; list
+  # it here so that the above 'comm' command doesn't report a false match.
   gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
 
   # These are needed for older GCC versions.
index 53cdc8be8becc87942a1fcd7ea1ef088f98d81ac..33d66c188d325a8aea3f32e60c2066988938e168 100644 (file)
@@ -1,5 +1,5 @@
 # nls.m4 serial 5 (gettext-0.18)
-dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation,
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2015 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
index 43012dca1b403d6b6fddbbde35b4449f5caa7191..203c3f98b6478d3b47cc63e8952bf33b10ef4f4d 100644 (file)
@@ -1,5 +1,5 @@
-# po.m4 serial 24 (gettext-0.19)
-dnl Copyright (C) 1995-2014 Free Software Foundation, Inc.
+# po.m4 serial 23 (gettext-0.18.3)
+dnl Copyright (C) 1995-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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -30,7 +30,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
 
   dnl Release version of the gettext macros. This is used to ensure that
   dnl the gettext macros and po/Makefile.in.in are in sync.
-  AC_SUBST([GETTEXT_MACRO_VERSION], [0.19])
+  AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
 
   dnl Perform the following tests also if --disable-nls has been given,
   dnl because they are needed for "make dist" to work.
index f60cc2156e00cccbbc135fd4cc3e1d4b63be3fba..e0c4bde1f8e5cf39d248148741f027a6d7a752c4 100644 (file)
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 46
+# stdio_h.m4 serial 44
 dnl Copyright (C) 2007-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,
@@ -15,21 +15,15 @@ AC_DEFUN([gl_STDIO_H],
   dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and
   dnl inttypes.h behave like gnu instead of system; we must give our
   dnl printf wrapper the right attribute to match.
-  AC_CACHE_CHECK([which flavor of printf attribute matches inttypes macros],
+  AC_CACHE_CHECK([whether inttypes macros match system or gnu printf],
     [gl_cv_func_printf_attribute_flavor],
-    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-       #define __STDC_FORMAT_MACROS 1
+    [AC_EGREP_CPP([findme .(ll|j)d. findme],
+      [#define __STDC_FORMAT_MACROS 1
        #include <stdio.h>
        #include <inttypes.h>
-       /* For non-mingw systems, compilation will trivially succeed.
-          For mingw, compilation will succeed for older mingw (system
-          printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
-       #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
-         (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
-       extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
-       #endif
-      ]])], [gl_cv_func_printf_attribute_flavor=system],
-      [gl_cv_func_printf_attribute_flavor=gnu])])
+       findme PRIdMAX findme
+      ], [gl_cv_func_printf_attribute_flavor=gnu],
+      [gl_cv_func_printf_attribute_flavor=system])])
   if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
     AC_DEFINE([GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU], [1],
       [Define to 1 if printf and friends should be labeled with
index 5398faf78b24ac498ce2fd1cef7ef5efc61286bb..86777bd3154d21c9024dff5d8ff4a79243579101 100644 (file)
 
 /* Some platforms lack max_align_t.  */
 #if !@HAVE_MAX_ALIGN_T@
-/* On the x86, the maximum storage alignment of double, long, etc. is 4,
-   but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8,
-   and the C11 standard allows this.  Work around this problem by
-   using __alignof__ (which returns 8 for double) rather than _Alignof
-   (which returns 4), and align each union member accordingly.  */
-# ifdef __GNUC__
-#  define _GL_STDDEF_ALIGNAS(type) \
-     __attribute__ ((__aligned__ (__alignof__ (type))))
-# else
-#  define _GL_STDDEF_ALIGNAS(type) /* */
-# endif
 typedef union
 {
-  char *__p _GL_STDDEF_ALIGNAS (char *);
-  double __d _GL_STDDEF_ALIGNAS (double);
-  long double __ld _GL_STDDEF_ALIGNAS (long double);
-  long int __i _GL_STDDEF_ALIGNAS (long int);
+  char *__p;
+  double __d;
+  long double __ld;
+  long int __i;
 } max_align_t;
 #endif
 
index 47e11883ece98cb85516cccef87c9a0043d36597..fefc4218904e6020536a20e8506a7d2f6e673605 100644 (file)
    You should have received a copy of the GNU Lesser General Public License
    along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
+#ifndef _@GUARD_PREFIX@_STRING_H
+
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 #endif
 @PRAGMA_COLUMNS@
 
-#if defined _GL_ALREADY_INCLUDING_STRING_H
-/* Special invocation convention:
-   - On OS X/NetBSD we have a sequence of nested includes
-       <string.h> -> <strings.h> -> "string.h"
-     In this situation system _chk variants due to -D_FORTIFY_SOURCE
-     might be used after any replacements defined here.  */
-
-#@INCLUDE_NEXT@ @NEXT_STRING_H@
-
-#else
-/* Normal invocation convention.  */
-
-#ifndef _@GUARD_PREFIX@_STRING_H
-
-#define _GL_ALREADY_INCLUDING_STRING_H
-
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT@ @NEXT_STRING_H@
 
-#undef _GL_ALREADY_INCLUDING_STRING_H
-
 #ifndef _@GUARD_PREFIX@_STRING_H
 #define _@GUARD_PREFIX@_STRING_H
 
@@ -1043,4 +1027,3 @@ _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - "
 
 #endif /* _@GUARD_PREFIX@_STRING_H */
 #endif /* _@GUARD_PREFIX@_STRING_H */
-#endif
index 78846f696839df88118cf05ac559c262496a83d4..13a72bee90c9623f28a03f6228108690d8e6ed0e 100644 (file)
 #endif
 /* Get CHAR_BIT.  */
 #include <limits.h>
-/* On mingw, __USE_MINGW_ANSI_STDIO only works if <stdio.h> is also included */
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-# include <stdio.h>
-#endif
 
 #if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX)
 # error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to <bug-gnulib@gnu.org>."
index f8b160f58c08cd31f3e496fa573d8c8c5f458ec9..cfa52371ab3f7afd6f1945c5d090ad8af051f5b2 100644 (file)
@@ -57,8 +57,7 @@ main (void)
               /* FILE1 is a regular file or a symlink to a regular file.  */
               if (len != statbuf.st_size)
                 {
-                  fprintf (stderr, "Read %lu from %s...\n",
-                           (unsigned long) len, FILE1);
+                  fprintf (stderr, "Read %ld from %s...\n", (unsigned long) len, FILE1);
                   err = 1;
                 }
             }
@@ -99,8 +98,7 @@ main (void)
              is not a regular file.  */
           if (len != 0)
             {
-              fprintf (stderr, "Read %lu from %s...\n",
-                       (unsigned long) len, FILE2);
+              fprintf (stderr, "Read %ld from %s...\n", (unsigned long) len, FILE2);
               err = 1;
             }
           free (out);
index aa6ae549cc7eca28339134b930db78a96ef4d1ef..317949655e96eafe57847365067a46237b81ebd1 100644 (file)
@@ -55,16 +55,6 @@ verify (alignof (ptrdiff_t) <= alignof (max_align_t));
 verify (alignof (size_t) <= alignof (max_align_t));
 verify (alignof (wchar_t) <= alignof (max_align_t));
 verify (alignof (struct d) <= alignof (max_align_t));
-#if defined __GNUC__ || defined __IBM__ALIGNOF__
-verify (__alignof__ (double) <= __alignof__ (max_align_t));
-verify (__alignof__ (int) <= __alignof__ (max_align_t));
-verify (__alignof__ (long double) <= __alignof__ (max_align_t));
-verify (__alignof__ (long int) <= __alignof__ (max_align_t));
-verify (__alignof__ (ptrdiff_t) <= __alignof__ (max_align_t));
-verify (__alignof__ (size_t) <= __alignof__ (max_align_t));
-verify (__alignof__ (wchar_t) <= __alignof__ (max_align_t));
-verify (__alignof__ (struct d) <= __alignof__ (max_align_t));
-#endif
 
 int
 main (void)
index eb4fb701753f6d687405d4563ec6b481e5511179..ccffef5853c9e23e678cac590f1aea144f0ad68e 100644 (file)
 # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
 #endif
 
-/* On mingw, the flavor of printf depends on whether the extensions module
- * is in use; the check for <stdio.h> determines the witness macro.  */
-#ifndef _GL_ATTRIBUTE_SPEC_PRINTF
-# if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
-#  define _GL_ATTRIBUTE_SPEC_PRINTF __gnu_printf__
-# else
-#  define _GL_ATTRIBUTE_SPEC_PRINTF __printf__
-# endif
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -50,11 +40,11 @@ extern "C" {
    If STATUS is nonzero, terminate the program with 'exit (STATUS)'.  */
 
 extern void error (int __status, int __errnum, const char *__format, ...)
-     _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 3, 4));
+     _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4));
 
 extern void error_at_line (int __status, int __errnum, const char *__fname,
                            unsigned int __lineno, const char *__format, ...)
-     _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 5, 6));
+     _GL_ATTRIBUTE_FORMAT ((__printf__, 5, 6));
 
 /* If NULL, error will flush stdout, then print on stderr the program
    name, a colon and a space.  Otherwise, error will call this
index 1c65d2a848e3c1f61a01cff1a2b94cca05a9c460..b38badd1a11af77e7fcaed99f87f8fb754e0d09c 100644 (file)
@@ -128,7 +128,7 @@ fseeko (FILE *fp, off_t offset, int whence)
       fp->_offset = pos;
 #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
       /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
-# if defined __CYGWIN__ || (defined __NetBSD__ && __NetBSD_Version__ >= 600000000)
+# if defined __CYGWIN__
       /* fp_->_offset is typed as an integer.  */
       fp_->_offset = pos;
 # else
index 72800650e6f23e481623892512083d6f5071b06a..e74339a165e0a78085d550a30a119ad012a1ca2e 100644 (file)
@@ -74,13 +74,12 @@ AC_DEFUN([gl_EXTERN_INLINE],
 # define _GL_EXTERN_INLINE static _GL_UNUSED
 #endif
 
-/* In GCC 4.6 (inclusive) to 5.1 (exclusive),
-   suppress bogus "no previous prototype for 'FOO'"
+/* 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 __GNUC__ == 4 && 6 <= __GNUC_MINOR__
+#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
 # if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
 #  define _GL_INLINE_HEADER_CONST_PRAGMA
 # else
index f60cc2156e00cccbbc135fd4cc3e1d4b63be3fba..e0c4bde1f8e5cf39d248148741f027a6d7a752c4 100644 (file)
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 46
+# stdio_h.m4 serial 44
 dnl Copyright (C) 2007-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,
@@ -15,21 +15,15 @@ AC_DEFUN([gl_STDIO_H],
   dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and
   dnl inttypes.h behave like gnu instead of system; we must give our
   dnl printf wrapper the right attribute to match.
-  AC_CACHE_CHECK([which flavor of printf attribute matches inttypes macros],
+  AC_CACHE_CHECK([whether inttypes macros match system or gnu printf],
     [gl_cv_func_printf_attribute_flavor],
-    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-       #define __STDC_FORMAT_MACROS 1
+    [AC_EGREP_CPP([findme .(ll|j)d. findme],
+      [#define __STDC_FORMAT_MACROS 1
        #include <stdio.h>
        #include <inttypes.h>
-       /* For non-mingw systems, compilation will trivially succeed.
-          For mingw, compilation will succeed for older mingw (system
-          printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
-       #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
-         (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
-       extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
-       #endif
-      ]])], [gl_cv_func_printf_attribute_flavor=system],
-      [gl_cv_func_printf_attribute_flavor=gnu])])
+       findme PRIdMAX findme
+      ], [gl_cv_func_printf_attribute_flavor=gnu],
+      [gl_cv_func_printf_attribute_flavor=system])])
   if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
     AC_DEFINE([GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU], [1],
       [Define to 1 if printf and friends should be labeled with
index 698307bc9559d35e497a2bdd5c42726aeb00df94..44db24173c4c7438ce0b1ac710cba78d9b4b1684 100644 (file)
 
 /* Some platforms lack max_align_t.  */
 #if !@HAVE_MAX_ALIGN_T@
-/* On the x86, the maximum storage alignment of double, long, etc. is 4,
-   but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8,
-   and the C11 standard allows this.  Work around this problem by
-   using __alignof__ (which returns 8 for double) rather than _Alignof
-   (which returns 4), and align each union member accordingly.  */
-# ifdef __GNUC__
-#  define _GL_STDDEF_ALIGNAS(type) \
-     __attribute__ ((__aligned__ (__alignof__ (type))))
-# else
-#  define _GL_STDDEF_ALIGNAS(type) /* */
-# endif
 typedef union
 {
-  char *__p _GL_STDDEF_ALIGNAS (char *);
-  double __d _GL_STDDEF_ALIGNAS (double);
-  long double __ld _GL_STDDEF_ALIGNAS (long double);
-  long int __i _GL_STDDEF_ALIGNAS (long int);
+  char *__p;
+  double __d;
+  long double __ld;
+  long int __i;
 } max_align_t;
 #endif
 
index 2abd6bc0e1066de23f38f4cf4c5a22a39c1477c4..ebd727eda147dda0e86d940a193781d8e6f3818d 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
+#ifndef _@GUARD_PREFIX@_STRING_H
+
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 #endif
 @PRAGMA_COLUMNS@
 
-#if defined _GL_ALREADY_INCLUDING_STRING_H
-/* Special invocation convention:
-   - On OS X/NetBSD we have a sequence of nested includes
-       <string.h> -> <strings.h> -> "string.h"
-     In this situation system _chk variants due to -D_FORTIFY_SOURCE
-     might be used after any replacements defined here.  */
-
-#@INCLUDE_NEXT@ @NEXT_STRING_H@
-
-#else
-/* Normal invocation convention.  */
-
-#ifndef _@GUARD_PREFIX@_STRING_H
-
-#define _GL_ALREADY_INCLUDING_STRING_H
-
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT@ @NEXT_STRING_H@
 
-#undef _GL_ALREADY_INCLUDING_STRING_H
-
 #ifndef _@GUARD_PREFIX@_STRING_H
 #define _@GUARD_PREFIX@_STRING_H
 
@@ -1043,4 +1027,3 @@ _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - "
 
 #endif /* _@GUARD_PREFIX@_STRING_H */
 #endif /* _@GUARD_PREFIX@_STRING_H */
-#endif
index 81ef680a3a7aabd036529cf35b6a976f2c13f945..68f847a2c4ee877948d3584b23c7f83193245bdb 100644 (file)
@@ -41,8 +41,7 @@ extern "C" {
 # define _GL_ATTRIBUTE_MALLOC
 #endif
 
-#if ! defined __clang__ && \
-    (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
 # define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
 #else
 # define _GL_ATTRIBUTE_ALLOC_SIZE(args)