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
1517db6b
Commit
1517db6b
authored
Mar 25, 2009
by
Alexey Kopytov
Browse files
Options
Browse Files
Download
Plain Diff
Automerge.
parents
341e19b9
73cb9b6e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
2 deletions
+33
-2
configure.in
configure.in
+21
-0
include/my_global.h
include/my_global.h
+12
-2
No files found.
configure.in
View file @
1517db6b
...
...
@@ -2094,6 +2094,27 @@ esac
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_MSG_RESULT
(
yes
)
AC_MSG_CHECKING
(
whether isinf
()
is safe to use
in
C code
)
AC_TRY_RUN
([
#include <math.h>
int main
()
{
double
a
=
10.0
;
double
b
=
1e308
;
return
!
isinf
(
a
*
b
)
;
}
]
,
[
AC_MSG_RESULT
(
yes
)]
,
[
AC_MSG_RESULT
(
no
)
AC_DEFINE
([
HAVE_BROKEN_ISINF],
[
1],
[
Define to 1
if
isinf
()
uses 80-bit register
for
intermediate values]
)
]
,
[
# Let's be optimistic when cross-compiling, since the only compiler known
# to be affected by this isinf() bug is GCC 4.3 on 32-bit x86.
AC_MSG_RESULT
([[
cross-compiling, assuming
'yes'
]])
])
AC_MSG_CHECKING
(
whether isinf
()
can be used
in
C++ code
)
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
...
...
include/my_global.h
View file @
1517db6b
...
...
@@ -831,9 +831,19 @@ typedef SOCKET_SIZE_TYPE size_socket;
#endif
#ifdef HAVE_ISINF
/* isinf() can be used in both C and C++ code */
#define my_isinf(X) isinf(X)
/* Check if C compiler is affected by GCC bug #39228 */
#if !defined(__cplusplus) && defined(HAVE_BROKEN_ISINF)
/* Force store/reload of the argument to/from a 64-bit double */
static
inline
double
my_isinf
(
double
x
)
{
volatile
double
t
=
x
;
return
isinf
(
t
);
}
#else
/* System-provided isinf() is available and safe to use */
#define my_isinf(X) isinf(X)
#endif
#else
/* !HAVE_ISINF */
#define my_isinf(X) (!finite(X) && !isnan(X))
#endif
...
...
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