Include stdio.h and stdlib.h everywhere, and don't cook our own #define NULL.
authorEric Anholt <eric@anholt.net>
Tue, 22 Jun 2010 17:38:52 +0000 (10:38 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 22 Jun 2010 19:30:55 +0000 (12:30 -0700)
22 files changed:
ast_function.cpp
ast_to_hir.cpp
hir_field_selection.cpp
ir.h
ir_basic_block.cpp
ir_constant_expression.cpp
ir_constant_folding.cpp
ir_constant_variable.cpp
ir_copy_propagation.cpp
ir_dead_code.cpp
ir_dead_code_local.cpp
ir_expression_flattening.cpp
ir_function_can_inline.cpp
ir_function_inlining.cpp
ir_hierarchical_visitor.cpp
ir_hv_accept.cpp
ir_if_simplification.cpp
ir_print_visitor.cpp
ir_reader.cpp
ir_swizzle_swizzle.cpp
ir_variable.cpp
ir_vec_index_to_swizzle.cpp

index 279c45eac0e97f64dca09f73a8c38ee32042e370..26050977d52df469f850925dfb4666d055e6e282 100644 (file)
@@ -21,7 +21,6 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-#include <cstdio>
 #include "glsl_symbol_table.h"
 #include "ast.h"
 #include "glsl_types.h"
index dbc36660697e2d430b6a09f82369a83ec9a3ea05..aa90d4b6631679edf8107ba77d7081792d8a45b0 100644 (file)
@@ -48,7 +48,7 @@
  * As a result, my preference is to put as little C code as possible in the
  * parser (and lexer) sources.
  */
-#include <stdio.h>
+
 #include "main/imports.h"
 #include "glsl_symbol_table.h"
 #include "glsl_parser_extras.h"
index f0be84dab4ce1955109d064b15ce3bdc4ab48d26..e60ea30d7ff37026aea19745302fcaa57321b6e2 100644 (file)
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
  */
-#include <stdio.h>
+
+#include "ir.h"
 #include "main/imports.h"
 #include "symbol_table.h"
 #include "glsl_parser_extras.h"
 #include "ast.h"
 #include "glsl_types.h"
-#include "ir.h"
 
 struct ir_rvalue *
 _mesa_ast_field_selection_to_hir(const ast_expression *expr,
diff --git a/ir.h b/ir.h
index 33b6069ea5c1512c07fbda02728cc189c3f5cef6..d99453c602511866d8997f82d9d22597b7ac0782 100644 (file)
--- a/ir.h
+++ b/ir.h
@@ -26,6 +26,9 @@
 #ifndef IR_H
 #define IR_H
 
+#include <cstdio>
+#include <cstdlib>
+
 #include "list.h"
 #include "ir_visitor.h"
 #include "ir_hierarchical_visitor.h"
index 2cf37046059da0b2b892917aea2bb55c1209ee00..f9953ea42dafa47b89276472b7990b4d8025b918 100644 (file)
@@ -27,7 +27,6 @@
  * Basic block analysis of instruction streams.
  */
 
-#include <stdio.h>
 #include "ir.h"
 #include "ir_visitor.h"
 #include "ir_basic_block.h"
index 5bb592079a967cfda5788ca704fd007012b099a7..e9f04998209fd49cf4676e1225421aa0e02e2e8b 100644 (file)
@@ -33,7 +33,6 @@
  *    * Initializers for \c const variables
  */
 
-#define NULL 0
 #include <math.h>
 #include "ir.h"
 #include "ir_visitor.h"
index 5dc4a7dc654ae42d13b442e2a37a921adc62afd2..342d027bbe8a970ed26cd68315856d1cdf5c2985 100644 (file)
@@ -26,7 +26,6 @@
  * Replace constant-valued expressions with references to constant values.
  */
 
-#define NULL 0
 #include "ir.h"
 #include "ir_visitor.h"
 #include "ir_optimization.h"
index 7210c17dc773051c1507f4bc87d143b7ebc82ac5..a905474d858f3695b18a5218467cbb176a16f318 100644 (file)
@@ -32,8 +32,6 @@
  * and calls to builtin functions.
  */
 
-#include <stdio.h>
-#include <stdlib.h>
 #include "ir.h"
 #include "ir_print_visitor.h"
 #include "ir_visitor.h"
index 1c5c10d6fce8bce254609c0e8351c7cb4a5e75a8..da5998109ff4000df200a264d6822c9e1bf46b9b 100644 (file)
@@ -32,7 +32,6 @@
  * help anyway by triggering other optimizations that live in the HIR.
  */
 
-#include <stdio.h>
 #include "ir.h"
 #include "ir_visitor.h"
 #include "ir_print_visitor.h"
index 2ede7ff0cf460d1e8b5d2614c588b8a788f87b99..8465d863aa394d15a5774743ae8873fb3741ffa4 100644 (file)
@@ -27,7 +27,6 @@
  * Eliminates dead assignments and variable declarations from the code.
  */
 
-#define NULL 0
 #include "ir.h"
 #include "ir_visitor.h"
 #include "ir_expression_flattening.h"
index e83b300390bb60054545820c0390cdd7f6f2b973..344a6ebfbf5439ec6fc31a12c120fb66b231bf9a 100644 (file)
@@ -33,7 +33,6 @@
  * for assignments to variables that are never read.
  */
 
-#include <stdio.h>
 #include "ir.h"
 #include "ir_print_visitor.h"
 #include "ir_basic_block.h"
index 394a0d0432b577fd8388d09f55b758a665d4285c..3089f17ae1498c13021ada929084a39aa1230016 100644 (file)
@@ -33,7 +33,6 @@
  * instruction stream.
  */
 
-#define NULL 0
 #include "ir.h"
 #include "ir_visitor.h"
 #include "ir_expression_flattening.h"
index 3be351055dd34a6b820a27896bb2f50347f40ed1..5761a742049509e7b0a98f474848af61a327ae4c 100644 (file)
@@ -33,7 +33,6 @@
  * (0) loop surrounding the function body.
  */
 
-#define NULL 0
 #include "ir.h"
 
 class ir_function_can_inline_visitor : public ir_hierarchical_visitor {
index a501c813fb8395278c9a8e9e060845a8b705a45f..4e5604f89fe1e4c10a478cdd5f1c814d76a3ce1b 100644 (file)
@@ -27,7 +27,6 @@
  * Replaces calls to functions with the body of the function.
  */
 
-#define NULL 0
 #include "ir.h"
 #include "ir_visitor.h"
 #include "ir_function_inlining.h"
index fd77391973f74938cb959102494a584f9262d21d..11d30b4b6e7c273e9bc7a5e2f70babe763d3590b 100644 (file)
@@ -20,7 +20,7 @@
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
  */
-#define NULL 0
+
 #include "ir.h"
 #include "ir_hierarchical_visitor.h"
 
index 7c1798a051a625a0184e6c1b2215eefd37e760db..54326332724387ad8bfc67f0ea319fb93a5bbb39 100644 (file)
@@ -20,7 +20,7 @@
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
  */
-#define NULL 0
+
 #include "ir.h"
 
 /**
index 042d0b677fcf97590917e642b73e3b0d19f86113..6882ef72b95db1b4800f43d47d97cdbd7e4e1a51 100644 (file)
@@ -28,7 +28,6 @@
  * instruction stream.
  */
 
-#define NULL 0
 #include "ir.h"
 
 class ir_if_simplification_visitor : public ir_hierarchical_visitor {
index 18ff48c3b345a3e79a769bbb9db89322b2cb59e0..40fac8803c10b972da68818acfbb3c93ed2e5926 100644 (file)
@@ -20,7 +20,7 @@
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
  */
-#include <cstdio>
+
 #include "ir_print_visitor.h"
 #include "glsl_types.h"
 #include "glsl_parser_extras.h"
index 5cbce333f41a669bf3fdcef86cc13e7d54cace0e..a8ccb30999fd56460cf787ca029e26390533f500 100644 (file)
@@ -20,7 +20,7 @@
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
  */
-#include <cstdio>
+
 #include <cstdarg>
 
 extern "C" {
index 8873bef8d6100afb230948557f6c9108e44211fd..0ffb4fa3133b3934b9cbf51cb14b3df03ead423e 100644 (file)
@@ -27,7 +27,6 @@
  * Eliminates the second swizzle in a swizzle chain.
  */
 
-#include <stdio.h>
 #include "ir.h"
 #include "ir_visitor.h"
 #include "ir_optimization.h"
index 0c0d1278a41466e16b2a2527dd64d889ab595cbe..49d8e3dcfb5cca388a526143cef99effd9756084 100644 (file)
  * DEALINGS IN THE SOFTWARE.
  */
 
-#include <stdio.h>
+#include "ir.h"
 #include "glsl_parser_extras.h"
 #include "glsl_symbol_table.h"
-#include "ir.h"
 #include "builtin_variables.h"
 
 #ifndef Elements
index f0900cf70d64980a755dd484b176d677d9c1945a..cb2f6ca4097f122e5f3b11eae0a86bf84709fb0e 100644 (file)
@@ -29,7 +29,6 @@
  * and codegen backends not have to worry about this case.
  */
 
-#include <stdio.h>
 #include "ir.h"
 #include "ir_visitor.h"
 #include "ir_optimization.h"