Xref: utzoo unix-pc.general:557 comp.sys.att:3011 Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!nrl-cmf!cmcl2!rutgers!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: unix-pc.general,comp.sys.att Subject: Re: 3b1 shared library problems Message-ID: <2624@bsu-cs.UUCP> Date: 14 Apr 88 16:52:56 GMT References: <103@dms3b1.UUCP> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Distribution: na Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 26 Keywords: shlib.ifile missing symbols Summary: daylight is not in shared library In article <103@dms3b1.UUCP> dave@dms3b1.UUCP (Dave Hanna) writes: >The problem is that, when linking the shared libraries, >the symbol "daylight", which, according to the manual CTIME(3C) is >an external int defined in ctime, is not defined in the shared >library ifile. I've seen patches to shlib.i (or a similarly-named file), but my fix was to use code that doesn't use "daylight" at all but can still find out timezone. The following is from the zoo source code. The tm->tm_isdst field tells you if daylight savings time is in effect. extern long timezone; /* defined by library routine */ long time (); struct tm *localtime (); /* Function gettz(), returns the offset from GMT in seconds of the local time, taking into account daylight savings time */ long gettz() { struct tm *tm; long clock; clock = time ((long *) 0); tm = localtime (&clock); return (timezone - tm->tm_isdst*3600); } -- Rahul Dhesi UUCP: !{iuvax,pur-ee,uunet}!bsu-cs!dhesi