Remove unnecessary includes of system headers in header files

Started by Peter Eisentrautover 2 years ago5 messageshackers
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

I noticed that some header files included system header files for no
apparent reason, so I did some digging and found out that in a few cases
the original reason has disappeared. So I propose the attached patches
to remove the unnecessary includes.

Attachments:

0001-Remove-unnecessary-includes-of-signal.h.patchtext/plain; charset=UTF-8; name=0001-Remove-unnecessary-includes-of-signal.h.patchDownload+0-5
0002-Remove-unnecessary-include-of-sys-socket.h.patchtext/plain; charset=UTF-8; name=0002-Remove-unnecessary-include-of-sys-socket.h.patchDownload+0-2
0003-Remove-unnecessary-include-of-math.h.patchtext/plain; charset=UTF-8; name=0003-Remove-unnecessary-include-of-math.h.patchDownload+0-3
#2Shubham.Khanna@fujitsu.com
Shubham.Khanna@fujitsu.com
In reply to: Peter Eisentraut (#1)
RE: Remove unnecessary includes of system headers in header files

Hi Peter,

I have reviewed the patches and also RUN the command, 'make check-world'. It is working fine. All test cases are passed successfully.

Thanks and Regards,
Shubham Khanna.

-----Original Message-----
From: Peter Eisentraut <peter@eisentraut.org>
Sent: Friday, December 1, 2023 1:24 PM
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Remove unnecessary includes of system headers in header files

I noticed that some header files included system header files for no apparent reason, so I did some digging and found out that in a few cases the original reason has disappeared. So I propose the attached patches to remove the unnecessary includes.

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#1)
Re: Remove unnecessary includes of system headers in header files

Peter Eisentraut <peter@eisentraut.org> writes:

I noticed that some header files included system header files for no
apparent reason, so I did some digging and found out that in a few cases
the original reason has disappeared. So I propose the attached patches
to remove the unnecessary includes.

Seems generally reasonable. Have you checked that headerscheck and
cpluspluscheck are happy?

regards, tom lane

#4Peter Eisentraut
peter_e@gmx.net
In reply to: Tom Lane (#3)
Re: Remove unnecessary includes of system headers in header files

On 01.12.23 17:41, Tom Lane wrote:

Peter Eisentraut <peter@eisentraut.org> writes:

I noticed that some header files included system header files for no
apparent reason, so I did some digging and found out that in a few cases
the original reason has disappeared. So I propose the attached patches
to remove the unnecessary includes.

Seems generally reasonable. Have you checked that headerscheck and
cpluspluscheck are happy?

Yes, I ran it through Cirrus, which includes those checks.

#5Peter Eisentraut
peter_e@gmx.net
In reply to: Shubham.Khanna@fujitsu.com (#2)
Re: Remove unnecessary includes of system headers in header files

On 01.12.23 11:51, Shubham.Khanna@fujitsu.com wrote:

Hi Peter,

I have reviewed the patches and also RUN the command, 'make check-world'. It is working fine. All test cases are passed successfully.

committed

Show quoted text

Thanks and Regards,
Shubham Khanna.

-----Original Message-----
From: Peter Eisentraut <peter@eisentraut.org>
Sent: Friday, December 1, 2023 1:24 PM
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Remove unnecessary includes of system headers in header files

I noticed that some header files included system header files for no apparent reason, so I did some digging and found out that in a few cases the original reason has disappeared. So I propose the attached patches to remove the unnecessary includes.