Mush - patch for UTX/32 2.1a

Wytze van der Raay wytze at gouldnl.UUCP
Wed Mar 29 01:04:34 AEST 1989


In article <1799 at infocenter.UUCP> mhoffman at 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 at gouldnl.uucp |
| Maarssenbroek, The Netherlands          (USA)   ...!gould!wraay |



More information about the Comp.sources.bugs mailing list