From ae793a3ad9f9cbeb9361223258d67cf0f6daa5f3 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 23 Mar 2017 16:00:57 +0000 Subject: [PATCH] Duktape: Atari Mint lacks trunc, log2 and cbrt. build/Linux-atari/content_handlers_javascript_duktape_duktape.o:build/Linux-atari/content_handlers_javascript_duktape_duktape.o:(.text+0x978): undefined reference to `_trunc' build/Linux-atari/content_handlers_javascript_duktape_duktape.o:build/Linux-atari/content_handlers_javascript_duktape_duktape.o:(.text+0x990): undefined reference to `_log2' build/Linux-atari/content_handlers_javascript_duktape_duktape.o:build/Linux-atari/content_handlers_javascript_duktape_duktape.o:(.text+0x99c): undefined reference to `_cbrt' --- content/handlers/javascript/duktape/duk_config.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/content/handlers/javascript/duktape/duk_config.h b/content/handlers/javascript/duktape/duk_config.h index 1b31a0b16..c28a4b8e5 100644 --- a/content/handlers/javascript/duktape/duk_config.h +++ b/content/handlers/javascript/duktape/duk_config.h @@ -350,6 +350,11 @@ #define DUK_F_VBCC #endif +/* Atari Mint */ +#if defined(__MINT__) +#define DUK_F_MINT +#endif + #if defined(ANDROID) || defined(__ANDROID__) #define DUK_F_ANDROID #endif @@ -2271,8 +2276,9 @@ typedef struct duk_hthread duk_context; * for platforms that don't include them. MSVC isn't detected as C99, but * these functions also exist in MSVC 2013 and later so include a clause for * that too. Android doesn't have log2; disable all of these for Android. + * Atari MINT also lacks these. */ -#if (defined(DUK_F_C99) || defined(DUK_F_CPP11) || (defined(_MSC_VER) && (_MSC_VER >= 1800))) && !defined(DUK_F_ANDROID) +#if (defined(DUK_F_C99) || defined(DUK_F_CPP11) || (defined(_MSC_VER) && (_MSC_VER >= 1800))) && !defined(DUK_F_ANDROID) && !defined(DUK_F_MINT) #if !defined(DUK_CBRT) #define DUK_CBRT cbrt #endif