aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdio.in.h
diff options
context:
space:
mode:
authorPaul Eggert2013-01-03 18:17:49 -0800
committerPaul Eggert2013-01-03 18:17:49 -0800
commitee0d39381afabe6ca81701e786fa506239e261d2 (patch)
tree7f04c7ae2157f42b11f9f718cfdff1de458a4242 /lib/stdio.in.h
parent342532db2bf1f9d9efcd2073b6f4395db548df5a (diff)
downloademacs-ee0d39381afabe6ca81701e786fa506239e261d2.tar.gz
emacs-ee0d39381afabe6ca81701e786fa506239e261d2.zip
Merge from gnulib.
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.
Diffstat (limited to 'lib/stdio.in.h')
-rw-r--r--lib/stdio.in.h27
1 files changed, 8 insertions, 19 deletions
diff --git a/lib/stdio.in.h b/lib/stdio.in.h
index d9a67dc4d41..d6af99ca77d 100644
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -46,11 +46,6 @@
46#ifndef _@GUARD_PREFIX@_STDIO_H 46#ifndef _@GUARD_PREFIX@_STDIO_H
47#define _@GUARD_PREFIX@_STDIO_H 47#define _@GUARD_PREFIX@_STDIO_H
48 48
49_GL_INLINE_HEADER_BEGIN
50#ifndef _GL_STDIO_INLINE
51# define _GL_STDIO_INLINE _GL_INLINE
52#endif
53
54/* Get va_list. Needed on many systems, including glibc 2.8. */ 49/* Get va_list. Needed on many systems, including glibc 2.8. */
55#include <stdarg.h> 50#include <stdarg.h>
56 51
@@ -580,21 +575,17 @@ _GL_CXXALIAS_RPL (fwrite, size_t,
580_GL_CXXALIAS_SYS (fwrite, size_t, 575_GL_CXXALIAS_SYS (fwrite, size_t,
581 (const void *ptr, size_t s, size_t n, FILE *stream)); 576 (const void *ptr, size_t s, size_t n, FILE *stream));
582 577
583/* Work around glibc bug 11959 578/* Work around bug 11959 when fortifying glibc 2.4 through 2.15
584 <http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>, 579 <http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>,
585 which sometimes causes an unwanted diagnostic for fwrite calls. 580 which sometimes causes an unwanted diagnostic for fwrite calls.
586 This affects only function declaration attributes, so it's not 581 This affects only function declaration attributes under certain
587 needed for C++. */ 582 versions of gcc, and is not needed for C++. */
588# if !defined __cplusplus && 0 < __USE_FORTIFY_LEVEL 583# if (0 < __USE_FORTIFY_LEVEL \
589_GL_STDIO_INLINE size_t _GL_ARG_NONNULL ((1, 4)) 584 && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \
590rpl_fwrite (const void *ptr, size_t s, size_t n, FILE *stream) 585 && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \
591{ 586 && !defined __cplusplus)
592 size_t r = fwrite (ptr, s, n, stream);
593 (void) r;
594 return r;
595}
596# undef fwrite 587# undef fwrite
597# define fwrite rpl_fwrite 588# define fwrite(a, b, c, d) ({size_t __r = fwrite (a, b, c, d); __r; })
598# endif 589# endif
599# endif 590# endif
600_GL_CXXALIASWARN (fwrite); 591_GL_CXXALIASWARN (fwrite);
@@ -1338,8 +1329,6 @@ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - "
1338 "POSIX compliance"); 1329 "POSIX compliance");
1339#endif 1330#endif
1340 1331
1341_GL_INLINE_HEADER_END
1342
1343#endif /* _@GUARD_PREFIX@_STDIO_H */ 1332#endif /* _@GUARD_PREFIX@_STDIO_H */
1344#endif /* _@GUARD_PREFIX@_STDIO_H */ 1333#endif /* _@GUARD_PREFIX@_STDIO_H */
1345#endif 1334#endif