unchanged binary output

Arthur David Olson olsona at lecserver.nci.nih.gov
Sat Apr 1 19:40:41 UTC 2006


Below are changes to "zic.c" and "europe" that should arrange for all but one
of the 64-bit zic output files to have first parts that are bit-for-bit
identical (except for TZif/TZif2 differences) to files produced by the old
32-bit compiler.

The only exception is America/Juneau; the 64-bit compiler notices that
Yukon Daylight Time (YDT) was never actually used in Juneau and optimizes
out some information. The files should, however, be identical from a functional
standpoint.

				--ado

------- zic.c -------
*** /tmp/geta5518	Sat Apr  1 14:29:54 2006
--- /tmp/getb5518	Sat Apr  1 14:29:54 2006
***************
*** 1,4 ****
! static char	elsieid[] = "@(#)zic.c	8.3";
  
  #include "private.h"
  #include "locale.h"
--- 1,4 ----
! static char	elsieid[] = "@(#)zic.c	8.4";
  
  #include "private.h"
  #include "locale.h"
***************
*** 1630,1643 ****
  			indmap[i] = -1;
  		thischarcnt = 0;
  		for (i = 0; i < typecnt; ++i) {
  			if (!writetype[i])
  				continue;
  			if (indmap[abbrinds[i]] >= 0)
  				continue;
! 			indmap[abbrinds[i]] = thischarcnt;
! 			(void) strcpy(&thischars[thischarcnt],
! 				&chars[abbrinds[i]]);
! 			thischarcnt += strlen(&chars[abbrinds[i]]) + 1;
  		}
  #define DO(field)	(void) fwrite((void *) tzh.field, \
  				(size_t) sizeof tzh.field, (size_t) 1, fp)
--- 1630,1652 ----
  			indmap[i] = -1;
  		thischarcnt = 0;
  		for (i = 0; i < typecnt; ++i) {
+ 			register int	j;
+ 			register char *	thisabbr;
+ 
  			if (!writetype[i])
  				continue;
  			if (indmap[abbrinds[i]] >= 0)
  				continue;
! 			thisabbr = &chars[abbrinds[i]];
! 			for (j = 0; j < thischarcnt; ++j)
! 				if (strcmp(&thischars[j], thisabbr) == 0)
! 					break;
! 			if (j == thischarcnt) {
! 				(void) strcpy(&thischars[thischarcnt],
! 					thisabbr);
! 				thischarcnt += strlen(thisabbr) + 1;
! 			}
! 			indmap[abbrinds[i]] = j;
  		}
  #define DO(field)	(void) fwrite((void *) tzh.field, \
  				(size_t) sizeof tzh.field, (size_t) 1, fp)

------- europe -------
*** /tmp/geta5536	Sat Apr  1 14:29:55 2006
--- /tmp/getb5536	Sat Apr  1 14:29:55 2006
***************
*** 1,4 ****
! # @(#)europe	8.1
  # <pre>
  
  # This data is by no means authoritative; if you think you know better,
--- 1,4 ----
! # @(#)europe	8.2
  # <pre>
  
  # This data is by no means authoritative; if you think you know better,
***************
*** 418,424 ****
  # See EU for rules starting in 1996.
  
  # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
! Zone	Europe/London	-0:01:15 -	LMT	1847 Dec  1
  			 0:00	GB-Eire	%s	1968 Oct 27
  			 1:00	-	BST	1971 Oct 31 2:00u
  			 0:00	GB-Eire	%s	1996
--- 418,424 ----
  # See EU for rules starting in 1996.
  
  # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
! Zone	Europe/London	-0:01:15 -	LMT	1847 Dec  1 0:00s
  			 0:00	GB-Eire	%s	1968 Oct 27
  			 1:00	-	BST	1971 Oct 31 2:00u
  			 0:00	GB-Eire	%s	1996
***************
*** 1121,1127 ****
  
  # Gibraltar
  # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
! Zone Europe/Gibraltar	-0:21:24 -	LMT	1880 Aug  2
  			0:00	GB-Eire	%s	1957 Apr 14 2:00
  			1:00	-	CET	1982
  			1:00	EU	CE%sT
--- 1121,1127 ----
  
  # Gibraltar
  # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
! Zone Europe/Gibraltar	-0:21:24 -	LMT	1880 Aug  2 0:00s
  			0:00	GB-Eire	%s	1957 Apr 14 2:00
  			1:00	-	CET	1982
  			1:00	EU	CE%sT
***************
*** 1325,1331 ****
  Rule	Italy	1979	only	-	Sep	30	0:00s	0	-
  # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
  Zone	Europe/Rome	0:49:56 -	LMT	1866 Sep 22
! 			0:49:56	-	RMT	1893 Nov	# Rome Mean Time
  			1:00	Italy	CE%sT	1942 Nov  2 2:00s
  			1:00	C-Eur	CE%sT	1944 Jul
  			1:00	Italy	CE%sT	1980
--- 1325,1331 ----
  Rule	Italy	1979	only	-	Sep	30	0:00s	0	-
  # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
  Zone	Europe/Rome	0:49:56 -	LMT	1866 Sep 22
! 			0:49:56	-	RMT	1893 Nov  1 0:00s # Rome Mean
  			1:00	Italy	CE%sT	1942 Nov  2 2:00s
  			1:00	C-Eur	CE%sT	1944 Jul
  			1:00	Italy	CE%sT	1980
***************
*** 1514,1520 ****
  Rule	Malta	1975	1980	-	Sep	Sun>=15	2:00	0	-
  Rule	Malta	1980	only	-	Mar	31	2:00	1:00	S
  # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
! Zone	Europe/Malta	0:58:04 -	LMT	1893 Nov  2	# Valletta
  			1:00	Italy	CE%sT	1942 Nov  2 2:00s
  			1:00	C-Eur	CE%sT	1945 Apr  2 2:00s
  			1:00	Italy	CE%sT	1973 Mar 31
--- 1514,1520 ----
  Rule	Malta	1975	1980	-	Sep	Sun>=15	2:00	0	-
  Rule	Malta	1980	only	-	Mar	31	2:00	1:00	S
  # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
! Zone	Europe/Malta	0:58:04 -	LMT	1893 Nov  2 0:00s # Valletta
  			1:00	Italy	CE%sT	1942 Nov  2 2:00s
  			1:00	C-Eur	CE%sT	1945 Apr  2 2:00s
  			1:00	Italy	CE%sT	1973 Mar 31
***************
*** 2149,2155 ****
  Rule SpainAfrica 1978	only	-	Jun	 1	 0:00	1:00	S
  Rule SpainAfrica 1978	only	-	Aug	 4	 0:00	0	-
  # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
! Zone	Europe/Madrid	-0:14:44 -	LMT	1901
  			 0:00	Spain	WE%sT	1946 Sep 30
  			 1:00	Spain	CE%sT	1979
  			 1:00	EU	CE%sT
--- 2149,2155 ----
  Rule SpainAfrica 1978	only	-	Jun	 1	 0:00	1:00	S
  Rule SpainAfrica 1978	only	-	Aug	 4	 0:00	0	-
  # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
! Zone	Europe/Madrid	-0:14:44 -	LMT	1901 Jan  1  0:00s
  			 0:00	Spain	WE%sT	1946 Sep 30
  			 1:00	Spain	CE%sT	1979
  			 1:00	EU	CE%sT



More information about the tz mailing list