From 3d6012303c3ce24c75d209267e6914f706d025c5 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 24 Jun 2010 17:08:53 -0700 Subject: glsl2: Wrap includes of C interfaces with extern "C". --- src/glsl/ast_type.cpp | 2 ++ src/glsl/glsl_symbol_table.h | 2 ++ src/glsl/glsl_types.cpp | 3 ++- src/glsl/ir_clone.cpp | 2 ++ src/glsl/ir_function_inlining.cpp | 2 ++ src/glsl/ir_validate.cpp | 2 ++ src/glsl/linker.cpp | 2 ++ 7 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/glsl/ast_type.cpp b/src/glsl/ast_type.cpp index cb0852bb773..49dfde20e97 100644 --- a/src/glsl/ast_type.cpp +++ b/src/glsl/ast_type.cpp @@ -23,7 +23,9 @@ #include #include "ast.h" +extern "C" { #include "symbol_table.h" +} void ast_type_specifier::print(void) const diff --git a/src/glsl/glsl_symbol_table.h b/src/glsl/glsl_symbol_table.h index ae2fd3f4f1f..8fbc66c974d 100644 --- a/src/glsl/glsl_symbol_table.h +++ b/src/glsl/glsl_symbol_table.h @@ -28,7 +28,9 @@ #include +extern "C" { #include "symbol_table.h" +} #include "ir.h" #include "glsl_types.h" diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp index bef267fa6be..9a53fbdbcb4 100644 --- a/src/glsl/glsl_types.cpp +++ b/src/glsl/glsl_types.cpp @@ -27,8 +27,9 @@ #include "glsl_parser_extras.h" #include "glsl_types.h" #include "builtin_types.h" +extern "C" { #include "hash_table.h" - +} hash_table *glsl_type::array_types = NULL; diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp index 84176383fca..01a1ce3a6d4 100644 --- a/src/glsl/ir_clone.cpp +++ b/src/glsl/ir_clone.cpp @@ -24,7 +24,9 @@ #include #include "ir.h" #include "glsl_types.h" +extern "C" { #include "hash_table.h" +} /** * Duplicate an IR variable diff --git a/src/glsl/ir_function_inlining.cpp b/src/glsl/ir_function_inlining.cpp index e55780c940e..1adf67868ee 100644 --- a/src/glsl/ir_function_inlining.cpp +++ b/src/glsl/ir_function_inlining.cpp @@ -33,7 +33,9 @@ #include "ir_function_inlining.h" #include "ir_expression_flattening.h" #include "glsl_types.h" +extern "C" { #include "hash_table.h" +} class ir_function_inlining_visitor : public ir_hierarchical_visitor { public: diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp index 507e88993f2..19538524879 100644 --- a/src/glsl/ir_validate.cpp +++ b/src/glsl/ir_validate.cpp @@ -36,7 +36,9 @@ #include #include "ir.h" #include "ir_hierarchical_visitor.h" +extern "C" { #include "hash_table.h" +} static unsigned int hash_func(const void *key) { diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index ba382fe8816..8547f74ce65 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -77,7 +77,9 @@ extern "C" { #include "ir.h" #include "ir_optimization.h" #include "program.h" +extern "C" { #include "hash_table.h" +} /** * Visitor that determines whether or not a variable is ever written. -- cgit v1.2.3