From 9570e24df1397f31dbd7c8436928749da9fc378c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 12 Jul 2005 05:54:21 +0000 Subject: r8341: enable floating point support in ejs (This used to be commit bdc6b67eb27cc3da6d5144bbb71096741f779aba) --- source4/lib/ejs/config.h | 6 +++++- source4/lib/ejs/miniMpr.h | 1 + source4/lib/ejs/var.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/source4/lib/ejs/config.h b/source4/lib/ejs/config.h index e6cd603907..320318a0b2 100644 --- a/source4/lib/ejs/config.h +++ b/source4/lib/ejs/config.h @@ -45,7 +45,7 @@ #define BLD_FEATURE_EJS 1 #define BLD_FEATURE_ESP_MODULE 1 #define BLD_FEATURE_EVAL_PERIOD 30 -#define BLD_FEATURE_FLOATING_POINT 0 +#define BLD_FEATURE_FLOATING_POINT 1 #define BLD_FEATURE_IF_MODIFIED 0 #define BLD_FEATURE_INT64 1 #define BLD_FEATURE_KEEP_ALIVE 0 @@ -135,3 +135,7 @@ #define BLD_BIN_DIR "${BLD_TOP}/bin" #define BLD_INC_DIR "/usr/include/${BLD_PRODUCT}" #define BLD_EXP_OBJ_DIR "${BLD_TOP}/obj" + +#ifndef MAX_FLOAT +#define MAX_FLOAT 3.40282347e+38F +#endif diff --git a/source4/lib/ejs/miniMpr.h b/source4/lib/ejs/miniMpr.h index 3bbd63a302..d431ebdc1b 100644 --- a/source4/lib/ejs/miniMpr.h +++ b/source4/lib/ejs/miniMpr.h @@ -74,6 +74,7 @@ #if QNX4 #include #endif + #include /********************************** Defines ***********************************/ diff --git a/source4/lib/ejs/var.c b/source4/lib/ejs/var.c index 843d2ff738..7cbf8a0b7f 100644 --- a/source4/lib/ejs/var.c +++ b/source4/lib/ejs/var.c @@ -1843,7 +1843,7 @@ bool mprVarToBool(const MprVar *vp) * Convert the variable to a floating point number. Only for primitive types. */ -double mprVarToFloat(MprVar *vp) +double mprVarToFloat(const MprVar *vp) { mprAssert(vp); -- cgit