Proposed changes to localtime.c, zic.c, and Makefile

Olson, Arthur David (NIH/NCI) olsona at dc37a.nci.nih.gov
Mon Jan 24 17:26:20 UTC 2005


Here are proposed changes to:

1.	localtime.c, to include "float.h" for the benefit of some gcc
systems (thanks to Bradley White for finding the problem).
2.	zic.c, to complain about links to links if the "-v" flag is used.
3.	Makefile, to ensure that a "make public" is done with the benefit of
gcc diagnostics.

				--ado

------- localtime.c -------
*** /tmp/geta15164	Mon Jan 24 12:20:36 2005
--- /tmp/getb15164	Mon Jan 24 12:20:36 2005
***************
*** 5,11 ****
  
  #ifndef lint
  #ifndef NOID
! static char	elsieid[] = "@(#)localtime.c	7.89";
  #endif /* !defined NOID */
  #endif /* !defined lint */
  
--- 5,11 ----
  
  #ifndef lint
  #ifndef NOID
! static char	elsieid[] = "@(#)localtime.c	7.90";
  #endif /* !defined NOID */
  #endif /* !defined lint */
  
***************
*** 20,25 ****
--- 20,26 ----
  #include "private.h"
  #include "tzfile.h"
  #include "fcntl.h"
+ #include "float.h"	/* for FLT_MAX and DBL_MAX */
  
  /*
  ** SunOS 4.1.1 headers lack O_BINARY.

------- zic.c -------
*** /tmp/geta15183	Mon Jan 24 12:20:47 2005
--- /tmp/getb15183	Mon Jan 24 12:20:47 2005
***************
*** 1,4 ****
! static char	elsieid[] = "@(#)zic.c	7.118";
  
  /*
  ** Regardless of the type of time_t, we do our work using this type.
--- 1,4 ----
! static char	elsieid[] = "@(#)zic.c	7.119";
  
  /*
  ** Regardless of the type of time_t, we do our work using this type.
***************
*** 579,584 ****
--- 579,589 ----
  	for (i = 0; i < nlinks; ++i) {
  		eat(links[i].l_filename, links[i].l_linenum);
  		dolink(links[i].l_from, links[i].l_to);
+ 		if (noise)
+ 			for (j = 0; j < nlinks; ++j)
+ 				if (strcmp(links[i].l_to,
+ 					links[j].l_from) == 0)
+ 						warning("link to link");
  	}
  	if (lcltime != NULL) {
  		eat("command line", 1);


------- Makefile -------
*** /tmp/geta15240	Mon Jan 24 12:21:57 2005
--- /tmp/getb15240	Mon Jan 24 12:21:57 2005
***************
*** 1,4 ****
! # @(#)Makefile	7.103
  
  # Change the line below for your time zone (after finding the zone you
want in
  # the time zone files, or adding it to a time zone file).
--- 1,4 ----
! # @(#)Makefile	7.104
  
  # Change the line below for your time zone (after finding the zone you
want in
  # the time zone files, or adding it to a time zone file).
***************
*** 384,390 ****
  
  # The zics below ensure that each data file can stand on its own.
  
! public:		$(ENCHILADA) zic
  		-mkdir /tmp/,tzpublic
  		-for i in $(TDATA) ; do zic -v -d /tmp/,tzpublic $$i 2>&1 |
grep -v "starting year" ; done
  		for i in $(TDATA) ; do zic -d /tmp/,tzpublic $$i || exit;
done
--- 384,392 ----
  
  # The zics below ensure that each data file can stand on its own.
  
! public:
! 		make maintainer-clean
! 		make "CFLAGS=$(GCC_DEBUG_FLAGS)"
  		-mkdir /tmp/,tzpublic
  		-for i in $(TDATA) ; do zic -v -d /tmp/,tzpublic $$i 2>&1 |
grep -v "starting year" ; done
  		for i in $(TDATA) ; do zic -d /tmp/,tzpublic $$i || exit;
done



More information about the tz mailing list