MDEV-9308 Fix build errors with recent gcc (isfinite)
"#include <math.h>" has "#define isfinite(X) ..." while "#include <cmath>" does "#undef isfinite" in -std=c++11 mode <cmath> is included, we need a workaround to provide a usable isfinite()
This commit is contained in:
parent
77b548484e
commit
dc92263ab3
@ -813,6 +813,9 @@ inline unsigned long long my_double2ulonglong(double d)
|
||||
#else
|
||||
#define finite(x) (1.0 / fabs(x) > 0.0)
|
||||
#endif /* HAVE_FINITE */
|
||||
#elif (__cplusplus >= 201103L)
|
||||
#include <cmath>
|
||||
static inline bool isfinite(double x) { return std::isfinite(x); }
|
||||
#endif /* isfinite */
|
||||
|
||||
#ifndef HAVE_ISNAN
|
||||
|
Loading…
x
Reference in New Issue
Block a user