From bc8cc68aeff7ae3be1353f4077633cda4d30b54b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 14 Jul 2023 14:33:21 +0900 Subject: [PATCH] Make dtoa.c buildable alone --- missing/dtoa.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/missing/dtoa.c b/missing/dtoa.c index b7a8302875..bce2cb22a1 100644 --- a/missing/dtoa.c +++ b/missing/dtoa.c @@ -183,7 +183,10 @@ #undef Long #undef ULong +#include #include +#include +#include #if (INT_MAX >> 30) && !(INT_MAX >> 31) #define Long int @@ -195,7 +198,7 @@ #error No 32bit integer #endif -#if HAVE_LONG_LONG +#if defined(HAVE_LONG_LONG) && (HAVE_LONG_LONG) #define Llong LONG_LONG #else #define NO_LONG_LONG @@ -221,12 +224,12 @@ #ifdef MALLOC extern void *MALLOC(size_t); #else -#define MALLOC xmalloc +#define MALLOC malloc #endif #ifdef FREE extern void FREE(void*); #else -#define FREE xfree +#define FREE free #endif #ifndef NO_SANITIZE #define NO_SANITIZE(x, y) y @@ -502,7 +505,7 @@ extern double rnd_prod(double, double), rnd_quot(double, double); #endif #ifndef ATOMIC_PTR_CAS -#define ATOMIC_PTR_CAS(var, old, new) ((var) = (new), (old)) +#define ATOMIC_PTR_CAS(var, old, new) ((var) = (new), (void *)(old)) #endif #ifndef LIKELY #define LIKELY(x) (x)