diff options
author | Alexey Kopytov <Alexey.Kopytov@sun.com> | 2009-03-25 16:19:53 +0300 |
---|---|---|
committer | Alexey Kopytov <Alexey.Kopytov@sun.com> | 2009-03-25 16:19:53 +0300 |
commit | 4ee0f6a64c89f226a113688ab6f894f9e18ffa74 (patch) | |
tree | f492a6c519a23459220c8e3df6f7896662ce82a3 /include/my_global.h | |
parent | 77cc537e0d51aa206eb37e38beb821a716aff576 (diff) | |
parent | bbe24f03f2288049b39359ad52b0cccc1b762b44 (diff) | |
download | mariadb-git-4ee0f6a64c89f226a113688ab6f894f9e18ffa74.tar.gz |
Automerge.
Diffstat (limited to 'include/my_global.h')
-rw-r--r-- | include/my_global.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/my_global.h b/include/my_global.h index f5a3016bb1e..53b5deaffb1 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -831,9 +831,19 @@ typedef SOCKET_SIZE_TYPE size_socket; #endif #ifdef HAVE_ISINF -/* isinf() can be used in both C and C++ code */ -#define my_isinf(X) isinf(X) +/* Check if C compiler is affected by GCC bug #39228 */ +#if !defined(__cplusplus) && defined(HAVE_BROKEN_ISINF) +/* Force store/reload of the argument to/from a 64-bit double */ +static inline double my_isinf(double x) +{ + volatile double t= x; + return isinf(t); +} #else +/* System-provided isinf() is available and safe to use */ +#define my_isinf(X) isinf(X) +#endif +#else /* !HAVE_ISINF */ #define my_isinf(X) (!finite(X) && !isnan(X)) #endif |