* src/threads/threadlist.hpp (ThreadList): Adapted thread counting methods to
[cacao.git] / src / vm / global.h
index 33b7fb1e7ecd32cae73c00b1d1155bc902e12e16..45287193b1bcab37471c04ca56d04be3132fc8e4 100644 (file)
@@ -77,8 +77,10 @@ typedef union {
 /* Define printf formats which change size between 32- and 64-bit. */
 
 #if SIZEOF_VOID_P == 8
+# define PRINTF_FORMAT_INTPTR_T   "0x%016lx"
 # define PRINTF_FORMAT_INT64_T    "%ld"
 #else
+# define PRINTF_FORMAT_INTPTR_T   "0x%08lx"
 # define PRINTF_FORMAT_INT64_T    "%lld"
 #endif
 
@@ -89,6 +91,16 @@ typedef union {
 
 #define STR(a)  #a
 
+/* There are multiple definitions of MIN out there, but we cannot be sure. */
+
+#ifndef MIN
+# define MIN(a,b)  (((a) < (b)) ? (a) : (b))
+#endif
+
+#ifndef MAX
+# define MAX(a,b)  (((a) > (b)) ? (a) : (b))
+#endif
+
 
 /* forward typedefs ***********************************************************/