This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New package: tzcode-2003d-1

>>>>> "Nicholas" == Nicholas Wourms <> writes:

    Nicholas> wrote:
    >> The package 'tzcode' is now available with the Cygwin distribution.
    >> o     (Homepage)
    >> o              (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> 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 and tzfile.h do you mean ? From the cygwin source ?
I don't find a file in the cygwin source. There is a 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/ it should work without the

---   2002-12-20 04:43:50.000000000 +0100
+++        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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]