From ffa46fbb1cd4d3104f27d9fe55a0ac5520aa93ca Mon Sep 17 00:00:00 2001 From: bptato Date: Sun, 14 Apr 2024 15:10:06 +0200 Subject: Revert bignum build fixes Importing patch from upstream instead. This reverts commits ccf177cc125e120b338612bbf24966faf3fd87fa and 6776f4dba975137f4034b1295c0f1958b752a2cb. --- lib/quickjs/libbf.c | 2 -- lib/quickjs/quickjs.c | 8 -------- 2 files changed, 10 deletions(-) (limited to 'lib/quickjs') diff --git a/lib/quickjs/libbf.c b/lib/quickjs/libbf.c index 7f497a85..dee394ac 100644 --- a/lib/quickjs/libbf.c +++ b/lib/quickjs/libbf.c @@ -136,7 +136,6 @@ static inline slimb_t ceil_div(slimb_t a, slimb_t b) return a / b; } -#ifdef USE_BF_DEC /* b must be >= 1 */ static inline slimb_t floor_div(slimb_t a, slimb_t b) { @@ -146,7 +145,6 @@ static inline slimb_t floor_div(slimb_t a, slimb_t b) return (a - b + 1) / b; } } -#endif /* USE_BF_DEC */ /* return r = a modulo b (0 <= r <= b - 1. b must be >= 1 */ static inline limb_t smod(slimb_t a, slimb_t b) diff --git a/lib/quickjs/quickjs.c b/lib/quickjs/quickjs.c index 3a8bee53..9cf4afbf 100644 --- a/lib/quickjs/quickjs.c +++ b/lib/quickjs/quickjs.c @@ -36057,11 +36057,7 @@ static JSValue JS_ReadBigNum(BCReaderState *s, int tag) JS_ThrowInternalError(s->ctx, "invalid bignum length"); goto fail; } -#ifdef CONFIG_BIGNUM if (tag != BC_TAG_BIG_DECIMAL) -#else - if (TRUE) -#endif l = (len + sizeof(limb_t) - 1) / sizeof(limb_t); else l = (len + LIMB_DIGITS - 1) / LIMB_DIGITS; @@ -36069,11 +36065,7 @@ static JSValue JS_ReadBigNum(BCReaderState *s, int tag) JS_ThrowOutOfMemory(s->ctx); goto fail; } -#ifdef CONFIG_BIGNUM if (tag != BC_TAG_BIG_DECIMAL) { -#else - if (TRUE) { -#endif n = len & (sizeof(limb_t) - 1); if (n != 0) { v = 0; -- cgit 1.4.1-2-gfad0