Use C-style system headers in C++ code to avoid issues with std:: namespace
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 10 Feb 2011 18:26:42 +0000 (10:26 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 21 Feb 2011 21:07:29 +0000 (13:07 -0800)
25 files changed:
src/glsl/ast_expr.cpp
src/glsl/ast_type.cpp
src/glsl/glsl_parser_extras.h
src/glsl/glsl_types.cpp
src/glsl/glsl_types.h
src/glsl/hir_field_selection.cpp
src/glsl/ir.h
src/glsl/ir_import_prototypes.cpp
src/glsl/ir_print_visitor.cpp
src/glsl/ir_validate.cpp
src/glsl/link_functions.cpp
src/glsl/linker.cpp
src/glsl/loop_controls.cpp
src/glsl/lower_mat_op_to_vec.cpp
src/glsl/main.cpp
src/glsl/opt_constant_propagation.cpp
src/glsl/opt_constant_variable.cpp
src/glsl/opt_dead_code.cpp
src/glsl/opt_dead_code_local.cpp
src/glsl/opt_dead_functions.cpp
src/glsl/opt_structure_splitting.cpp
src/glsl/opt_swizzle_swizzle.cpp
src/glsl/opt_tree_grafting.cpp
src/glsl/s_expression.cpp
src/mesa/program/sampler.cpp

index 974beb9f614a0223b0d4dfda6bd04926dcbabab7..e624d11cf3b271844fbe3c6c35157d188d252d49 100644 (file)
  * 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)
 {
index 5ddfeec87246172650c0a97d1e6a9dcaa3ff9fe4..c680ae5f67123f326f3ccf41c6b112fa817b9c51 100644 (file)
  * 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
 {
index 8d4fca78773d2d350e2cea678d532ed8fb98aacc..10cb673c694a6b0b67eee0bc78c5bf372ff55dd3 100644 (file)
@@ -31,7 +31,7 @@
 #ifdef __cplusplus
 
 
-#include <cstdlib>
+#include <stdlib.h>
 #include "glsl_symbol_table.h"
 
 enum _mesa_glsl_parser_targets {
index f4d9242b2571ba854034e10581d9a58405d1578b..76b4f3e4cb0e20008413ccf5524d39440d935205 100644 (file)
@@ -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"
index ab6858faac736a7c54d714455c3307cde9ef9719..61bf5e0cfd24779fee3913817214bf6fd13d1abd 100644 (file)
@@ -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"
index 995f284fa58fbaf0f4fb3925893e7edb817fed87..3c33127b5f88b004ec03996fc7faa50b78abc876 100644 (file)
@@ -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,
index 74a8b06b1a30bffd96347197675bf37afcc4766e..f2f902c0a775939a89e915cef913d909ece30134 100644 (file)
@@ -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"
index be5e0c1d3de50872c2604d13ba8843e18260ad9e..3585bf6b24bfd2e7a7b20e528a0a5ee1bdf112d2 100644 (file)
@@ -27,7 +27,6 @@
  *
  * \author Ian Romanick
  */
-#include <cstdio>
 #include "ir.h"
 #include "glsl_symbol_table.h"
 
index be76945a2178b9b8150db5d6208559946525ecae..82ccc722fa28762f4fe4fd60345450306fca9385 100644 (file)
@@ -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
index b0dd6c21f8eb196abbecb6a12b3a60163a20184c..44d7549ea285bda27b48cbf88b3fd012d565d241 100644 (file)
@@ -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()
index 861fa39b51e0abc5600a5a3e9139a3e3d6c3b74e..5851c14d624ca9b5cda61a5a2876df39562bed94 100644 (file)
  * DEALINGS IN THE SOFTWARE.
  */
 
-#include <cstdlib>
-#include <cstdio>
-#include <cstdarg>
-
 #include "main/core.h"
 #include "glsl_symbol_table.h"
 #include "glsl_parser_extras.h"
index 6c003bb025672b5bbdb1ad89b8f468199ae6bc43..7db5c5e8d5313b4c5040bad5caeb53b51862c235 100644 (file)
  *
  * \author Ian Romanick <ian.d.romanick@intel.com>
  */
-#include <cstdlib>
-#include <cstdio>
-#include <cstdarg>
-#include <climits>
 
 #include "main/core.h"
 #include "glsl_symbol_table.h"
index 9eaa50f22d45ca8d51bdcee48896387b2a9ae1e5..9acbadc50ea58f7d980ee3eaa62729c776fcb2c2 100644 (file)
@@ -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"
index bdc53a1f812d938575d755efd2594d8d83f517b7..8cbbfa713c9c448ac1b2fdbe29e1881b7ef17980 100644 (file)
@@ -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()
index 6f055293140a1d560c3896de44aacb838629a7fb..096da93dcef7480e1ccaaff6dba8635be9c8698f 100644 (file)
@@ -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"
index 814f6e61f1c3d9e17d8760a58771c93b694457e9..4425f4211934a0dd5f913e1048a2365f24419fda 100644 (file)
@@ -41,8 +41,6 @@
 #include "ir_optimization.h"
 #include "glsl_types.h"
 
-using std::memset;
-
 class acp_entry : public exec_node
 {
 public:
index 9dca0ff8e76e85a6907f3f0d87c5a54f484a2978..3fa7c3badc804c4ae5aa6d55d67876bffb18fc1d 100644 (file)
@@ -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;
index f47b9613e1964df3031ea0edb7d877bc3c0a7bb9..cb500d2d105b41f983c13cc59d6e2351daff81ff 100644 (file)
@@ -32,8 +32,6 @@
 #include "ir_variable_refcount.h"
 #include "glsl_types.h"
 
-using std::printf;
-
 static bool debug = false;
 
 /**
index f67b4633740c185618921ea6643dee911aab9b90..39962bd602ef8ba89a2ad34eba903d82cdbdc437 100644 (file)
@@ -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
index d72eb6115e19e25eb9d0e15004957421c67bd80d..ceb79080a75213a481320e083f594b134252ec2d 100644 (file)
@@ -32,8 +32,6 @@
  #include "ir_expression_flattening.h"
  #include "glsl_types.h"
 
- using std::strcmp;
-
  class signature_entry : public exec_node
  {
  public:
index 8686da06afa60d0bebcac9698b09c05fd3749318..014407c0be2f5ba30e4a5941e188964e09b1420a 100644 (file)
@@ -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
index 8d0e1051d8a7bf05a3b4debacaaaa40c7100d5f2..bc442fa86939194b124094584f26b2691fd63227 100644 (file)
@@ -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()
index a85ba82340108c0a9ab462e820f1f1428e49fc6f..1ef940f9c72bc31cf72bac01783a36042650d58b 100644 (file)
@@ -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 {
index 77ac08ac7ef4bc3a9ec7351694f5a973cfff69e6..a922a50d3b9dc1f03cafc2c2c3fd6510d75a7452 100644 (file)
@@ -22,9 +22,6 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
 #include <assert.h>
 #include "s_expression.h"
 
index 12c4a40a25fe90698692d3c5bc34092eba45bb80..1457d1199fac036d291be67e628c15bd88e458d2 100644 (file)
@@ -23,7 +23,6 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-#include <cstdio>
 #include "ir.h"
 #include "glsl_types.h"
 #include "ir_visitor.h"