Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src tzcode2016i



details:   https://anonhg.NetBSD.org/src/rev/3bfb819c0bb2
branches:  trunk
changeset: 818877:3bfb819c0bb2
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Nov 04 19:41:53 2016 +0000

description:
tzcode2016i

diffstat:

 doc/3RDPARTY              |    4 +-
 doc/CHANGES               |    3 +-
 lib/libc/time/LICENSE     |    4 +
 lib/libc/time/Makefile    |   10 +-
 lib/libc/time/NEWS        |   60 ++++++++++++
 lib/libc/time/localtime.c |   43 ++++++++-
 lib/libc/time/private.h   |   42 +++++++-
 lib/libc/time/tz-art.htm  |    3 +-
 lib/libc/time/tz-link.htm |   14 +-
 lib/libc/time/version     |    2 +-
 lib/libc/time/zic.c       |  217 +++++++++++++++++++++++++++------------------
 11 files changed, 288 insertions(+), 114 deletions(-)

diffs (truncated from 934 to 300 lines):

diff -r 9d6b3fd07c90 -r 3bfb819c0bb2 doc/3RDPARTY
--- a/doc/3RDPARTY      Fri Nov 04 19:18:53 2016 +0000
+++ b/doc/3RDPARTY      Fri Nov 04 19:41:53 2016 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: 3RDPARTY,v 1.1375 2016/11/03 09:57:18 kre Exp $
+#      $NetBSD: 3RDPARTY,v 1.1376 2016/11/04 19:42:54 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1398,7 +1398,7 @@
 Added changes from a5 -> a12 manually.
 
 Package:       tz
-Version:       tzcode2016h / tzdata2016i
+Version:       tzcode2016i / tzdata2016i
 Current Vers:  tzcode2016i / tzdata2016i
 Maintainer:    Paul Eggert <eggert%cs.ucla.edu@localhost>
 Archive Site:  ftp://ftp.iana.org/tz/releases/
diff -r 9d6b3fd07c90 -r 3bfb819c0bb2 doc/CHANGES
--- a/doc/CHANGES       Fri Nov 04 19:18:53 2016 +0000
+++ b/doc/CHANGES       Fri Nov 04 19:41:53 2016 +0000
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:                   <$Revision: 1.2207 $>
+# LIST OF CHANGES FROM LAST RELEASE:                   <$Revision: 1.2208 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -392,3 +392,4 @@
        wapbl(4): Improved truncate performance, and stability [jdolecek 20161028]
        bind: Import version 9.10.4-P4. [christos 20161101]
        zoneinfo: Import tzdata2016i.  [kre 20161103]
+       libc: Update to tzcode2016i. [christos 20161104]
diff -r 9d6b3fd07c90 -r 3bfb819c0bb2 lib/libc/time/LICENSE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/time/LICENSE     Fri Nov 04 19:41:53 2016 +0000
@@ -0,0 +1,4 @@
+With a few exceptions, all files in the tz code and data (including
+this one) are in the public domain.  The exceptions are date.c,
+newstrftime.3, and strftime.c, which contain material derived from BSD
+and which use the BSD 3-clause license.
diff -r 9d6b3fd07c90 -r 3bfb819c0bb2 lib/libc/time/Makefile
--- a/lib/libc/time/Makefile    Fri Nov 04 19:18:53 2016 +0000
+++ b/lib/libc/time/Makefile    Fri Nov 04 19:41:53 2016 +0000
@@ -129,6 +129,10 @@
 #  -DHAVE_SYS_WAIT_H=0 if your compiler lacks a "sys/wait.h"
 #  -DHAVE_TZSET=0 if your system lacks a tzset function
 #  -DHAVE_UNISTD_H=0 if your compiler lacks a "unistd.h" (Microsoft C++ 7?)
+#  -DEPOCH_LOCAL=1 if the 'time' function returns local time not UT
+#  -DEPOCH_OFFSET=N if the 'time' function returns a value N greater
+#      than what POSIX specifies, assuming local time is UT.
+#      For example, N is 252460800 on AmigaOS.
 #  -DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU=1
 #      if you do not want run time warnings about formats that may cause
 #      year 2000 grief
@@ -714,18 +718,12 @@
                done
                rm -fr time_t.dir
 
-tarballs signatures: version
-               $(MAKE) VERSION="$$(cat version)" $@_version
-
 tarballs_version: tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz \
                tzdb-$(VERSION).tar.lz
 tarballs traditional_tarballs signatures traditional_signatures: version
                VERSION=`cat version` && \
                $(MAKE) VERSION="$$VERSION" $@_version
 
-tarballs_version: traditional_tarballs_version tzdb-$(VERSION).tar.lz
-traditional_tarballs_version: \
-  tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz
 signatures_version: traditional_signatures_version tzdb-$(VERSION).tar.lz.asc
 traditional_signatures_version: \
   tzcode$(VERSION).tar.gz.asc tzdata$(VERSION).tar.gz.asc \
