aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-08-06 08:21:51 +0000
committerRichard M. Stallman1996-08-06 08:21:51 +0000
commit98ab445ddbd4619c0bf5b8c978e3317565cccc87 (patch)
tree32aaef5358152b802178a2e7f0b40a5d1792b083
parent88ba4f30f5b05583867ac0ef8f7888d3060c6bb8 (diff)
downloademacs-98ab445ddbd4619c0bf5b8c978e3317565cccc87.tar.gz
emacs-98ab445ddbd4619c0bf5b8c978e3317565cccc87.zip
(LOCALTIME_CACHE): Don't put a string literal "TZ=..." in environ.
-rw-r--r--configure.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 17832a3071a..960bf51de90 100644
--- a/configure.in
+++ b/configure.in
@@ -1438,16 +1438,18 @@ unset_TZ ()
1438 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '=')) 1438 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
1439 to++; 1439 to++;
1440} 1440}
1441char TZ_GMT0[] = "TZ=GMT0";
1442char TZ_PST8[] = "TZ=PST8";
1441main() 1443main()
1442{ 1444{
1443 time_t now = time ((time_t *) 0); 1445 time_t now = time ((time_t *) 0);
1444 int hour_GMT0, hour_unset; 1446 int hour_GMT0, hour_unset;
1445 if (putenv ("TZ=GMT0") != 0) 1447 if (putenv (TZ_GMT0) != 0)
1446 exit (1); 1448 exit (1);
1447 hour_GMT0 = localtime (&now)->tm_hour; 1449 hour_GMT0 = localtime (&now)->tm_hour;
1448 unset_TZ (); 1450 unset_TZ ();
1449 hour_unset = localtime (&now)->tm_hour; 1451 hour_unset = localtime (&now)->tm_hour;
1450 if (putenv ("TZ=PST8") != 0) 1452 if (putenv (TZ_PST8) != 0)
1451 exit (1); 1453 exit (1);
1452 if (localtime (&now)->tm_hour == hour_GMT0) 1454 if (localtime (&now)->tm_hour == hour_GMT0)
1453 exit (1); 1455 exit (1);