summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@sun.com>2009-02-23 14:28:26 +0200
committerAlexey Kopytov <Alexey.Kopytov@sun.com>2009-02-23 14:28:26 +0200
commit0e62c9aa6301de71164496ec7c81c871d78ce8cd (patch)
treec507314a3bdbff4f5bf5079cdf4b16a6899bb25a /configure.in
parentddf6ac40ea0f3290c148b3009069a22f12ab6e70 (diff)
downloadmariadb-git-0e62c9aa6301de71164496ec7c81c871d78ce8cd.tar.gz
Fix for bug #15936: "round" differs on Windows to Unix
Both of our own implementations of rint(3) were inconsistent with the most common behavior of rint() on those platforms that have it: round to nearest, break ties by rounding to nearest even. Fixed by leaving just one implementation of rint() in our source tree, and changing its behavior to match the most common native implementations on other platforms. configure.in: Added checks for fenv.h and fesetround(). include/config-win.h: Removed the incorrect implementation of rint() for Windows. include/my_global.h: Added an rint() implementation for platforms that do not have it. mysql-test/r/func_math.result: Added a test case for bug #15936. mysql-test/t/func_math.test: Added a test case for bug #15936. sql/mysqld.cc: Explicitly set the FPU rounding mode with fesetround().
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 9591b5bbc5a..8c2c4a9cf79 100644
--- a/configure.in
+++ b/configure.in
@@ -825,7 +825,7 @@ AC_TYPE_SIZE_T
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h ieeefp.h limits.h \
+AC_CHECK_HEADERS(fcntl.h fenv.h float.h floatingpoint.h ieeefp.h limits.h \
memory.h pwd.h select.h \
stdlib.h stddef.h \
strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \
@@ -2060,7 +2060,7 @@ AC_FUNC_UTIME_NULL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(alarm bcmp bfill bmove bzero chsize cuserid fchmod fcntl \
- fconvert fdatasync finite fpresetsticky fpsetmask fsync ftruncate \
+ fconvert fdatasync fesetround finite fpresetsticky fpsetmask fsync ftruncate \
getcwd gethostbyaddr_r gethostbyname_r getpass getpassphrase getpwnam \
getpwuid getrlimit getrusage getwd gmtime_r index initgroups isnan \
localtime_r locking longjmp lrand48 madvise mallinfo memcpy memmove \