Index: src/main.c ================================================================== --- src/main.c +++ src/main.c @@ -12,11 +12,11 @@ ** Main file for the SQLite library. The routines in this file ** implement the programmer interface to the library. Routines in ** other files are for internal use by SQLite and should not be ** accessed by users of the library. ** -** $Id: main.c,v 1.479 2008/07/16 14:02:33 drh Exp $ +** $Id: main.c,v 1.480 2008/07/22 05:13:30 shane Exp $ */ #include "sqliteInt.h" #include #ifdef SQLITE_ENABLE_FTS3 @@ -115,10 +115,24 @@ rc = sqlite3_os_init(); inProgress = 0; sqlite3Config.isInit = (rc==SQLITE_OK ? 1 : 0); sqlite3_mutex_leave(sqlite3Config.pInitMutex); } + + /* Check NaN support. */ +#ifndef NDEBUG + /* This section of code's only "output" is via assert() statements. */ + if ( rc==SQLITE_OK ){ + u64 x = (((u64)1)<<63)-1; + double y; + assert(sizeof(x)==8); + assert(sizeof(x)==sizeof(y)); + memcpy(&y, &x, 8); + assert( sqlite3IsNaN(y) ); + } +#endif + return rc; } /* ** Undo the effects of sqlite3_initialize(). Must not be called while