summaryrefslogtreecommitdiff
path: root/include/my_global.h
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2016-02-23 20:53:29 -0500
committerNirbhay Choubey <nirbhay@mariadb.com>2016-02-23 20:53:29 -0500
commit0d58323e2645460907280b0482811729822a7ef1 (patch)
tree1b0400c627851e0cb9c9445e24367a5ce9fd5d4d /include/my_global.h
parent276d65b324f4f0021bc457b4d5723153d4e12608 (diff)
parenta4b271496888e1f8628d0af36309e35293093577 (diff)
downloadmariadb-git-0d58323e2645460907280b0482811729822a7ef1.tar.gz
Merge tag 'mariadb-10.0.24' into 10.0-galera
Diffstat (limited to 'include/my_global.h')
-rw-r--r--include/my_global.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/include/my_global.h b/include/my_global.h
index 43bde96f684..191e08d9218 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -200,20 +200,6 @@
#define likely(x) __builtin_expect(((x) != 0),1)
#define unlikely(x) __builtin_expect(((x) != 0),0)
-/*
- now let's figure out if inline functions are supported
- autoconf defines 'inline' to be empty, if not
-*/
-#define inline_test_1(X) X ## 1
-#define inline_test_2(X) inline_test_1(X)
-#if inline_test_2(inline) != 1
-#define HAVE_INLINE
-#else
-#error Compiler does not support inline!
-#endif
-#undef inline_test_2
-#undef inline_test_1
-
/* Fix problem with S_ISLNK() on Linux */
#if defined(TARGET_OS_LINUX) || defined(__GLIBC__)
#undef _GNU_SOURCE
@@ -454,7 +440,7 @@ extern "C" int madvise(void *addr, size_t len, int behav);
#endif
#ifndef STDERR_FILENO
-#define STDERR_FILENO 2
+#define STDERR_FILENO fileno(stderr)
#endif
/*
@@ -833,6 +819,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