diff --git a/.github/workflows/decnum.yml b/.github/workflows/decnum.yml new file mode 100644 index 00000000..acba4e98 --- /dev/null +++ b/.github/workflows/decnum.yml @@ -0,0 +1,32 @@ +name: decnum +on: + push: + branches: + - master + pull_request: + +jobs: + disabled: + runs-on: ubuntu-22.04 + steps: + - name: Clone repository + uses: actions/checkout@v3 + with: + submodules: true + - name: Install packages + run: | + sudo apt-get update + sudo apt-get install -y automake autoconf libtool + - name: Build + run: | + autoreconf -i + ./configure \ + --disable-docs \ + --disable-maintainer-mode \ + --disable-decnum + make -j"$(nproc)" + file ./jq + - name: Test + run: | + diff <(echo 100000000000000000000 | ./jq) <(echo 1e+20) + git diff --exit-code diff --git a/src/jv.c b/src/jv.c index a8e0af2d..159b3f27 100644 --- a/src/jv.c +++ b/src/jv.c @@ -46,10 +46,6 @@ #include "jv_unicode.h" #include "util.h" -#include "jv_dtoa.h" -#include "jv_dtoa_tsd.h" -#include "jv_type_private.h" - /* * Internal refcounting helpers */ @@ -200,6 +196,9 @@ static void jvp_invalid_free(jv x) { */ #ifdef USE_DECNUM +#include "jv_dtoa.h" +#include "jv_dtoa_tsd.h" + // we will manage the space for the struct #define DECNUMDIGITS 1 #include "decNumber/decNumber.h"