Include stdio.h and stdlib.h everywhere, and don't cook our own #define NULL.

This commit is contained in:
Eric Anholt
2010-06-22 10:38:52 -07:00
committed by Ian Romanick
parent b302359394
commit ac95f2f8c8
22 changed files with 11 additions and 24 deletions

View File

@@ -21,7 +21,6 @@
* DEALINGS IN THE SOFTWARE. * DEALINGS IN THE SOFTWARE.
*/ */
#include <cstdio>
#include "glsl_symbol_table.h" #include "glsl_symbol_table.h"
#include "ast.h" #include "ast.h"
#include "glsl_types.h" #include "glsl_types.h"

View File

@@ -48,7 +48,7 @@
* As a result, my preference is to put as little C code as possible in the * As a result, my preference is to put as little C code as possible in the
* parser (and lexer) sources. * parser (and lexer) sources.
*/ */
#include <stdio.h>
#include "main/imports.h" #include "main/imports.h"
#include "glsl_symbol_table.h" #include "glsl_symbol_table.h"
#include "glsl_parser_extras.h" #include "glsl_parser_extras.h"

View File

@@ -20,13 +20,13 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE. * DEALINGS IN THE SOFTWARE.
*/ */
#include <stdio.h>
#include "ir.h"
#include "main/imports.h" #include "main/imports.h"
#include "symbol_table.h" #include "symbol_table.h"
#include "glsl_parser_extras.h" #include "glsl_parser_extras.h"
#include "ast.h" #include "ast.h"
#include "glsl_types.h" #include "glsl_types.h"
#include "ir.h"
struct ir_rvalue * struct ir_rvalue *
_mesa_ast_field_selection_to_hir(const ast_expression *expr, _mesa_ast_field_selection_to_hir(const ast_expression *expr,

3
ir.h
View File

@@ -26,6 +26,9 @@
#ifndef IR_H #ifndef IR_H
#define IR_H #define IR_H
#include <cstdio>
#include <cstdlib>
#include "list.h" #include "list.h"
#include "ir_visitor.h" #include "ir_visitor.h"
#include "ir_hierarchical_visitor.h" #include "ir_hierarchical_visitor.h"

View File

@@ -27,7 +27,6 @@
* Basic block analysis of instruction streams. * Basic block analysis of instruction streams.
*/ */
#include <stdio.h>
#include "ir.h" #include "ir.h"
#include "ir_visitor.h" #include "ir_visitor.h"
#include "ir_basic_block.h" #include "ir_basic_block.h"

View File

@@ -33,7 +33,6 @@
* * Initializers for \c const variables * * Initializers for \c const variables
*/ */
#define NULL 0
#include <math.h> #include <math.h>
#include "ir.h" #include "ir.h"
#include "ir_visitor.h" #include "ir_visitor.h"

View File

@@ -26,7 +26,6 @@
* Replace constant-valued expressions with references to constant values. * Replace constant-valued expressions with references to constant values.
*/ */
#define NULL 0
#include "ir.h" #include "ir.h"
#include "ir_visitor.h" #include "ir_visitor.h"
#include "ir_optimization.h" #include "ir_optimization.h"

View File

@@ -32,8 +32,6 @@
* and calls to builtin functions. * and calls to builtin functions.
*/ */
#include <stdio.h>
#include <stdlib.h>
#include "ir.h" #include "ir.h"
#include "ir_print_visitor.h" #include "ir_print_visitor.h"
#include "ir_visitor.h" #include "ir_visitor.h"

View File

@@ -32,7 +32,6 @@
* help anyway by triggering other optimizations that live in the HIR. * help anyway by triggering other optimizations that live in the HIR.
*/ */
#include <stdio.h>
#include "ir.h" #include "ir.h"
#include "ir_visitor.h" #include "ir_visitor.h"
#include "ir_print_visitor.h" #include "ir_print_visitor.h"

View File

@@ -27,7 +27,6 @@
* Eliminates dead assignments and variable declarations from the code. * Eliminates dead assignments and variable declarations from the code.
*/ */
#define NULL 0
#include "ir.h" #include "ir.h"
#include "ir_visitor.h" #include "ir_visitor.h"
#include "ir_expression_flattening.h" #include "ir_expression_flattening.h"

View File

@@ -33,7 +33,6 @@
* for assignments to variables that are never read. * for assignments to variables that are never read.
*/ */
#include <stdio.h>
#include "ir.h" #include "ir.h"
#include "ir_print_visitor.h" #include "ir_print_visitor.h"
#include "ir_basic_block.h" #include "ir_basic_block.h"

View File

@@ -33,7 +33,6 @@
* instruction stream. * instruction stream.
*/ */
#define NULL 0
#include "ir.h" #include "ir.h"
#include "ir_visitor.h" #include "ir_visitor.h"
#include "ir_expression_flattening.h" #include "ir_expression_flattening.h"

View File

@@ -33,7 +33,6 @@
* (0) loop surrounding the function body. * (0) loop surrounding the function body.
*/ */
#define NULL 0
#include "ir.h" #include "ir.h"
class ir_function_can_inline_visitor : public ir_hierarchical_visitor { class ir_function_can_inline_visitor : public ir_hierarchical_visitor {

View File

@@ -27,7 +27,6 @@
* Replaces calls to functions with the body of the function. * Replaces calls to functions with the body of the function.
*/ */
#define NULL 0
#include "ir.h" #include "ir.h"
#include "ir_visitor.h" #include "ir_visitor.h"
#include "ir_function_inlining.h" #include "ir_function_inlining.h"

View File

@@ -20,7 +20,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE. * DEALINGS IN THE SOFTWARE.
*/ */
#define NULL 0
#include "ir.h" #include "ir.h"
#include "ir_hierarchical_visitor.h" #include "ir_hierarchical_visitor.h"

View File

@@ -20,7 +20,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE. * DEALINGS IN THE SOFTWARE.
*/ */
#define NULL 0
#include "ir.h" #include "ir.h"
/** /**

View File

@@ -28,7 +28,6 @@
* instruction stream. * instruction stream.
*/ */
#define NULL 0
#include "ir.h" #include "ir.h"
class ir_if_simplification_visitor : public ir_hierarchical_visitor { class ir_if_simplification_visitor : public ir_hierarchical_visitor {

View File

@@ -20,7 +20,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE. * DEALINGS IN THE SOFTWARE.
*/ */
#include <cstdio>
#include "ir_print_visitor.h" #include "ir_print_visitor.h"
#include "glsl_types.h" #include "glsl_types.h"
#include "glsl_parser_extras.h" #include "glsl_parser_extras.h"

View File

@@ -20,7 +20,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE. * DEALINGS IN THE SOFTWARE.
*/ */
#include <cstdio>
#include <cstdarg> #include <cstdarg>
extern "C" { extern "C" {

View File

@@ -27,7 +27,6 @@
* Eliminates the second swizzle in a swizzle chain. * Eliminates the second swizzle in a swizzle chain.
*/ */
#include <stdio.h>
#include "ir.h" #include "ir.h"
#include "ir_visitor.h" #include "ir_visitor.h"
#include "ir_optimization.h" #include "ir_optimization.h"

View File

@@ -21,10 +21,9 @@
* DEALINGS IN THE SOFTWARE. * DEALINGS IN THE SOFTWARE.
*/ */
#include <stdio.h> #include "ir.h"
#include "glsl_parser_extras.h" #include "glsl_parser_extras.h"
#include "glsl_symbol_table.h" #include "glsl_symbol_table.h"
#include "ir.h"
#include "builtin_variables.h" #include "builtin_variables.h"
#ifndef Elements #ifndef Elements

View File

@@ -29,7 +29,6 @@
* and codegen backends not have to worry about this case. * and codegen backends not have to worry about this case.
*/ */
#include <stdio.h>
#include "ir.h" #include "ir.h"
#include "ir_visitor.h" #include "ir_visitor.h"
#include "ir_optimization.h" #include "ir_optimization.h"