This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Testresults of libffi-3.0.9rc10 for x64 mingw target



On Dec 29, 2009, at 3:01 AM, Kai Tietz wrote:


2009/12/28 Andrew Haley <aph@redhat.com>:
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.

Andrew.



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

Please take a look toe the PRIdLL for Non-WIN64 (and please use _WIN64 as this is defined by compiler!!), and the Win64 version.

I think _WIN64 is used upstream to define WIN64. I built with both msvc and gcc, but only ever ran the tetsuite with gcc.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]