diff --git a/thirdparty/WDL/source/WDL/eel2/nseel-compiler.c b/thirdparty/WDL/source/WDL/eel2/nseel-compiler.c index a0c39cb..5dee9a7 100644 --- a/thirdparty/WDL/source/WDL/eel2/nseel-compiler.c +++ b/thirdparty/WDL/source/WDL/eel2/nseel-compiler.c @@ -68,6 +68,12 @@ FILE *g_eel_dump_fp, *g_eel_dump_fp2; #define COMPUTABLE_EXTRA_SPACE 16 // safety buffer, if EEL_VALIDATE_WORKTABLE_USE set, used for magic-value-checking #endif +#ifdef NSEEL_ATOF + double NSEEL_ATOF(const char *); +#else + #define NSEEL_ATOF atof +#endif + /* P1 is rightmost parameter @@ -5798,7 +5804,7 @@ opcodeRec *nseel_translate(compileContext *ctx, const char *tmp, size_t tmplen) return nseel_createCompiledValue(ctx,ctx->onNamedString(ctx->caller_this,buf+1)); } } - return nseel_createCompiledValue(ctx,(EEL_F)atof(tmp)); + return nseel_createCompiledValue(ctx,(EEL_F)NSEEL_ATOF(tmp)); } void NSEEL_VM_set_var_resolver(NSEEL_VMCTX _ctx, EEL_F *(*res)(void *userctx, const char *name), void *userctx) diff --git a/thirdparty/WDL/source/WDL/lineparse.h b/thirdparty/WDL/source/WDL/lineparse.h index 07f4a4e..d639132 100644 --- a/thirdparty/WDL/source/WDL/lineparse.h +++ b/thirdparty/WDL/source/WDL/lineparse.h @@ -42,6 +42,12 @@ #define WDL_LINEPARSER_HAS_LINEPARSERINT #endif +#ifdef WDL_LINEPARSE_ATOF + extern "C" double WDL_LINEPARSE_ATOF(const char *); +#else + #define WDL_LINEPARSE_ATOF atof +#endif + #ifndef WDL_LINEPARSE_IMPL_ONLY class LineParserInt // version which does not have any temporary space for buffers (requires use of parseDestroyBuffer) { @@ -159,7 +165,7 @@ class LineParserInt // version which does not have any temporary space for buffe buf[ot++]=c; } buf[ot] = 0; - return atof(buf); + return WDL_LINEPARSE_ATOF(buf); } int WDL_LINEPARSE_PREFIX gettoken_int(int token) const