glsl: add AoA support for atomic counters
[mesa.git] / src / glsl / s_expression.cpp
index 1a28e1d5248c637b3dd2b8cc01851e388f28c49a..f82e155a6b6af09a3514edddcd09006bacba67ca 100644 (file)
@@ -23,7 +23,8 @@
  */
 
 #include <assert.h>
-#include <limits>
+#include <stdio.h>
+#include <math.h>
 #include "s_expression.h"
 
 s_symbol::s_symbol(const char *str, size_t n)
@@ -69,11 +70,11 @@ read_atom(void *ctx, const char *&src, char *&symbol_buffer)
    // requires strtof to parse '+INF' as +Infinity, but we still support some
    // non-C99-compliant compilers (e.g. MSVC).
    if (n == 4 && strncmp(src, "+INF", 4) == 0) {
-      expr = new(ctx) s_float(std::numeric_limits<float>::infinity());
+      expr = new(ctx) s_float(INFINITY);
    } else {
       // Check if the atom is a number.
       char *float_end = NULL;
-      float f = glsl_strtof(src, &float_end);
+      float f = _mesa_strtof(src, &float_end);
       if (float_end != src) {
          char *int_end = NULL;
          int i = strtol(src, &int_end, 10);