diff options
author | Eli Zaretskii <eliz@gnu.org> | 2013-05-16 12:58:56 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2013-05-16 12:58:56 +0300 |
commit | a9519e2685d19b13ce4e3e1ba13f97569013627e (patch) | |
tree | 6a9e0e35514c400749f23c891e9a95577fb9bfc1 /lib | |
parent | 3946d31b7bcf2a7dceacb86598823360f457cd19 (diff) | |
parent | 2d4bf34b5b83b3728b2fb18a72536f3e14afcf34 (diff) | |
download | emacs-a9519e2685d19b13ce4e3e1ba13f97569013627e.tar.gz emacs-a9519e2685d19b13ce4e3e1ba13f97569013627e.tar.bz2 emacs-a9519e2685d19b13ce4e3e1ba13f97569013627e.zip |
Merge from trunk.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sig2str.c | 12 | ||||
-rw-r--r-- | lib/stdio.in.h | 14 |
2 files changed, 20 insertions, 6 deletions
diff --git a/lib/sig2str.c b/lib/sig2str.c index 8b36e2facf0..6ead2a71d13 100644 --- a/lib/sig2str.c +++ b/lib/sig2str.c @@ -325,21 +325,25 @@ sig2str (int signum, char *signame) { int rtmin = SIGRTMIN; int rtmax = SIGRTMAX; + int base, delta; if (! (rtmin <= signum && signum <= rtmax)) return -1; if (signum <= rtmin + (rtmax - rtmin) / 2) { - int delta = signum - rtmin; - sprintf (signame, delta ? "RTMIN+%d" : "RTMIN", delta); + strcpy (signame, "RTMIN"); + base = rtmin; } else { - int delta = rtmax - signum; - sprintf (signame, delta ? "RTMAX-%d" : "RTMAX", delta); + strcpy (signame, "RTMAX"); + base = rtmax; } + delta = signum - base; + if (delta != 0) + sprintf (signame + 5, "%+d", delta); return 0; } } 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); |