On 12/28/2009 07:15 PM, Kai Tietz wrote:
2009/12/28 Timothy Wall <twall@users.sf.net>:
On Dec 28, 2009, at 12:50 PM, Andrew Haley wrote:
On 12/28/2009 05:16 PM, Anthony Green wrote:
It looks like the failures are related to printing long long
types.
Andrew - do you remember the origin of this addition to
ffitest.h...
Yes. See http://sourceware.org/ml/libffi-discuss/2009/msg00159.html
Summary: mingw64 can't printf a long long. According
to Timothy Wall, "PRId64" is supposed to work on mingw64.
I don't think "PRId64" is supposed to be in quotes, since it's a
macro, but I can't test atm.
Indeed, PRId64 is a macro and has not to be quoted, as otherwise
it simply gets a string, which isn't the intention here.
This use of quotes looks perfectly alright to me. What do you think
is supposed to be wrong with it? The error messages suggest that
there is some problem interpreting the printf specifier.
Index: testsuite/libffi.call/ffitest.h
===================================================================
RCS file: /cvs/libffi/libffi/testsuite/libffi.call/ffitest.h,v
retrieving revision 1.5
diff -u -r1.5 ffitest.h
--- testsuite/libffi.call/ffitest.h 22 Dec 2008 15:21:15
-0000 1.5
+++ testsuite/libffi.call/ffitest.h 16 Jun 2009 09:37:58 -0000
@@ -45,6 +45,15 @@
#endif
+/* MinGW kludge. */
+#ifdef WIN64
+#define PRIdLL "PRId64"
+#define PRIuLL "PRIu64"
+#else
+#define PRIdLL "lld"
+#define PRIuLL "llu"
+#endif