Thread: cleanup standard includes

cleanup standard includes

From
Neil Conway
Date:
This patch removes a bunch of superfluous #include directives: if
postgres.h or c.h includes a system header (such as stdio.h or
stdlib.h), there's no need to specifically include it in any of the .c
files in the backend.

Cheers,

Neil

--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC

Attachment

Re: cleanup standard includes

From
Peter Eisentraut
Date:
Neil Conway writes:

> This patch removes a bunch of superfluous #include directives: if
> postgres.h or c.h includes a system header (such as stdio.h or
> stdlib.h), there's no need to specifically include it in any of the .c
> files in the backend.

I think we should keep this for 7.4.  I found out today that include file
reorganization can have bizarre side effects that be had better not deal
with now.

--
Peter Eisentraut   peter_e@gmx.net


Re: cleanup standard includes

From
Tom Lane
Date:
Peter Eisentraut <peter_e@gmx.net> writes:
> Neil Conway writes:
>> This patch removes a bunch of superfluous #include directives: if
>> postgres.h or c.h includes a system header (such as stdio.h or
>> stdlib.h), there's no need to specifically include it in any of the .c
>> files in the backend.

> I think we should keep this for 7.4.  I found out today that include file
> reorganization can have bizarre side effects that be had better not deal
> with now.

It looked pretty safe to me ... but I agree with Peter that this is a
bad time to be taking unnecessary risks.  Code cleanup activities can be
held for 7.4.

            regards, tom lane

Re: cleanup standard includes

From
Bruce Momjian
Date:
This has been saved for the 7.4 release:

    http://candle.pha.pa.us/cgi-bin/pgpatches2

---------------------------------------------------------------------------


Neil Conway wrote:
> This patch removes a bunch of superfluous #include directives: if
> postgres.h or c.h includes a system header (such as stdio.h or
> stdlib.h), there's no need to specifically include it in any of the .c
> files in the backend.
>
> Cheers,
>
> Neil
>
> --
> Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: cleanup standard includes

From
Bruce Momjian
Date:
Patch applied.  Thanks.

---------------------------------------------------------------------------


Neil Conway wrote:
> This patch removes a bunch of superfluous #include directives: if
> postgres.h or c.h includes a system header (such as stdio.h or
> stdlib.h), there's no need to specifically include it in any of the .c
> files in the backend.
>
> Cheers,
>
> Neil
>
> --
> Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073