This is the mail archive of the
mailing list for the Cygwin project.
Re: New package: tzcode-2003d-1
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: "Dr. Volker Zell" <Dr dot Volker dot Zell at oracle dot com>
- Cc: cygwin-apps at cygwin dot com
- Date: Sat, 29 Nov 2003 12:51:20 -0500 (EST)
- Subject: Re: New package: tzcode-2003d-1
- References: <firstname.lastname@example.org> <3FC792DB.email@example.com><firstname.lastname@example.org>
- Reply-to: cygwin-apps at cygwin dot com
On Sat, 29 Nov 2003, Dr. Volker Zell wrote:
> >>>>> "Nicholas" == Nicholas Wourms <email@example.com> writes:
> 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
> --- 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
> So go ahead and update the cygwin source with the latest source provided by this package.
Some systems actually use the TZDEFAULT and TZDIR environment variables to
find the zoneinfo database. Perhaps the right solution would be to take
those variables into account? On the other hand, there is no
/usr/local/etc/zoneinfo directory under Cygwin, so we might as well change
TZDIR to point to one that does exist. Does this make Cygwin depend on
the tzcode package now?
If Cygwin were to provide a default (dummy?) implementation of the
zoneinfo database somewhere, then the use of the TZDIR and TZDEFAULT
environment variables would be justified. We could set them in a
/etc/profile.d script distributed with the tzcode package.
|\ _,,,---,,_ firstname.lastname@example.org
ZZZzz /,`.-'`' -. ;-;;,_ email@example.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster." -- Patrick Naughton