From dc92263ab3d2649d657bfd586b4500704d08cbe4 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 17 Feb 2016 13:48:13 +0100 Subject: MDEV-9308 Fix build errors with recent gcc (isfinite) "#include " has "#define isfinite(X) ..." while "#include " does "#undef isfinite" in -std=c++11 mode is included, we need a workaround to provide a usable isfinite() --- include/my_global.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/my_global.h b/include/my_global.h index 5901dcdcea1..4c58c21b2aa 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -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 +static inline bool isfinite(double x) { return std::isfinite(x); } #endif /* isfinite */ #ifndef HAVE_ISNAN -- cgit v1.2.1