[tz] [PROPOSED PATCH] * zdump.c (adjusted_yday): Define only if TM_GMTOFF is not defined.

Paul Eggert eggert at cs.ucla.edu
Sun Oct 5 00:40:49 UTC 2014


---
 zdump.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/zdump.c b/zdump.c
index 37a0926..13bbb0e 100644
--- a/zdump.c
+++ b/zdump.c
@@ -851,8 +851,9 @@ delta(struct tm * newp, struct tm *oldp)
 	return result;
 }
 
+#ifndef TM_GMTOFF
 /* Return A->tm_yday, adjusted to compare it fairly to B->tm_yday.
-  Assume A and B differ by at most one year.  */
+   Assume A and B differ by at most one year.  */
 static int
 adjusted_yday(struct tm const *a, struct tm const *b)
 {
@@ -861,6 +862,7 @@ adjusted_yday(struct tm const *a, struct tm const *b)
     yday += 365 + isleap_sum(b->tm_year, TM_YEAR_BASE);
   return yday;
 }
+#endif
 
 /* If A is the broken-down local time and B the broken-down UTC for
    the same instant, return A's UTC offset in seconds, where positive
-- 
1.9.1



More information about the tz mailing list