Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/time merge tzcode2014f via patch
details: https://anonhg.NetBSD.org/src/rev/6e01843a642d
branches: trunk
changeset: 331586:6e01843a642d
user: christos <christos%NetBSD.org@localhost>
date: Fri Aug 15 11:04:07 2014 +0000
description:
merge tzcode2014f via patch
diffstat:
lib/libc/time/Makefile | 91 ++++++++++----
lib/libc/time/NEWS | 273 ++++++++++++++++++++++++++++++++++++++++----
lib/libc/time/Theory | 90 ++++++++------
lib/libc/time/asctime.c | 6 +-
lib/libc/time/checktab.awk | 114 +++++++++++++-----
lib/libc/time/ctime.3 | 4 +-
lib/libc/time/localtime.c | 147 +++++++++++++-----------
lib/libc/time/private.h | 38 +----
lib/libc/time/strftime.c | 18 +-
lib/libc/time/time2posix.3 | 10 +-
lib/libc/time/tz-art.htm | 25 ++-
lib/libc/time/tz-link.htm | 74 +++++++----
lib/libc/time/tzfile.5 | 6 +-
lib/libc/time/tzfile.h | 4 +-
lib/libc/time/tzselect.8 | 41 +++---
lib/libc/time/tzselect.ksh | 43 ++++--
lib/libc/time/tzset.3 | 24 +-
lib/libc/time/zdump.8 | 7 +-
lib/libc/time/zdump.c | 54 ++++----
lib/libc/time/zic.8 | 54 +++++++-
lib/libc/time/zic.c | 248 ++++++++++++++++++++++++++++------------
21 files changed, 924 insertions(+), 447 deletions(-)
diffs (truncated from 2949 to 300 lines):
diff -r c4175fb00a8c -r 6e01843a642d lib/libc/time/Makefile
--- a/lib/libc/time/Makefile Fri Aug 15 09:40:07 2014 +0000
+++ b/lib/libc/time/Makefile Fri Aug 15 11:04:07 2014 +0000
@@ -1,4 +1,3 @@
-# <pre>
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
@@ -6,7 +5,7 @@
PACKAGE= tzcode
# Version numbers of the code and data distributions.
-VERSION= 2014e
+VERSION= 2014f
# Email address for bug reports.
BUGEMAIL= tz%iana.org@localhost
@@ -96,14 +95,14 @@
YEARISTYPE= ./yearistype
# Non-default libraries needed to link.
-# Add -lintl if you want to use `gettext' on Solaris.
+# Add -lintl if you want to use 'gettext' on Solaris.
LDLIBS=
# Add the following to the end of the "CFLAGS=" line as needed.
# -DBIG_BANG=-9999999LL if the Big Bang occurred at time -9999999 (see zic.c)
-# -DHAVE_ADJTIME=0 if `adjtime' does not exist (SVR0?)
+# -DHAVE_ADJTIME=0 if 'adjtime' does not exist (SVR0?)
# -DHAVE_DOS_FILE_NAMES if file names have drive specifiers etc. (MS-DOS)
-# -DHAVE_GETTEXT=1 if `gettext' works (GNU, Linux, Solaris); also see LDLIBS
+# -DHAVE_GETTEXT=1 if 'gettext' works (GNU, Linux, Solaris); also see LDLIBS
# -DHAVE_INCOMPATIBLE_CTIME_R=1 if your system's time.h declares
# ctime_r and asctime_r incompatibly with the POSIX standard (Solaris 8).
# -DHAVE_INTTYPES_H=1 if you have a pre-C99 compiler with "inttypes.h"
@@ -124,7 +123,7 @@
# year 2000 grief
# -Dtime_tz=\"T\" to use T as the time_t type, rather than the system time_t
# -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz"
-# -TTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory;
+# -DTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory;
# the default is system-supplied, typically "/usr/lib/locale"
# -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified
# -DNO_ERROR_IN_DST_GAP=1
@@ -136,14 +135,16 @@
GCC_DEBUG_FLAGS = -Dlint -g3 -O3 -fno-common -fstrict-aliasing \
-Wall -Wextra \
-Wbad-function-cast -Wcast-align -Wcast-qual \
- -Wformat=2 -Winit-self \
+ -Wdeclaration-after-statement \
+ -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 \
-Wshadow -Wstrict-prototypes -Wsuggest-attribute=const \
- -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure -Wtrampolines \
+ -Wsuggest-attribute=format -Wsuggest-attribute=noreturn \
+ -Wsuggest-attribute=pure -Wtrampolines \
-Wwrite-strings
#
# If you want to use System V compatibility code, add
@@ -237,7 +238,7 @@
ZFLAGS=
-# The name of a Posix-compliant `awk' on your system.
+# The name of a Posix-compliant 'awk' on your system.
AWK= awk
# The full path name of a Posix-compliant shell, preferably one that supports
@@ -267,16 +268,34 @@
SP_CHARSET_FIXED=YES \
SP_ENCODING=UTF-8
-# INVALID_CHAR is a regular expression that matches invalid characters in
-# distributed files. For now, stick to a safe subset of ASCII.
+# SAFE_CHAR is a regular expression that matches a safe character.
+# Some parts of this distribution are limited to safe characters;
+# others can use any UTF-8 character.
+# For now, the safe characters are a safe subset of ASCII.
# The caller must set the shell variable 'sharp' to the character '#',
# since Makefile macros cannot contain '#'.
# TAB_CHAR is a single tab character, in single quotes.
TAB_CHAR= ' '
-INVALID_CHAR1= $(TAB_CHAR)' !\"'$$sharp'$$%&'\''()*+,./0123456789:;<=>?@'
-INVALID_CHAR2= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\^_`'
-INVALID_CHAR3= 'abcdefghijklmnopqrstuvwxyz{|}~'
-INVALID_CHAR= '[^]'$(INVALID_CHAR1)$(INVALID_CHAR2)$(INVALID_CHAR3)'-]'
+SAFE_CHARSET1= $(TAB_CHAR)' !\"'$$sharp'$$%&'\''()*+,./0123456789:;<=>?@'
+SAFE_CHARSET2= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\^_`'
+SAFE_CHARSET3= 'abcdefghijklmnopqrstuvwxyz{|}~'
+SAFE_CHARSET= ]$(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3)-
+SAFE_CHAR= '['$(SAFE_CHARSET)']'
+# NONSYM_CHAR is a regular expression that matches any character
+# except for a small number of symbols, where we prefer to stick with
+# ASCII renderings for the convenience of maintainers whose text editors
+# mishandle UTF-8 by default (e.g., XEmacs 21.4.22).
+NONSYM_CHAR= '[^â??â??°â?²â?³â??â? â?¤â?¥Â±â??Ã?÷â??â??â??â??·â?¢Â§Â¶Â«Â»â??â??â??â??â??â??â??â??â?¹â?ºã??ã??ã??ã??ã??ã??ã??]'
+
+# SAFE_LINE matches a line of safe characters.
+# SAFE_SHARP_LINE is similar, except any character can follow '#';
+# this is so that comments can contain non-ASCII characters.
+# NONSYM_LINE matches a line of non-symbols.
+# VALID_LINE matches a line of any validly-encoded characters.
+SAFE_LINE= '^'$(SAFE_CHAR)'*$$'
+SAFE_SHARP_LINE='^'$(SAFE_CHAR)'*('$$sharp$(NONSYM_CHAR)'*)?$$'
+NONSYM_LINE= '^'$(NONSYM_CHAR)'*$$'
+VALID_LINE= '^.*$$'
# Flags to give 'tar' when making a distribution.
# Try to use flags appropriate for GNU tar.
@@ -299,7 +318,7 @@
# ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib.
RANLIB= :
-TZCOBJS= zic.o localtime.o asctime.o scheck.o ialloc.o
+TZCOBJS= zic.o scheck.o ialloc.o
TZDOBJS= zdump.o localtime.o ialloc.o asctime.o
DATEOBJS= date.o localtime.o strftime.o asctime.o
LIBSRCS= localtime.c asctime.c difftime.c
@@ -315,21 +334,20 @@
tzfile.5.txt tzselect.8.txt zic.8.txt zdump.8.txt \
date.1.txt
COMMON= Makefile README
-DOCS= NEWS Theory $(MANS) date.1 $(MANTXTS)
+WEB_PAGES= tz-art.htm tz-link.htm
+DOCS= NEWS Theory $(MANS) date.1 $(MANTXTS) $(WEB_PAGES)
PRIMARY_YDATA= africa antarctica asia australasia \
europe northamerica southamerica
YDATA= $(PRIMARY_YDATA) pacificnew etcetera backward
NDATA= systemv factory
TDATA= $(YDATA) $(NDATA)
-TABDATA= iso3166.tab zone.tab leapseconds
+ZONETABLES= zone1970.tab zone.tab
+TABDATA= iso3166.tab leapseconds $(ZONETABLES)
LEAP_DEPS= leapseconds.awk leap-seconds.list
DATA= $(YDATA) $(NDATA) $(TABDATA) \
$(LEAP_DEPS) yearistype.sh
-WEB_PAGES= tz-art.htm tz-link.htm
AWK_SCRIPTS= checktab.awk leapseconds.awk
-MISC= usno1988 usno1989 usno1989a usno1995 usno1997 usno1998 \
- $(WEB_PAGES) $(AWK_SCRIPTS) workman.sh \
- zoneinfo2tdf.pl
+MISC= $(AWK_SCRIPTS) workman.sh zoneinfo2tdf.pl
ENCHILADA= $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC)
# And for the benefit of csh users on systems that assume the user
@@ -348,7 +366,7 @@
$(DESTDIR)$(MANDIR)/man8
$(ZIC) -y $(YEARISTYPE) \
-d $(DESTDIR)$(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES)
- cp -f iso3166.tab zone.tab $(DESTDIR)$(TZDIR)/.
+ cp -f iso3166.tab $(ZONETABLES) $(DESTDIR)$(TZDIR)/.
cp tzselect zic zdump $(DESTDIR)$(ETCDIR)/.
cp libtz.a $(DESTDIR)$(LIBDIR)/.
$(RANLIB) $(DESTDIR)$(LIBDIR)/libtz.a
@@ -435,10 +453,22 @@
check: check_character_set check_tables check_web
check_character_set: $(ENCHILADA)
- sharp='#'; ! grep -n $(INVALID_CHAR) $(ENCHILADA)
+ LC_ALL=en_US.utf8 && export LC_ALL && \
+ sharp='#' && \
+ ! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \
+ $(MISC) $(SOURCES) $(WEB_PAGES) && \
+ ! grep -Env $(SAFE_SHARP_LINE) $(YDATA) $(NDATA) iso3166.tab \
+ zone.tab leapseconds $(LEAP_DEPS) yearistype.sh && \
+ test $$(grep -Ecv $(SAFE_SHARP_LINE) Makefile) -eq 1 && \
+ ! grep -Env $(NONSYM_LINE) README NEWS Theory $(MANS) date.1 \
+ zone1970.tab && \
+ ! grep -Env $(VALID_LINE) $(ENCHILADA)
-check_tables: checktab.awk $(PRIMARY_YDATA)
- $(AWK) -f checktab.awk $(PRIMARY_YDATA)
+check_tables: checktab.awk $(PRIMARY_YDATA) $(ZONETABLES)
+ for tab in $(ZONETABLES); do \
+ $(AWK) -f checktab.awk -v zone_table=$$tab $(PRIMARY_YDATA) \
+ || exit; \
+ done
check_web: $(WEB_PAGES)
$(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) $(WEB_PAGES)
@@ -517,7 +547,7 @@
# Check that the code works under various alternative
# implementations of time_t.
check_time_t_alternatives:
- zones=`$(AWK) '/^[^#]/ { print $$3 }' <zone.tab` && \
+ zones=`$(AWK) '/^[^#]/ { print $$3 }' <zone1970.tab` && \
for type in $(TIME_T_ALTERNATIVES); do \
mkdir -p tzpublic/$$type && \
make clean_misc && \
@@ -586,3 +616,10 @@
zic.o: private.h tzfile.h version.h
.KEEP_STATE:
+
+.PHONY: ALL INSTALL all
+.PHONY: check check_character_set check_public check_tables
+.PHONY: check_time_t_alternatives check_web clean clean_misc
+.PHONY: install maintainer-clean names posix_only posix_right
+.PHONY: public right_only right_posix signatures tarballs typecheck
+.PHONY: zonenames zones
diff -r c4175fb00a8c -r 6e01843a642d lib/libc/time/NEWS
--- a/lib/libc/time/NEWS Fri Aug 15 09:40:07 2014 +0000
+++ b/lib/libc/time/NEWS Fri Aug 15 11:04:07 2014 +0000
@@ -1,5 +1,214 @@
News for the tz database
+Release 2014f - 2014-08-05 17:42:36 -0700
+
+ Changes affecting future time stamps
+
+ Russia will subtract an hour from most of its time zones on 2014-10-26
+ at 02:00 local time. (Thanks to Alexander Krivenyshev.)
+ There are a few exceptions: Magadan Oblast (Asia/Magadan) and Zabaykalsky
+ Krai are subtracting two hours; conversely, Chukotka Autonomous Okrug
+ (Asia/Anadyr), Kamchatka Krai (Asia/Kamchatka), Kemerovo Oblast
+ (Asia/Novokuznetsk), and the Samara Oblast and the Udmurt Republic
+ (Europe/Samara) are not changing their clocks. The changed zones are
+ Europe/Kaliningrad, Europe/Moscow, Europe/Simferopol, Europe/Volgograd,
+ Asia/Yekaterinburg, Asia/Omsk, Asia/Novosibirsk, Asia/Krasnoyarsk,
+ Asia/Irkutsk, Asia/Yakutsk, Asia/Vladivostok, Asia/Khandyga,
+ Asia/Sakhalin, and Asia/Ust-Nera; Asia/Magadan will have two hours
+ subtracted; and Asia/Novokuznetsk's time zone abbreviation is affected,
+ but not its UTC offset. Two zones are added: Asia/Chita (split
+ from Asia/Yakutsk, and also with two hours subtracted) and
+ Asia/Srednekolymsk (split from Asia/Magadan, but with only one hour
+ subtracted). (Thanks to Tim Parenti for much of the above.)
+
+ Changes affecting time zone abbreviations
+
+ Australian eastern time zone abbreviations are now AEST/AEDT not EST,
+ and similarly for the other Australian zones. That is, for eastern
+ standard and daylight saving time the abbreviations are AEST and AEDT
+ instead of the former EST for both; similarly, ACST/ACDT, ACWST/ACWDT,
+ and AWST/AWDT are now used instead of the former CST, CWST, and WST.
+ This change does not affect UTC offsets, only time zone abbreviations.
+ (Thanks to Rich Tibbett and many others.)
+
+ Asia/Novokuznetsk shifts from NOVT to KRAT (remaining on UTC+7)
+ effective 2014-10-26 at 02:00 local time.
+
+ The time zone abbreviation for Xinjiang Time (observed in �rümqi)
+ has been changed from URUT to XJT. (Thanks to Luther Ma.)
+
+ Prefer MSK/MSD for Moscow time in Russia, even in other cities.
+ Similarly, prefer EET/EEST for eastern European time in Russia.
+
+ Change time zone abbreviations in (western) Samoa to use "ST" and
+ "DT" suffixes, as this is more likely to match common practice.
+ Prefix "W" to (western) Samoa time when its standard-time offset
+ disagrees with that of American Samoa.
+
+ America/Metlakatla now uses PST, not MeST, to abbreviate its time zone.
+
+ Time zone abbreviations have been updated for Japan's two time
+ zones used 1896-1937. JWST now stands for Western Standard
+ Time, and JCST for Central Standard Time (formerly this was CJT).
+ These abbreviations are now used for time in Korea, Taiwan,
+ and Sakhalin while controlled by Japan.
+
+ Changes affecting past time stamps
+
+ China's five zones have been simplified to two, since the post-1970
+ differences in the other three seem to have been imaginary. The
+ zones Asia/Harbin, Asia/Chongqing, and Asia/Kashgar have been
+ removed; backwards-compatibility links still work, albeit with
+ different behaviors for time stamps before May 1980. Asia/Urumqi's
+ 1980 transition to UTC+8 has been removed, so that it is now at
+ UTC+6 and not UTC+8. (Thanks to Luther Ma and to Alois Treindl;
+ Treindl sent helpful translations of two papers by Guo Qingsheng.)
+
+ Some zones have been turned into links, when they differed from existing
+ zones only for older UTC offsets where the data were likely invented.
+ These changes affect UTC offsets in pre-1970 time stamps only. This is
+ similar to the change in release 2013e, except this time for western
+ Africa. The affected zones are: Africa/Bamako, Africa/Banjul,
+ Africa/Conakry, Africa/Dakar, Africa/Freetown, Africa/Lome,
+ Africa/Nouakchott, Africa/Ouagadougou, Africa/Sao_Tome, and
+ Atlantic/St_Helena. This also affects the backwards-compatibility
+ link Africa/Timbuktu. (Thanks to Alan Barrett, Stephen Colebourne,
+ Tim Parenti, and David Patte for reporting problems in earlier
+ versions of this change.)
+
+ Asia/Shanghai's pre-standard-time UT offset has been changed from
+ 8:05:57 to 8:05:43, the location of Xujiahui Observatory. Its
+ transition to standard time has been changed from 1928 to 1901.
+
+ Asia/Taipei switched to JWST on 1896-01-01, then to JST on 1937-10-01,
+ then to CST on 1945-09-21 at 01:00, and did not observe DST in 1945.
+ In 1946 it observed DST from 05-15 through 09-30; in 1947
+ from 04-15 through 10-31; and in 1979 from 07-01 through 09-30.
+ (Thanks to Yu-Cheng Chuang.)
+
+ Asia/Riyadh's transition to standard time is now 1947-03-14, not 1950.
+
+ Europe/Helsinki's 1942 fall-back transition was 10-04 at 01:00, not
+ 10-03 at 00:00. (Thanks to Konstantin Hyppönen.)
Home |
Main Index |
Thread Index |
Old Index