+/* printf format defines ******************************************************/
+
+/* 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
+
+
+/* convenience macros *********************************************************/
+
+/* Makes a string of the argument (which is not macro-expanded). */
+
+#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
+
+