Use the more portable %lu rather than %zu
authorIan Lynagh <igloo@earth.li>
Sun, 24 May 2009 13:58:28 +0000 (13:58 +0000)
committerIan Lynagh <igloo@earth.li>
Sun, 24 May 2009 13:58:28 +0000 (13:58 +0000)
We now also need to cast the values to (unsigned long), as on some
platforms sizeof returns (unsigned int).

template-hsc.h

index 39c308a..241080b 100644 (file)
@@ -48,9 +48,9 @@
 
 #define hsc_type(t)                                         \
     if ((t)(int)(t)1.4 == (t)1.4)                           \
-        printf ("%s%zu",                                    \
+        printf ("%s%lu",                                    \
                 (t)(-1) < (t)0 ? "Int" : "Word",            \
-                sizeof (t) * 8);                            \
+                (unsigned long)sizeof (t) * 8);             \
     else                                                    \
         printf ("%s",                                       \
                 sizeof (t) >  sizeof (double) ? "LDouble" : \