reg.exe platform specific test?
Akihiro Sagawa
sagawa.aki at gmail.com
Fri Oct 17 13:01:00 CDT 2014
On Fri, 17 Oct 2014 17:45:52 +0200, Jonathan Vollebregt wrote:
> In the reg.exe tests around line 181:
>
> > verify_reg(hkey, "dword8", REG_DWORD, &dword, sizeof(dword),
> > (sizeof(long) > sizeof(DWORD)) ? 0 : TODO_REG_DATA);
>
> What's the reason for this? Is there some platform specific quirk I should be aware of?
The reason is that reg.c REG_DWORD handling code uses strtolW() for
string conversion[1]. If the value greater than LONG_MAX, strtolW()
returns LONG_MAX, so this test doesn't pass if sizeof(long) == 4.
I'm not sure all wine platform use LP64 architecture then, so I
introduce above quirks. In retrospect, 0xdeadbeefU < LONG_MAX is
easier to read, I think.
[1] http://source.winehq.org/source/programs/reg/reg.c#0145
Regards,
Akihiro Sagawa
More information about the wine-devel
mailing list