]> granicus.if.org Git - postgresql/commit
Fix 8a934d677 for libc++ and make more include order resistant.
authorAndres Freund <andres@anarazel.de>
Fri, 31 Aug 2018 23:56:11 +0000 (16:56 -0700)
committerAndres Freund <andres@anarazel.de>
Sat, 1 Sep 2018 00:10:52 +0000 (17:10 -0700)
commit5758685c9f1a51b0a77ae8f415a57670941f2c4b
treeb3f314cf7fc9532a171251b8b34a62277e6e6c1b
parent115bf1e79af0114c18d7d5675f4ba7e8bd6e11e9
Fix 8a934d677 for libc++ and make more include order resistant.

The previous definition was used in C++ mode, which causes problems
when using clang with libc++ (rather than libstdc++), due to bugs
therein.  So just avoid in C++ mode.

A second problem is that depending on include order and implicit
includes the previous definition did not guarantee that the current
hack was effective by the time isinf was used, fix that by forcing
math.h to be included.  This can cause clang using builds, or gcc
using ones with JIT enabled, to slow down noticably.

It's likely that we at some point want a better solution for the
performance problem, but while it's there it should better work.

Reported-By: Steven Winfield
Bug: #15270
Discussion: https://postgr.es/m/153116283147.1401.360416241833049560@wrigleys.postgresql.org
Author: Andres Freund
Backpatch: 11, like the previous commit.
src/include/port.h