cleanup standard includes

Started by Neil Conwayalmost 24 years ago5 messagespatches
Jump to latest
#1Neil Conway
neilc@samurai.com

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

Attachments:

include-cleanup.patchtext/x-patchDownload+5-41
#2Peter Eisentraut
peter_e@gmx.net
In reply to: Neil Conway (#1)
Re: cleanup standard includes

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

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#2)
Re: cleanup standard includes

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

#4Bruce Momjian
bruce@momjian.us
In reply to: Neil Conway (#1)
Re: cleanup standard includes

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
#5Bruce Momjian
bruce@momjian.us
In reply to: Neil Conway (#1)
Re: cleanup standard includes

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