/ Check-in [97c6ea23]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Get the behavior of SQLITE_HAVE_ISNAN right. It was reversed in check-in (6517). Ticket #3809. (CVS 6518)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:97c6ea2368556b2a9a914ba2322085e312598b15
User & Date: drh 2009-04-17 15:18:48
Context
2009-04-17
16:54
Revise the implementation of sqlite3_initialize() slightly in order to make it more easily testable. The functionality should be unchanged. (CVS 6519) check-in: bb1a390a user: drh tags: trunk
15:18
Get the behavior of SQLITE_HAVE_ISNAN right. It was reversed in check-in (6517). Ticket #3809. (CVS 6518) check-in: 97c6ea23 user: drh tags: trunk
11:57
Add the SQLITE_HAVE_ISNAN compile-time option which, if present, causes SQLite to use the math library isnan() function rather than its own homebrew implementation of isnan(). (CVS 6517) check-in: 54d23521 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/util.c.

    10     10   **
    11     11   *************************************************************************
    12     12   ** Utility functions used throughout sqlite.
    13     13   **
    14     14   ** This file contains functions for allocating memory, comparing
    15     15   ** strings, and stuff like that.
    16     16   **
    17         -** $Id: util.c,v 1.250 2009/04/17 11:57:22 drh Exp $
           17  +** $Id: util.c,v 1.251 2009/04/17 15:18:48 drh Exp $
    18     18   */
    19     19   #include "sqliteInt.h"
    20     20   #include <stdarg.h>
    21     21   #include <math.h>
    22     22   
    23     23   /*
    24     24   ** Routine needed to support the testcase() macro.
................................................................................
    54     54   /*
    55     55   ** Return true if the floating point value is Not a Number (NaN).
    56     56   **
    57     57   ** Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN.
    58     58   ** Otherwise, we have our own implementation that works on most systems.
    59     59   */
    60     60   int sqlite3IsNaN(double x){
    61         -#if defined(SQLITE_HAVE_ISNAN)
           61  +#if !defined(SQLITE_HAVE_ISNAN)
    62     62     /*
    63     63     ** Systems that support the isnan() library function should probably
    64     64     ** make use of it by compiling with -DSQLITE_HAVE_ISNAN.  But we have
    65     65     ** found that many systems do not have a working isnan() function so
    66     66     ** this implementation is provided as an alternative.
    67     67     **
    68     68     ** This NaN test sometimes fails if compiled on GCC with -ffast-math.