diff -r 9d6b3fd07c90 -r 3bfb819c0bb2 lib/libc/time/NEWS
--- a/lib/libc/time/NEWS        Fri Nov 04 19:18:53 2016 +0000
+++ b/lib/libc/time/NEWS        Fri Nov 04 19:41:53 2016 +0000
@@ -1,5 +1,65 @@
 News for the tz database
 
+Release 2016i - 2016-11-01 23:19:52 -0700
+
+  Briefly: Cyprus split into two time zones on 2016-10-30, and Tonga
+  reintroduces DST on 2016-11-06.
+
+  Changes to future time stamps
+
+    Pacific/Tongatapu begins DST on 2016-11-06 at 02:00, ending on
+    2017-01-15 at 03:00.  Assume future observances in Tonga will be
+    from the first Sunday in November through the third Sunday in
+    January, like Fiji.  (Thanks to Pulu ʻAnau.)  Switch to numeric
+    time zone abbreviations for this zone.
+
+  Changes to past and future time stamps
+
+    Northern Cyprus is now +03 year round, causing a split in Cyprus
+    time zones starting 2016-10-30 at 04:00.  This creates a zone
+    Asia/Famagusta.  (Thanks to Even Scharning and Matt Johnson.)
+
+    Antarctica/Casey switched from +08 to +11 on 2016-10-22.
+    (Thanks to Steffen Thorsen.)
+
+  Changes to past time stamps
+
+    Several corrections were made for pre-1975 time stamps in Italy.
+    These affect Europe/Malta, Europe/Rome, Europe/San_Marino, and
+    Europe/Vatican.
+
+    First, the 1893-11-01 00:00 transition in Italy used the new UT
+    offset (+01), not the old (+00:49:56).  (Thanks to Michael
+    Deckers.)
+
+    Second, rules for daylight saving in Italy were changed to agree
+    with Italy's National Institute of Metrological Research (INRiM)
+    except for 1944, as follows (thanks to Pierpaolo Bernardi, Brian
+    Inglis, and Michael Deckers):
+
+      The 1916-06-03 transition was at 24:00, not 00:00.
+
+      The 1916-10-01, 1919-10-05, and 1920-09-19 transitions were at
+      00:00, not 01:00.
+
+      The 1917-09-30 and 1918-10-06 transitions were at 24:00, not
+      01:00.
+
+      The 1944-09-17 transition was at 03:00, not 01:00.  This
+      particular change is taken from Italian law as INRiM's table,
+      (which says 02:00) appears to have a typo here.  Also, keep the
+      1944-04-03 transition for Europe/Rome, as Rome was controlled by
+      Germany then.
+
+      The 1967-1970 and 1972-1974 fallback transitions were at 01:00,
+      not 00:00.
+
+  Changes to code
+
+    The code should now be buildable on AmigaOS merely by setting the
+    appropriate Makefile variables.  (From a patch by Carsten Larsen.)
+
+
 Release 2016h - 2016-10-19 23:17:57 -0700
 
   Changes to future time stamps
diff -r 9d6b3fd07c90 -r 3bfb819c0bb2 lib/libc/time/localtime.c
--- a/lib/libc/time/localtime.c Fri Nov 04 19:18:53 2016 +0000
+++ b/lib/libc/time/localtime.c Fri Nov 04 19:41:53 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: localtime.c,v 1.104 2016/10/07 15:29:42 christos Exp $ */
+/*     $NetBSD: localtime.c,v 1.105 2016/11/04 19:41:53 christos Exp $ */
 
 /*
 ** This file is in the public domain, so clarified as of
@@ -10,7 +10,7 @@
 #if 0
 static char    elsieid[] = "@(#)localtime.c    8.17";
 #else
-__RCSID("$NetBSD: localtime.c,v 1.104 2016/10/07 15:29:42 christos Exp $");
+__RCSID("$NetBSD: localtime.c,v 1.105 2016/11/04 19:41:53 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -1605,6 +1605,45 @@
 
 #endif /* defined STD_INSPIRED */
 
