LONG_PTR and friends

Zebediah Figura z.figura12 at gmail.com
Wed Dec 4 12:04:00 CST 2019


On 12/4/19 11:28 AM, Jacek Caban wrote:
> Hi Zebediah,
> 
> On 11/26/19 7:48 PM, Zebediah Figura wrote:
>> * Both builtin and native msvcrt always support %I, but it's 
>> nonstandard and it spits out warnings when you try to use it when not 
>> compiling with mingw.
> 
> 
> I'd say that it looks like a nice solution. Since the warning is 
> obviously bogus, I wonder if we should just skip format attribute in 
> debug.h when __WINE_USE_MSVCRT is defined and we're not using a cross 
> compiler.

Sure, makes sense. I'll try a patch along these lines.

> 
> 
>> * We could also cast to (void *), or cast to a 64-bit type and use 
>> wine_dbgstr_longlong(), though this has the unfortunate side effect of 
>> forcing us to trace in hexadecimal.
> 
> 
> It's not related to your original problem, but for PE builds (modules 
> using -mno-cygwin to be precise), compatibility is not an issue so there 
> is no reason for using wine_dbgstr_longlong(). I think we should 
> consider using %ll* instead.

That would be nice, especially for places where it'd be more readable to 
have decimal traces than hexadecimal. I guess we'd run into warnings 
when the "long" type is used, but if we skip the format attribute as 
above we won't have anything to worry about.

(Related question: why don't we just always define __int64 to "long long"?)

> 
> 
> Thanks,
> 
> Jacek
> 
> 




More information about the wine-devel mailing list