[PATCH 2/3] msvcrt: Set errno through the _matherr function.

Alex Henrie alexhenrie24 at gmail.com
Wed Aug 2 00:22:53 CDT 2017


2017-08-01 11:25 GMT-06:00 Piotr Caban <piotr.caban at gmail.com>:
> On 08/01/17 08:13, Alex Henrie wrote:
>>
>> @@ -252,7 +320,7 @@ float CDECL MSVCRT_powf( float x, float y )
>>   {
>>     /* FIXME: If x < 0 and y is not integral, set EDOM */
>>     float z = powf(x,y);
>> -  if (!finitef(z)) *MSVCRT__errno() = MSVCRT_EDOM;
>> +  if (!finitef(z)) math_error(_DOMAIN, "powf", x, 0, ret);
>
> ret is not defined here.

Good catch, thanks. I will test a 64-bit build of Wine before resubmitting.

2017-08-01 11:32 GMT-06:00 Piotr Caban <piotr.caban at gmail.com>:
> On 08/01/17 19:25, Piotr Caban wrote:
>>
>> Could you please also add exception.name tests (in this case it should be
>> set to pow instead of powf).
>
> I've done the testing incorrectly. Adding a test for exception.name value
> will be useful anyway.

I thought about testing exception.name, but then I found that on
Windows a lot of the reported names don't match the functions' real
names. For example, atanh reports itself to be asin, which is almost
certainly a bug. I'd prefer to not write tests for buggy behavior that
no application depends on. Who knows, maybe Microsoft will fix it in a
future release.

-Alex



More information about the wine-devel mailing list