summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Green <green@moxielogic.com>2018-03-27 14:12:02 -0400
committerAnthony Green <green@moxielogic.com>2018-03-27 14:12:02 -0400
commite8cf133813e7fa2c606d93abab5b68989e5f6cbc (patch)
treee52efaf53833b47c2c82ff500ca0cfc3b9c6bd74
parenta3e20940898ed2ca96b9df87f34117d06d900e5f (diff)
downloadlibffi-e8cf133813e7fa2c606d93abab5b68989e5f6cbc.tar.gz
msvc c99 hack
-rw-r--r--testsuite/libffi.call/ffitest.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/testsuite/libffi.call/ffitest.h b/testsuite/libffi.call/ffitest.h
index a823cfe..203d948 100644
--- a/testsuite/libffi.call/ffitest.h
+++ b/testsuite/libffi.call/ffitest.h
@@ -79,14 +79,12 @@
#define PRIdLL "ld"
#undef PRIuLL
#define PRIuLL "lu"
-#ifndef _MSC_VER
#define PRId8 "hd"
#define PRIu8 "hu"
#define PRId64 "ld"
#define PRIu64 "lu"
#define PRIuPTR "lu"
#endif
-#endif
/* PA HP-UX kludge. */
#if defined(__hppa__) && defined(__hpux__) && !defined(PRIuPTR)
@@ -126,12 +124,14 @@
/* MSVC kludge. */
#if defined _MSC_VER
+#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS)
#define PRIuPTR "lu"
#define PRIu8 "u"
#define PRId8 "d"
#define PRIu64 "I64u"
#define PRId64 "I64d"
#endif
+#endif
#ifndef PRIuPTR
#define PRIuPTR "u"