[Mesa-dev] [PATCH 08/12] mesa: remove powf macro

Brian Paul brianp at vmware.com
Tue Feb 24 08:57:32 PST 2015


Use the wrapper in c99_math.h if needed.
---
 src/mesa/main/imports.h    | 1 -
 src/mesa/main/light.c      | 1 +
 src/mesa/tnl/t_rasterpos.c | 1 +
 src/mesa/tnl/t_vb_light.c  | 2 +-
 4 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 6747611..1a69fe7 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -102,7 +102,6 @@ typedef union { GLfloat f; GLint i; GLuint u; } fi_type;
 #define floorf(f) ((float) floor(f))
 #define logf(f) ((float) log(f))
 
-#define powf(x,y) ((float) pow(x,y))
 #define sqrtf(f) ((float) sqrt(f))
 #endif
 
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index 7a1afd9..9db0bff 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -24,6 +24,7 @@
  */
 
 
+#include "c99_math.h"
 #include "glheader.h"
 #include "imports.h"
 #include "context.h"
diff --git a/src/mesa/tnl/t_rasterpos.c b/src/mesa/tnl/t_rasterpos.c
index 2f52bb3..5945f64 100644
--- a/src/mesa/tnl/t_rasterpos.c
+++ b/src/mesa/tnl/t_rasterpos.c
@@ -23,6 +23,7 @@
  */
 
 
+#include "c99_math.h"
 #include "main/glheader.h"
 #include "main/colormac.h"
 #include "main/feedback.h"
diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c
index 7e76ed4..7781b6a 100644
--- a/src/mesa/tnl/t_vb_light.c
+++ b/src/mesa/tnl/t_vb_light.c
@@ -23,7 +23,7 @@
  */
 
 
-
+#include "c99_math.h"
 #include "main/glheader.h"
 #include "main/colormac.h"
 #include "main/light.h"
-- 
1.9.1



More information about the mesa-dev mailing list