Module Name: src Committed By: christos Date: Wed Nov 2 23:19:49 UTC 2011
Modified Files: src/external/public-domain/sqlite/dist: sqlite3.c Log Message: fix vax floating point overflows. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/public-domain/sqlite/dist/sqlite3.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/public-domain/sqlite/dist/sqlite3.c diff -u src/external/public-domain/sqlite/dist/sqlite3.c:1.1.1.1 src/external/public-domain/sqlite/dist/sqlite3.c:1.2 --- src/external/public-domain/sqlite/dist/sqlite3.c:1.1.1.1 Thu Oct 13 17:38:52 2011 +++ src/external/public-domain/sqlite/dist/sqlite3.c Wed Nov 2 19:19:48 2011 @@ -7615,10 +7615,19 @@ SQLITE_PRIVATE void sqlite3HashClear(Has # define SQLITE_OMIT_TRACE 1 # undef SQLITE_MIXED_ENDIAN_64BIT_FLOAT # undef SQLITE_HAVE_ISNAN +#else +# ifdef __vax__ +# include <float.h> +# define SQLITE_BIG_DBL DBL_MAX +# define SQLITE_HUGE_DBL DBL_MAX +# endif #endif #ifndef SQLITE_BIG_DBL # define SQLITE_BIG_DBL (1e99) #endif +#ifndef SQLITE_HUGE_DBL +# define SQLITE_HUGE_DBL (1.0e+308) +#endif /* ** OMIT_TEMPDB is set to 1 if SQLITE_OMIT_TEMPDB is defined, or 0 @@ -21000,10 +21009,10 @@ do_atof_calc: while( e%308 ) { scale *= 1.0e+1; e -= 1; } if( esign<0 ){ result = s / scale; - result /= 1.0e+308; + result /= SQLITE_HUGE_DBL; }else{ result = s * scale; - result *= 1.0e+308; + result *= SQLITE_HUGE_DBL; } }else{ /* 1.0e+22 is the largest power of 10 than can be @@ -130632,7 +130641,7 @@ SQLITE_API int sqlite3_extension_init( ** May you share freely, never taking more than you give. ** ************************************************************************* -** $Id: sqlite3.c,v 1.1.1.1 2011/10/13 21:38:52 joerg Exp $ +** $Id: sqlite3.c,v 1.2 2011/11/02 23:19:48 christos Exp $ ** ** This file implements an integration between the ICU library ** ("International Components for Unicode", an open-source library