Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
3e63fa6e
Commit
3e63fa6e
authored
May 25, 2018
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup rint() portability checks
parent
7ffd7fe9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
38 deletions
+0
-38
cmake/os/WindowsCache.cmake
cmake/os/WindowsCache.cmake
+0
-1
config.h.cmake
config.h.cmake
+0
-1
configure.cmake
configure.cmake
+0
-1
include/my_global.h
include/my_global.h
+0
-35
No files found.
cmake/os/WindowsCache.cmake
View file @
3e63fa6e
...
...
@@ -139,7 +139,6 @@ SET(HAVE_READLINK CACHE INTERNAL "")
SET
(
HAVE_READ_REAL_TIME CACHE INTERNAL
""
)
SET
(
HAVE_REALPATH CACHE INTERNAL
""
)
SET
(
HAVE_RENAME 1 CACHE INTERNAL
""
)
#SET(HAVE_RINT CACHE INTERNAL "")
SET
(
HAVE_RWLOCK_INIT CACHE INTERNAL
""
)
SET
(
HAVE_SCHED_H CACHE INTERNAL
""
)
SET
(
HAVE_SCHED_YIELD CACHE INTERNAL
""
)
...
...
config.h.cmake
View file @
3e63fa6e
...
...
@@ -210,7 +210,6 @@
#cmakedefine HAVE_READLINK 1
#cmakedefine HAVE_REALPATH 1
#cmakedefine HAVE_RENAME 1
#cmakedefine HAVE_RINT 1
#cmakedefine HAVE_RWLOCK_INIT 1
#cmakedefine HAVE_SCHED_YIELD 1
#cmakedefine HAVE_SELECT 1
...
...
configure.cmake
View file @
3e63fa6e
...
...
@@ -478,7 +478,6 @@ CHECK_SYMBOL_EXISTS(FIONREAD "sys/filio.h" FIONREAD_IN_SYS_FILIO)
CHECK_SYMBOL_EXISTS
(
gettimeofday
"sys/time.h"
HAVE_GETTIMEOFDAY
)
CHECK_SYMBOL_EXISTS
(
log2 math.h HAVE_LOG2
)
CHECK_SYMBOL_EXISTS
(
rint math.h HAVE_RINT
)
#
# Test for endianness
...
...
include/my_global.h
View file @
3e63fa6e
...
...
@@ -1179,41 +1179,6 @@ typedef struct { const char *dli_fname, dli_fbase; } Dl_info;
#endif
#endif
/* !defined(__func__) */
#ifndef HAVE_RINT
/**
All integers up to this number can be represented exactly as double precision
values (DBL_MANT_DIG == 53 for IEEE 754 hardware).
*/
#define MAX_EXACT_INTEGER ((1LL << DBL_MANT_DIG) - 1)
/**
rint(3) implementation for platforms that do not have it.
Always rounds to the nearest integer with ties being rounded to the nearest
even integer to mimic glibc's rint() behavior in the "round-to-nearest"
FPU mode. Hardware-specific optimizations are possible (frndint on x86).
Unlike this implementation, hardware will also honor the FPU rounding mode.
*/
static
inline
double
rint
(
double
x
)
{
double
f
,
i
;
f
=
modf
(
x
,
&
i
);
/*
All doubles with absolute values > MAX_EXACT_INTEGER are even anyway,
no need to check it.
*/
if
(
x
>
0
.
0
)
i
+=
(
double
)
((
f
>
0
.
5
)
||
(
f
==
0
.
5
&&
i
<=
(
double
)
MAX_EXACT_INTEGER
&&
(
longlong
)
i
%
2
));
else
i
-=
(
double
)
((
f
<
-
0
.
5
)
||
(
f
==
-
0
.
5
&&
i
>=
(
double
)
-
MAX_EXACT_INTEGER
&&
(
longlong
)
i
%
2
));
return
i
;
}
#endif
/* HAVE_RINT */
/*
MYSQL_PLUGIN_IMPORT macro is used to export mysqld data
(i.e variables) for usage in storage engine loadable plugins.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment