Re: [HACKERS] Re: include-file cleanup - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Re: include-file cleanup
Date
Msg-id 20447.932234171@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Re: include-file cleanup  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] Re: include-file cleanup
List pgsql-hackers
A further thought on the include-file cleanup: although you are right to
be wary of removing includes of system files, it would be a good idea to
remove *redundant* includes of system files.

In particular, since c.h includes <stdlib.h>, as well as <stddef.h>
and <stdarg.h> if they exist, it should not be necessary for any file
that includes c.h (either directly or via postgres.h) to pull these
in for itself.  Removing the "retail" inclusions of these files that
are found in many source files would make life much easier for anyone
trying to port to a platform where they don't exist...

Also, I think some places include c.h without having included
postgres.h.  These should be checked to ensure that config.h has
been included first --- c.h depends on configuration symbols from
config.h to work properly.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Merging old man pages
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Re: include-file cleanup