aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert2015-10-21 20:10:40 -0700
committerPaul Eggert2015-10-21 20:11:23 -0700
commit0bb27cd32e4a6a7fc4485381efc9ff0026e15689 (patch)
tree4367708145574829e615f3840bbdad923a2343a0 /lib
parent2ab48bafa3e8c3c686dcadfb5d2410178e9dd269 (diff)
downloademacs-0bb27cd32e4a6a7fc4485381efc9ff0026e15689.tar.gz
emacs-0bb27cd32e4a6a7fc4485381efc9ff0026e15689.zip
Merge from gnulib
This incorporates: 2015-10-18 stdalign: work around pre-4.9 GCC x86 bug 2015-10-18 time_rz: avoid warning from bleeding-edge gcc's -Wnonnull * doc/misc/texinfo.tex, lib/stdalign.in.h, lib/time_rz.c: Copy from gnulib.
Diffstat (limited to 'lib')
-rw-r--r--lib/stdalign.in.h5
-rw-r--r--lib/time_rz.c9
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/stdalign.in.h b/lib/stdalign.in.h
index c6115b6dbe0..ce1e793e273 100644
--- a/lib/stdalign.in.h
+++ b/lib/stdalign.in.h
@@ -52,7 +52,10 @@
52#undef _Alignas 52#undef _Alignas
53#undef _Alignof 53#undef _Alignof
54 54
55#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 55/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023
56 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
57#if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
58 || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9)))
56# ifdef __cplusplus 59# ifdef __cplusplus
57# if 201103 <= __cplusplus 60# if 201103 <= __cplusplus
58# define _Alignof(type) alignof (type) 61# define _Alignof(type) alignof (type)
diff --git a/lib/time_rz.c b/lib/time_rz.c
index f94893aa2c1..a89b7e70f14 100644
--- a/lib/time_rz.c
+++ b/lib/time_rz.c
@@ -90,8 +90,7 @@ extend_abbrs (char *abbrs, char const *abbr, size_t abbr_size)
90} 90}
91 91
92/* Return a newly allocated time zone for NAME, or NULL on failure. 92/* Return a newly allocated time zone for NAME, or NULL on failure.
93 As a special case, return a nonzero constant for wall clock time, a 93 A null NAME stands for wall clock time (which is like unset TZ). */
94 constant that survives freeing. */
95timezone_t 94timezone_t
96tzalloc (char const *name) 95tzalloc (char const *name)
97{ 96{
@@ -288,10 +287,8 @@ localtime_rz (timezone_t tz, time_t const *t, struct tm *tm)
288 timezone_t old_tz = set_tz (tz); 287 timezone_t old_tz = set_tz (tz);
289 if (old_tz) 288 if (old_tz)
290 { 289 {
291 tm = localtime_r (t, tm); 290 bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm);
292 if (tm && !save_abbr (tz, tm)) 291 if (revert_tz (old_tz) && abbr_saved)
293 tm = NULL;
294 if (revert_tz (old_tz))
295 return tm; 292 return tm;
296 } 293 }
297 return NULL; 294 return NULL;