aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKenichi Handa2013-05-23 00:12:59 +0900
committerKenichi Handa2013-05-23 00:12:59 +0900
commite1b96d7e637cf76864013f8dba68135f07638ab8 (patch)
tree1a2ccd5961a60f0268a37444071e8cd7a2255fbc /lib
parente6d2f1553635a746396f2f4261dde31e03e0fdd1 (diff)
parent5d0acd9d3bb26adfac1c80b78aa48dc8b2d34fe0 (diff)
downloademacs-e1b96d7e637cf76864013f8dba68135f07638ab8.tar.gz
emacs-e1b96d7e637cf76864013f8dba68135f07638ab8.zip
merge trunk
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile.am4
-rw-r--r--lib/sig2str.c12
-rw-r--r--lib/stdio.in.h14
3 files changed, 24 insertions, 6 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
index c72e0904221..f76d0d3928d 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -9,6 +9,10 @@ SUFFIXES =
9AM_CFLAGS = $(PROFILING_CFLAGS) $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS) 9AM_CFLAGS = $(PROFILING_CFLAGS) $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)
10DEFAULT_INCLUDES = -I. -I$(top_srcdir)/lib -I../src -I$(top_srcdir)/src 10DEFAULT_INCLUDES = -I. -I$(top_srcdir)/lib -I../src -I$(top_srcdir)/src
11 11
12if BUILDING_FOR_WINDOWSNT
13include ../nt/gnulib.mk
14else
12include gnulib.mk 15include gnulib.mk
13 16
14libgnu_a_SOURCES += openat-die.c save-cwd.c 17libgnu_a_SOURCES += openat-die.c save-cwd.c
18endif
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)
325 { 325 {
326 int rtmin = SIGRTMIN; 326 int rtmin = SIGRTMIN;
327 int rtmax = SIGRTMAX; 327 int rtmax = SIGRTMAX;
328 int base, delta;
328 329
329 if (! (rtmin <= signum && signum <= rtmax)) 330 if (! (rtmin <= signum && signum <= rtmax))
330 return -1; 331 return -1;
331 332
332 if (signum <= rtmin + (rtmax - rtmin) / 2) 333 if (signum <= rtmin + (rtmax - rtmin) / 2)
333 { 334 {
334 int delta = signum - rtmin; 335 strcpy (signame, "RTMIN");
335 sprintf (signame, delta ? "RTMIN+%d" : "RTMIN", delta); 336 base = rtmin;
336 } 337 }
337 else 338 else
338 { 339 {
339 int delta = rtmax - signum; 340 strcpy (signame, "RTMAX");
340 sprintf (signame, delta ? "RTMAX-%d" : "RTMAX", delta); 341 base = rtmax;
341 } 342 }
342 343
344 delta = signum - base;
345 if (delta != 0)
346 sprintf (signame + 5, "%+d", delta);
343 return 0; 347 return 0;
344 } 348 }
345} 349}
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
589extern size_t __REDIRECT (rpl_fwrite,
590 (const void *__restrict, size_t, size_t,
591 FILE *__restrict),
592 fwrite);
593extern 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);