anv/pipeline: Run lower_returns and inline_functions after spirv_to_nir
[mesa.git] / include / c99_math.h
index 5b01d53a83af269094b601d30a9155ffb27c432f..8a67fb133d6e26013c0e5be8e5d84d33d0a5b5e9 100644 (file)
@@ -82,7 +82,12 @@ roundf(float x)
 #endif /* _MSC_VER */
 
 
-#if __STDC_VERSION__ < 199901L && (!defined(__cplusplus) || defined(_MSC_VER))
+#if (defined(_MSC_VER) && _MSC_VER < 1800) || \
+    (!defined(_MSC_VER) && \
+     __STDC_VERSION__ < 199901L && \
+     (!defined(_XOPEN_SOURCE) || _XOPEN_SOURCE < 600) && \
+     !defined(__cplusplus))
+
 static inline long int
 lrint(double d)
 {
@@ -134,6 +139,19 @@ llrintf(float f)
 
    return rounded;
 }
+
+static inline float
+exp2f(float f)
+{
+   return powf(2.0f, f);
+}
+
+static inline double
+exp2(double d)
+{
+   return pow(2.0, d);
+}
+
 #endif /* C99 */