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.
This commit is contained in:
kaa@polly.local 2007-05-08 21:11:46 +04:00
commit 51af6a4077
6 changed files with 21 additions and 87 deletions

View file

@ -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;