From 9e1585ab8f487222a03e017079efadb570817657 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 16 May 2007 10:10:02 +0200 Subject: Fix for bug #28240: "isinf()" cannot be used in C++ for lack of prototype - Since isinf() portability across various platforms and compilers is a complicated question, we should not use it directly. Instead, the my_isinf() macro should be used, which is defined as an alias to the system-defined isinf() if it is safe to use, or a workaround implementation otherwise configure.in: Added a check to define HAVE_ISINF only if it can be used in C++ code as well. include/my_global.h: Define my_isinf() as an alias to isinf(), if it is available in both C and C++ code. Otherwise, define it to a workaround implementation. sql/item_func.cc: Replaced isinf() with my_isinf(). strings/strtod.c: Replaced isinf() with my_isinf(). --- strings/strtod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'strings') diff --git a/strings/strtod.c b/strings/strtod.c index 15707a9b944..7196cafb2c9 100644 --- a/strings/strtod.c +++ b/strings/strtod.c @@ -194,7 +194,7 @@ double my_strtod(const char *str, char **end_ptr, int *error) done: *end_ptr= (char*) str; /* end of number */ - if (overflow || isinf(result)) + if (overflow || my_isinf(result)) { result= DBL_MAX; *error= EOVERFLOW; -- cgit v1.2.1