+#if defined time_tz || EPOCH_LOCAL || EPOCH_OFFSET != 0
+
+# ifndef USG_COMPAT
+#  define daylight 0
+#  define timezone 0
+# endif
+# ifndef ALTZONE
+#  define altzone 0
+# endif
+ 
+/* Convert from the underlying system's time_t to the ersatz time_tz,
+   which is called 'time_t' in this file.  Typically, this merely
+   converts the time's integer width.  On some platforms, the system
+   time is local time not UT, or uses some epoch other than the POSIX
+   epoch.
+
+   Although this code appears to define a function named 'time' that
+   returns time_t, the macros in private.h cause this code to actually
+   define a function named 'tz_time' that returns tz_time_t.  The call
+   to sys_time invokes the underlying system's 'time' function.  */
+ 
+time_t
+time(time_t *p)
+{
+  time_t r = sys_time(0);
+  if (r != (time_t) -1) {
+    int_fast32_t offset = EPOCH_LOCAL ? (daylight ? timezone : altzone) : 0;
+    if (increment_overflow32(&offset, -EPOCH_OFFSET)
+       || increment_overflow_time (&r, offset)) {
+      errno = EOVERFLOW;
+      r = -1;
+    }
+  }
+  if (p)
+    *p = r;
+  return r;
+}
+#endif
+
 /*
 ** Return the number of leap years through the end of the given year
 ** where, to make the math easy, the answer for year zero is defined as zero.
diff -r 9d6b3fd07c90 -r 3bfb819c0bb2 lib/libc/time/private.h
--- a/lib/libc/time/private.h   Fri Nov 04 19:18:53 2016 +0000
+++ b/lib/libc/time/private.h   Fri Nov 04 19:41:53 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: private.h,v 1.47 2016/10/20 17:41:34 christos Exp $    */
+/*     $NetBSD: private.h,v 1.48 2016/11/04 19:41:53 christos Exp $    */
 
 #ifndef PRIVATE_H
 #define PRIVATE_H
@@ -225,14 +225,18 @@
 # endif
 #endif
 
-#ifndef SCNdFAST64
+#ifndef PRIdFAST64
 # if INT_FAST64_MAX == LLONG_MAX
-#  define SCNdFAST64 "lld"
+#  define PRIdFAST64 "lld"
 # else
-#  define SCNdFAST64 "ld"
+#  define PRIdFAST64 "ld"
 # endif
 #endif
 
+#ifndef SCNdFAST64
+# define SCNdFAST64 PRIdFAST64
+#endif
+
 #ifndef INT_FAST32_MAX
 # if INT_MAX >> 31 == 0
 typedef long int_fast32_t;
@@ -332,6 +336,13 @@
 ** Workarounds for compilers/systems.
 */
 
+#ifndef EPOCH_LOCAL
+# define EPOCH_LOCAL 0
+#endif
+#ifndef EPOCH_OFFSET
+# define EPOCH_OFFSET 0
+#endif
+
 /*
 ** Compile with -Dtime_tz=T to build the tz package with a private
 ** time_t type equivalent to T rather than the system-supplied time_t.
@@ -339,7 +350,7 @@
 ** (e.g., time_t wider than 'long', or unsigned time_t) even on
 ** typical platforms.
 */
-#ifdef time_tz
+#if defined time_tz || EPOCH_LOCAL || EPOCH_OFFSET != 0
 # ifdef LOCALTIME_IMPLEMENTATION
 static time_t sys_time(time_t *x) { return time(x); }
 # endif
@@ -527,10 +538,29 @@
   ((t) (TYPE_SIGNED(t) ? - TWOS_COMPLEMENT(t) - MAXVAL(t, b) : 0))
 
 #ifdef LOCALTIME_IMPLEMENTATION
-/* The minimum and maximum finite time values.  This assumes no padding.  */
+/* The minimum and maximum finite time values.  This implementation
+   assumes no padding if time_t is signed and either the compiler is
+   pre-C11 or time_t is not one of the standard signed integer types.  */
+#if (201112 <= __STDC_VERSION__) && !defined(__lint__)
+static time_t const time_t_min
+  = (TYPE_SIGNED(time_t)
+     ? _Generic((time_t) 0,
+               signed char: SCHAR_MIN, short: SHRT_MIN,
+               int: INT_MIN, long: LONG_MIN, long long: LLONG_MIN,
+               default: MINVAL(time_t, TYPE_BIT(time_t)))
+     : 0);
+static time_t const time_t_max
+  = (TYPE_SIGNED(time_t)
+     ? _Generic((time_t) 0,
+               signed char: SCHAR_MAX, short: SHRT_MAX,
+               int: INT_MAX, long: LONG_MAX, long long: LLONG_MAX,
+               default: MAXVAL(time_t, TYPE_BIT(time_t)))
+     : -1);
+#else
 static time_t const time_t_min = MINVAL(time_t, TYPE_BIT(time_t));
 static time_t const time_t_max = MAXVAL(time_t, TYPE_BIT(time_t));
 #endif
+#endif
 
 #ifndef INT_STRLEN_MAXIMUM
 /*
diff -r 9d6b3fd07c90 -r 3bfb819c0bb2 lib/libc/time/tz-art.htm
--- a/lib/libc/time/tz-art.htm  Fri Nov 04 19:18:53 2016 +0000
+++ b/lib/libc/time/tz-art.htm  Fri Nov 04 19:41:53 2016 +0000
@@ -438,7 +438,8 @@
 The webcomic <em>xkcd</em> has the strip
 "<a href='http://xkcd.com/673/'>The Sun</a>" (2009-12-09) and the panels
 "<a href='http://xkcd.com/1017/'>Backward in Time</a>" (2012-02-14),
-"<a href='http://xkcd.com/1061/'>EST</a>" (2012-05-28), and
+"<a href='http://xkcd.com/1061/'>EST</a>" (2012-05-28),



Home | Main Index | Thread Index | Old Index