From: Date: May 14 2007 3:11pm Subject: bk commit into 5.0 tree (df:1.2485) BUG#28240 List-Archive: http://lists.mysql.com/commits/26606 X-Bug: 28240 Message-Id: <200705141315.l4EDFKqw031290@mail.mysql.com> Below is the list of changes that have just been committed into a local 5.0 repository of df. When df does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-05-14 15:11:29+02:00, df@stripped +4 -0 import of fix for bug#28240 configure.in@stripped, 2007-05-14 15:11:28+02:00, df@stripped +13 -5 import of fix for bug#28240 include/my_global.h@stripped, 2007-05-14 15:11:28+02:00, df@stripped +5 -6 import of fix for bug#28240 sql/item_func.cc@stripped, 2007-05-14 15:11:28+02:00, df@stripped +2 -2 import of fix for bug#28240 strings/strtod.c@stripped, 2007-05-14 15:11:28+02:00, df@stripped +1 -1 import of fix for bug#28240 # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: df # Host: pippilotta.erinye.com # Root: /shared/home/df/mysql/build/mysql-5.0.42 --- 1.441/configure.in 2007-04-26 16:06:40 +02:00 +++ 1.442/configure.in 2007-05-14 15:11:28 +02:00 @@ -2006,12 +2006,20 @@ ;; esac -# isinf() could be a function or a macro (HPUX) -AC_MSG_CHECKING(for isinf with ) +# Check that isinf() is available in math.h and can be used in both C and C++ +# code +AC_MSG_CHECKING(for isinf in ) AC_TRY_LINK([#include ], [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_MSG_RESULT(yes) + AC_MSG_CHECKING(whether isinf() can be used in C++ code) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_LINK([#include ], [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" --- 1.25/strings/strtod.c 2006-12-14 23:53:00 +01:00 +++ 1.26/strings/strtod.c 2007-05-14 15:11:28 +02:00 @@ -194,7 +194,7 @@ done: *end_ptr= (char*) str; /* end of number */ - if (overflow || isinf(result)) + if (overflow || my_isinf(result)) { result= DBL_MAX; *error= EOVERFLOW; --- 1.341/sql/item_func.cc 2007-05-11 17:56:20 +02:00 +++ 1.342/sql/item_func.cc 2007-05-14 15:11:28 +02:00 @@ -2025,9 +2025,9 @@ tmp=(abs_dec < array_elements(log_10) ? log_10[abs_dec] : pow(10.0,(double) abs_dec)); - if (dec_negative && isinf(tmp)) + if (dec_negative && my_isinf(tmp)) tmp2= 0; - else if (!dec_negative && isinf(value * tmp)) + else if (!dec_negative && my_isinf(value * tmp)) tmp2= value; else if (truncate) { --- 1.140/include/my_global.h 2007-04-29 14:57:14 +02:00 +++ 1.141/include/my_global.h 2007-05-14 15:11:28 +02:00 @@ -792,12 +792,11 @@ #define isnan(x) ((x) != (x)) #endif -#if !defined(HAVE_ISINF) -/* The configure check for "isinf with math.h" has failed */ -#ifdef isinf -#undef isinf -#endif -#define isinf(X) (!finite(X) && !isnan(X)) +#ifdef HAVE_ISINF +/* isinf() can be used in both C and C++ code */ +#define my_isinf(X) isinf(X) +#else +#define my_isinf(X) (!finite(X) && !isnan(X)) #endif /* Define missing math constants. */