From: Mark Geisert <mark@maxrnd.com>
To: cygwin-patches@cygwin.com
Subject: [Cygwin PATCH 2/9] tzcode resync: README
Date: Wed, 13 May 2020 01:23:42 -0700 [thread overview]
Message-ID: <20200513082349.831-2-mark@maxrnd.com> (raw)
In-Reply-To: <20200513082349.831-1-mark@maxrnd.com>
---
winsup/cygwin/tzcode/README | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
create mode 100644 winsup/cygwin/tzcode/README
diff --git a/winsup/cygwin/tzcode/README b/winsup/cygwin/tzcode/README
new file mode 100644
index 000000000..a200502ea
--- /dev/null
+++ b/winsup/cygwin/tzcode/README
@@ -0,0 +1,37 @@
+/*
+ How the code in this directory is supposed to work...
+ 2020/05/13 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. OTOH namespace.h implements something on
+ NetBSD that is not provided on Cygwin, so it's empty here.
+
+ 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 heading 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.
+
+ ..mark
+*/
--
2.21.0
next prev parent reply other threads:[~2020-05-13 8:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-13 8:23 [Cygwin PATCH 1/9] tzcode resync: Makefile.in Mark Geisert
2020-05-13 8:23 ` Mark Geisert [this message]
2020-05-13 8:23 ` [Cygwin PATCH 3/9] tzcode resync: localtime.cc Mark Geisert
2020-05-13 8:23 ` [Cygwin PATCH 4/9] tzcode resync: localtime.c.patched Mark Geisert
2020-05-13 8:23 ` [Cygwin PATCH 5/9] tzcode resync: localtime.c Mark Geisert
2020-05-13 8:23 ` [Cygwin PATCH 6/9] tzcode resync: namespace.h Mark Geisert
2020-05-13 8:23 ` [Cygwin PATCH 7/9] tzcode resync: private.h Mark Geisert
2020-05-13 8:23 ` [Cygwin PATCH 8/9] tzcode resync: tzfile.h Mark Geisert
2020-05-13 8:23 ` [Cygwin PATCH 9/9] tzcode resync: tz_posixrules.h Mark Geisert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200513082349.831-2-mark@maxrnd.com \
--to=mark@maxrnd.com \
--cc=cygwin-patches@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).