diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-05-15 14:46:36 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-05-15 14:46:36 +0000 |
commit | b17277cfa29eee1b76fcaa18f2d4bb21c1567d6c (patch) | |
tree | 80219b5b81d70a715003af4c8b00de47fd373aef /time | |
parent | 0f488414e05e73763e739222ff8a89682df93d42 (diff) | |
download | glibc-b17277cfa29eee1b76fcaa18f2d4bb21c1567d6c.zip glibc-b17277cfa29eee1b76fcaa18f2d4bb21c1567d6c.tar.gz glibc-b17277cfa29eee1b76fcaa18f2d4bb21c1567d6c.tar.bz2 |
Update.
1998-05-15 14:36 Ulrich Drepper <drepper@cygnus.com>
* posix/wordexp-test.c: Avoid duplicate messages.
* sysdeps/generic/setenv.c: Use __tfind and __tsearch, not tfind and
tsearch. Correctly interpret values returned by those functions.
(unsetenv): Store pointer to string, not pointer to string pointer.
* time/tzfile.c (__tzfile_compute): Take new arguments. Store
DST information and offset in them.
* time/tzset.c (__tz_convert): Pass extra parameters to
__tzfile_compute. Compute equivalent values for use of tz_rules.
1998-05-15 00:49:11 Zack Weinberg <zack@rabi.phys.columbia.edu>
* iconvdata/Makefile (gen-8bit-table): Use move-if-change and
stamp files to avoid unnecessary recompilation.
(gen-8bit-gap-table): Likewise.
(move-if-change): New variable.
(all generated .h rules): Change to be .stmp rules.
(%.h): New rule; depend on %.stmp; no commands.
(distribute): Add gen-8bit.sh, gen-8bit-gap.sh,
gen-8bit-gap-1.sh.
1998-05-15 01:09 Zack Weinberg <zack@rabi.phys.columbia.edu>
* Makerules (libc-map): Deleted.
(load-map-file): Set to the appropriate compiler switch, not
just the file name. If libfoo-map is not set, look for a
libfoo.map in the current directory and $(..).
(map-file): New variable, contains just the mapfile name.
(build-shlib): Adjust for new value of load-map-file.
(libc.so): Correct dependencies.
* extra-lib.mk: Correct shlib dependencies since libfoo-map
may not be set anymore.
* elf/Makefile: Set ld-map to $(..)libc.map, not $(libc-map).
Delete libdl-map. Tweak ld.so link rule to work with changed
variable settings in Makerules.
* iconvdata/Makefile: Tweak build-module to work with changed
variable settings in Makerules.
* db/Makefile: Delete libdb-map.
* hesiod/Makefile: Delete libnss_hesiod-map.
* linuxthreads/Makefile: Delete libpthread-map.
* locale/Makefile: Delete libBrokenLocale-map.
* login/Makefile: Delete libutil-map.
* math/Makefile: Delete libm-map.
* md5-crypt/Makefile: Delete libcrypt-map.
* nis/Makefile: Delete libnsl-map, libnss_nis-map,
libnss_nisplus-map, and libnss_compat-map.
* nss/Makefile: Delete libnss_files-map, libnss_db-map, and
libnss_ldap-map.
* resolv/Makefile: Delete libresolv-map and libnss_dns-map.
* rt/Makefile: Delete librt-map.
1998-05-15 01:06 Zack Weinberg <zack@rabi.phys.columbia.edu>
* configure.in: Instead of substituting `yes' or `no' for whether
--no-whole-archive is available, set @no_whole_archive@ to the
appropriate gcc switch or the empty string. Likewise for
-fno-exceptions.
* config.make.in: Replace have-no-whole-archive with
no-whole-archive and have-no-exceptions with no-exceptions.
* Makerules: Delete stanzas setting no-whole-archive and
no-exceptions.
* sunrpc/Makefile: Use move-if-change to update generated .h
and .c files.
1998-05-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* wcsmbs/wcsmbsload.c (extract_charset_name): Use strcspn instead
of strchr loop.
1998-05-15 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* time/tzfile.c (__tzfile_read): Remove unused variable info.
(__tzfile_compute): Likewise.
1998-05-15 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/unix/sysv/linux/bits/socket.h (AF_SNA,PF_SNA): Add new
defines from Linux 2.1.102.
Diffstat (limited to 'time')
-rw-r--r-- | time/tzfile.c | 9 | ||||
-rw-r--r-- | time/tzset.c | 18 |
2 files changed, 18 insertions, 9 deletions
diff --git a/time/tzfile.c b/time/tzfile.c index c9becf3..9fab857 100644 --- a/time/tzfile.c +++ b/time/tzfile.c @@ -90,7 +90,6 @@ __tzfile_read (const char *file) struct tzhead tzhead; size_t chars; register size_t i; - struct ttinfo *info; __use_tzfile = 0; @@ -415,13 +414,14 @@ find_transition (time_t timer) int __tzfile_compute (time_t timer, int use_localtime, - long int *leap_correct, int *leap_hit) + long int *leap_correct, int *leap_hit, + int *isdst, long int *offset) { + struct ttinfo *info = find_transition (timer); register size_t i; if (use_localtime) { - struct ttinfo *info = find_transition (timer); __daylight = rule_stdoff != rule_dstoff; __timezone = -rule_stdoff; __tzname[1] = NULL; @@ -434,6 +434,9 @@ __tzfile_compute (time_t timer, int use_localtime, __tzname[1] = __tzname[0]; } + *isdst = info->isdst; + *offset = info->offset; + *leap_correct = 0L; *leap_hit = 0; diff --git a/time/tzset.c b/time/tzset.c index e42be39..251967e 100644 --- a/time/tzset.c +++ b/time/tzset.c @@ -37,7 +37,8 @@ extern struct tm _tmbuf; extern int __use_tzfile; extern void __tzfile_read __P ((const char *file)); extern int __tzfile_compute __P ((time_t timer, int use_localtime, - long int *leap_correct, int *leap_hit)); + long int *leap_correct, int *leap_hit, + int *isdst, long int *offset)); extern void __tzfile_default __P ((const char *std, const char *dst, long int stdoff, long int dstoff)); extern char *__tzstring __P ((const char *string)); @@ -594,6 +595,8 @@ __tz_convert (const time_t *timer, int use_localtime, struct tm *tp) { long int leap_correction; int leap_extra_secs; + int isdst; + long int offset; if (timer == NULL) { @@ -612,7 +615,8 @@ __tz_convert (const time_t *timer, int use_localtime, struct tm *tp) if (__use_tzfile) { if (! __tzfile_compute (*timer, use_localtime, - &leap_correction, &leap_extra_secs)) + &leap_correction, &leap_extra_secs, + &isdst, &offset)) tp = NULL; } else @@ -621,16 +625,18 @@ __tz_convert (const time_t *timer, int use_localtime, struct tm *tp) tp = NULL; leap_correction = 0L; leap_extra_secs = 0; + + isdst = (*timer >= tz_rules[0].change && *timer < tz_rules[1].change); + offset = tz_rules[isdst].offset; } if (tp) { if (use_localtime) { - tp->tm_isdst = (*timer >= tz_rules[0].change - && *timer < tz_rules[1].change); - tp->tm_zone = __tzname[tp->tm_isdst]; - tp->tm_gmtoff = tz_rules[tp->tm_isdst].offset; + tp->tm_isdst = isdst; + tp->tm_zone = __tzname[isdst]; + tp->tm_gmtoff = offset; } else { |