]> www.ginac.de Git - cln.git/commitdiff
64-bit mingw port: Define sintP, uintP in terms of 'intptr_t', not 'long'.
authorBruno Haible <bruno@clisp.org>
Sun, 27 Oct 2019 18:46:55 +0000 (19:46 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 27 Oct 2019 18:46:55 +0000 (19:46 +0100)
Based on a patch by Robert Szalai <robicjedi@gmail.com>.

include/cln/types.h

index c4b49f290849725a830e660b9d93cb092766f826..dc98bddbd264fcc372fdebc750cdf42dee4733d2 100644 (file)
@@ -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 <stdint.h>
+
 // Elementary arithmetic types of given width:
   // 8 bits
   #if (char_bitsize==8)
   #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