msvcrt: Add INFINITY and NAN definitions to math.h.

Jacek Caban jacek at codeweavers.com
Sat Jan 11 03:37:34 CST 2014


On 1/10/14 5:44 PM, Francois Gouget wrote:
> On Fri, 10 Jan 2014, Jacek Caban wrote:
> [...]
>> Looking at how it's done in my Linux headers, there is
>> __builtin_nanf() and __builtin_inff() guarded by GCC >= 3.3 that we
>> could use.
> This would work on Linux. But the Solaris headers don't define NAN which
> is what uncovered this problem in the first place... In other words the
> msvcrt headers cannot rely on the system headers to define INFINITY and
> NAN.

__builtin_* stuff is compiler, not OS, dependent, so this should work on 
Solaris when GCC is used. We still have to use __port_nan()-like 
solution as a fallback for compilers that we can't support other way, 
but IMO we should try harder to provide a better definition.

Jacek



More information about the wine-devel mailing list