newlib-cygwin/winsup/cygwin/tzcode
Mike Frysinger 24491c1251 winsup: delete old _LIBC logic
This logic has never been used as we don't define _LIBC and the
reentrant.h header doesn't exist, so delete it all.
2021-11-10 20:16:15 -05: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 libc/time: Move internal newlib tz-structs into own header 2020-10-15 16:59:51 +02:00
namespace.h
private.h winsup: delete old _LIBC logic 2021-11-10 20:16:15 -05:00
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
*/