Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2002-05-07 17:18:44 +0400
committerCorinna Vinschen <corinna@vinschen.de>2002-05-07 17:18:44 +0400
commit795b46cf8fde240b486c27800a79d50fea9c8b7d (patch)
tree7291e8dc56e35f89698e70af6d2abe3bded0ed82
parent3769952b4d544a2b98eadd2b7761359590aaee8d (diff)
* localtime.cc (tzsetwall): Use wildabbr if generated timezone name
length < 3.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/localtime.cc14
2 files changed, 12 insertions, 7 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index cc32b8792..42e1833c7 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2002-04-28 Norbert Schulze <norbert.schulze@web.de>
+
+ * localtime.cc (tzsetwall): Use wildabbr if generated timezone name
+ length < 3.
+
2002-05-05 Pierre Humblet <pierre.humblet@ieee.org>
* spawn.cc (spawn_guts): Move call to set_process_privilege()
diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc
index 48006e25a..8267bdebb 100644
--- a/winsup/cygwin/localtime.cc
+++ b/winsup/cygwin/localtime.cc
@@ -1396,10 +1396,10 @@ tzsetwall P((void))
dst = cp = buf;
for (src = tz.StandardName; *src; src++)
if (is_upper(*src)) *dst++ = *src;
- if (cp == dst)
+ if ((dst - cp) < 3)
{
- /* In Asian Windows, tz.StandardName may not contain
- the timezone name. */
+ /* In non-english Windows, converted tz.StandardName
+ may not contain a valid standard timezone name. */
strcpy(cp, wildabbr);
cp += strlen(wildabbr);
}
@@ -1414,11 +1414,11 @@ tzsetwall P((void))
dst = cp;
for (src = tz.DaylightName; *src; src++)
if (is_upper(*src)) *dst++ = *src;
- if (cp == dst)
+ if ((dst - cp) < 3)
{
- /* In Asian Windows, tz.StandardName may not contain
- the daylight name. */
- strcpy(buf, wildabbr);
+ /* In non-english Windows, converted tz.DaylightName
+ may not contain a valid daylight timezone name. */
+ strcpy(cp, wildabbr);
cp += strlen(wildabbr);
}
else