]> code.delx.au - gnu-emacs/commitdiff
Merge from gnulib.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 4 Jan 2013 02:17:49 +0000 (18:17 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 4 Jan 2013 02:17:49 +0000 (18:17 -0800)
This incorporates:
2013-01-04 stdio: remove now-unnecessary stdio.c
2013-01-04 fprintftime: depend on stdio, not ignore-value
2013-01-04 fwrite: silence __wur only for older glibc versions
2013-01-04 fwrite: silence __wur without using inline
* lib/stdio.c: Remove.
* lib/stdio.in.h, lib/strftime.c: Update from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.

ChangeLog
lib/gnulib.mk
lib/stdio.c [deleted file]
lib/stdio.in.h
lib/strftime.c
m4/gnulib-comp.m4

index d56d74b20dbc497c48f6ff26870aa24717a18ebf..68c0d85b5cc91ce6afd9136dc5f99159e1db5c3b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2013-01-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Merge from gnulib, incorporating:
+       2013-01-04 stdio: remove now-unnecessary stdio.c
+       2013-01-04 fprintftime: depend on stdio, not ignore-value
+       2013-01-04 fwrite: silence __wur only for older glibc versions
+       2013-01-04 fwrite: silence __wur without using inline
+       * lib/stdio.c: Remove.
+       * lib/stdio.in.h, lib/strftime.c: Update from gnulib.
+       * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
+
 2013-01-02  Paul Eggert  <eggert@cs.ucla.edu>
 
        Merge from gnulib, incorporating copyright-date changes and:
index ca628a28da43f7fb1d2697050f937b988642c142..2347d84448d3906bf674a235e47f8fe1fbde0dbc 100644 (file)
@@ -774,7 +774,6 @@ EXTRA_DIST += stdint.in.h
 ## begin gnulib module stdio
 
 BUILT_SOURCES += stdio.h
-libgnu_a_SOURCES += stdio.c
 
 # We need the following in order to create <stdio.h> when the system
 # doesn't have one that works with the given compiler.
diff --git a/lib/stdio.c b/lib/stdio.c
deleted file mode 100644 (file)
index e6ed829..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <config.h>
-#define _GL_STDIO_INLINE _GL_EXTERN_INLINE
-#include "stdio.h"
index d9a67dc4d414cf32b438a1820ee0d860988e4f12..d6af99ca77dcb0cb45759782da546ff1ff17b167 100644 (file)
 #ifndef _@GUARD_PREFIX@_STDIO_H
 #define _@GUARD_PREFIX@_STDIO_H
 
-_GL_INLINE_HEADER_BEGIN
-#ifndef _GL_STDIO_INLINE
-# define _GL_STDIO_INLINE _GL_INLINE
-#endif
-
 /* Get va_list.  Needed on many systems, including glibc 2.8.  */
 #include <stdarg.h>
 
@@ -580,21 +575,17 @@ _GL_CXXALIAS_RPL (fwrite, size_t,
 _GL_CXXALIAS_SYS (fwrite, size_t,
                   (const void *ptr, size_t s, size_t n, FILE *stream));
 
-/* Work around glibc bug 11959
+/* Work around bug 11959 when fortifying glibc 2.4 through 2.15
    <http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>,
    which sometimes causes an unwanted diagnostic for fwrite calls.
-   This affects only function declaration attributes, so it's not
-   needed for C++.  */
-#  if !defined __cplusplus && 0 < __USE_FORTIFY_LEVEL
-_GL_STDIO_INLINE size_t _GL_ARG_NONNULL ((1, 4))
-rpl_fwrite (const void *ptr, size_t s, size_t n, FILE *stream)
-{
-  size_t r = fwrite (ptr, s, n, stream);
-  (void) r;
-  return r;
-}
+   This affects only function declaration attributes under certain
+   versions of gcc, and is not needed for C++.  */
+#  if (0 < __USE_FORTIFY_LEVEL                                          \
+       && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \
+       && 3 < __GNUC__ + (4 <= __GNUC_MINOR__)                          \
+       && !defined __cplusplus)
 #   undef fwrite
-#   define fwrite rpl_fwrite
+#   define fwrite(a, b, c, d) ({size_t __r = fwrite (a, b, c, d); __r; })
 #  endif
 # endif
 _GL_CXXALIASWARN (fwrite);
@@ -1338,8 +1329,6 @@ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - "
                       "POSIX compliance");
 #endif
 
-_GL_INLINE_HEADER_END
-
 #endif /* _@GUARD_PREFIX@_STDIO_H */
 #endif /* _@GUARD_PREFIX@_STDIO_H */
 #endif
index 1d58f2a160b36ebca04682e9511f612532a8a0e8..213ced860dee010bbac8d6c99c9532239104c44a 100644 (file)
@@ -26,7 +26,6 @@
 #else
 # include <config.h>
 # if FPRINTFTIME
-#  include "ignore-value.h"
 #  include "fprintftime.h"
 # else
 #  include "strftime.h"
@@ -209,15 +208,7 @@ extern char *tzname[];
          else if (to_uppcase)                                                 \
            fwrite_uppcase (p, (s), _n);                                       \
          else                                                                 \
-           {                                                                  \
-             /* We are ignoring the value of fwrite here, in spite of the     \
-                fact that technically, that may not be valid: the fwrite      \
-                specification in POSIX 2008 defers to that of fputc, which    \
-                is intended to be consistent with the one from ISO C,         \
-                which permits failure due to ENOMEM *without* setting the     \
-                stream's error indicator.  */                                 \
-             ignore_value (fwrite ((s), _n, 1, p));                           \
-           }                                                                  \
+           fwrite (s, _n, 1, p);                                              \
        }                                                                      \
      while (0)                                                                \
     )
index 06dd51a4d53fdb4ca163985bd747f75855b3062a..b7109c5f87f284e13f20cb28c7acbfc347f8d3c6 100644 (file)
@@ -712,7 +712,6 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/stdbool.in.h
   lib/stddef.in.h
   lib/stdint.in.h
-  lib/stdio.c
   lib/stdio.in.h
   lib/stdlib.in.h
   lib/strftime.c