Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!mintaka!bloom-beacon!EXPO.LCS.MIT.EDU!converse From: converse@EXPO.LCS.MIT.EDU Newsgroups: comp.windows.x Subject: Re: time.h Message-ID: <9011191648.AA22040@excess.lcs.mit.edu> Date: 19 Nov 90 16:48:56 GMT References: <9011190128.AA05620@wintermute.fullerton.edu> Sender: daemon@athena.mit.edu (Mr Background) Organization: X Consortium, MIT Laboratory for Computer Science Lines: 23 > I am tring to include time.h in a program running under motif. When I compile > I get a message saying that line 6 of time.h is redeclaring tm. It looks like > the include for the X11/intrinsic.h is declaring its own tm. From here it looks like Intrinsic.h includes Xos.h which includes sys/time.h. > Is this a major bug or is there some fix for this. Probably no to both, but I don't know what Xt software or o.s. you are running. > We should be able to include standard > packages like time.h without any problems. Agreed. Header files often contain the definition of a preprocessor symbol which can be used to prevent the error of including a header file more than once, by wrapping the include. #ifndef __XTIME__ #include #endif But it is not clear to me whether these symbols are defined by any standard.