Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Oct 2010 07:58:09 +0000 (UTC)
From:      Edwin Groothuis <edwin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r213319 - vendor/tzcode/dist/zic
Message-ID:  <201010010758.o917w9cT095250@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: edwin
Date: Fri Oct  1 07:58:09 2010
New Revision: 213319
URL: http://svn.freebsd.org/changeset/base/213319

Log:
  Vendor import of tzcode2010m
  
  Obtained from:	ftp://elsie.nci.nih.gov/pub/

Modified:
  vendor/tzcode/dist/zic/zic.c

Modified: vendor/tzcode/dist/zic/zic.c
==============================================================================
--- vendor/tzcode/dist/zic/zic.c	Fri Oct  1 06:12:13 2010	(r213318)
+++ vendor/tzcode/dist/zic/zic.c	Fri Oct  1 07:58:09 2010	(r213319)
@@ -3,7 +3,7 @@
 ** 2006-07-17 by Arthur David Olson.
 */
 
-static char	elsieid[] = "@(#)zic.c	8.20";
+static char	elsieid[] = "@(#)zic.c	8.22";
 
 #include "private.h"
 #include "locale.h"
@@ -1621,6 +1621,52 @@ const char * const	string;
 			if (thistimei == 0)
 				writetype[0] = TRUE;
 		}
+#ifndef LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH
+		/*
+		** For some pre-2011 systems: if the last-to-be-written
+		** standard (or daylight) type has an offset different from the
+		** most recently used offset,
+		** append an (unused) copy of the most recently used type
+		** (to help get global "altzone" and "timezone" variables
+		** set correctly).
+		*/
+		{
+			register int	mrudst, mrustd, hidst, histd, type;
+
+			hidst = histd = mrudst = mrustd = -1;
+			for (i = thistimei; i < thistimelim; ++i)
+				if (isdsts[types[i]])
+					mrudst = types[i];
+				else	mrustd = types[i];
+			for (i = 0; i < typecnt; ++i)
+				if (writetype[i])
+					if (isdsts[i])
+						hidst = i;
+					else	histd = i;
+			if (hidst >= 0 && mrudst >= 0 && hidst != mrudst &&
+				gmtoffs[hidst] != gmtoffs[mrudst]) {
+					isdsts[mrudst] = -1;
+					type = addtype(gmtoffs[mrudst],
+						&chars[abbrinds[mrudst]],
+						TRUE,
+						ttisstds[mrudst],
+						ttisgmts[mrudst]);
+					isdsts[mrudst] = TRUE;
+					writetype[type] = TRUE;
+			}
+			if (histd >= 0 && mrustd >= 0 && histd != mrustd &&
+				gmtoffs[histd] != gmtoffs[mrustd]) {
+					isdsts[mrustd] = -1;
+					type = addtype(gmtoffs[mrustd],
+						&chars[abbrinds[mrustd]],
+						FALSE,
+						ttisstds[mrustd],
+						ttisgmts[mrustd]);
+					isdsts[mrustd] = FALSE;
+					writetype[type] = TRUE;
+			}
+		}
+#endif /* !defined LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH */
 		thistypecnt = 0;
 		for (i = 0; i < typecnt; ++i)
 			typemap[i] = writetype[i] ?  thistypecnt++ : -1;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010010758.o917w9cT095250>