summaryrefslogtreecommitdiff
path: root/lib/stdio.in.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-05-16 00:10:39 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2013-05-16 00:10:39 -0700
commitcdd0de4b056b4612e055fa15f65af118dafc9b18 (patch)
treea9d72533fb38b82969308316c958a3263d85d10d /lib/stdio.in.h
parent9df4ec5e9044e92e792ba9e8cb714603e32c5cc5 (diff)
downloademacs-cdd0de4b056b4612e055fa15f65af118dafc9b18.tar.gz
Merge from gnulib.
2013-05-15 manywarnings: update for GCC 4.8.0 2013-05-15 stdio: use __REDIRECT for fwrite, fwrite_unlocked 2013-05-15 sig2str, stdio, warnings: port to clang
Diffstat (limited to 'lib/stdio.in.h')
-rw-r--r--lib/stdio.in.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/stdio.in.h b/lib/stdio.in.h
index d6af99ca77d..06cbad00d3d 100644
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -579,13 +579,23 @@ _GL_CXXALIAS_SYS (fwrite, size_t,
<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 under certain
- versions of gcc, and is not needed for C++. */
+ versions of gcc and clang, 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(a, b, c, d) ({size_t __r = fwrite (a, b, c, d); __r; })
+# undef fwrite_unlocked
+extern size_t __REDIRECT (rpl_fwrite,
+ (const void *__restrict, size_t, size_t,
+ FILE *__restrict),
+ fwrite);
+extern size_t __REDIRECT (rpl_fwrite_unlocked,
+ (const void *__restrict, size_t, size_t,
+ FILE *__restrict),
+ fwrite_unlocked);
+# define fwrite rpl_fwrite
+# define fwrite_unlocked rpl_fwrite_unlocked
# endif
# endif
_GL_CXXALIASWARN (fwrite);