aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2007-06-20 15:29:25 +0000
committerdrh <drh@noemail.net>2007-06-20 15:29:25 +0000
commit7cd6927e7f1baff9b972b48abf5446b373b70e23 (patch)
tree7a39797ab77444ed02e9fd07d2beab2ed7662d1f /src
parent029f3f8924204438ffacc2b853df0ca53f725690 (diff)
downloadsqlite-7cd6927e7f1baff9b972b48abf5446b373b70e23.tar.gz
sqlite-7cd6927e7f1baff9b972b48abf5446b373b70e23.zip
Remove the dependency on libm for isnan(). Ticket #2436. (CVS 4103)
FossilOrigin-Name: 406675bb1c954dae95b9059f7f533ed57e3947d9
Diffstat (limited to 'src')
-rw-r--r--src/printf.c2
-rw-r--r--src/sqliteInt.h6
-rw-r--r--src/vdbe.c4
-rw-r--r--src/vdbemem.c2
4 files changed, 6 insertions, 8 deletions
diff --git a/src/printf.c b/src/printf.c
index e910650fe..457dac4b8 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -454,7 +454,7 @@ static int vxprintf(
if( xtype==etFLOAT ) realvalue += rounder;
/* Normalize realvalue to within 10.0 > realvalue >= 1.0 */
exp = 0;
- if( isnan(realvalue) ){
+ if( sqlite3_isnan(realvalue) ){
bufpt = "NaN";
length = 3;
break;
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index eca83996e..38cad64d9 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -11,7 +11,7 @@
*************************************************************************
** Internal interface definitions for SQLite.
**
-** @(#) $Id: sqliteInt.h,v 1.573 2007/06/19 15:23:48 drh Exp $
+** @(#) $Id: sqliteInt.h,v 1.574 2007/06/20 15:29:25 drh Exp $
*/
#ifndef _SQLITEINT_H_
#define _SQLITEINT_H_
@@ -65,9 +65,7 @@
#include <assert.h>
#include <stddef.h>
-#if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__)
-# define isnan(X) ((X)!=(X))
-#endif
+#define sqlite3_isnan(X) ((X)!=(X))
/*
** If compiling for a processor that lacks floating point support,
diff --git a/src/vdbe.c b/src/vdbe.c
index cdee71465..8522c21a2 100644
--- a/src/vdbe.c
+++ b/src/vdbe.c
@@ -43,7 +43,7 @@
** in this file for details. If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
-** $Id: vdbe.c,v 1.626 2007/06/15 14:53:53 danielk1977 Exp $
+** $Id: vdbe.c,v 1.627 2007/06/20 15:29:25 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -1188,7 +1188,7 @@ case OP_Remainder: { /* same as TK_REM, no-push */
break;
}
}
- if( isnan(b) ){
+ if( sqlite3_isnan(b) ){
goto divide_by_zero;
}
Release(pTos);
diff --git a/src/vdbemem.c b/src/vdbemem.c
index 21a27f3b2..f05e05cce 100644
--- a/src/vdbemem.c
+++ b/src/vdbemem.c
@@ -436,7 +436,7 @@ void sqlite3VdbeMemSetInt64(Mem *pMem, i64 val){
** manifest type REAL.
*/
void sqlite3VdbeMemSetDouble(Mem *pMem, double val){
- if( isnan(val) ){
+ if( sqlite3_isnan(val) ){
sqlite3VdbeMemSetNull(pMem);
}else{
sqlite3VdbeMemRelease(pMem);