Re: timezone stuff on 64 bit machines
If someone with a 64-bit machine could check out the attached (and if everyone could check out the logic), I'd love it. --ado SCCS/s.localtime.c: 7.45 vs. 7.46 *** 7.45/localtime.c Wed Oct 18 16:36:18 1995 --- 7.46/localtime.c Wed Oct 18 16:36:20 1995 *************** *** 1,6 **** #ifndef lint #ifndef NOID ! static char elsieid[] = "@(#)localtime.c 7.45"; #endif /* !defined NOID */ #endif /* !defined lint */ --- 1,6 ---- #ifndef lint #ifndef NOID ! static char elsieid[] = "@(#)localtime.c 7.46"; #endif /* !defined NOID */ #endif /* !defined lint */ *************** *** 1173,1178 **** --- 1173,1189 ---- if (tmp->tm_wday < 0) tmp->tm_wday += DAYSPERWEEK; y = EPOCH_YEAR; + #define CYCLE_DAYS 1022679L /* Any consecutive CYCLE_DAYS days... */ + #define CYCLE_YEARS 2800L /* make up exactly CYCLE_YEARS years. */ + if (days >= CYCLE_DAYS || days <= -CYCLE_DAYS) { + register int cycles; + + cycles = (days >= 0) ? + (days / CYCLE_DAYS) : + (-1 - (-1 - days) / CYCLE_DAYS); + days -= cycles * CYCLE_DAYS; + y += cycles * CYCLE_YEARS; + } if (days >= 0) for ( ; ; ) { yleap = isleap(y);
On Wed, 18 Oct 1995, Arthur David Olson wrote:
If someone with a 64-bit machine could check out the attached (and if everyone could check out the logic), I'd love it.
It fixed that problem form my point of view -- meaning it comes out of that loop. Now there's a hang in outzone() in zic.c. At line 1439 it loops over every year once again. Erik ------------------------------------------------------------------------------- "Eggheads unite! You have nothing to lose but your yolks" - Adlai Stevenson Erik Troan = http://sunsite.unc.edu/ewt/ = ewt@sunsite.unc.edu
participants (2)
-
ado -
Erik Troan