New package: tzcode-2003d-1
Dr. Volker Zell
Dr.Volker.Zell@oracle.com
Sat Nov 29 17:28:00 GMT 2003
>>>>> "Nicholas" == Nicholas Wourms <nwourms@netscape.net> writes:
Nicholas> dr.volker.zell@oracle.com wrote:
>> The package 'tzcode' is now available with the Cygwin distribution.
>> o http://www.twinsun.com/tz/tz-link.htm (Homepage)
>> o ftp://elsie.nci.nih.gov/pub/ (Download location)
Nicholas> I know the train has already left the station, but I do have a few
Nicholas> nitpicks about the package (other then my earlier ones).
I have also the following changes which will get fixed in the next version.
* man pages are now in /usr/share/man
* fixed some mkdir warnings during installation
* added missing requires for tzselect: gawk pdksh
Nicholas> Aren't zoneinfo data alternatives supposed to go in
Nicholas> /usr/share/zoneinfo/<alternative name>? Having three zoneinfo dirs in
Nicholas> Top-Level /usr/share doesn't seem right and is definitely not FHS
Nicholas> compliant.
Look at the comments from the Makefile below. It seems there have been configuration
errors with that directory structure. The /usr/share/zoneinfo-posix directory is actually
the same as /usr/share/zoneinfo. Maybe we should skip the creation of the posix subdir
in the other_two makefile rule.
# If you always want time values interpreted as "seconds since the epoch
# (not counting leap seconds)", use
# REDO= posix_only
# below. If you always want right time values interpreted as "seconds since
# the epoch" (counting leap seconds)", use
# REDO= right_only
# below. If you want both sets of data available, with leap seconds not
# counted normally, use
# REDO= posix_right
# below. If you want both sets of data available, with leap seconds counted
# normally, use
# REDO= right_posix
# below.
# POSIX mandates that leap seconds not be counted; for compatibility with it,
# use either "posix_only" or "posix_right".
REDO= posix_right
posix_only: zic $(TDATA)
$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) -L /dev/null $(TDATA)
right_only: zic leapseconds $(TDATA)
$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) -L leapseconds $(TDATA)
# In earlier versions of this makefile, the other two directories were
# subdirectories of $(TZDIR). However, this led to configuration errors.
# For example, with posix_right under the earlier scheme,
# TZ='right/Australia/Adelaide' got you localtime with leap seconds,
# but gmtime without leap seconds, which led to problems with applications
# like sendmail that subtract gmtime from localtime.
# Therefore, the other two directories are now siblings of $(TZDIR).
# You must replace all of $(TZDIR) to switch from not using leap seconds
# to using them, or vice versa.
other_two: zic leapseconds $(TDATA)
$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR)-posix -L /dev/null $(TDATA)
$(ZIC) -y $(YEARISTYPE) \
-d $(DESTDIR)$(TZDIR)-leaps -L leapseconds $(TDATA)
posix_right: posix_only other_two
right_posix: right_only other_two
zones: $(REDO)
Nicholas> I don't know if this is relevant, but I also noticed that glibc has no
Nicholas> "leaps" dir but it does have a "right" dir. Is this going to be a
Nicholas> problem?
I don't think so. This version just calls the 'right' directory 'timezone-leaps'.
Nicholas> I would like to resolve this so that I can submit a patch for
Nicholas> zoneinfo.cc and tzfile.h so that they correctly locate the zoneinfo
Nicholas> tree and various other files (currently they look in
Nicholas> /usr/local/etc/zoneinfo by default). While I'm at it, I also plan to
Which zoneinfo.cc and tzfile.h do you mean ? From the cygwin source ?
I don't find a zoneinfo.cc file in the cygwin source. There is a localtime.cc so.
Nicholas> update the code to the latest source provided by this package (since
Nicholas> it appears DJ just copied the source from there in the first place).
Nicholas> This way, it will save you the trouble of maintaining an additional,
Nicholas> unneeded static lib. Plus, it will cut down on the size of the
Nicholas> binaries since that static lib contains duplicate code already
Nicholas> contained in the dll.
Your're right. When I delete all references to
localtime.o strftime.o asctime.o and difftime.c
from the Makefile everything still compiles fine and even works when creating
a symbolic link /usr/local/etc/zoneinfo to /usr/share/zoneinfo. As you stated
the current cygwin dll looks in /usr/local/etc/zoneinfo for it's zoneinfo files.
If we change the following in /winsup/cygwin/localtime.cc it should work without the
symlink.
--- localtime.cc.orig 2002-12-20 04:43:50.000000000 +0100
+++ localtime.cc 2003-11-29 18:19:45.934009600 +0100
@@ -303,7 +303,7 @@ static char tzfilehid[] = "@(#)tzfile.h
*/
#ifndef TZDIR
-#define TZDIR "/usr/local/etc/zoneinfo" /* Time zone object file directory */
+#define TZDIR "/usr/share/zoneinfo" /* Time zone object file directory */
#endif /* !defined TZDIR */
#ifndef TZDEFAULT
There is also a duplicate definition in /winsup/cygwin/include/tzfile.h although this
file doesn't seem to be used yet.
--- tzfile.h.orig 2003-09-26 23:12:35.000000000 +0200
+++ tzfile.h 2003-11-29 18:22:45.001496000 +0100
@@ -41,7 +41,6 @@ details. */
#define TM_OCTOBER 9
#define TM_NOVEMBER 10
#define TM_DECEMBER 11
-#define TM_SUNDAY 0
#define TM_YEAR_BASE 1900
So go ahead and update the cygwin source with the latest source provided by this package.
Nicholas> Cheers,
Nicholas> Nicholas
Ciao
Volker
More information about the Cygwin-apps
mailing list