Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!pprg.unm.edu!hc!lll-winken!uunet!mcvax!hp4nl!gouldnl!wytze From: wytze@gouldnl.UUCP (Wytze van der Raay) Newsgroups: comp.sources.bugs Subject: Re: Mush - patch for UTX/32 2.1a Summary: better patch Keywords: mush timezone patch Message-ID: <695@gouldnl.UUCP> Date: 28 Mar 89 15:04:34 GMT References: <1799@infocenter.UUCP> Reply-To: wytze@gouldnl.UUCP (Wytze van der Raay) Organization: Gould European Unix Support Centre Lines: 47 In article <1799@infocenter.UUCP> mhoffman@infocenter.UUCP (Mike Hoffman) writes: >While compiling mush 6.4, I ran across a rather unexpected >problem during loading: "_timezone: undefined." Well I tried >"man timezone" and got the manpage for ctime(3), but timezone() >was missing from the page! ... >Anyhow, here is my kludge (I mean fix). Not very scientific, but >it seems to work. We are on Eastern Time, but I guess the "EST" >and "EDT" could be #define'd to any appropriate timezone. The proposed change is really a kludge, not a fix! How about innocent Mush users outside the EST/EDT timezone? You don't really want them to edit the source again and again ... Basically, the code in dates.c::rfc_date needs to be upgraded for the case of a BSD4.3 system which uses the /etc/zoneinfo system for establishing timezones. This includes (as far as Gould is concerned) UTX/32 2.1 and later (PowerNode), and UTX/32 3.0 and later(NPL). The following context diff shows how this can be done. Presumably Dan Heller can turn this into a generic fix for BSD4.3 ++ systems sometime ... *** dates.c.org Thu Mar 16 09:17:47 1989 --- dates.c Tue Mar 28 12:25:07 1989 *************** *** 219,225 **** --- 219,231 ---- (void) gettimeofday(&mytime, &myzone); T = localtime(&mytime.tv_sec); + #if defined(gould) && defined(COFF) + /* Newer BSD4.3 systems use flexible timezone implementation. */ + /* This happens to coincide with the introduction of COFF ... */ + tz = T->tm_zone; + #else tz = timezone(myzone.tz_minuteswest, (T->tm_isdst && myzone.tz_dsttime)); + #endif #else char *tz = ""; #endif /* BSD */ -- | Wytze van der Raay ...!hp4nl!gouldnl!wytze | | Gould European Unix Support Centre wytze@gouldnl.uucp | | Maarssenbroek, The Netherlands (USA) ...!gould!wraay |