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


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 would stick types.h in the constructed time.h.  No need
> to check for it, all platforms apparently have one.  It doesn't hurt
> to forward declare "struct tm" in that clause too, even if it already
> comes on a platform.  Something like this:
> 
>  >        # It does, so include it and hope it has the appropriate
>  >        # type declarations.
>  >        echo '#include <sys/types.h>' >>tmp.h
>  >        echo '#include <sys/time.h>' >>tmp.h
>  >        echo 'struct tm;' >>tmp.h

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.

-- 
zw A man who has never gone to school may steal from a freight car, but if he
   has a university education, he may steal the whole railroad.
   	-- Theodore Roosevelt


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