This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Generate string.h and time.h if nonexistent; kill POSIX


 > From: "Zack Weinberg" <zackw@Stanford.EDU>
 > 
 > On Tue, May 08, 2001 at 11:31:26AM -0400, Kaveh R. Ghazi wrote:
 > >  > From: "Zack Weinberg" <zackw@Stanford.EDU>
 > >  > 
 > >  > On Tue, May 01, 2001 at 11:50:11AM -0400, Kaveh R. Ghazi wrote:
 > >  > > 
 > >  > > IIRC, some platform's sys/time.h required including sys/types.h
 > >  > > beforehand.
 > ...
 > >  > I'm nervous about this.  This header will be used by tsystem.h
 > >  > which already includes sys/types.h.  What if it's not safe to
 > >  > include sys/types.h twice?  I don't think fixincludes/fixproto try
 > >  > to add MI guards to headers that lack them.
 > > 
 > > Well, I can offer examples where we include it twice and have not seen
 > > any problems in practice.  E.g. system.h + cpplib.h both include
 > > sys/types.h, so IMHO its safe.
 > 
 > That's good enough for me.  Revised patch for fixproto appended.
 > 
 > ===================================================================
 > Index: fixproto
 > +	# It does, so include it and hope it has the appropriate
 > +	# type declarations.  Some versions require sys/types.h.
 > +	echo '#include <sys/types.h>' >>tmp.h
 > +	echo '#include <sys/time.h>' >>tmp.h
 > +	else

One nit you forgot from my last email, please include a forward
declaration of "struct tm".  It can't hurt, and my thinking is that
we'll want to ensure "struct tm *" inserted as parameters in missing
prototypes by fixproto won't choke.

		Thanks!
		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]