From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10b612,3a063ab61f0dfe6b X-Google-Attributes: gid10b612,public X-Google-Thread: 1164f8,3a063ab61f0dfe6b X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1992-01-14 04:18:43 PST Xref: sparky comp.unix.ultrix:1963 comp.sys.dec:1183 Path: sparky!uunet!mcsun!sun4nl!mhres!pronto!jv From: jv@mh.nl (Johan Vromans) Newsgroups: comp.unix.ultrix,comp.sys.dec Subject: Re: problems with time.h under Ultrix 4.x Message-ID: <1992Jan14.084551.6951@pronto.mh.nl> Date: 14 Jan 92 08:45:51 GMT References: <1992Jan10.234037.19422@mtholyoke.edu> Sender: jv@pronto.mh.nl (Johan Vromans) Organization: Multihouse Automation, the Netherlands In-Reply-To: jbotz@mtholyoke.edu's message of 10 Jan 92 23:40:37 GMT X-Md4-Signature: 94fb94d15ffd93c3779e6f5409108eff In article <1992Jan10.234037.19422@mtholyoke.edu> jbotz@mtholyoke.edu (Jurgen Botz) writes: About half the software I've compiled under Ultrix 4.x has had problems with DEC's "time.h". Often I get 'conflicting types for "time"' errors, but I've gotten others as well. I can usually fix it by temporarily commenting something in DEC's header out. But seeing as that so much software has problems there, does anyone know what DEC is doing wrong, and/or can suggest a more permanent fix? TIA. 'Old' software uses type long for time, current standard is time_t. DEC has changed its sys/time.h to use time_t, which conflicts with older software. My personal solution is to change, in sys/time.h (actually /usr/local/lib/gcc-include/sys/time.h since I only use GCC) : extern time_t time( time_t *__tloc ); to: #ifdef TIME_T_LONG extern long time( time_t *__tloc ); #else extern time_t time( time_t *__tloc ); #endif When I encounter software that uses 'long time', I only have to supply -DTIME_T_LONG on the command line. Johan -- Johan Vromans jv@mh.nl via internet backbones Multihouse Automatisering bv uucp:..!{uunet,sun4nl}!mh.nl!jv Doesburgweg 7, 2803 PL Gouda, The Netherlands phone/fax: +31 1820 62911/62500 ------------------------ "Arms are made for hugging" -------------------------