[master] 42d9fc6 Don't look for timegm(), we don't use it anymore.

Poul-Henning Kamp phk at FreeBSD.org
Mon Feb 23 14:16:19 CET 2015


commit 42d9fc667d9f23c02eef08efe2d760f61042c900
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Feb 23 13:15:49 2015 +0000

    Don't look for timegm(), we don't use it anymore.
    
    Don't smash the TZ variable, we don't rely on it any more.

diff --git a/bin/varnishd/mgt/mgt_main.c b/bin/varnishd/mgt/mgt_main.c
index a2e823b..5a8d4ca 100644
--- a/bin/varnishd/mgt/mgt_main.c
+++ b/bin/varnishd/mgt/mgt_main.c
@@ -408,14 +408,6 @@ main(int argc, char * const *argv)
 	/* for ASSERT_MGT() */
 	mgt_pid = getpid();
 
-	/*
-	 * Run in UTC timezone, on the off-chance that this operating
-	 * system does not have a timegm() function, and translates
-	 * timestamps on the local timescale.
-	 * See lib/libvarnish/time.c
-	 */
-	AZ(setenv("TZ", "UTC", 1));
-	tzset();
 	assert(VTIM_parse("Sun, 06 Nov 1994 08:49:37 GMT") == 784111777);
 	assert(VTIM_parse("Sunday, 06-Nov-94 08:49:37 GMT") == 784111777);
 	assert(VTIM_parse("Sun Nov  6 08:49:37 1994") == 784111777);
diff --git a/configure.ac b/configure.ac
index c2fefe7..ada83df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -217,7 +217,6 @@ AC_CHECK_FUNCS([socket])
 AC_CHECK_FUNCS([strptime])
 AC_CHECK_FUNCS([fmtcheck])
 AC_CHECK_FUNCS([getdtablesize])
-AC_CHECK_FUNCS([timegm])
 AC_CHECK_FUNCS([nanosleep])
 AC_CHECK_FUNCS([setppriv])
 AC_CHECK_FUNCS([fallocate])



More information about the varnish-commit mailing list