summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-02-10 10:26:42 -0800
committerIan Romanick <[email protected]>2011-02-21 13:07:29 -0800
commit497baf4e4a6a0a2f247c7bfb9bf69a2b93c2c19f (patch)
tree37859f056fb13140fabe45a26bb129ddd0014fc3
parent5a1fbf0f70a1c2d444f61494f86e26ca866c31d5 (diff)
Use C-style system headers in C++ code to avoid issues with std:: namespace
-rw-r--r--src/glsl/ast_expr.cpp5
-rw-r--r--src/glsl/ast_type.cpp3
-rw-r--r--src/glsl/glsl_parser_extras.h2
-rw-r--r--src/glsl/glsl_types.cpp2
-rw-r--r--src/glsl/glsl_types.h4
-rw-r--r--src/glsl/hir_field_selection.cpp2
-rw-r--r--src/glsl/ir.h4
-rw-r--r--src/glsl/ir_import_prototypes.cpp1
-rw-r--r--src/glsl/ir_print_visitor.cpp3
-rw-r--r--src/glsl/ir_validate.cpp3
-rw-r--r--src/glsl/link_functions.cpp4
-rw-r--r--src/glsl/linker.cpp4
-rw-r--r--src/glsl/loop_controls.cpp2
-rw-r--r--src/glsl/lower_mat_op_to_vec.cpp3
-rw-r--r--src/glsl/main.cpp2
-rw-r--r--src/glsl/opt_constant_propagation.cpp2
-rw-r--r--src/glsl/opt_constant_variable.cpp3
-rw-r--r--src/glsl/opt_dead_code.cpp2
-rw-r--r--src/glsl/opt_dead_code_local.cpp2
-rw-r--r--src/glsl/opt_dead_functions.cpp2
-rw-r--r--src/glsl/opt_structure_splitting.cpp3
-rw-r--r--src/glsl/opt_swizzle_swizzle.cpp2
-rw-r--r--src/glsl/opt_tree_grafting.cpp2
-rw-r--r--src/glsl/s_expression.cpp3
-rw-r--r--src/mesa/program/sampler.cpp1
25 files changed, 8 insertions, 58 deletions
diff --git a/src/glsl/ast_expr.cpp b/src/glsl/ast_expr.cpp
index 974beb9f614..e624d11cf3b 100644
--- a/src/glsl/ast_expr.cpp
+++ b/src/glsl/ast_expr.cpp
@@ -20,12 +20,9 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
-#include <cstdio>
-#include <cassert>
+#include <assert.h>
#include "ast.h"
-using std::printf;
-
const char *
ast_expression::operator_string(enum ast_operators op)
{
diff --git a/src/glsl/ast_type.cpp b/src/glsl/ast_type.cpp
index 5ddfeec8724..c680ae5f671 100644
--- a/src/glsl/ast_type.cpp
+++ b/src/glsl/ast_type.cpp
@@ -21,14 +21,11 @@
* DEALINGS IN THE SOFTWARE.
*/
-#include <cstdio>
#include "ast.h"
extern "C" {
#include "program/symbol_table.h"
}
-using std::printf;
-
void
ast_type_specifier::print(void) const
{
diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h
index 8d4fca78773..10cb673c694 100644
--- a/src/glsl/glsl_parser_extras.h
+++ b/src/glsl/glsl_parser_extras.h
@@ -31,7 +31,7 @@
#ifdef __cplusplus
-#include <cstdlib>
+#include <stdlib.h>
#include "glsl_symbol_table.h"
enum _mesa_glsl_parser_targets {
diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp
index f4d9242b257..76b4f3e4cb0 100644
--- a/src/glsl/glsl_types.cpp
+++ b/src/glsl/glsl_types.cpp
@@ -21,7 +21,7 @@
* DEALINGS IN THE SOFTWARE.
*/
-#include <cstdio>
+#include <stdio.h>
#include <stdlib.h>
#include "main/core.h" /* for Elements */
#include "glsl_symbol_table.h"
diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h
index ab6858faac7..61bf5e0cfd2 100644
--- a/src/glsl/glsl_types.h
+++ b/src/glsl/glsl_types.h
@@ -26,8 +26,8 @@
#ifndef GLSL_TYPES_H
#define GLSL_TYPES_H
-#include <cstring>
-#include <cassert>
+#include <string.h>
+#include <assert.h>
extern "C" {
#include "GL/gl.h"
diff --git a/src/glsl/hir_field_selection.cpp b/src/glsl/hir_field_selection.cpp
index 995f284fa58..3c33127b5f8 100644
--- a/src/glsl/hir_field_selection.cpp
+++ b/src/glsl/hir_field_selection.cpp
@@ -27,8 +27,6 @@
#include "ast.h"
#include "glsl_types.h"
-using std::strcmp;
-
ir_rvalue *
_mesa_ast_field_selection_to_hir(const ast_expression *expr,
exec_list *instructions,
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index 74a8b06b1a3..f2f902c0a77 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -26,8 +26,8 @@
#ifndef IR_H
#define IR_H
-#include <cstdio>
-#include <cstdlib>
+#include <stdio.h>
+#include <stdlib.h>
#include "ralloc.h"
#include "glsl_types.h"
diff --git a/src/glsl/ir_import_prototypes.cpp b/src/glsl/ir_import_prototypes.cpp
index be5e0c1d3de..3585bf6b24b 100644
--- a/src/glsl/ir_import_prototypes.cpp
+++ b/src/glsl/ir_import_prototypes.cpp
@@ -27,7 +27,6 @@
*
* \author Ian Romanick
*/
-#include <cstdio>
#include "ir.h"
#include "glsl_symbol_table.h"
diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp
index be76945a217..82ccc722fa2 100644
--- a/src/glsl/ir_print_visitor.cpp
+++ b/src/glsl/ir_print_visitor.cpp
@@ -25,9 +25,6 @@
#include "glsl_types.h"
#include "glsl_parser_extras.h"
-using std::printf;
-using std::strncmp;
-
static void print_type(const glsl_type *t);
void
diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp
index b0dd6c21f8e..44d7549ea28 100644
--- a/src/glsl/ir_validate.cpp
+++ b/src/glsl/ir_validate.cpp
@@ -39,9 +39,6 @@
#include "program/hash_table.h"
#include "glsl_types.h"
-using std::abort;
-using std::printf;
-
class ir_validate : public ir_hierarchical_visitor {
public:
ir_validate()
diff --git a/src/glsl/link_functions.cpp b/src/glsl/link_functions.cpp
index 861fa39b51e..5851c14d624 100644
--- a/src/glsl/link_functions.cpp
+++ b/src/glsl/link_functions.cpp
@@ -21,10 +21,6 @@
* DEALINGS IN THE SOFTWARE.
*/
-#include <cstdlib>
-#include <cstdio>
-#include <cstdarg>
-
#include "main/core.h"
#include "glsl_symbol_table.h"
#include "glsl_parser_extras.h"
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 6c003bb0256..7db5c5e8d53 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -63,10 +63,6 @@
*
* \author Ian Romanick <[email protected]>
*/
-#include <cstdlib>
-#include <cstdio>
-#include <cstdarg>
-#include <climits>
#include "main/core.h"
#include "glsl_symbol_table.h"
diff --git a/src/glsl/loop_controls.cpp b/src/glsl/loop_controls.cpp
index 9eaa50f22d4..9acbadc50ea 100644
--- a/src/glsl/loop_controls.cpp
+++ b/src/glsl/loop_controls.cpp
@@ -21,7 +21,7 @@
* DEALINGS IN THE SOFTWARE.
*/
-#include <climits>
+#include <limits.h>
#include "main/compiler.h"
#include "glsl_types.h"
#include "loop_analysis.h"
diff --git a/src/glsl/lower_mat_op_to_vec.cpp b/src/glsl/lower_mat_op_to_vec.cpp
index bdc53a1f812..8cbbfa713c9 100644
--- a/src/glsl/lower_mat_op_to_vec.cpp
+++ b/src/glsl/lower_mat_op_to_vec.cpp
@@ -35,9 +35,6 @@
#include "ir_expression_flattening.h"
#include "glsl_types.h"
-using std::abort;
-using std::printf;
-
class ir_mat_op_to_vec_visitor : public ir_hierarchical_visitor {
public:
ir_mat_op_to_vec_visitor()
diff --git a/src/glsl/main.cpp b/src/glsl/main.cpp
index 6f055293140..096da93dcef 100644
--- a/src/glsl/main.cpp
+++ b/src/glsl/main.cpp
@@ -20,8 +20,6 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
-#include <cstdlib>
-#include <cstdio>
#include <getopt.h>
#include "ast.h"
diff --git a/src/glsl/opt_constant_propagation.cpp b/src/glsl/opt_constant_propagation.cpp
index 814f6e61f1c..4425f421193 100644
--- a/src/glsl/opt_constant_propagation.cpp
+++ b/src/glsl/opt_constant_propagation.cpp
@@ -41,8 +41,6 @@
#include "ir_optimization.h"
#include "glsl_types.h"
-using std::memset;
-
class acp_entry : public exec_node
{
public:
diff --git a/src/glsl/opt_constant_variable.cpp b/src/glsl/opt_constant_variable.cpp
index 9dca0ff8e76..3fa7c3badc8 100644
--- a/src/glsl/opt_constant_variable.cpp
+++ b/src/glsl/opt_constant_variable.cpp
@@ -37,9 +37,6 @@
#include "ir_optimization.h"
#include "glsl_types.h"
-using std::calloc;
-using std::free;
-
struct assignment_entry {
exec_node link;
int assignment_count;
diff --git a/src/glsl/opt_dead_code.cpp b/src/glsl/opt_dead_code.cpp
index f47b9613e19..cb500d2d105 100644
--- a/src/glsl/opt_dead_code.cpp
+++ b/src/glsl/opt_dead_code.cpp
@@ -32,8 +32,6 @@
#include "ir_variable_refcount.h"
#include "glsl_types.h"
-using std::printf;
-
static bool debug = false;
/**
diff --git a/src/glsl/opt_dead_code_local.cpp b/src/glsl/opt_dead_code_local.cpp
index f67b4633740..39962bd602e 100644
--- a/src/glsl/opt_dead_code_local.cpp
+++ b/src/glsl/opt_dead_code_local.cpp
@@ -38,8 +38,6 @@
#include "ir_optimization.h"
#include "glsl_types.h"
-using std::printf;
-
static bool debug = false;
class assignment_entry : public exec_node
diff --git a/src/glsl/opt_dead_functions.cpp b/src/glsl/opt_dead_functions.cpp
index d72eb6115e1..ceb79080a75 100644
--- a/src/glsl/opt_dead_functions.cpp
+++ b/src/glsl/opt_dead_functions.cpp
@@ -32,8 +32,6 @@
#include "ir_expression_flattening.h"
#include "glsl_types.h"
- using std::strcmp;
-
class signature_entry : public exec_node
{
public:
diff --git a/src/glsl/opt_structure_splitting.cpp b/src/glsl/opt_structure_splitting.cpp
index 8686da06afa..014407c0be2 100644
--- a/src/glsl/opt_structure_splitting.cpp
+++ b/src/glsl/opt_structure_splitting.cpp
@@ -38,9 +38,6 @@
#include "ir_rvalue_visitor.h"
#include "glsl_types.h"
-using std::printf;
-using std::strcmp;
-
static bool debug = false;
// XXX using variable_entry2 here to avoid collision (MSVC multiply-defined
diff --git a/src/glsl/opt_swizzle_swizzle.cpp b/src/glsl/opt_swizzle_swizzle.cpp
index 8d0e1051d8a..bc442fa8693 100644
--- a/src/glsl/opt_swizzle_swizzle.cpp
+++ b/src/glsl/opt_swizzle_swizzle.cpp
@@ -32,8 +32,6 @@
#include "ir_optimization.h"
#include "glsl_types.h"
-using std::memset;
-
class ir_swizzle_swizzle_visitor : public ir_hierarchical_visitor {
public:
ir_swizzle_swizzle_visitor()
diff --git a/src/glsl/opt_tree_grafting.cpp b/src/glsl/opt_tree_grafting.cpp
index a85ba823401..1ef940f9c72 100644
--- a/src/glsl/opt_tree_grafting.cpp
+++ b/src/glsl/opt_tree_grafting.cpp
@@ -54,8 +54,6 @@
#include "ir_optimization.h"
#include "glsl_types.h"
-using std::printf;
-
static bool debug = false;
class ir_tree_grafting_visitor : public ir_hierarchical_visitor {
diff --git a/src/glsl/s_expression.cpp b/src/glsl/s_expression.cpp
index 77ac08ac7ef..a922a50d3b9 100644
--- a/src/glsl/s_expression.cpp
+++ b/src/glsl/s_expression.cpp
@@ -22,9 +22,6 @@
* DEALINGS IN THE SOFTWARE.
*/
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
#include <assert.h>
#include "s_expression.h"
diff --git a/src/mesa/program/sampler.cpp b/src/mesa/program/sampler.cpp
index 12c4a40a25f..1457d1199fa 100644
--- a/src/mesa/program/sampler.cpp
+++ b/src/mesa/program/sampler.cpp
@@ -23,7 +23,6 @@
* DEALINGS IN THE SOFTWARE.
*/
-#include <cstdio>
#include "ir.h"
#include "glsl_types.h"
#include "ir_visitor.h"