Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/time welcome to tzcode 2015d (zic performance impro...



details:   https://anonhg.NetBSD.org/src/rev/89973204d326
branches:  trunk
changeset: 807952:89973204d326
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Apr 28 17:00:24 2015 +0000

description:
welcome to tzcode 2015d (zic performance improvements and cleanups)

diffstat:

 lib/libc/time/Makefile    |   23 ++--
 lib/libc/time/NEWS        |   74 +++++++++++++
 lib/libc/time/ialloc.c    |   44 --------
 lib/libc/time/private.h   |   14 +-
 lib/libc/time/scheck.c    |   80 ---------------
 lib/libc/time/tz-link.htm |    7 +-
 lib/libc/time/zic.c       |  244 +++++++++++++++++++++++++++------------------
 7 files changed, 243 insertions(+), 243 deletions(-)

diffs (truncated from 910 to 300 lines):

diff -r fa0ca2e55a61 -r 89973204d326 lib/libc/time/Makefile
--- a/lib/libc/time/Makefile    Tue Apr 28 16:06:09 2015 +0000
+++ b/lib/libc/time/Makefile    Tue Apr 28 17:00:24 2015 +0000
@@ -5,7 +5,7 @@
 PACKAGE=       tzcode
 
 # Version numbers of the code and data distributions.
-VERSION=       2015b
+VERSION=       2015d
 
 # Email address for bug reports.
 BUGEMAIL=      tz%iana.org@localhost
@@ -120,6 +120,7 @@
 #  -DHAVE_STDINT_H=1 if you have a pre-C99 compiler with "stdint.h"
 #  -DHAVE_STRFTIME_L=1 if <time.h> declares locale_t and strftime_l
 #      This defaults to 0 if _POSIX_VERSION < 200809, 1 otherwise.
+#  -DHAVE_STRDUP=0 if your system lacks the strdup function
 #  -DHAVE_SYMLINK=0 if your system lacks the symlink function
 #  -DHAVE_SYS_STAT_H=0 if your compiler lacks a "sys/stat.h"
 #  -DHAVE_SYS_WAIT_H=0 if your compiler lacks a "sys/wait.h"
@@ -150,18 +151,18 @@
 #  $(GCC_DEBUG_FLAGS) if you are using GCC and want lots of checking
 GCC_DEBUG_FLAGS = -Dlint -g3 -O3 -fno-common -fstrict-aliasing \
        -Wall -Wextra \
-       -Wbad-function-cast -Wcast-align -Wcast-qual \
+       -Wbad-function-cast -Wcast-align -Wdate-time \
        -Wdeclaration-after-statement \
+       -Wdouble-promotion \
        -Wformat=2 -Winit-self -Wjump-misses-init \
-       -Wmissing-declarations -Wmissing-noreturn -Wmissing-prototypes \
-       -Wnested-externs -Wno-address -Wno-cast-qual \
-       -Wno-format-nonliteral -Wno-sign-compare -Wno-sign-conversion \
-       -Wno-type-limits \
-       -Wno-unused-parameter -Woverlength-strings -Wpointer-arith \
+       -Wlogical-op -Wmissing-prototypes -Wnested-externs \
+       -Wold-style-definition -Woverlength-strings -Wpointer-arith \
        -Wshadow -Wstrict-prototypes -Wsuggest-attribute=const \
        -Wsuggest-attribute=format -Wsuggest-attribute=noreturn \
        -Wsuggest-attribute=pure -Wtrampolines \
-       -Wwrite-strings
+       -Wunused -Wwrite-strings \
+       -Wno-address -Wno-format-nonliteral -Wno-sign-compare \
+       -Wno-type-limits -Wno-unused-parameter
 #
 # If you want to use System V compatibility code, add
 #      -DUSG_COMPAT
@@ -331,13 +332,13 @@
 # ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib.
 RANLIB=                :
 
-TZCOBJS=       zic.o scheck.o ialloc.o
+TZCOBJS=       zic.o
 TZDOBJS=       zdump.o localtime.o asctime.o
 DATEOBJS=      date.o localtime.o strftime.o asctime.o
 LIBSRCS=       localtime.c asctime.c difftime.c
 LIBOBJS=       localtime.o asctime.o difftime.o
 HEADERS=       tzfile.h private.h
-NONLIBSRCS=    zic.c zdump.c scheck.c ialloc.c
+NONLIBSRCS=    zic.c zdump.c
 NEWUCBSRCS=    date.c strftime.c
 SOURCES=       $(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) \
                        tzselect.ksh workman.sh
@@ -655,9 +656,7 @@
 asctime.o:     private.h tzfile.h
 date.o:                private.h
 difftime.o:    private.h
-ialloc.o:      private.h
 localtime.o:   private.h tzfile.h
-scheck.o:      private.h
 strftime.o:    private.h tzfile.h
 zdump.o:       version.h
 zic.o:         private.h tzfile.h version.h
diff -r fa0ca2e55a61 -r 89973204d326 lib/libc/time/NEWS
--- a/lib/libc/time/NEWS        Tue Apr 28 16:06:09 2015 +0000
+++ b/lib/libc/time/NEWS        Tue Apr 28 17:00:24 2015 +0000
@@ -1,5 +1,79 @@
 News for the tz database
 
+Release 2015d - 2015-04-24 08:09:46 -0700
+
+  Changes affecting future time stamps
+
+    Egypt will not observe DST in 2015 and will consider canceling it
+    permanently.  For now, assume no DST indefinitely.
+    (Thanks to Ahmed Nazmy and Tim Parenti.)
+
+  Changes affecting past time stamps
+
+    America/Whitehorse switched from UTC-9 to UTC-8 on 1967-05-28, not
+    1966-07-01.  Also, Yukon's time zone history is documented better.
+    (Thanks to Brian Inglis and Dennis Ferguson.)
+
+  Change affecting past and future time zone abbreviations
+
+    The abbreviations for Hawaii-Aleutian standard and daylight times
+    have been changed from HAST/HADT to HST/HDT, as per US Government
+    Printing Office style.  This affects only America/Adak since 1983,
+    as America/Honolulu was already using the new style.
+
+  Changes affecting code
+
+   zic has some minor performance improvements.
+
+
+Release 2015c - 2015-04-11 08:55:55 -0700
+
+  Changes affecting future time stamps
+
+    Egypt's spring-forward transition is at 24:00 on April's last Thursday,
+    not 00:00 on April's last Friday.  2015's transition will therefore be on
+    Thursday, April 30 at 24:00, not Friday, April 24 at 00:00.  Similar fixes
+    apply to 2026, 2037, 2043, etc.  (Thanks to Steffen Thorsen.)
+
+  Changes affecting past time stamps
+
+    The following changes affect some pre-1991 Chile-related time stamps
+    in America/Santiago, Antarctica/Palmer, and Pacific/Easter.
+
+      The 1910 transition was January 10, not January 1.
+
+      The 1918 transition was September 10, not September 1.
+
+      The UTC-4 time observed from 1932 to 1942 is now considered to be
+      standard time, not year-round DST.
+
+      Santiago observed DST (UTC-3) from 1946-07-15 through 1946-08-31,
+      then reverted to standard time, then switched its time zone to
+      UTC-5 on 1947-04-01.
+
+      Assume transitions before 1968 were at 00:00, since we have no data
+      saying otherwise.
+
+      The spring 1988 transition was 1988-10-09, not 1988-10-02.
+      The fall 1990 transition was 1990-03-11, not 1990-03-18.
+
+      Assume no UTC offset change for Pacific/Easter on 1890-01-01,
+      and omit all transitions on Pacific/Easter from 1942 through 1946
+      since we have no data suggesting that they existed.
+
+    One more zone has been turned into a link, as it differed
+    from an existing zone only for older time stamps.  As usual,
+    this change affects UTC offsets in pre-1970 time stamps only.
+    The zone's old contents have been moved to the 'backzone' file.
+    The affected zone is America/Montreal.
+
+  Changes affecting commentary
+
+    Mention the TZUpdater tool.
+
+    Mention "The Time Now".  (Thanks to Brandon Ramsey.)
+
+
 Release 2015b - 2015-03-19 23:28:11 -0700
 
   Changes affecting future time stamps
diff -r fa0ca2e55a61 -r 89973204d326 lib/libc/time/ialloc.c
--- a/lib/libc/time/ialloc.c    Tue Apr 28 16:06:09 2015 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*     $NetBSD: ialloc.c,v 1.9 2012/10/26 18:29:34 christos Exp $      */
-/*
-** This file is in the public domain, so clarified as of
-** 2006-07-17 by Arthur David Olson.
-*/
-
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <sys/cdefs.h>
-
-#if 0
-static char    elsieid[] = "@(#)ialloc.c       8.30";
-#else
-__RCSID("$NetBSD: ialloc.c,v 1.9 2012/10/26 18:29:34 christos Exp $");
-#endif
-
-#include "private.h"
-
-char *
-icatalloc(char *const old, const char *const new)
-{
-       char *  result;
-       int     oldsize, newsize;
-
-       newsize = (new == NULL) ? 0 : strlen(new);
-       if (old == NULL)
-               oldsize = 0;
-       else if (newsize == 0)
-               return old;
-       else
-               oldsize = strlen(old);
-       if ((result = realloc(old, oldsize + newsize + 1)) != NULL)
-               if (new != NULL)
-                       (void) strcpy(result + oldsize, new); /* XXX strcpy is safe */
-       return result;
-}
-
-char *
-icpyalloc(const char *const string)
-{
-       return icatalloc(NULL, string);
-}
diff -r fa0ca2e55a61 -r 89973204d326 lib/libc/time/private.h
--- a/lib/libc/time/private.h   Tue Apr 28 16:06:09 2015 +0000
+++ b/lib/libc/time/private.h   Tue Apr 28 17:00:24 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: private.h,v 1.39 2015/03/24 20:01:18 christos Exp $    */
+/*     $NetBSD: private.h,v 1.40 2015/04/28 17:00:24 christos Exp $    */
 
 #ifndef PRIVATE_H
 #define PRIVATE_H
@@ -54,6 +54,10 @@
 #define HAVE_SETTIMEOFDAY      3
 #endif /* !defined HAVE_SETTIMEOFDAY */
 
+#ifndef HAVE_STRDUP
+#define HAVE_STRDUP 1
+#endif
+
 #ifndef HAVE_SYMLINK
 #define HAVE_SYMLINK           1
 #endif /* !defined HAVE_SYMLINK */
@@ -467,14 +471,6 @@
 #endif
 
 /*
-** Private function declarations.
-*/
-
-char *         icatalloc(char * old, const char * new);
-char *         icpyalloc(const char * string);
-const char *   scheck(const char * string, const char * format);
-
-/*
 ** Finally, some convenience items.
 */
 
diff -r fa0ca2e55a61 -r 89973204d326 lib/libc/time/scheck.c
--- a/lib/libc/time/scheck.c    Tue Apr 28 16:06:09 2015 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*     $NetBSD: scheck.c,v 1.12 2014/03/18 18:20:37 riastradh Exp $    */
-
-/*
-** This file is in the public domain, so clarified as of
-** 2006-07-17 by Arthur David Olson.
-*/
-
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#include <sys/cdefs.h>
-
-#ifndef lint
-#if 0
-static char    elsieid[] = "@(#)scheck.c       8.19";
-#else
-__RCSID("$NetBSD: scheck.c,v 1.12 2014/03/18 18:20:37 riastradh Exp $");
-#endif
-#endif /* !defined lint */
-
-/*LINTLIBRARY*/
-
-#include "private.h"
-
-const char *
-scheck(const char *const string, const char *const format)
-{
-       char *          fbuf;
-       const char *    fp;
-       char *          tp;
-       int             c;
-       const char *    result;
-       char            dummy;
-
-       result = "";
-       if (string == NULL || format == NULL)
-               return result;
-       fbuf = malloc(2 * strlen(format) + 4);
-       if (fbuf == NULL)
-               return result;
-       fp = format;
-       tp = fbuf;
-
-       /*
-       ** Copy directives, suppressing each conversion that is not
-       ** already suppressed.  Scansets containing '%' are not
-       ** supported; e.g., the conversion specification "%[%]" is not
-       ** supported.  Also, multibyte characters containing a
-       ** non-leading '%' byte are not supported.
-       */
-       while ((*tp++ = c = *fp++) != '\0') {
-               if (c != '%')
-                       continue;
-               if (is_digit(*fp)) {
-                       char const *f = fp;
-                       char *t = tp;
-                       do {



Home | Main Index | Thread Index | Old Index