mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Restore the use of system isnan() that was removed by
check-in [ea748edecb261f2b]. See [forum:/forumpost/d7c530ac587f59e6|forum thread d7c530ac587f59e6]. FossilOrigin-Name: b3cfe23bec0b95ca673802526704200e2396df715fdded72aa71addd7f47e0e1
This commit is contained in:
12
src/util.c
12
src/util.c
@@ -60,11 +60,21 @@ int sqlite3FaultSim(int iTest){
|
||||
#ifndef SQLITE_OMIT_FLOATING_POINT
|
||||
/*
|
||||
** Return true if the floating point value is Not a Number (NaN).
|
||||
**
|
||||
** Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN.
|
||||
** Otherwise, we have our own implementation that works on most systems.
|
||||
*/
|
||||
int sqlite3IsNaN(double x){
|
||||
int rc; /* The value return */
|
||||
#if !SQLITE_HAVE_ISNAN && !HAVE_ISNAN
|
||||
u64 y;
|
||||
memcpy(&y,&x,sizeof(y));
|
||||
return IsNaN(y);
|
||||
rc = IsNaN(y);
|
||||
#else
|
||||
rc = isnan(x);
|
||||
#endif /* HAVE_ISNAN */
|
||||
testcase( rc );
|
||||
return rc;
|
||||
}
|
||||
#endif /* SQLITE_OMIT_FLOATING_POINT */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user