I thought there was a long somewhere but I couldn't figure out where. I also had no idea why I had to change it to 0 in my tests but knowing that it's obvious: I use strtoulW.
A new set of reg patches including binary/big_endian/expand/multi tests will be coming as soon as testbot gives me the all clear.
On 10/17/2014 08:01 PM, Akihiro Sagawa wrote:
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