summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamie Madill <jmadill@chromium.org>2013-11-01 17:45:04 -0400
committerJamie Madill <jmadill@chromium.org>2013-11-01 17:45:04 -0400
commit9c318342233f68b915d39c8f1f181b9ef545c4db (patch)
tree86ac383ef2973ca8a07983e2da332de4887cc80a
parent4b48845f74fb54052a6b693c62d269d0952d4289 (diff)
downloadangle_dx11-9c318342233f68b915d39c8f1f181b9ef545c4db.tar.gz
Fix build on QNX.
InfoSink.h needs stdlib.h for abs(int) and free() in the global namespace. ExpressionParser needs malloc.h, because bison needs malloc and free in the global namespace, but "#include <cassert>" will put it only in the std:: namespace on QNX. BUG=500 R=geofflang@chromium.org, jmadill@chromium.org, shannonwoods@chromium.org, zmo@chromium.org Review URL: https://codereview.appspot.com/19330044
-rw-r--r--src/compiler/preprocessor/ExpressionParser.cpp5
-rw-r--r--src/compiler/preprocessor/ExpressionParser.y5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/compiler/preprocessor/ExpressionParser.cpp b/src/compiler/preprocessor/ExpressionParser.cpp
index 2fcda35b..06c94382 100644
--- a/src/compiler/preprocessor/ExpressionParser.cpp
+++ b/src/compiler/preprocessor/ExpressionParser.cpp
@@ -92,7 +92,12 @@
#include "ExpressionParser.h"
+#if defined(_MSC_VER)
#include <malloc.h>
+#else
+#include <stdlib.h>
+#endif
+
#include <cassert>
#include <sstream>
diff --git a/src/compiler/preprocessor/ExpressionParser.y b/src/compiler/preprocessor/ExpressionParser.y
index bb2e81a4..27ed6ad5 100644
--- a/src/compiler/preprocessor/ExpressionParser.y
+++ b/src/compiler/preprocessor/ExpressionParser.y
@@ -33,7 +33,12 @@ WHICH GENERATES THE GLSL ES preprocessor expression parser.
#include "ExpressionParser.h"
+#if defined(_MSC_VER)
#include <malloc.h>
+#else
+#include <stdlib.h>
+#endif
+
#include <cassert>
#include <sstream>