aboutsummaryrefslogtreecommitdiff
path: root/time/tzfile.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-06-16 04:52:54 +0000
committerRoland McGrath <roland@gnu.org>1996-06-16 04:52:54 +0000
commita3b5844025aa90fd28f3bf5a27be116852761f4e (patch)
tree390714ca3b0d10f4ef9bce7ffd4d649ad9184f13 /time/tzfile.c
parent5fbef188648f5150617e0a14f1011e600f1b3a0f (diff)
downloadglibc-a3b5844025aa90fd28f3bf5a27be116852761f4e.tar
glibc-a3b5844025aa90fd28f3bf5a27be116852761f4e.tar.gz
glibc-a3b5844025aa90fd28f3bf5a27be116852761f4e.tar.bz2
glibc-a3b5844025aa90fd28f3bf5a27be116852761f4e.zip
Sun Jun 16 00:40:20 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* time/Makefile ($(installed-localtime-file)): If target exists, do nothing but print a message; if not, make it an absolute symlink. * time/tzset.c (__tzset): After stripping leading :, call __tzfile_read on TZ even if it's empty or null. * time/tzfile.c (__tzfile_read): Use "Universal" if passed "".
Diffstat (limited to 'time/tzfile.c')
-rw-r--r--time/tzfile.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/time/tzfile.c b/time/tzfile.c
index e78a05ec75..332ed46c33 100644
--- a/time/tzfile.c
+++ b/time/tzfile.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 95, 96 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -103,8 +103,12 @@ DEFUN(__tzfile_read, (file), CONST char *file)
free((PTR) leaps);
leaps = NULL;
- if (file == NULL || *file == '\0')
+ if (file == NULL)
+ /* No user specification; use the site-wide default. */
file = TZDEFAULT;
+ else if (*file == '\0')
+ /* User specified the empty string; use UTC explicitly. */
+ file = "Universal";
if (*file != '/')
{
@@ -224,7 +228,7 @@ DEFUN(__tzfile_read, (file), CONST char *file)
(void) fclose(f);
compute_tzname_max (chars);
-
+
__use_tzfile = 1;
return;