util/u_math: Fix C++ include of u_math.h on MSVC.
authorJosé Fonseca <jfonseca@vmware.com>
Tue, 8 Oct 2013 00:09:46 +0000 (17:09 -0700)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 9 Oct 2013 23:31:53 +0000 (00:31 +0100)
GNU C++ compiler declares the C99 lrint, etc. when _GNU_SOURCE is
defined, but MSVC does not.

Trivial.

src/gallium/auxiliary/util/u_math.h

index 478a4aa4d1773056eae0959654292e67c15b4ff8..30053492d8a9f5d8c5f070bd0e24075d5cdf5d62 100644 (file)
@@ -162,7 +162,7 @@ float log2f(float f)
 #endif
 
 
-#if __STDC_VERSION__ < 199901L && !defined(__cplusplus)
+#if __STDC_VERSION__ < 199901L && (!defined(__cplusplus) || !defined(_GNU_SOURCE))
 static INLINE long int
 lrint(double d)
 {