about summary refs log tree commit diff stats
path: root/lib/quickjs/libbf.c
diff options
context:
space:
mode:
authorCharlie Gordon <github@chqrlie.org>2024-03-22 11:23:33 +0100
committerbptato <nincsnevem662@gmail.com>2024-04-14 19:00:24 +0200
commit4fba09e15a6af581588eec2a191143f03f2a8c49 (patch)
treeff56e701c40d7280e21f5b5fe9483751722b0249 /lib/quickjs/libbf.c
parent07f88ea2a567faf1501af1563de2336c296f7e49 (diff)
downloadchawan-4fba09e15a6af581588eec2a191143f03f2a8c49.tar.gz
Fix compilation with -DCONFIG_BIGNUM
- disable BigDecimal convertion in `JS_ReadBigNum`
- fix some error messages
Diffstat (limited to 'lib/quickjs/libbf.c')
-rw-r--r--lib/quickjs/libbf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/quickjs/libbf.c b/lib/quickjs/libbf.c
index dee394ac..05d62ed6 100644
--- a/lib/quickjs/libbf.c
+++ b/lib/quickjs/libbf.c
@@ -136,6 +136,7 @@ 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)
 {
@@ -145,6 +146,7 @@ static inline slimb_t floor_div(slimb_t a, slimb_t b)
         return (a - b + 1) / b;
     }
 }
+#endif
 
 /* return r = a modulo b (0 <= r <= b - 1. b must be >= 1 */
 static inline limb_t smod(slimb_t a, slimb_t b)