aboutsummaryrefslogtreecommitdiffstats
path: root/src/editfns.c
diff options
context:
space:
mode:
authorPaul Eggert2017-05-01 15:33:06 -0700
committerPaul Eggert2017-05-01 15:33:26 -0700
commit634d0a907ff7ba5901dfe3624e58d718f3f37cec (patch)
tree6bf86cf04d8b28a79693df9cdef1063c9b06ca76 /src/editfns.c
parent16b49e214ad828de29ceb57ad1b443eece9bba03 (diff)
downloademacs-634d0a907ff7ba5901dfe3624e58d718f3f37cec.tar.gz
emacs-634d0a907ff7ba5901dfe3624e58d718f3f37cec.zip
Merge from gnulib
This incorporates: 2017-05-01 New module 'localtime-buffer' 2017-04-30 utimens: Add support for native Windows * admin/merge-gnulib (AVOIDED_MODULES): Add tzset. * configure.ac (tzset): No need for Emacs itself to check now. * lib/gettimeofday.c, lib/time.in.h, lib/time_rz.c, lib/utimens.c: * m4/gettimeofday.m4, m4/time_h.m4, m4/time_rz.m4: Copy from gnulib. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib/localtime-buffer.c, lib/localtime-buffer.h: * m4/localtime-buffer.m4: New files, copied from gnulib. * src/editfns.c (init_editfns): Assume tzset is callable.
Diffstat (limited to 'src/editfns.c')
-rw-r--r--src/editfns.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 2dafd8e7b1b..38530437a2f 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -226,7 +226,7 @@ tzlookup (Lisp_Object zone, bool settz)
226void 226void
227init_editfns (bool dumping) 227init_editfns (bool dumping)
228{ 228{
229#if !defined CANNOT_DUMP && defined HAVE_TZSET 229#if !defined CANNOT_DUMP
230 /* A valid but unlikely setting for the TZ environment variable. 230 /* A valid but unlikely setting for the TZ environment variable.
231 It is OK (though a bit slower) if the user chooses this value. */ 231 It is OK (though a bit slower) if the user chooses this value. */
232 static char dump_tz_string[] = "TZ=UtC0"; 232 static char dump_tz_string[] = "TZ=UtC0";
@@ -245,17 +245,15 @@ init_editfns (bool dumping)
245 and skip the rest of this function. */ 245 and skip the rest of this function. */
246 if (dumping) 246 if (dumping)
247 { 247 {
248# ifdef HAVE_TZSET
249 xputenv (dump_tz_string); 248 xputenv (dump_tz_string);
250 tzset (); 249 tzset ();
251# endif
252 return; 250 return;
253 } 251 }
254#endif 252#endif
255 253
256 char *tz = getenv ("TZ"); 254 char *tz = getenv ("TZ");
257 255
258#if !defined CANNOT_DUMP && defined HAVE_TZSET 256#if !defined CANNOT_DUMP
259 /* If the execution TZ happens to be the same as the dump TZ, 257 /* If the execution TZ happens to be the same as the dump TZ,
260 change it to some other value and then change it back, 258 change it to some other value and then change it back,
261 to force the underlying implementation to reload the TZ info. 259 to force the underlying implementation to reload the TZ info.