]> www.ginac.de Git - cln.git/commitdiff
64-bit mingw port: Fix compilation error of intparam.c.
authorBruno Haible <bruno@clisp.org>
Sun, 27 Oct 2019 18:46:53 +0000 (19:46 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 27 Oct 2019 18:46:53 +0000 (19:46 +0100)
autoconf/intparam.c

index d3b9408f8c3f2a391d4733ada199fd3350ac2e65..7988265fff008f000177d823239514e6712efcd5 100644 (file)
@@ -433,28 +433,28 @@ void main7(void) {
     { printf("#error \"Pointer types %s and %s have different sizes!!\"\n",typestr1,typestr2); }       \
     else                                                                                               \
     { int i;                                                                                           \
-      ulong differences1 = 0, differences2 = 0;                                                        \
+      uintptr_t differences1 = 0, differences2 = 0;                                                    \
       for (i = 0; i<100; i++)                                                                          \
-        { ulong sample;                                                                                \
+        { uintptr_t sample;                                                                            \
           type1 sample1;                                                                               \
           type2 sample2;                                                                               \
-          get_a_random(ulong,ulong_bitsize,sample);                                                    \
+          get_a_random(uintptr_t,pointer_bitsize,sample);                                              \
           sample1 = (type1)sample;                                                                     \
           sample2 = (type2)sample;                                                                     \
-          differences1 |= ((ulong)sample1 ^ (ulong)(type1)(sample2));                                  \
-          differences2 |= ((ulong)sample2 ^ (ulong)(type2)(sample1));                                  \
+          differences1 |= ((uintptr_t)sample1 ^ (uintptr_t)(type1)(sample2));                          \
+          differences2 |= ((uintptr_t)sample2 ^ (uintptr_t)(type2)(sample1));                          \
         }                                                                                              \
       if (differences1==0)                                                                             \
         printf("/* Casts from %s to %s is OK (does nothing). */\n",typestr2,typestr1);                 \
       else                                                                                             \
-      if (differences1 == ~(ulong)0)                                                                   \
+      if (differences1 == ~(uintptr_t)0)                                                               \
         printf("#error \"Casts from %s to %s work in an unknown way!!\"\n",typestr2,typestr1);         \
       else                                                                                             \
         printf("#error \"Casts from %s to %s modify part 0x%8lX of pointer!!\"\n",typestr2,typestr1,differences1); \
       if (differences2==0)                                                                             \
         printf("/* Casts from %s to %s is OK (does nothing). */\n",typestr1,typestr2);                 \
       else                                                                                             \
-      if (differences2 == ~(ulong)0)                                                                   \
+      if (differences2 == ~(uintptr_t)0)                                                               \
         printf("#error \"Casts from %s to %s work in an unknown way!!\"\n",typestr1,typestr2);         \
       else                                                                                             \
         printf("#error \"Casts from %s to %s modify part 0x%8lX of pointer!!\"\n",typestr1,typestr2,differences2); \