summaryrefslogtreecommitdiff
path: root/content/handlers/javascript/duktape/duk_config.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2016-08-31 18:34:39 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2016-08-31 18:54:35 +0100
commit9800c5f298f2a6387cf8ef9341e9b01f35fcb2a6 (patch)
treeb45be9c392335615b51e02e05176bedac9ffc443 /content/handlers/javascript/duktape/duk_config.h
parentc71b1ec91bb4a51e434c323a82bf4fbc046d932a (diff)
downloadnetsurf-9800c5f298f2a6387cf8ef9341e9b01f35fcb2a6.tar.gz
netsurf-9800c5f298f2a6387cf8ef9341e9b01f35fcb2a6.tar.bz2
Duktape: Update to version 1.5.1.
Version 1.5.1 includes some of our own fixes, reducing our delta to upstream. These should not be needed now: - 2cbb337756d9af5bda4d594964d446439f602551 Squash harmless Clang warning introduced in Duktape 1.5.0. - 8f8cda2b48d1063366302204559c1ed3362656bc Fix Duktape on AmigaOS3 (thanks to Tygre and Sami)
Diffstat (limited to 'content/handlers/javascript/duktape/duk_config.h')
-rw-r--r--content/handlers/javascript/duktape/duk_config.h61
1 files changed, 56 insertions, 5 deletions
diff --git a/content/handlers/javascript/duktape/duk_config.h b/content/handlers/javascript/duktape/duk_config.h
index 4a83e77f4..c336603eb 100644
--- a/content/handlers/javascript/duktape/duk_config.h
+++ b/content/handlers/javascript/duktape/duk_config.h
@@ -1,9 +1,9 @@
/*
* duk_config.h configuration header generated by genconfig.py.
*
- * Git commit: 83d557704ee63f68ab40b6fcb00995c9b3d6777c
- * Git describe: v1.5.0
- * Git branch: master
+ * Git commit: 2cc76e9ff1f64869e1146ad7317d8cbe33bbd27e
+ * Git describe: v1.5.1
+ * Git branch: HEAD
*
* Supported platforms:
* - Mac OSX, iPhone, Darwin
@@ -918,12 +918,27 @@
#define DUK_EXTERNAL_DECL __attribute__ ((visibility("default"))) extern
#define DUK_EXTERNAL __attribute__ ((visibility("default")))
#if defined(DUK_SINGLE_FILE)
+#if (defined(DUK_F_GCC_VERSION) && DUK_F_GCC_VERSION >= 30101) || defined(DUK_F_CLANG)
+/* Minimize warnings for unused internal functions with GCC >= 3.1.1 and
+ * Clang. Based on documentation it should suffice to have the attribute
+ * in the declaration only, but in practice some warnings are generated unless
+ * the attribute is also applied to the definition.
+ */
+#define DUK_INTERNAL_DECL static __attribute__ ((unused))
+#define DUK_INTERNAL static __attribute__ ((unused))
+#else
#define DUK_INTERNAL_DECL static
#define DUK_INTERNAL static
+#endif
+#else
+#if (defined(DUK_F_GCC_VERSION) && DUK_F_GCC_VERSION >= 30101) || defined(DUK_F_CLANG)
+#define DUK_INTERNAL_DECL __attribute__ ((visibility("hidden"))) __attribute__ ((unused)) extern
+#define DUK_INTERNAL __attribute__ ((visibility("hidden"))) __attribute__ ((unused))
#else
#define DUK_INTERNAL_DECL __attribute__ ((visibility("hidden"))) extern
#define DUK_INTERNAL __attribute__ ((visibility("hidden")))
#endif
+#endif
#define DUK_LOCAL_DECL static
#define DUK_LOCAL static
#endif
@@ -1012,12 +1027,27 @@
#define DUK_EXTERNAL_DECL __attribute__ ((visibility("default"))) extern
#define DUK_EXTERNAL __attribute__ ((visibility("default")))
#if defined(DUK_SINGLE_FILE)
+#if (defined(DUK_F_GCC_VERSION) && DUK_F_GCC_VERSION >= 30101) || defined(DUK_F_CLANG)
+/* Minimize warnings for unused internal functions with GCC >= 3.1.1 and
+ * Clang. Based on documentation it should suffice to have the attribute
+ * in the declaration only, but in practice some warnings are generated unless
+ * the attribute is also applied to the definition.
+ */
+#define DUK_INTERNAL_DECL static __attribute__ ((unused))
+#define DUK_INTERNAL static __attribute__ ((unused))
+#else
#define DUK_INTERNAL_DECL static
#define DUK_INTERNAL static
+#endif
+#else
+#if (defined(DUK_F_GCC_VERSION) && DUK_F_GCC_VERSION >= 30101) || defined(DUK_F_CLANG)
+#define DUK_INTERNAL_DECL __attribute__ ((visibility("hidden"))) __attribute__ ((unused)) extern
+#define DUK_INTERNAL __attribute__ ((visibility("hidden"))) __attribute__ ((unused))
#else
#define DUK_INTERNAL_DECL __attribute__ ((visibility("hidden"))) extern
#define DUK_INTERNAL __attribute__ ((visibility("hidden")))
#endif
+#endif
#define DUK_LOCAL_DECL static
#define DUK_LOCAL static
#endif
@@ -1174,12 +1204,27 @@
#define DUK_EXTERNAL_DECL __attribute__ ((visibility("default"))) extern
#define DUK_EXTERNAL __attribute__ ((visibility("default")))
#if defined(DUK_SINGLE_FILE)
+#if (defined(DUK_F_GCC_VERSION) && DUK_F_GCC_VERSION >= 30101) || defined(DUK_F_CLANG)
+/* Minimize warnings for unused internal functions with GCC >= 3.1.1 and
+ * Clang. Based on documentation it should suffice to have the attribute
+ * in the declaration only, but in practice some warnings are generated unless
+ * the attribute is also applied to the definition.
+ */
+#define DUK_INTERNAL_DECL static __attribute__ ((unused))
+#define DUK_INTERNAL static __attribute__ ((unused))
+#else
#define DUK_INTERNAL_DECL static
#define DUK_INTERNAL static
+#endif
+#else
+#if (defined(DUK_F_GCC_VERSION) && DUK_F_GCC_VERSION >= 30101) || defined(DUK_F_CLANG)
+#define DUK_INTERNAL_DECL __attribute__ ((visibility("hidden"))) __attribute__ ((unused)) extern
+#define DUK_INTERNAL __attribute__ ((visibility("hidden"))) __attribute__ ((unused))
#else
#define DUK_INTERNAL_DECL __attribute__ ((visibility("hidden"))) extern
#define DUK_INTERNAL __attribute__ ((visibility("hidden")))
#endif
+#endif
#define DUK_LOCAL_DECL static
#define DUK_LOCAL static
@@ -2076,8 +2121,14 @@ typedef FILE duk_file;
defined(FP_SUBNORMAL) && defined(FP_NORMAL))
/* Missing some obvious constants. */
#define DUK_F_USE_REPL_ALL
-#elif defined(DUK_F_AMIGAOS)
-/* VBCC is missing the built-ins even in C99 mode (perhaps a header issue) */
+#elif defined(DUK_F_AMIGAOS) && defined(DUK_F_VBCC)
+/* VBCC is missing the built-ins even in C99 mode (perhaps a header issue). */
+#define DUK_F_USE_REPL_ALL
+#elif defined(DUK_F_AMIGAOS) && defined(DUK_F_M68K)
+/* AmigaOS + M68K seems to have math issues even when using GCC cross
+ * compilation. Use replacements for all AmigaOS versions on M68K
+ * regardless of compiler.
+ */
#define DUK_F_USE_REPL_ALL
#elif defined(DUK_F_FREEBSD) && defined(DUK_F_CLANG)
/* Placeholder fix for (detection is wider than necessary):