From 7b717a7783a8d98279c8d45e2c9d4c08e9910054 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 27 Oct 2019 19:46:55 +0100 Subject: [PATCH] 64-bit mingw port: Define sintP, uintP in terms of 'intptr_t', not 'long'. Based on a patch by Robert Szalai . --- include/cln/types.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/include/cln/types.h b/include/cln/types.h index c4b49f2..dc98bdd 100644 --- a/include/cln/types.h +++ b/include/cln/types.h @@ -6,9 +6,12 @@ // CPU and other #include "cln/config.h" -// char_bitsize, short_bitsize, long_bitsize, long_long_bitsize +// char_bitsize, short_bitsize, long_bitsize, long_long_bitsize, pointer_bitsize #include "cln/intparam.h" +// intptr_t, uintptr_t +#include + // Elementary arithmetic types of given width: // 8 bits #if (char_bitsize==8) @@ -99,10 +102,10 @@ #endif // Integer type as large as a pointer. -// Assumption: sizeof(long) == sizeof(void*) - #define intPsize long_bitsize - typedef long sintP; - typedef unsigned long uintP; +// Assumption: sizeof(intptr_t) == sizeof(void*) + #define intPsize pointer_bitsize + typedef intptr_t sintP; + typedef uintptr_t uintP; // Integer type used for the value of a fixnum. #define intVsize long_bitsize -- 2.47.0