Re: remove the unneeded header file math.h in binaryheap.c
=?utf-8?Q?=C3=81lvaro?= Herrera <alvherre@kurilemu.de> writes:
I looked around to see if there are more unnecessary inclusions of that
header and found a few candidates. Things still compile and pass tests
for me, but of course they may fail on other platforms.
Yeah ... my recollection is that some of our inclusions of <math.h>,
and also of <limits.h>, were needed because assorted platforms didn't
follow the C/POSIX standards about which headers should provide which
symbols. Maybe that's all cleaned up now. I'd worry about Solaris
and AIX as being the most likely stragglers.
Another likely source of obsolete <math.h> usages is in the datetime
code, as a leftover from our old floating-point timestamps.
regards, tom lane
Import Notes
Reply to msg id not found: 202601151335.65rrduj65nat@alvherre.pgsqlReference msg id not found: 202601151335.65rrduj65nat@alvherre.pgsql
On 2026-Jan-15, Tom Lane wrote:
Yeah ... my recollection is that some of our inclusions of <math.h>,
and also of <limits.h>, were needed because assorted platforms didn't
follow the C/POSIX standards about which headers should provide which
symbols. Maybe that's all cleaned up now. I'd worry about Solaris
and AIX as being the most likely stragglers.
I think we have enough Solaris in the buildfarm to know if there are any
problems. As for AIX, we don't support it currently, and I guess we'll
know from the developers if we need any patches there.
Another likely source of obsolete <math.h> usages is in the datetime
code, as a leftover from our old floating-point timestamps.
Yeah, there was one in date.h related to that, which I mentioned in my
reply to Andres.
I have just pushed it. Now it's time for the buildfarm to speak ...
Thanks liujinyang, and welcome -- may your Postgres contribution days be
long and fertile.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"No nos atrevemos a muchas cosas porque son difíciles,
pero son difíciles porque no nos atrevemos a hacerlas" (Séneca)