diff options
author | Vlad Lesin <vlad_lesin@mail.ru> | 2018-05-25 22:16:04 +0400 |
---|---|---|
committer | Vlad Lesin <vlad_lesin@mail.ru> | 2019-11-19 16:28:15 +0300 |
commit | 6718d3bc3241f72e07504133371cf3813d2e6fe9 (patch) | |
tree | d93a3b16f5559c8bde8649e6348fcc54f606101c /storage/innobase/gis | |
parent | b80df9eba23b4eb9694e770a41135127c6dbc5df (diff) | |
download | mariadb-git-6718d3bc3241f72e07504133371cf3813d2e6fe9.tar.gz |
MDEV-21082: isnan/isinf compilation errors, isfinite warnings on MacOS
The fix consists of three commits backported from 10.3:
1) Cleanup isnan() portability checks
(cherry picked from commit 7ffd7fe9627d1f750a3712aebb4503e5ae8aea8e)
2) Cleanup isinf() portability checks
Original problem reported by Wlad: re-compilation of 10.3 on top of 10.2
build would cache undefined HAVE_ISINF from 10.2, whereas it is expected
to be 1 in 10.3.
std::isinf() seem to be available on all supported platforms.
(cherry picked from commit bc469a0bdf85400f7a63834f5b7af1a513dcdec9)
3) Use std::isfinite in C++ code
This is addition to parent revision fixing build failures.
(cherry picked from commit 54999f4e75f42baca484ae436b382ca8817df1dd)
Diffstat (limited to 'storage/innobase/gis')
-rw-r--r-- | storage/innobase/gis/gis0geo.cc | 2 | ||||
-rw-r--r-- | storage/innobase/gis/gis0rtree.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/storage/innobase/gis/gis0geo.cc b/storage/innobase/gis/gis0geo.cc index bd601c2e19e..cad3877d3e9 100644 --- a/storage/innobase/gis/gis0geo.cc +++ b/storage/innobase/gis/gis0geo.cc @@ -367,7 +367,7 @@ mbr_join_square( /* Check if finite (not infinity or NaN), so we don't get NaN in calculations */ - if (!isfinite(square)) { + if (!std::isfinite(square)) { return DBL_MAX; } diff --git a/storage/innobase/gis/gis0rtree.cc b/storage/innobase/gis/gis0rtree.cc index a9c30ae2a38..ce1749820c3 100644 --- a/storage/innobase/gis/gis0rtree.cc +++ b/storage/innobase/gis/gis0rtree.cc @@ -1969,7 +1969,7 @@ rtr_estimate_n_rows_in_range( mtr_commit(&mtr); mem_heap_free(heap); - if (!isfinite(area)) { + if (!std::isfinite(area)) { return(HA_POS_ERROR); } |