diff options
author | he <he@pkgsrc.org> | 2020-01-26 18:37:49 +0000 |
---|---|---|
committer | he <he@pkgsrc.org> | 2020-01-26 18:37:49 +0000 |
commit | 4fe3b1525028b7969aa14b99d51d03083e5475e2 (patch) | |
tree | d28deee162e93c4bdbb8c98893457b17fa7c30c1 /lang/quickjs/patches/patch-quickjs.c | |
parent | 0267807f87c64f31dfd0e699ddbab19e55e61df4 (diff) | |
download | pkgsrc-4fe3b1525028b7969aa14b99d51d03083e5475e2.tar.gz |
Update to 2020-01-19 version.
Pkgsrc changes:
* adapt patches
* If NetBSD platform misses 64-bit atomics, turn off all atomics
(Trying to just disable BIGNUM fails; workaround suggested by
Fabrice Bellard)
Upstream changes:
- keep CONFIG_BIGNUM in the makefile
- added os.chdir()
- qjs: added -I option
- more memory checks in the bignum operations
- modified operator overloading semantics to be closer to the TC39
proposal
- suppressed "use bigint" mode. Simplified "use math" mode
- BigDecimal: changed suffix from 'd' to 'm'
- misc bug fixes
Diffstat (limited to 'lang/quickjs/patches/patch-quickjs.c')
-rw-r--r-- | lang/quickjs/patches/patch-quickjs.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/lang/quickjs/patches/patch-quickjs.c b/lang/quickjs/patches/patch-quickjs.c index 2643557152e..90f8c4c80b8 100644 --- a/lang/quickjs/patches/patch-quickjs.c +++ b/lang/quickjs/patches/patch-quickjs.c @@ -1,10 +1,26 @@ -$NetBSD: patch-quickjs.c,v 1.1 2019/11/14 21:20:04 rillig Exp $ +$NetBSD: patch-quickjs.c,v 1.2 2020/01/26 18:37:49 he Exp $ Portability patch for NetBSD. ---- quickjs.c.orig 2019-10-27 10:55:35.000000000 +0000 +--- quickjs.c.orig 2020-01-19 10:12:01.000000000 +0000 +++ quickjs.c -@@ -1343,7 +1343,7 @@ static inline size_t js_def_malloc_usabl +@@ -68,7 +68,15 @@ + /* define to include Atomics.* operations which depend on the OS + threads */ + #if !defined(EMSCRIPTEN) ++#ifdef __NetBSD__ ++#ifdef __HAVE_ATOMICS64_OPS + #define CONFIG_ATOMICS ++#else ++#undef CONFIG_ATOMICS ++#endif /* __HAVE_ATOMICS64_OPS */ ++#else /* ! __NetBSD__ */ ++#define CONFIG_ATOMICS ++#endif /* __NetBSD__ */ + #endif + + /* dump object free */ +@@ -1544,7 +1552,7 @@ static inline size_t js_def_malloc_usabl return malloc_size(ptr); #elif defined(_WIN32) return _msize(ptr); @@ -13,7 +29,7 @@ Portability patch for NetBSD. return 0; #elif defined(__linux__) return malloc_usable_size(ptr); -@@ -1417,7 +1417,7 @@ static const JSMallocFunctions def_mallo +@@ -1618,7 +1626,7 @@ static const JSMallocFunctions def_mallo malloc_size, #elif defined(_WIN32) (size_t (*)(const void *))_msize, |