njs_feature_run=yes
njs_feature_incs="$NJS_QUICKJS_DEFAULT_INCS"
njs_feature_libs="-lquickjs.lto -lm -ldl -lpthread"
- njs_feature_test="#include <qjs.h>
+ njs_feature_test="#include <quickjs_compat.h>
int main() {
JSRuntime *rt;
njs_feature="QuickJS JS_GetClassID()"
njs_feature_name=NJS_HAVE_QUICKJS_GET_CLASS_ID
- njs_feature_test="#include <qjs.h>
+ njs_feature_test="#include <quickjs_compat.h>
int main() {
(void) JS_GetClassID(JS_UNDEFINED);
njs_feature="QuickJS JS_NewTypedArray()"
njs_feature_name=NJS_HAVE_QUICKJS_NEW_TYPED_ARRAY
- njs_feature_test="#include <qjs.h>
+ njs_feature_test="#include <quickjs_compat.h>
int main() {
JSValue ta, argv;
njs_feature="QuickJS JS_IsSameValue()"
njs_feature_name=NJS_HAVE_QUICKJS_IS_SAME_VALUE
- njs_feature_test="#include <qjs.h>
+ njs_feature_test="#include <quickjs_compat.h>
int main() {
JSRuntime *rt;
njs_feature="QuickJS JS_IsArray()"
njs_feature_name=NJS_HAVE_QUICKJS_IS_ARRAY_SINGLE_ARG
- njs_feature_test="#include <qjs.h>
+ njs_feature_test="#include <quickjs_compat.h>
int main() {
JSRuntime *rt;
njs_feature="QuickJS JS_AddIntrinsicBigInt()"
njs_feature_name=NJS_HAVE_QUICKJS_ADD_INTRINSIC_BIG_INT
- njs_feature_test="#include <qjs.h>
+ njs_feature_test="#include <quickjs_compat.h>
int main() {
JSRuntime *rt;
njs_feature="QuickJS version"
njs_feature_name=NJS_QUICKJS_VERSION
njs_feature_run=value
- njs_feature_test="#include <qjs.h>
+ njs_feature_test="#include <quickjs_compat.h>
int main() {
#if defined(QJS_VERSION_MAJOR)
ngx_feature="QuickJS library -lquickjs.lto"
ngx_feature_name=NJS_HAVE_QUICKJS
ngx_feature_run=yes
- ngx_feature_incs="#include <qjs.h>"
+ ngx_feature_incs="#include <quickjs_compat.h>"
ngx_feature_path="$NJS_QUICKJS_DEFAULT_INCS"
ngx_feature_libs="-lquickjs.lto -lm -ldl -lpthread"
ngx_feature_test="JSRuntime *rt;
#include <njs_chb.h>
#include <njs_utils.h>
#include <njs_assert.h>
-
-#ifndef __has_warning
-# define __has_warning(x) 0
-#endif
-
-#if (defined(__GNUC__) && (__GNUC__ >= 8)) \
- || (defined(__clang__) && __has_warning("-Wcast-function-type"))
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wcast-function-type"
-#endif
-
-#include <quickjs.h>
-
-#ifndef JS_BOOL
-#define JS_BOOL bool
-#endif
-
-#if (defined(__GNUC__) && (__GNUC__ >= 8)) \
- || (defined(__clang__) && __has_warning("-Wcast-function-type"))
-#pragma GCC diagnostic pop
-#endif
-#include <pthread.h>
+#include <quickjs_compat.h>
#define QJS_CORE_CLASS_ID_OFFSET 64
--- /dev/null
+
+/*
+ * Copyright (C) F5, Inc.
+ */
+
+#ifndef __has_warning
+ #define __has_warning(x) 0
+#endif
+
+#if (defined(__GNUC__) && (__GNUC__ >= 8)) \
+ || (defined(__clang__) && __has_warning("-Wcast-function-type"))
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wcast-function-type"
+
+ #include <quickjs.h>
+
+ #pragma GCC diagnostic pop
+#else
+ #include <quickjs.h>
+#endif
+
+#ifndef JS_BOOL
+ #define JS_BOOL bool
+#endif