newlib-cygwin/winsup/cygwin/tzcode
Corinna Vinschen 4914c426c7 Cygwin: drop useless comment
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2020-05-26 10:22:41 +02:00
..
README
localtime.c
localtime.c.patch Cygwin: convert localtime_wrapper.c to plain C source 2020-05-26 09:56:57 +02:00
localtime_wrapper.c Cygwin: drop useless comment 2020-05-26 10:22:41 +02:00
namespace.h
private.h
tz_posixrules.h
tzfile.h

README

/*
	How the code in this directory is supposed to work...
	2020/05/22 Mark Geisert <mark@maxrnd.com>

	localtime.cc is the Cygwin-specific module that is compiled into
	the Cygwin DLL when the latter is built.  It's just a wrapper that
	#defines a bunch of stuff then #includes localtime.c.

	localtime.c, at any point in time, is a reasonably recent version
	of /src/lib/libc/time/localtime.c from NetBSD.  The same goes for
	private.h and tzfile.h.  An empty namespace.h suffices for Cygwin.

	The idea is that in the future, one just needs to bring over newer
	versions of localtime.c, private.h, and/or tzfile.h from NetBSD as
	they become available.

	With luck, you can drop those files into this directory and they
	can be immediately used to build a newer Cygwin DLL that has the
	newer NetBSD functionality.  Without luck, you'll have to tweak the
	wrapper localtime.cc.  In the worst case, some other strategy will
	need to be figured out, such as manually pulling out the parts of
	the NetBSD code Cygwin needs to build a stand-alone localtime.cc.

	Re tz_posixrules.h: The data elements can be generated from
	/usr/share/zoneinfo/posixrules in any version of Cygwin's tzdata
	package.  Instructions are in the comment leading tz_posixrules.h.

	Addendum:
	Implementation of the strategy above has uncovered a small number
	of NetBSD-isms in localtime.c that cannot be worked around with
	preprocessor tricks.  So there is another file localtime.c.patched
	that holds just these adjustments for Cygwin, and it's this file
	that localtime.cc #includes.  localtime.c.patched is generated by
	winsup/cygwin/Makefile[.in] operating with localtime.c.patch.

	..mark
*/