Anonymous User
October 23, 2024 01:20AM
details: https://github.com/nginx/njs/commit/606ceb243c49ce336be8d34085ee158f3723e271
branches: master
commit: 606ceb243c49ce336be8d34085ee158f3723e271
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Tue, 22 Oct 2024 18:50:46 -0700
description:
QuickJS: improved library discovery.

Add explicit testing for JS_GetClassID() function since it is not available
in older QuickJS versions.

This closes #801 issue on Github.

---
auto/quickjs | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/auto/quickjs b/auto/quickjs
index 8451d44d..9aeb485a 100644
--- a/auto/quickjs
+++ b/auto/quickjs
@@ -25,7 +25,6 @@ if [ $NJS_TRY_QUICKJS = YES ]; then
JSRuntime *rt;

rt = JS_NewRuntime();
- (void) JS_GetClassID;
JS_FreeRuntime(rt);
return 0;
}"
@@ -56,6 +55,28 @@ if [ $NJS_TRY_QUICKJS = YES ]; then

if [ $njs_found = yes ]; then

+ njs_feature="QuickJS JS_GetClassID()"
+ njs_feature_test="#if defined(__GNUC__) && (__GNUC__ >= 8)
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored \"-Wcast-function-type\"
+ #endif
+
+ #include <quickjs.h>
+
+ int main() {
+ (void) JS_GetClassID;
+ return 0;
+ }"
+
+ . auto/feature
+
+ if [ $njs_found = no ]; then
+ echo
+ echo $0: error: QuickJS library found, but JS_GetClassID\(\) is missing.
+ echo
+ exit 1;
+ fi
+
njs_feature="QuickJS JS_NewTypedArray()"
njs_feature_test="#if defined(__GNUC__) && (__GNUC__ >= 8)
#pragma GCC diagnostic push
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] QuickJS: improved library discovery.

Anonymous User 182 October 23, 2024 01:20AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 127
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready