aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2013-01-03 18:17:49 -0800
committerPaul Eggert2013-01-03 18:17:49 -0800
commitee0d39381afabe6ca81701e786fa506239e261d2 (patch)
tree7f04c7ae2157f42b11f9f718cfdff1de458a4242
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.
-rw-r--r--ChangeLog11
-rw-r--r--lib/gnulib.mk1
-rw-r--r--lib/stdio.c3
-rw-r--r--lib/stdio.in.h27
-rw-r--r--lib/strftime.c11
-rw-r--r--m4/gnulib-comp.m41
6 files changed, 20 insertions, 34 deletions
diff --git a/ChangeLog b/ChangeLog
index d56d74b20db..68c0d85b5cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
12013-01-04 Paul Eggert <eggert@cs.ucla.edu>
2
3 Merge from gnulib, incorporating:
4 2013-01-04 stdio: remove now-unnecessary stdio.c
5 2013-01-04 fprintftime: depend on stdio, not ignore-value
6 2013-01-04 fwrite: silence __wur only for older glibc versions
7 2013-01-04 fwrite: silence __wur without using inline
8 * lib/stdio.c: Remove.
9 * lib/stdio.in.h, lib/strftime.c: Update from gnulib.
10 * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
11
12013-01-02 Paul Eggert <eggert@cs.ucla.edu> 122013-01-02 Paul Eggert <eggert@cs.ucla.edu>
2 13
3 Merge from gnulib, incorporating copyright-date changes and: 14 Merge from gnulib, incorporating copyright-date changes and:
diff --git a/lib/gnulib.mk b/lib/gnulib.mk
index ca628a28da4..2347d84448d 100644
--- a/lib/gnulib.mk
+++ b/lib/gnulib.mk
@@ -774,7 +774,6 @@ EXTRA_DIST += stdint.in.h
774## begin gnulib module stdio 774## begin gnulib module stdio
775 775
776BUILT_SOURCES += stdio.h 776BUILT_SOURCES += stdio.h
777libgnu_a_SOURCES += stdio.c
778 777
779# We need the following in order to create <stdio.h> when the system 778# We need the following in order to create <stdio.h> when the system
780# doesn't have one that works with the given compiler. 779# doesn't have one that works with the given compiler.
diff --git a/lib/stdio.c b/lib/stdio.c
deleted file mode 100644
index e6ed82996b7..00000000000
--- a/lib/stdio.c
+++ /dev/null
@@ -1,3 +0,0 @@
1#include <config.h>
2#define _GL_STDIO_INLINE _GL_EXTERN_INLINE
3#include "stdio.h"
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
diff --git a/lib/strftime.c b/lib/strftime.c
index 1d58f2a160b..213ced860de 100644
--- a/lib/strftime.c
+++ b/lib/strftime.c
@@ -26,7 +26,6 @@
26#else 26#else
27# include <config.h> 27# include <config.h>
28# if FPRINTFTIME 28# if FPRINTFTIME
29# include "ignore-value.h"
30# include "fprintftime.h" 29# include "fprintftime.h"
31# else 30# else
32# include "strftime.h" 31# include "strftime.h"
@@ -209,15 +208,7 @@ extern char *tzname[];
209 else if (to_uppcase) \ 208 else if (to_uppcase) \
210 fwrite_uppcase (p, (s), _n); \ 209 fwrite_uppcase (p, (s), _n); \
211 else \ 210 else \
212 { \ 211 fwrite (s, _n, 1, p); \
213 /* We are ignoring the value of fwrite here, in spite of the \
214 fact that technically, that may not be valid: the fwrite \
215 specification in POSIX 2008 defers to that of fputc, which \
216 is intended to be consistent with the one from ISO C, \
217 which permits failure due to ENOMEM *without* setting the \
218 stream's error indicator. */ \
219 ignore_value (fwrite ((s), _n, 1, p)); \
220 } \
221 } \ 212 } \
222 while (0) \ 213 while (0) \
223 ) 214 )
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 06dd51a4d53..b7109c5f87f 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -712,7 +712,6 @@ AC_DEFUN([gl_FILE_LIST], [
712 lib/stdbool.in.h 712 lib/stdbool.in.h
713 lib/stddef.in.h 713 lib/stddef.in.h
714 lib/stdint.in.h 714 lib/stdint.in.h
715 lib/stdio.c
716 lib/stdio.in.h 715 lib/stdio.in.h
717 lib/stdlib.in.h 716 lib/stdlib.in.h
718 lib/strftime.c 717 lib/strftime.c