Bug 44767

Summary: isinf() doesn't compile with MSVC.
Product: Mesa Reporter: morgan.devel
Component: glsl-compilerAssignee: Paul Berry <stereotype441>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Proposed fix

Description morgan.devel 2012-01-14 00:29:30 UTC
isinf() doesn't compile on MSVC because strtod() doesn't parse +INF/-INF tags (these are C99 extensions).
Comment 1 Paul Berry 2012-01-17 10:43:43 UTC
Created attachment 55692 [details] [review]
Proposed fix

Could you please try this patch and let me know if it fixes the problem?
Comment 2 morgan.devel 2012-01-18 09:35:51 UTC
Unfortunately, INFINITY macro is C99 too. Apart from that the patch works correctly (I tried with std::numeric_limits<float>::infinity()).
Comment 3 Paul Berry 2012-01-18 12:35:27 UTC
(In reply to comment #2)
> Unfortunately, INFINITY macro is C99 too. Apart from that the patch works
> correctly (I tried with std::numeric_limits<float>::infinity()).

Ok, thanks.  I've updated the patch and posted it to the mailing list for review: http://lists.freedesktop.org/archives/mesa-dev/2012-January/017739.html
Comment 4 Paul Berry 2012-01-19 18:49:40 UTC
Fixed in commit 4f82fed49359676fc19598f8c65ca51958dd2d79

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.