summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorMark Janes <[email protected]>2015-03-04 16:37:29 -0800
committerMatt Turner <[email protected]>2015-03-05 10:21:40 -0800
commit237dcb4aa7c39c59bfd225ae3d73caf709be216d (patch)
tree9139b596ac2383fa3e4ada351b94000ba9319e5f /src/gallium/drivers/r600
parent2e4c95dfe2cb205c327ceaa12b44a9273bdb20dc (diff)
Fix invalid extern "C" around header inclusion.
System headers may contain C++ declarations, which cannot be given C linkage. For this reason, include statements should never occur inside extern "C". This patch moves the C linkage statements to enclose only the declarations within a single header. Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/r600_shader.h12
-rw-r--r--src/gallium/drivers/r600/sb/sb_bc.h2
-rw-r--r--src/gallium/drivers/r600/sb/sb_bc_parser.cpp2
-rw-r--r--src/gallium/drivers/r600/sb/sb_core.cpp2
-rw-r--r--src/gallium/drivers/r600/sb/sb_public.h12
5 files changed, 24 insertions, 6 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.h b/src/gallium/drivers/r600/r600_shader.h
index b2559e9b661..dd359d7e959 100644
--- a/src/gallium/drivers/r600/r600_shader.h
+++ b/src/gallium/drivers/r600/r600_shader.h
@@ -25,6 +25,12 @@
#include "r600_asm.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
struct r600_shader_io {
unsigned name;
unsigned gpr;
@@ -125,4 +131,10 @@ struct r600_pipe_shader {
TGSI_INTERPOLATE_LOC_CENTER/SAMPLE/COUNT. Other input values return -1. */
int eg_get_interpolator_index(unsigned interpolate, unsigned location);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+
#endif
diff --git a/src/gallium/drivers/r600/sb/sb_bc.h b/src/gallium/drivers/r600/sb/sb_bc.h
index 072d8f8b4e0..ab988f8716d 100644
--- a/src/gallium/drivers/r600/sb/sb_bc.h
+++ b/src/gallium/drivers/r600/sb/sb_bc.h
@@ -27,10 +27,8 @@
#ifndef SB_BC_H_
#define SB_BC_H_
-extern "C" {
#include <stdint.h>
#include "r600_isa.h"
-}
#include <cstdio>
#include <string>
diff --git a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
index 403f938092e..08e7f5c36c3 100644
--- a/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
+++ b/src/gallium/drivers/r600/sb/sb_bc_parser.cpp
@@ -32,10 +32,8 @@
#define BCP_DUMP(q)
#endif
-extern "C" {
#include "r600_pipe.h"
#include "r600_shader.h"
-}
#include <stack>
diff --git a/src/gallium/drivers/r600/sb/sb_core.cpp b/src/gallium/drivers/r600/sb/sb_core.cpp
index 9fd9d9ad25a..7db80082b60 100644
--- a/src/gallium/drivers/r600/sb/sb_core.cpp
+++ b/src/gallium/drivers/r600/sb/sb_core.cpp
@@ -26,13 +26,11 @@
#define SB_RA_SCHED_CHECK DEBUG
-extern "C" {
#include "os/os_time.h"
#include "r600_pipe.h"
#include "r600_shader.h"
#include "sb_public.h"
-}
#include <stack>
#include <map>
diff --git a/src/gallium/drivers/r600/sb/sb_public.h b/src/gallium/drivers/r600/sb/sb_public.h
index c9f5f97f9c8..a90771f06d1 100644
--- a/src/gallium/drivers/r600/sb/sb_public.h
+++ b/src/gallium/drivers/r600/sb/sb_public.h
@@ -27,6 +27,12 @@
#ifndef R600_SB_H_
#define R600_SB_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
struct r600_shader;
void r600_sb_context_destroy(void *sctx);
@@ -37,4 +43,10 @@ int r600_sb_bytecode_process(struct r600_context *rctx,
int dump_source_bytecode,
int optimize);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+
#endif //R600_SB_H_