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
b55890d6
Commit
b55890d6
authored
May 25, 2018
by
Sergey Vojtovich
Committed by
Vlad Lesin
Nov 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup isnan() portability checks
(cherry picked from commit
7ffd7fe9
)
parent
bd2b05df
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
5 additions
and
20 deletions
+5
-20
cmake/os/Windows.cmake
cmake/os/Windows.cmake
+0
-1
config.h.cmake
config.h.cmake
+0
-2
configure.cmake
configure.cmake
+0
-1
include/my_global.h
include/my_global.h
+4
-5
sql/field.cc
sql/field.cc
+1
-1
storage/heap/hp_hash.c
storage/heap/hp_hash.c
+0
-2
storage/maria/ma_key.c
storage/maria/ma_key.c
+0
-2
storage/maria/ma_sp_key.c
storage/maria/ma_sp_key.c
+0
-2
storage/myisam/mi_key.c
storage/myisam/mi_key.c
+0
-2
storage/myisam/sp_key.c
storage/myisam/sp_key.c
+0
-2
No files found.
cmake/os/Windows.cmake
View file @
b55890d6
...
@@ -225,7 +225,6 @@ CHECK_SYMBOL_REPLACEMENT(S_IROTH _S_IREAD sys/stat.h)
...
@@ -225,7 +225,6 @@ CHECK_SYMBOL_REPLACEMENT(S_IROTH _S_IREAD sys/stat.h)
CHECK_SYMBOL_REPLACEMENT
(
S_IFIFO _S_IFIFO sys/stat.h
)
CHECK_SYMBOL_REPLACEMENT
(
S_IFIFO _S_IFIFO sys/stat.h
)
CHECK_SYMBOL_REPLACEMENT
(
SIGQUIT SIGTERM signal.h
)
CHECK_SYMBOL_REPLACEMENT
(
SIGQUIT SIGTERM signal.h
)
CHECK_SYMBOL_REPLACEMENT
(
SIGPIPE SIGINT signal.h
)
CHECK_SYMBOL_REPLACEMENT
(
SIGPIPE SIGINT signal.h
)
CHECK_SYMBOL_REPLACEMENT
(
isnan _isnan
"math.h;float.h"
)
CHECK_SYMBOL_REPLACEMENT
(
finite _finite
"math;float.h"
)
CHECK_SYMBOL_REPLACEMENT
(
finite _finite
"math;float.h"
)
CHECK_FUNCTION_REPLACEMENT
(
popen _popen
)
CHECK_FUNCTION_REPLACEMENT
(
popen _popen
)
CHECK_FUNCTION_REPLACEMENT
(
pclose _pclose
)
CHECK_FUNCTION_REPLACEMENT
(
pclose _pclose
)
...
...
config.h.cmake
View file @
b55890d6
...
@@ -163,7 +163,6 @@
...
@@ -163,7 +163,6 @@
#cmakedefine HAVE_IN_ADDR_T 1
#cmakedefine HAVE_IN_ADDR_T 1
#cmakedefine HAVE_INITGROUPS 1
#cmakedefine HAVE_INITGROUPS 1
#cmakedefine HAVE_ISNAN 1
#cmakedefine HAVE_ISNAN 1
#cmakedefine HAVE_ISINF 1
#cmakedefine HAVE_LARGE_PAGE_OPTION 1
#cmakedefine HAVE_LARGE_PAGE_OPTION 1
#cmakedefine HAVE_LDIV 1
#cmakedefine HAVE_LDIV 1
#cmakedefine HAVE_LRAND48 1
#cmakedefine HAVE_LRAND48 1
...
@@ -423,7 +422,6 @@
...
@@ -423,7 +422,6 @@
#cmakedefine mode_t @mode_t@
#cmakedefine mode_t @mode_t@
#cmakedefine SIGQUIT @SIGQUIT@
#cmakedefine SIGQUIT @SIGQUIT@
#cmakedefine SIGPIPE @SIGPIPE@
#cmakedefine SIGPIPE @SIGPIPE@
#cmakedefine isnan @isnan@
#cmakedefine finite @finite@
#cmakedefine finite @finite@
#cmakedefine popen @popen@
#cmakedefine popen @popen@
#cmakedefine pclose @pclose@
#cmakedefine pclose @pclose@
...
...
configure.cmake
View file @
b55890d6
...
@@ -475,7 +475,6 @@ ELSE()
...
@@ -475,7 +475,6 @@ ELSE()
CHECK_SYMBOL_EXISTS
(
finite
"ieeefp.h"
HAVE_FINITE
)
CHECK_SYMBOL_EXISTS
(
finite
"ieeefp.h"
HAVE_FINITE
)
ENDIF
()
ENDIF
()
CHECK_SYMBOL_EXISTS
(
log2 math.h HAVE_LOG2
)
CHECK_SYMBOL_EXISTS
(
log2 math.h HAVE_LOG2
)
CHECK_SYMBOL_EXISTS
(
isnan math.h HAVE_ISNAN
)
CHECK_SYMBOL_EXISTS
(
rint math.h HAVE_RINT
)
CHECK_SYMBOL_EXISTS
(
rint math.h HAVE_RINT
)
# isinf() prototype not found on Solaris
# isinf() prototype not found on Solaris
...
...
include/my_global.h
View file @
b55890d6
...
@@ -811,6 +811,10 @@ inline unsigned long long my_double2ulonglong(double d)
...
@@ -811,6 +811,10 @@ inline unsigned long long my_double2ulonglong(double d)
#define SIZE_T_MAX (~((size_t) 0))
#define SIZE_T_MAX (~((size_t) 0))
#endif
#endif
#ifdef __cplusplus
#include <cmath>
#endif
#ifndef isfinite
#ifndef isfinite
#ifdef HAVE_FINITE
#ifdef HAVE_FINITE
#define isfinite(x) finite(x)
#define isfinite(x) finite(x)
...
@@ -822,11 +826,6 @@ inline unsigned long long my_double2ulonglong(double d)
...
@@ -822,11 +826,6 @@ inline unsigned long long my_double2ulonglong(double d)
static
inline
bool
isfinite
(
double
x
)
{
return
std
::
isfinite
(
x
);
}
static
inline
bool
isfinite
(
double
x
)
{
return
std
::
isfinite
(
x
);
}
#endif
/* isfinite */
#endif
/* isfinite */
#ifndef HAVE_ISNAN
#define isnan(x) ((x) != (x))
#endif
#define my_isnan(x) isnan(x)
#ifdef HAVE_ISINF
#ifdef HAVE_ISINF
#define my_isinf(X) isinf(X)
#define my_isinf(X) isinf(X)
#else
/* !HAVE_ISINF */
#else
/* !HAVE_ISINF */
...
...
sql/field.cc
View file @
b55890d6
...
@@ -4821,7 +4821,7 @@ int truncate_double(double *nr, uint field_length, uint dec,
...
@@ -4821,7 +4821,7 @@ int truncate_double(double *nr, uint field_length, uint dec,
int
error
=
0
;
int
error
=
0
;
double
res
=
*
nr
;
double
res
=
*
nr
;
if
(
isnan
(
res
))
if
(
std
::
isnan
(
res
))
{
{
*
nr
=
0
;
*
nr
=
0
;
return
-
1
;
return
-
1
;
...
...
storage/heap/hp_hash.c
View file @
b55890d6
...
@@ -778,7 +778,6 @@ uint hp_rb_make_key(HP_KEYDEF *keydef, uchar *key,
...
@@ -778,7 +778,6 @@ uint hp_rb_make_key(HP_KEYDEF *keydef, uchar *key,
uchar
*
pos
=
(
uchar
*
)
rec
+
seg
->
start
;
uchar
*
pos
=
(
uchar
*
)
rec
+
seg
->
start
;
DBUG_ASSERT
(
seg
->
type
!=
HA_KEYTYPE_BIT
);
DBUG_ASSERT
(
seg
->
type
!=
HA_KEYTYPE_BIT
);
#ifdef HAVE_ISNAN
if
(
seg
->
type
==
HA_KEYTYPE_FLOAT
)
if
(
seg
->
type
==
HA_KEYTYPE_FLOAT
)
{
{
float
nr
;
float
nr
;
...
@@ -802,7 +801,6 @@ uint hp_rb_make_key(HP_KEYDEF *keydef, uchar *key,
...
@@ -802,7 +801,6 @@ uint hp_rb_make_key(HP_KEYDEF *keydef, uchar *key,
continue
;
continue
;
}
}
}
}
#endif
pos
+=
length
;
pos
+=
length
;
while
(
length
--
)
while
(
length
--
)
{
{
...
...
storage/maria/ma_key.c
View file @
b55890d6
...
@@ -279,7 +279,6 @@ MARIA_KEY *_ma_make_key(MARIA_HA *info, MARIA_KEY *int_key, uint keynr,
...
@@ -279,7 +279,6 @@ MARIA_KEY *_ma_make_key(MARIA_HA *info, MARIA_KEY *int_key, uint keynr,
}
}
else
if
(
keyseg
->
flag
&
HA_SWAP_KEY
)
else
if
(
keyseg
->
flag
&
HA_SWAP_KEY
)
{
/* Numerical column */
{
/* Numerical column */
#ifdef HAVE_ISNAN
if
(
type
==
HA_KEYTYPE_FLOAT
)
if
(
type
==
HA_KEYTYPE_FLOAT
)
{
{
float
nr
;
float
nr
;
...
@@ -303,7 +302,6 @@ MARIA_KEY *_ma_make_key(MARIA_HA *info, MARIA_KEY *int_key, uint keynr,
...
@@ -303,7 +302,6 @@ MARIA_KEY *_ma_make_key(MARIA_HA *info, MARIA_KEY *int_key, uint keynr,
continue
;
continue
;
}
}
}
}
#endif
pos
+=
length
;
pos
+=
length
;
while
(
length
--
)
while
(
length
--
)
{
{
...
...
storage/maria/ma_sp_key.c
View file @
b55890d6
...
@@ -77,7 +77,6 @@ MARIA_KEY *_ma_sp_make_key(MARIA_HA *info, MARIA_KEY *ret_key, uint keynr,
...
@@ -77,7 +77,6 @@ MARIA_KEY *_ma_sp_make_key(MARIA_HA *info, MARIA_KEY *ret_key, uint keynr,
DBUG_ASSERT
(
keyseg
->
type
==
HA_KEYTYPE_DOUBLE
);
DBUG_ASSERT
(
keyseg
->
type
==
HA_KEYTYPE_DOUBLE
);
val
=
mbr
[
start
/
sizeof
(
double
)];
val
=
mbr
[
start
/
sizeof
(
double
)];
#ifdef HAVE_ISNAN
if
(
isnan
(
val
))
if
(
isnan
(
val
))
{
{
bzero
(
key
,
length
);
bzero
(
key
,
length
);
...
@@ -85,7 +84,6 @@ MARIA_KEY *_ma_sp_make_key(MARIA_HA *info, MARIA_KEY *ret_key, uint keynr,
...
@@ -85,7 +84,6 @@ MARIA_KEY *_ma_sp_make_key(MARIA_HA *info, MARIA_KEY *ret_key, uint keynr,
len
+=
length
;
len
+=
length
;
continue
;
continue
;
}
}
#endif
if
(
keyseg
->
flag
&
HA_SWAP_KEY
)
if
(
keyseg
->
flag
&
HA_SWAP_KEY
)
{
{
...
...
storage/myisam/mi_key.c
View file @
b55890d6
...
@@ -150,7 +150,6 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key,
...
@@ -150,7 +150,6 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key,
}
}
else
if
(
keyseg
->
flag
&
HA_SWAP_KEY
)
else
if
(
keyseg
->
flag
&
HA_SWAP_KEY
)
{
/* Numerical column */
{
/* Numerical column */
#ifdef HAVE_ISNAN
if
(
type
==
HA_KEYTYPE_FLOAT
)
if
(
type
==
HA_KEYTYPE_FLOAT
)
{
{
float
nr
;
float
nr
;
...
@@ -174,7 +173,6 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key,
...
@@ -174,7 +173,6 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key,
continue
;
continue
;
}
}
}
}
#endif
pos
+=
length
;
pos
+=
length
;
while
(
length
--
)
while
(
length
--
)
{
{
...
...
storage/myisam/sp_key.c
View file @
b55890d6
...
@@ -66,7 +66,6 @@ uint sp_make_key(register MI_INFO *info, uint keynr, uchar *key,
...
@@ -66,7 +66,6 @@ uint sp_make_key(register MI_INFO *info, uint keynr, uchar *key,
DBUG_ASSERT
(
keyseg
->
type
==
HA_KEYTYPE_DOUBLE
);
DBUG_ASSERT
(
keyseg
->
type
==
HA_KEYTYPE_DOUBLE
);
val
=
mbr
[
start
/
sizeof
(
double
)];
val
=
mbr
[
start
/
sizeof
(
double
)];
#ifdef HAVE_ISNAN
if
(
isnan
(
val
))
if
(
isnan
(
val
))
{
{
bzero
(
key
,
length
);
bzero
(
key
,
length
);
...
@@ -74,7 +73,6 @@ uint sp_make_key(register MI_INFO *info, uint keynr, uchar *key,
...
@@ -74,7 +73,6 @@ uint sp_make_key(register MI_INFO *info, uint keynr, uchar *key,
len
+=
length
;
len
+=
length
;
continue
;
continue
;
}
}
#endif
if
(
keyseg
->
flag
&
HA_SWAP_KEY
)
if
(
keyseg
->
flag
&
HA_SWAP_KEY
)
{
{
...
...
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