From: Eric Anholt Date: Tue, 22 Jun 2010 17:38:52 +0000 (-0700) Subject: Include stdio.h and stdlib.h everywhere, and don't cook our own #define NULL. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ac95f2f8c88d39aaa878f61172d9748af13e2c80;p=mesa.git Include stdio.h and stdlib.h everywhere, and don't cook our own #define NULL. --- diff --git a/ast_function.cpp b/ast_function.cpp index 279c45eac0e..26050977d52 100644 --- a/ast_function.cpp +++ b/ast_function.cpp @@ -21,7 +21,6 @@ * DEALINGS IN THE SOFTWARE. */ -#include #include "glsl_symbol_table.h" #include "ast.h" #include "glsl_types.h" diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp index dbc36660697..aa90d4b6631 100644 --- a/ast_to_hir.cpp +++ b/ast_to_hir.cpp @@ -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 + #include "main/imports.h" #include "glsl_symbol_table.h" #include "glsl_parser_extras.h" diff --git a/hir_field_selection.cpp b/hir_field_selection.cpp index f0be84dab4c..e60ea30d7ff 100644 --- a/hir_field_selection.cpp +++ b/hir_field_selection.cpp @@ -20,13 +20,13 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ -#include + +#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 33b6069ea5c..d99453c6025 100644 --- a/ir.h +++ b/ir.h @@ -26,6 +26,9 @@ #ifndef IR_H #define IR_H +#include +#include + #include "list.h" #include "ir_visitor.h" #include "ir_hierarchical_visitor.h" diff --git a/ir_basic_block.cpp b/ir_basic_block.cpp index 2cf37046059..f9953ea42da 100644 --- a/ir_basic_block.cpp +++ b/ir_basic_block.cpp @@ -27,7 +27,6 @@ * Basic block analysis of instruction streams. */ -#include #include "ir.h" #include "ir_visitor.h" #include "ir_basic_block.h" diff --git a/ir_constant_expression.cpp b/ir_constant_expression.cpp index 5bb592079a9..e9f04998209 100644 --- a/ir_constant_expression.cpp +++ b/ir_constant_expression.cpp @@ -33,7 +33,6 @@ * * Initializers for \c const variables */ -#define NULL 0 #include #include "ir.h" #include "ir_visitor.h" diff --git a/ir_constant_folding.cpp b/ir_constant_folding.cpp index 5dc4a7dc654..342d027bbe8 100644 --- a/ir_constant_folding.cpp +++ b/ir_constant_folding.cpp @@ -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" diff --git a/ir_constant_variable.cpp b/ir_constant_variable.cpp index 7210c17dc77..a905474d858 100644 --- a/ir_constant_variable.cpp +++ b/ir_constant_variable.cpp @@ -32,8 +32,6 @@ * and calls to builtin functions. */ -#include -#include #include "ir.h" #include "ir_print_visitor.h" #include "ir_visitor.h" diff --git a/ir_copy_propagation.cpp b/ir_copy_propagation.cpp index 1c5c10d6fce..da5998109ff 100644 --- a/ir_copy_propagation.cpp +++ b/ir_copy_propagation.cpp @@ -32,7 +32,6 @@ * help anyway by triggering other optimizations that live in the HIR. */ -#include #include "ir.h" #include "ir_visitor.h" #include "ir_print_visitor.h" diff --git a/ir_dead_code.cpp b/ir_dead_code.cpp index 2ede7ff0cf4..8465d863aa3 100644 --- a/ir_dead_code.cpp +++ b/ir_dead_code.cpp @@ -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" diff --git a/ir_dead_code_local.cpp b/ir_dead_code_local.cpp index e83b300390b..344a6ebfbf5 100644 --- a/ir_dead_code_local.cpp +++ b/ir_dead_code_local.cpp @@ -33,7 +33,6 @@ * for assignments to variables that are never read. */ -#include #include "ir.h" #include "ir_print_visitor.h" #include "ir_basic_block.h" diff --git a/ir_expression_flattening.cpp b/ir_expression_flattening.cpp index 394a0d0432b..3089f17ae14 100644 --- a/ir_expression_flattening.cpp +++ b/ir_expression_flattening.cpp @@ -33,7 +33,6 @@ * instruction stream. */ -#define NULL 0 #include "ir.h" #include "ir_visitor.h" #include "ir_expression_flattening.h" diff --git a/ir_function_can_inline.cpp b/ir_function_can_inline.cpp index 3be351055dd..5761a742049 100644 --- a/ir_function_can_inline.cpp +++ b/ir_function_can_inline.cpp @@ -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 { diff --git a/ir_function_inlining.cpp b/ir_function_inlining.cpp index a501c813fb8..4e5604f89fe 100644 --- a/ir_function_inlining.cpp +++ b/ir_function_inlining.cpp @@ -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" diff --git a/ir_hierarchical_visitor.cpp b/ir_hierarchical_visitor.cpp index fd77391973f..11d30b4b6e7 100644 --- a/ir_hierarchical_visitor.cpp +++ b/ir_hierarchical_visitor.cpp @@ -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" diff --git a/ir_hv_accept.cpp b/ir_hv_accept.cpp index 7c1798a051a..54326332724 100644 --- a/ir_hv_accept.cpp +++ b/ir_hv_accept.cpp @@ -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" /** diff --git a/ir_if_simplification.cpp b/ir_if_simplification.cpp index 042d0b677fc..6882ef72b95 100644 --- a/ir_if_simplification.cpp +++ b/ir_if_simplification.cpp @@ -28,7 +28,6 @@ * instruction stream. */ -#define NULL 0 #include "ir.h" class ir_if_simplification_visitor : public ir_hierarchical_visitor { diff --git a/ir_print_visitor.cpp b/ir_print_visitor.cpp index 18ff48c3b34..40fac8803c1 100644 --- a/ir_print_visitor.cpp +++ b/ir_print_visitor.cpp @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ -#include + #include "ir_print_visitor.h" #include "glsl_types.h" #include "glsl_parser_extras.h" diff --git a/ir_reader.cpp b/ir_reader.cpp index 5cbce333f41..a8ccb30999f 100644 --- a/ir_reader.cpp +++ b/ir_reader.cpp @@ -20,7 +20,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ -#include + #include extern "C" { diff --git a/ir_swizzle_swizzle.cpp b/ir_swizzle_swizzle.cpp index 8873bef8d61..0ffb4fa3133 100644 --- a/ir_swizzle_swizzle.cpp +++ b/ir_swizzle_swizzle.cpp @@ -27,7 +27,6 @@ * Eliminates the second swizzle in a swizzle chain. */ -#include #include "ir.h" #include "ir_visitor.h" #include "ir_optimization.h" diff --git a/ir_variable.cpp b/ir_variable.cpp index 0c0d1278a41..49d8e3dcfb5 100644 --- a/ir_variable.cpp +++ b/ir_variable.cpp @@ -21,10 +21,9 @@ * DEALINGS IN THE SOFTWARE. */ -#include +#include "ir.h" #include "glsl_parser_extras.h" #include "glsl_symbol_table.h" -#include "ir.h" #include "builtin_variables.h" #ifndef Elements diff --git a/ir_vec_index_to_swizzle.cpp b/ir_vec_index_to_swizzle.cpp index f0900cf70d6..cb2f6ca4097 100644 --- a/ir_vec_index_to_swizzle.cpp +++ b/ir_vec_index_to_swizzle.cpp @@ -29,7 +29,6 @@ * and codegen backends not have to worry about this case. */ -#include #include "ir.h" #include "ir_visitor.h" #include "ir_optimization.h"