diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-10-17 20:23:20 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-10-17 20:23:20 +0000 |
commit | 58423c7dbbea349041a4d96b1fdc51cdbc3a6ef1 (patch) | |
tree | 6637999d8a2f896afa0ad8fd61cdd0be866fa3fa | |
parent | 1aa5e4d74f97ef27cfae90a92e1736276ac08dfe (diff) | |
download | glibc-58423c7dbbea349041a4d96b1fdc51cdbc3a6ef1.tar.gz glibc-58423c7dbbea349041a4d96b1fdc51cdbc3a6ef1.tar.xz glibc-58423c7dbbea349041a4d96b1fdc51cdbc3a6ef1.zip |
[BZ #5186]
* time/tzset.c (__tz_convert): Don't force testing for a change of TZ if not called from localtime. But then also see whether the file changed, in case __use_tzfile is set.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | time/tzset.c | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index 9ae1518030..f9a7564d13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-10-17 Ulrich Drepper <drepper@redhat.com> + [BZ #5186] + * time/tzset.c (__tz_convert): Don't force testing for a change of + TZ if not called from localtime. But then also see whether the + file changed, in case __use_tzfile is set. + * sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Define F_DUPFD_CLOEXEC. * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise. diff --git a/time/tzset.c b/time/tzset.c index 27efef0f7a..0d54202185 100644 --- a/time/tzset.c +++ b/time/tzset.c @@ -401,7 +401,7 @@ tzset_internal (always, explicit) if (tz && *tz == ':') ++tz; - /* Check whether the value changes since the last run. */ + /* Check whether the value changed since the last run. */ if (old_tz != NULL && tz != NULL && strcmp (tz, old_tz) == 0) /* No change, simply return. */ return; @@ -606,9 +606,8 @@ __tz_convert (const time_t *timer, int use_localtime, struct tm *tp) /* Update internal database according to current TZ setting. POSIX.1 8.3.7.2 says that localtime_r is not required to set tzname. - This is a good idea since this allows at least a bit more parallelism. - By analogy we apply the same rule to gmtime_r. */ - tzset_internal (tp == &_tmbuf, 0); + This is a good idea since this allows at least a bit more parallelism. */ + tzset_internal (tp == &_tmbuf && use_localtime, 1); if (__use_tzfile) __tzfile_compute (*timer, use_localtime, &leap_correction, |