Commit 5e236f85 authored by unknown's avatar unknown

Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0.42

into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build


configure.in:
  Auto merged
sql/item_func.cc:
  Auto merged
parents fd5b27e1 db9908fc
...@@ -2006,12 +2006,20 @@ case "$target" in ...@@ -2006,12 +2006,20 @@ case "$target" in
;; ;;
esac esac
# isinf() could be a function or a macro (HPUX) # Check that isinf() is available in math.h and can be used in both C and C++
AC_MSG_CHECKING(for isinf with <math.h>) # code
AC_MSG_CHECKING(for isinf in <math.h>)
AC_TRY_LINK([#include <math.h>], [float f = 0.0; int r = isinf(f); return r], AC_TRY_LINK([#include <math.h>], [float f = 0.0; int r = isinf(f); return r],
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_ISINF, [1], [isinf() macro or function]), AC_MSG_CHECKING(whether isinf() can be used in C++ code)
AC_MSG_RESULT(no)) AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_LINK([#include <math.h>], [float f = 0.0; int r = isinf(f); return r],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_ISINF, [1], [isinf() macro or function]),
AC_MSG_RESULT(no))
AC_LANG_RESTORE,
AC_MSG_RESULT(no))
CFLAGS="$ORG_CFLAGS" CFLAGS="$ORG_CFLAGS"
......
...@@ -792,12 +792,11 @@ typedef SOCKET_SIZE_TYPE size_socket; ...@@ -792,12 +792,11 @@ typedef SOCKET_SIZE_TYPE size_socket;
#define isnan(x) ((x) != (x)) #define isnan(x) ((x) != (x))
#endif #endif
#if !defined(HAVE_ISINF) #ifdef HAVE_ISINF
/* The configure check for "isinf with math.h" has failed */ /* isinf() can be used in both C and C++ code */
#ifdef isinf #define my_isinf(X) isinf(X)
#undef isinf #else
#endif #define my_isinf(X) (!finite(X) && !isnan(X))
#define isinf(X) (!finite(X) && !isnan(X))
#endif #endif
/* Define missing math constants. */ /* Define missing math constants. */
......
...@@ -18,6 +18,10 @@ INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake") ...@@ -18,6 +18,10 @@ INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake")
# storage does not work properly in DLLs. # storage does not work properly in DLLs.
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_TLS") SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_TLS")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_TLS") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_TLS")
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_TLS")
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_TLS")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_TLS")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_TLS")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/zlib ${CMAKE_SOURCE_DIR}/zlib
......
...@@ -2025,9 +2025,9 @@ double my_double_round(double value, longlong dec, bool dec_unsigned, ...@@ -2025,9 +2025,9 @@ double my_double_round(double value, longlong dec, bool dec_unsigned,
tmp=(abs_dec < array_elements(log_10) ? tmp=(abs_dec < array_elements(log_10) ?
log_10[abs_dec] : pow(10.0,(double) abs_dec)); log_10[abs_dec] : pow(10.0,(double) abs_dec));
if (dec_negative && isinf(tmp)) if (dec_negative && my_isinf(tmp))
tmp2= 0; tmp2= 0;
else if (!dec_negative && isinf(value * tmp)) else if (!dec_negative && my_isinf(value * tmp))
tmp2= value; tmp2= value;
else if (truncate) else if (truncate)
{ {
......
...@@ -194,7 +194,7 @@ double my_strtod(const char *str, char **end_ptr, int *error) ...@@ -194,7 +194,7 @@ double my_strtod(const char *str, char **end_ptr, int *error)
done: done:
*end_ptr= (char*) str; /* end of number */ *end_ptr= (char*) str; /* end of number */
if (overflow || isinf(result)) if (overflow || my_isinf(result))
{ {
result= DBL_MAX; result= DBL_MAX;
*error= EOVERFLOW; *error= EOVERFLOW;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment