[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GTK patches part 2

From: Jan D.
Subject: Re: GTK patches part 2
Date: Tue, 10 Dec 2002 21:44:24 +0100 (MET)

> "Jan D." <address@hidden> writes:
> > Well, I don't usually add include:s unless needed.  For example,
> > xterm.h includes X11 headers who in turn includes a lot of standard
> > headers.  If what is needed gets included that way, I'm fine with it.
> You can't rely on that.  If *you* make reference to symbols or
> macros, *you* need to include the appropriate header file,
> regardless of whether or not some other header you include also
> needs that header file.  Sometimes people just dump all their

There is no such requrement in the C standard, even if it makes
sense for some people.

> includes into one local header file and just include that.  It
> gets the job done, but then each file isn't explicitly declaring
> what it needs.

For example, stdlib.h is included by config.h, so it is clearly
redundant to do so elsewhere.  I can put in stdio.h just for the
sake of portability.

        Jan D.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]