Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: jv@mh.nl (Johan Vromans)
Subject: Re: problems with time.h under Ultrix 4.x
Date: 14 Jan 92 08:45:51 GMT	[thread overview]
Message-ID: <1992Jan14.084551.6951@pronto.mh.nl> (raw)
In-Reply-To: jbotz@mtholyoke.edu's message of 10 Jan 92 23:40:37 GMT

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" -------------------------


      parent reply	other threads:[~1992-01-14  8:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-01-10 23:40 problems with time.h under Ultrix 4.x Jurgen Botz
1992-01-14  0:00 ` Eiji Hirai
1992-01-14  8:45 ` Johan Vromans [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox