changeset 1686:dcc48679a89e

"Fix" issues with DM_PRI* defines when compiling for Windows via MinGW.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 31 May 2018 18:19:03 +0300
parents 904904f145b4
children 383ca5f6e78b
files src/dmlib.h
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/dmlib.h	Thu May 31 17:55:40 2018 +0300
+++ b/src/dmlib.h	Thu May 31 18:19:03 2018 +0300
@@ -55,18 +55,22 @@
 // Do we have a valid arch?
 // If so, set some printf specifiers
 #if DM_ARCH == 32
-#  define DM_ARCH_32BIT    1
 #  define DM_PRIu32        "u"
 #  define DM_PRId32        "d"
 #  define DM_PRIx32        "x"
-#  define DM_PRIu64        "llu"
-#  define DM_PRId64        "lld"
-#  define DM_PRIx64        "llx"
+#  ifdef DM_WINDOWS
+#    define DM_PRIu64      "u"
+#    define DM_PRId64      "d"
+#    define DM_PRIx64      "x"
+#  else
+#    define DM_PRIu64      "llu"
+#    define DM_PRId64      "lld"
+#    define DM_PRIx64      "llx"
+#  endif
 #  define DM_PRIu_SIZE_T   "u"
 #  define DM_PRId_SSIZE_T  "d"
 #  define DM_PRIx_SIZE_T   "x"
 #elif DM_ARCH == 64
-#  define DM_ARCH_64BIT    1
 #  define DM_PRIu32        "u"
 #  define DM_PRId32        "d"
 #  define DM_PRIx32        "x"