This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
[PATCH 2/6] Add kludge for missing format specifiers on MSVC
- From: Peter Rosin <peda at lysator dot liu dot se>
- To: libffi-discuss at sourceware dot org
- Cc: Peter Rosin <peda at lysator dot liu dot se>
- Date: Fri, 23 Mar 2012 00:25:27 +0100
- Subject: [PATCH 2/6] Add kludge for missing format specifiers on MSVC
- References: <1332458731-15004-1-git-send-email-peda@lysator.liu.se>
---
ChangeLog | 5 +++++
testsuite/libffi.call/ffitest.h | 9 +++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 70ecba9..2d03e59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2012-03-22 Peter Rosin <peda@lysator.liu.se>
+ * testsuite/libffi.call/ffitest.h [MSVC]: Add kludge for missing
+ bits in the MSVC headers.
+
+2012-03-22 Peter Rosin <peda@lysator.liu.se>
+
* testsuite/libffi.call/cls_12byte.c: Adjust to the C89 style
with no declarations after statements.
* testsuite/libffi.call/cls_16byte.c: Likewise.
diff --git a/testsuite/libffi.call/ffitest.h b/testsuite/libffi.call/ffitest.h
index 0e95e16..ecda068 100644
--- a/testsuite/libffi.call/ffitest.h
+++ b/testsuite/libffi.call/ffitest.h
@@ -110,6 +110,15 @@
#endif
#endif
+/* MSVC kludge. */
+#if defined _MSC_VER
+#define PRIuPTR "lu"
+#define PRIu8 "u"
+#define PRId8 "d"
+#define PRIu64 "I64u"
+#define PRId64 "I64d"
+#endif
+
#ifdef USING_MMAP
static inline void *
allocate_mmap (size_t size)
--
1.7.9