diff options
| author | Paul Eggert | 2013-05-16 00:10:39 -0700 |
|---|---|---|
| committer | Paul Eggert | 2013-05-16 00:10:39 -0700 |
| commit | cdd0de4b056b4612e055fa15f65af118dafc9b18 (patch) | |
| tree | a9d72533fb38b82969308316c958a3263d85d10d /lib/stdio.in.h | |
| parent | 9df4ec5e9044e92e792ba9e8cb714603e32c5cc5 (diff) | |
| download | emacs-cdd0de4b056b4612e055fa15f65af118dafc9b18.tar.gz emacs-cdd0de4b056b4612e055fa15f65af118dafc9b18.zip | |
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.h | 14 |
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, | |||
| 579 | <http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>, | 579 | <http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>, |
| 580 | which sometimes causes an unwanted diagnostic for fwrite calls. | 580 | which sometimes causes an unwanted diagnostic for fwrite calls. |
| 581 | This affects only function declaration attributes under certain | 581 | This affects only function declaration attributes under certain |
| 582 | versions of gcc, and is not needed for C++. */ | 582 | versions of gcc and clang, and is not needed for C++. */ |
| 583 | # if (0 < __USE_FORTIFY_LEVEL \ | 583 | # if (0 < __USE_FORTIFY_LEVEL \ |
| 584 | && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \ | 584 | && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \ |
| 585 | && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \ | 585 | && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \ |
| 586 | && !defined __cplusplus) | 586 | && !defined __cplusplus) |
| 587 | # undef fwrite | 587 | # undef fwrite |
| 588 | # define fwrite(a, b, c, d) ({size_t __r = fwrite (a, b, c, d); __r; }) | 588 | # undef fwrite_unlocked |
| 589 | extern size_t __REDIRECT (rpl_fwrite, | ||
| 590 | (const void *__restrict, size_t, size_t, | ||
| 591 | FILE *__restrict), | ||
| 592 | fwrite); | ||
| 593 | extern size_t __REDIRECT (rpl_fwrite_unlocked, | ||
| 594 | (const void *__restrict, size_t, size_t, | ||
| 595 | FILE *__restrict), | ||
| 596 | fwrite_unlocked); | ||
| 597 | # define fwrite rpl_fwrite | ||
| 598 | # define fwrite_unlocked rpl_fwrite_unlocked | ||
| 589 | # endif | 599 | # endif |
| 590 | # endif | 600 | # endif |
| 591 | _GL_CXXALIASWARN (fwrite); | 601 | _GL_CXXALIASWARN (fwrite); |