aboutsummaryrefslogtreecommitdiff
path: root/winsup/utils/tzset.c
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2021-10-29 18:15:22 +0200
committerCorinna Vinschen <corinna@vinschen.de>2021-10-29 18:19:45 +0200
commitb794f2c6038fe3e4cb1bdcbf01f4abcf9c8167cd (patch)
treebe8b2b92766432e2ae1c26d0c44f235d77ea95ff /winsup/utils/tzset.c
parent687c4bad2877c4770431fa5e11b2582cf83bf316 (diff)
downloadnewlib-b794f2c6038fe3e4cb1bdcbf01f4abcf9c8167cd.zip
newlib-b794f2c6038fe3e4cb1bdcbf01f4abcf9c8167cd.tar.gz
newlib-b794f2c6038fe3e4cb1bdcbf01f4abcf9c8167cd.tar.bz2
Cygwin: drop support for systems not supporting RFC 4646 locales
i. e. Vista/2008. This drops support for the sr_CS locale. Regenerate LC_MESSAGES and LC_TIME ERA data from more recent Linux Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/utils/tzset.c')
-rw-r--r--winsup/utils/tzset.c39
1 files changed, 3 insertions, 36 deletions
diff --git a/winsup/utils/tzset.c b/winsup/utils/tzset.c
index 8e1ba09..d369ff7 100644
--- a/winsup/utils/tzset.c
+++ b/winsup/utils/tzset.c
@@ -119,9 +119,8 @@ print_version ()
int
main (int argc, char **argv)
{
- BOOL ret;
- HKEY hkey, skey;
- WCHAR keyname[256], stdname[256], std2name[256], country[10], *spc;
+ HKEY hkey;
+ WCHAR keyname[256], country[10], *spc;
GEOID geo;
int opt, idx, gotit = -1;
@@ -150,40 +149,8 @@ main (int argc, char **argv)
job a lot. */
if (!reg_query (hkey, L"TimeZoneKeyName", keyname, sizeof keyname, NULL))
{
- /* Pre-Vista we have a lot more to do. First fetch the name of the
- Standard (non-DST) timezone. If we can't get that, give up. */
- if (!reg_query (hkey, L"StandardName", stdname, sizeof stdname,
- "timezone information"))
- {
- reg_close (hkey);
- return 1;
- }
reg_close (hkey);
- /* Now open the timezone database registry key. Every subkey is a
- timezone. The key name is what we're after, but to find the right
- one, we have to compare the name of the previously fetched
- "StandardName" with the "Std" value in the timezone info... */
- hkey = reg_open (HKEY_LOCAL_MACHINE, REG_TZDB, "timezone database");
- if (!hkey)
- return 1;
- for (idx = 0; reg_enum (hkey, idx, keyname, sizeof keyname); ++idx)
- {
- skey = reg_open (hkey, keyname, NULL);
- if (skey)
- {
- /* ...however, on MUI-enabled machines, the names are not stored
- directly in the above StandardName, rather it is a resource
- pointer into tzres.dll. This is stored in MUI_Std.
- Fortunately it's easy to recognize this situation: If
- StandardName starts with @, it's a resource pointer, otherwise
- it's the cleartext value. */
- ret = reg_query (skey, stdname[0] == L'@' ? L"MUI_Std" : L"Std",
- std2name, sizeof std2name, NULL);
- reg_close (skey);
- if (ret && !wcscmp (stdname, std2name))
- break;
- }
- }
+ return 1;
}
reg_close (hkey);