[newlib-cygwin] tzset: Check timezone and country case-insensitive
Corinna Vinschen
corinna@sourceware.org
Wed Jul 8 08:26:00 GMT 2015
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=b90a91a61800706ff83c47431658515dda90399c
commit b90a91a61800706ff83c47431658515dda90399c
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Wed Jul 8 10:25:49 2015 +0200
tzset: Check timezone and country case-insensitive
* tzset.c (main): Check timezone and country case-insensitive.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/cygwin/release/2.1.0 | 4 ++++
winsup/utils/ChangeLog | 4 ++++
winsup/utils/tzset.c | 4 ++--
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/release/2.1.0 b/winsup/cygwin/release/2.1.0
index aca69cd..1b9e19f 100644
--- a/winsup/cygwin/release/2.1.0
+++ b/winsup/cygwin/release/2.1.0
@@ -33,3 +33,7 @@ Bug Fixes
Addresses: https://cygwin.com/ml/cygwin/2015-06/msg00384.html
- Fix a crash on 64 bit XP/2003 when opening /proc/$PID/maps.
+
+- Apparently on some Windows systems timezones differ in case
+ from the standard. Fix the tzset tool to check case-insensitive.
+ Addresses: https://cygwin.com/ml/cygwin/2015-07/msg00113.html
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
index 5a68a40..db6049b 100644
--- a/winsup/utils/ChangeLog
+++ b/winsup/utils/ChangeLog
@@ -1,3 +1,7 @@
+2015-07-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * tzset.c (main): Check timezone and country case-insensitive.
+
2015-06-07 Jon Turney <jon.turney@dronecode.org.uk>
* strace.cc (proc_child): Log process and thread create and exit,
diff --git a/winsup/utils/tzset.c b/winsup/utils/tzset.c
index 2b3f413..0e22f44 100644
--- a/winsup/utils/tzset.c
+++ b/winsup/utils/tzset.c
@@ -207,11 +207,11 @@ main (int argc, char **argv)
/* Now iterate over the mapping table and find the right entry. */
for (idx = 0; idx < TZMAP_SIZE; ++idx)
{
- if (!wcscmp (keyname, tzmap[idx].win_tzkey))
+ if (!wcscasecmp (keyname, tzmap[idx].win_tzkey))
{
if (gotit < 0)
gotit = idx;
- if (!wcscmp (country, tzmap[idx].country))
+ if (!wcscasecmp (country, tzmap[idx].country))
break;
}
else if (gotit >= 0)
More information about the Cygwin-cvs
mailing list