1
0
mirror of https://frontier.innolan.net/rainlance/amiga-tz.git synced 2025-11-20 00:20:20 +00:00

363 Commits

Author SHA1 Message Date
503ee68905 Release tzcode2015e and tzdata2015e.
* NEWS, Makefile (VERSION): Increase to 2015e.
2015-06-13 10:57:13 -07:00
0baae05254 Simplify 'make public' chatter
* Makefile (ALL): Depend on $(ENCHILADA).
(check_public): Do not depend on $(ENCHILADA), since we're
about to remove some of it anyway.  Use 'make ALL' to avoid
useless chatter about 'Nothing to do'.
2015-05-08 14:00:13 -07:00
65c4598c75 Prefer '$(MAKE)' to 'make'
* Makefile (check_public, check_time_t_alternatives)
(typecheck): Use '$(MAKE)' instead of 'make'.
This has better behavior with GNU 'make' and -j.
2015-05-08 13:52:05 -07:00
30a8c5406d Spell Åland etc. with accents in iso3166.tab
* Makefile (check_character_set): Don't require iso3166.tab
to be ASCII.
* NEWS: Document this.
* iso3166.tab (AX, CI, RE): Use UTF-8 rather than ASCII approximations.
2015-05-02 18:00:13 -07:00
f649033305 Remove hair from southamerica comment
While using the tz source to test some other program I found an
unwanted hair space (U+200A) in the commentary.  Fix this, and
adjust Makefile to catch this sort of thing in the future.
* Makefile (SAFE_CHARSET): Exclude ] and -, as they're now the
invoker's responsibility.  Invoker changed.
(NONSYM_CHAR): Remove, replacing with ...
(OK_CHAR): ... this new macro.  All uses changed.
(NONSYM_LINE, VALID_LINE): Remove, replacing with ...
(OK_LINE): ... this new macro.  All uses changed.
(check_character_set): Simplify test, and report all non-ASCII
non-letters.  Remove the exception for Makefile, as it no longer
needs to contain non-OK characters.
* southamerica: Replace an inadvertent hair space with a space.
2015-05-02 15:20:28 -07:00
6b36adfdd6 Release tzcode2015d and tzdata2015d.
* NEWS, Makefile (VERSION): Increase to 2015d.
2015-04-24 08:11:35 -07:00
da665373cb Remove need for scheck.c
Its function 'scheck' can be done more efficiently inline.
* Makefile (TZCOBJS): Remove scheck.o.
(NONLIBSRCS): Remove scheck.c.
(scheck.o): Remove.
* private.h (scheck): Remove decl.
* scheck.c: Remove.
* zic.c (gethms, inleap, rulesub): Instead of scheck, use sscanf
directly, with %c appended to the format to detect excess input.
2015-04-19 23:12:58 -07:00
0ddac5ef7e Remove need for ialloc.c
One of its functions, icpyalloc, duplicates the now-standard
function strdup, and we might as well use the standard function.
Its other function, icatalloc, is used only in O(N**2) algorithms
that can be rewritten to be O(N).
* Makefile: Mention HAVE_STRDUP in commentary.
(TZCOBJS): Remove ialloc.o.
(NONLIBSRCS): Remove ialloc.c.
(ialloc.o): Remove.
* ialloc.c: Remove.
* private.h (HAVE_STRDUP): New macro, defaulting to 1.
(icatalloc, icpyalloc): Remove decls.
* zic.c (end): Remove.
(strdup) [!HAVE_STRDUP]: New function.
(memcheck): Arg is no longer a const pointer, since the
result isn't.
(emalloc, erealloc, ecpyalloc): Now functions, not macros.
(ecpyalloc): Use strdup, not icpyalloc.
(ecatalloc): Remove.  All callers changed.
(componentcheck): Check that file name components are nonempty;
otherwise, relname might return nonsense.
(relname): New function.
(dolink, itsdir, writezone): Use it.
(dolink, stringrule, stringzone):
Rewrite to avoid O(N**2) algorithm involving 'strcat' and 'end'.
(writezone): Use local, not static, to store fullname,
and free it before returning.
(doabbr, stringoffset): Return strlen of result.
2015-04-19 23:12:58 -07:00
14ef987885 Release tzcode2015c and tzdata2015c.
* NEWS, Makefile (VERSION): Increase to 2015c.
2015-04-11 08:57:06 -07:00
6ac5f524e3 Modernize GCC_DEBUG_FLAGS
* Makefile (GCC_DEBUG_FLAGS): Assume GCC 4.9.2 and current tz sources.
Add -Wdate-time, -Wdouble-promotion, -Wlogical-op,
-Wold-style-definition, -Wunused.  Remove redundant -Wcast-qual
and -Wno-cast-qual.  Remove -Wmissing-declarations; implied by
-Wmissing-prototypes.  Remove -Wmissing-noreturn; equivalent to
-Wsuggest-attribute=noreturn.  Remove -Wno-sign-conversion; not
needed, as we don't use -Wconversion.  Put the -Wno-* options
last, so that they override preceding options that enable warnings.
2015-03-24 12:09:39 -07:00
2dc5d94148 Release tzcode2015b and tzdata2015b.
* NEWS, Makefile (VERSION): Increase to 2015b.
2015-03-19 23:29:24 -07:00
e219cfa26c Leap seconds administrivia
* leap-seconds.list: New version 3629404800 from NIST,
fixing a commentary typo and removing trailing white space.
* Makefile (check_white_space): Remove special case for
leap-second.list.
2015-02-06 08:22:35 -08:00
a0782484f1 Release tzcode2015a and tzdata2015a.
* NEWS, Makefile (VERSION): Increase to 2015a.
2015-01-29 22:36:59 -08:00
525886015d make check_white_space fix for leap-seconds.list
* Makefile (check_white_space): Allow trailing white space in
leap-seconds.list.  This file is maintained by NIST, and the
current version has trailing white space, and has a checksum
making it inadvisable for us to remove the trailing white space in
our copy.  Also, coalesce two 'grep' calls into one, and check for
weird white space characters anywhere, not just before line end.
2015-01-28 16:58:04 -08:00
2dc5286b28 Check for links to links.
This problem has come up before, and it's time to add a check to
catch this common error.
* Makefile (AWK_SCRIPTS): Add checklinks.awk.
(check, .PHONY): Add check_links.
(check_links): New rule.
* checklinks.awk: New file.
2014-11-17 11:31:40 -08:00
59ed0cc5b8 Release tzcode2014j and tzdata2014j.
* NEWS, Makefile (VERSION): Increase to 2014j.
2014-11-10 17:38:21 -08:00
6ea8fa7879 Release tzcode2014i and tzdata2014i.
* NEWS, Makefile (VERSION): Increase to 2014i.
2014-10-21 22:06:07 -07:00
3bf56b926f Fix some localtime.c problems noted by Christos Zoulas
in: http://mm.icann.org/pipermail/tz/2014-October/021684.html
* localtime.c (tzload): Use ssize_t, not int.  Redo comparison to
avoid the need for an ssize_t value less than -1, which POSIX does
not guarantee.  Use memmove so that we needn't worry about an
ssize_t index.
(tzparse): Remove static always-zero var.  Initialized fields
to zero by hand instead.
(zoneinit): Initialized more fields, to avoid undefined behavior
in tzalloc.
(leapcorr): Fix bug, a stray initialization of a local variable.
* Makefile: Add comment about ssize_t.
* NEWS: Document the above.
2014-10-07 21:43:13 -07:00
651d4deba4 Release tzcode2014h and tzdata2014h.
* NEWS, Makefile (VERSION): Increase to 2014h.
2014-09-25 19:00:28 -07:00
86677a3e82 * Makefile (check_sorted): Further improve quality of checks.
* NEWS: Document this.
* zone1970.tab: Sort country codes better.
2014-09-06 19:24:32 -07:00
720111eb8a * Makefile (check_sorted): Fix typo in recent change. 2014-09-06 18:37:10 -07:00
76409ad9c6 Check that supposedly-sorted source files actually are sorted.
* Makefile (check_sorted): New rule.
(check, .PHONY): Add it.
* backzone: Sort.
2014-09-06 15:11:40 -07:00
9cd0541edf Release tzcode2014g and tzdata2014g.
* NEWS, Makefile (VERSION): Increase to 2014g.
2014-08-28 12:32:04 -07:00
bdad90f18f * Makefile, NEWS: Say that backzone's contents are not all low-quality
and give credit to Lester Caine for some of its high-quality entries.
2014-08-25 22:00:09 -07:00
7e8821934e Port C macro defaults to Solaris and Irix.
This is mostly for convenience, so that plain 'make' works out of
the box on Solaris, instead of having to run something awkward like
'make CFLAGS="-xc99=all -DHAVE_INCOMPATIBLE_CTIME_R=1"', and
similarly for Irix 6.5.
* private.h (_POSIX_PTHREAD_SEMANTICS):
* private.h, zdump.c (__EXTENSIONS__):
New macros, to make Solaris headers more like what we want out
of the box.
(LLONG_MAX, LLONG_MIN): Default from __LONG_LONG_MAX__ if it's defined.
This simplifies later code.
(SCNdFAST64, PRIdMAX): Don't assume they're defined when
INT_FAST64_MAX is, as that's not true on Solaris 10 + Sun C 5.12.
(PRIuMAX): Likewise, for Solaris 11 + Sun C 5.12.
* zdump.c (HAVE_LOCALTIME_RZ): Default to 1 only if TM_ZONE.
* Makefile, NEWS: Document this.
2014-08-25 14:46:05 -07:00
82f519e703 Port 'make check_time_t_alternatives' to Solaris 10.
* Makefile (check_time_t_alternatives): Don't assume 'diff'
has the -q option, since POSIX does not require -q.
* NEWS: Document this.
2014-08-25 13:24:12 -07:00
61bdeb997b zdump now uses localtime_rz if available.
This is significantly faster and is cleaner internally.
* Makefile, NEWS: Document this.
* zdump.c (NETBSD_INSPIRED): Default to 1.
(HAVE_LOCALTIME_RZ): New macro; defaults to NETBSD_INSPIRED && USE_LTZ.
(timezone_t) [!HAVE_LOCALTIME_RZ]: New macro, as a substitute.
(localtime_r) [!HAVE_LOCALTIME_RZ && (!HAVE_LOCALTIME_R||!HAVE_TZSET)]:
(localtime_rz, tzalloc, tzfree) [!HAVE_LOCALTIME_RZ]:
(mktime_rz) [!HAVE_LOCALTIME_RZ && TYPECHECK]:
New substitute function and macro, compatible with NetBSD.
All other uses of localtime_r changed to use localtime_rz.
(settimezone): Remove; all uses replaced by tzalloc.
(tzalloc): Use most of the code of the old settimezone function,
but don't free the old storage.
(tzfree): Free it here instead.
(my_localtime_rz): Rename from my_localtime_r, and make it
compatible with localtime_rz.  All uses changed.
(saveabbr): Return the abbreviation.  If HAVE_LOCALTIME_RZ
simply return the output of abbr; that's faster.
(main): Diagnose any tzalloc failure.  tzfree after use.
(hunt, show): New timezone_t arg.  All uses changed.
2014-08-25 08:20:53 -07:00
f99b8f1414 Add NetBSD-inspired functions for timezone_t objects.
* Makefile, NEWS: Document this.
* localtime.c (NETBSD_INSPIRED_EXTERN): New macro.
(zoneinit): New function, with tzset_unlocked's internals.
(tzset_unlocked): Use it.
(tzalloc, tzfree) [NETBSD_INSPIRED]: New functions.
(localsub, gmtsub, time2sub, time2, time1, leapcorr):
New time zone argument.  All uses changed.
(localsub, gmtsub): Cast to char *, since the time zone argument
is a pointer-to-const.
(localtime_rz): New function, with localtime_tzset's internals.
(localtime_tzset): Use it.
(mktime_z): New function, with mktime's internals.
(mktime): Use it.
(leapcorr): Pass time_t by value, not by reference.
(time2posix_z): New function, with time2posix's internals.
(time2posix): Use it.  Omit unnecessary local.
(posix2time_z): New function, with posix2time's internals.
(posix2time): Use it.
* private.h (NETBSD_INSPIRED): Default to 1.
(localtime_rz, mktime_z, timezone_t, strftime, tzalloc, tzfree):
Define if NETBSD_INSPIRED is defined.
Use macros to avoid any clashes with <time.h>.
(posiztime_z, time2posix_z): Likewise, but only if
STD_INSPIRED is also defined.
2014-08-25 08:20:53 -07:00
9f7d50ae1c Add strftime_l to the library. Only the C locale is supported.
* Makefile, NEWS: Document this.
* private.h (HAVE_STRFTIME_L): New macro.
* strftime.c (strftime_l) [HAVE_STRFTIME_L]: New function.
2014-08-25 08:20:53 -07:00
0e1d8b9d99 strftime: remove support for long-obsolete SunOS locale files
These files were removed from Solaris long ago,
and are not present on any current platforms.
* Makefile, NEWS: Document this.
* private.h (LOCALE_HOME): Remove.
* strftime.c: Assume LOCALE_HOME is not defined.
Do not include sys/stat.h.
(localebuf, _loc) [LOCALE_HOME]: Remove.  All uses removed.
2014-08-25 08:20:53 -07:00
98dea66f9a zdump: use tz library unless USE_LTZ is 0
This fixes some schizophrenia in the build, which linked zdump to
the tz library code but did not compile zdump with the tz library API.
* zdump.c (USE_LTZ): New macro.
Use it, not time_tz, to decide whether to include private.h.
* Makefile, NEWS: Document this.
* Makefile (CHECK_TIME_T_ALTERNATIVES): New macro.
(public): Use it.
2014-08-25 08:20:53 -07:00
da184ab535 mktime: guess better near transitions where tm_isdst does not change
* localtime.c (SMALLEST): New macro.
(time2sub) [TM_GMTOFF && !UNINIT_TRAP]:
If the UTC offset doesn't match the request, try the requested offset.
This catches a problem caught by -DTYPECHECK with a time stamp
near a transition from LMT to standard time, where both sides of
the transition have tm_isdst == 0.  If !defined TM_GMTOFF ||
UNINIT_TRAP you're out of luck: mktime will still conform
to its spec but it'll be more likely to guess wrong on these
ambiguous inputs.
* private.h (UNINIT_TRAP): New macro that defaults to 0.
* Makefile, NEWS: Document this.
2014-08-25 08:20:53 -07:00
7c681a8148 zdump: use localtime_r if available
This is a bit cleaner and faster.
* zdump.c (HAVE_LOCALTIME_R, HAVE_TZSET): Default to 1.
(tzset) [!HAVE_TZSET]:
(localtime_r) [!HAVE_LOCALTIME_R]: Provide a replacement.
(settimezone): Call tzset after changing environ.
(my_localtime_r): Rename from my_localtime, and change API to
be compatible with localtime_r, not localtime.  All uses changed.
* Makefile, NEWS: Document this.
2014-08-25 08:20:52 -07:00
f50d254594 * Makefile (TZDOBJS): Remove ialloc.o.
* NEWS: Document this.
2014-08-25 08:20:52 -07:00
f4948756b5 Remove CMUCS's gtime function.
The Mach project has been inactive for decades,
and mktime has evidently replaced gtime.
* Makefile: Remove comment about CMUCS.
* localtime.c (gtime) [CMUCS]: Remove.
* NEWS: Document the above.
2014-08-25 08:20:52 -07:00
96eff14f85 Simplify configuration of TM_GMTOFF and TM_ZONE.
* private.h, zdump.c (_GNU_SOURCE): New macro.
(TM_GMTOFF) [!NO_TM_GMTOFF]:
(TM_ZONE) [!NO_TM_ZONE]: Guess definition if not already defined.
* Makefile, NEWS: Document the above.
2014-08-25 08:19:48 -07:00
10ac30643e * Makefile (check_time_t_alternatives): Pass REDO to submake. 2014-08-25 08:19:48 -07:00
11f5ff1129 * Makefile (strftime.o): Depend on private.h. 2014-08-25 08:19:47 -07:00
64399fc596 Make the library thread-safe if THREAD_SAFE is defined.
* localtime.c [THREAD_SAFE]: Include pthread.h.
(VOLATILE): New macro.
(locallock) [THREAD_SAFE]: New static var.
(lock, unlock): New functions.
(lcl_is_set, gmt_is_set): Now VOLATILE.
(tzsetwall): Move cleaned-up guts to new function tzsetwall_unlocked,
for which this is now merely a locking wrapper.
(tzset): Similarly, for new function tzset_unlocked.
(localsub): Don't set tzname here; that's not thread-safe.
This change can lose information on hosts without TM_ZONE,
but there is no reliable way to fix that in a thread-safe way.
(localtime_tzset): New function, which does proper locking.
(localtime, localtime_r): Use it.
(gmtsub): Do not worry about initializing gmtptr, as that's now
the caller's responsibility.
(gmtime): Reimplement in terms of gmtime_r.
(timegm): Reimplement in terms of timeoff.
(gmtime_r, offtime, mktime, timeoff, time2posix, posix2time):
Lock at start and unlock at end.
* Makefile, NEWS: Document this.
2014-08-25 08:19:47 -07:00
ac5bf48519 New data file 'backzone' for out-of-scope and/or poorly-sourced data.
* backzone: New file.
* Makefile (DATA): Add backzone.
(check_character_set): Check it.
(posix_packrat): New rule.
(.PHONY): Add it.
* NEWS: Document the above.
2014-08-12 17:38:35 -07:00
e107ce8107 * Makefile (.PHONY): Add check_white_space. 2014-08-12 11:30:30 -07:00
3b4c54b5b7 * Makefile (check_character_set): Check CONTRIBUTING like README. 2014-08-12 01:12:34 -07:00
bc9b5b8914 Distribute Theory as part of the tzdata tarball too.
(Suggested by Alan Barrett.)
* Makefile (COMMON): Move Theory here ...
(DOCS): From here.
* NEWS: Document this.
2014-08-12 01:10:09 -07:00
ac652d59bb * CONTRIBUTING: New file.
* Makefile (COMMON): Add it.
* README, NEWS, Theory, africa, asia, australasia, europe:
* northamerica, southamerica: Mention it.
2014-08-11 16:03:52 -07:00
f02ca7c6ef Shift the load a little between the two tarballs.
(Thanks to Alan Barrett for the suggestion.)
* Makefile (SOURCES): Move workman.sh here, from $(MISC).
(COMMON): Move NEWS here, from $(DOCS).
(tzdata$(VERSION).tar.gz): Move $(MISC) here, from
tzcode$(VERSION).tar.gz.
* NEWS: Document the above.
2014-08-11 12:32:48 -07:00
0512625db7 Improve checks for white space.
* Makefile (check_white_space): Rename from check_tabs; all uses
changed.  Also check for trailing white space and for oddball
ASCII white space characters.
2014-08-11 11:53:14 -07:00
f2fd32be74 Don't put spaces before tabs.
* Makefile (check_tabs): New rule.
(check): Use it.
Also, fix all other files to not have spaces before tabs.
2014-08-09 17:52:45 -07:00
b7a38560a5 Don't put leapseconds.awk in tzdata tarball.
This harmless bug was introduced in release 2014f, which distributed
leapseconds.awk in both the code and the data tarballs.
It's code, so it should be in the code tarball.
* Makefile (DATA): Omit leapseconds.awk.
(check_character_set): Omit redundant check of $(LEAP_DEPS).
2014-08-09 12:46:44 -07:00
17be956450 Release tzcode2014f and tzdata2014f.
* NEWS, Makefile (VERSION): Increase to 2014f.
2014-08-05 17:46:53 -07:00
4c73ed617f Rename time.tab to zone1970.tab.
* Makefile (ZONETABLES): Rename from TIMETABLES.  All uses changed.
* zone1970.tab: Rename from time.tab.  All uses changed.
2014-07-31 15:20:45 -07:00