38 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
/*
 | 
						|
	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
 | 
						|
*/
 |