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

From Tom Lane
Subject Re: [HACKERS] Re: include-file cleanup
Date
Msg-id 26320.932268309@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Re: include-file cleanup  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
I wrote:
>> OK, so then no .c files should be including c.h directly anymore?
>> Everything should include either postgres.h, or config.h if it's
>> not tightly tied to the system?

I misread your prior mail --- you have fixed c.h to include
config.h, so it's safe to include c.h directly if not including
postgres.h.  The real story now is: either c.h or postgres.h should be
the first file included by all .c files in Postgres, to ensure that the
autoconfigure symbols from config.h are picked up.

Bruce Momjian <maillist@candle.pha.pa.us> writes:
> Some port stuff includes just c.h.  Not sure why.

That makes sense to me for files that are just duplicating missing
system functions, and don't really need to be aware that they are
inside Postgres.

Looks like things are in good shape now.  I will run a compile here
momentarily...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Re: include-file cleanup
Next
From: wieck@debis.com (Jan Wieck)
Date:
Subject: Re: [HACKERS] New version number 6.6 or 7.0