]> www.ginac.de Git - cln.git/commitdiff
64-bit mingw port: Change return type of 'offsetof' to intptr_t.
authorRobert Szalai <robicjedi@gmail.com>
Sun, 27 Oct 2019 18:47:03 +0000 (19:47 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 27 Oct 2019 18:47:03 +0000 (19:47 +0100)
src/base/cl_offsetof.h

index 89ddaf272e7657e35694ddc740e787f332b01bfd..8a70c47ada5c6b7b8a0c747477a58f74e1f43cdb 100644 (file)
@@ -7,9 +7,9 @@
 
 #undef offsetof
 #if defined(__GNUG__)
-  #define offsetof(type,ident)  ((long)&(((type*)1)->ident)-1)
+  #define offsetof(type,ident)  ((intptr_t)&(((type*)1)->ident)-1)
 #else
-  #define offsetof(type,ident)  ((long)&(((type*)0)->ident))
+  #define offsetof(type,ident)  ((intptr_t)&(((type*)0)->ident))
 #endif
 
 #ifndef _CL_OFFSETOF_H