bacf4396a9
addColumn; which broke py stuff noticed with fgs@ while working on the py stuff much thanks to bernd@; for doing a bulk build with it ok fgs@, bernd@, simon@
43 lines
1.4 KiB
Plaintext
43 lines
1.4 KiB
Plaintext
$OpenBSD: patch-src_util_c,v 1.4 2009/04/05 00:02:54 martynas Exp $
|
|
--- src/util.c.orig Sun Feb 15 15:07:11 2009
|
|
+++ src/util.c Sun Mar 22 13:29:53 2009
|
|
@@ -18,6 +18,7 @@
|
|
*/
|
|
#include "sqliteInt.h"
|
|
#include <stdarg.h>
|
|
+#include <math.h>
|
|
|
|
/*
|
|
** Routine needed to support the testcase() macro.
|
|
@@ -54,29 +55,7 @@ int sqlite3Assert(void){
|
|
** Return true if the floating point value is Not a Number (NaN).
|
|
*/
|
|
int sqlite3IsNaN(double x){
|
|
- /* This NaN test sometimes fails if compiled on GCC with -ffast-math.
|
|
- ** On the other hand, the use of -ffast-math comes with the following
|
|
- ** warning:
|
|
- **
|
|
- ** This option [-ffast-math] should never be turned on by any
|
|
- ** -O option since it can result in incorrect output for programs
|
|
- ** which depend on an exact implementation of IEEE or ISO
|
|
- ** rules/specifications for math functions.
|
|
- **
|
|
- ** Under MSVC, this NaN test may fail if compiled with a floating-
|
|
- ** point precision mode other than /fp:precise. From the MSDN
|
|
- ** documentation:
|
|
- **
|
|
- ** The compiler [with /fp:precise] will properly handle comparisons
|
|
- ** involving NaN. For example, x != x evaluates to true if x is NaN
|
|
- ** ...
|
|
- */
|
|
-#ifdef __FAST_MATH__
|
|
-# error SQLite will not work correctly with the -ffast-math option of GCC.
|
|
-#endif
|
|
- volatile double y = x;
|
|
- volatile double z = y;
|
|
- return y!=z;
|
|
+ return isnan(x);
|
|
}
|
|
|
|
/*
|