8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 12:43:03 +01:00

Solve the display problem in Windows where

select cot(0) + 1 from rdb$database;
produces 1.#INF00000000000
Now it says Infinity but only Windows and Solaris are covered.
This commit is contained in:
robocop 2009-04-28 17:15:00 +00:00
parent 5faa53e4e3
commit 92eee0fac3

View File

@ -66,6 +66,8 @@
#ifdef SOLARIS
#include <nan.h>
#elif defined(WIN_NT)
#include <float.h>
#endif
#ifdef HAVE_UNISTD_H
@ -341,7 +343,7 @@ static processing_state newoutput(const TEXT*);
static processing_state newsize(const TEXT*, const TEXT*);
static processing_state newRowCount(const TEXT* newRowCountStr);
static processing_state newtrans(const TEXT*);
static processing_state parse_arg(int, SCHAR**, SCHAR*, FILE**);
static processing_state parse_arg(int, SCHAR**, SCHAR*); //, FILE**);
#ifdef DEV_BUILD
static processing_state passthrough(const char* cmd);
#endif
@ -587,7 +589,7 @@ int ISQL_main(int argc,
isqlGlob.Out = stdout;
isqlGlob.Errfp = stderr;
const processing_state ret = parse_arg(argc, argv, tabname, NULL);
const processing_state ret = parse_arg(argc, argv, tabname);
// Can't do a simple assignment because parse_arg may set Interactive to false.
if (stdin_redirected())
@ -6720,7 +6722,8 @@ static processing_state newtrans(const TEXT* statement)
}
static processing_state parse_arg(int argc, SCHAR** argv, SCHAR* tabname, FILE** sess)
static processing_state parse_arg(int argc, SCHAR** argv, SCHAR* tabname)
// , FILE** sess) Last param was for wisql
{
/**************************************
*
@ -7143,6 +7146,11 @@ static bool checkSpecial(TEXT* const p, const int length, const double value)
{
t = IsINF(value) ? "Infinity" : "NaN";
}
#elif defined(WIN_NT)
if (!_finite(value))
{
t = _isnan(value) ? "NaN" : "Infinity";
}
#endif
if (! t)
{