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


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. Do you
really believe that "PRId64" is a width specifier in a format string?
It isn't PRId64 is a macro defined in inttypes.h, which is a string,
so please don't use quotes here in win64 case.

Cheeers,
Kai

-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination


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