diff options
author | Emil Velikov <[email protected]> | 2017-02-16 15:16:40 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-02-21 18:29:28 +0000 |
commit | 84819146814d3ca1cbfb21ec746063da8613b0b7 (patch) | |
tree | 54c81053310187b574836755eb1cb9eadbdbfeb8 /src | |
parent | dafc325f42e3e43b5cf97d806ab2ec4caf5ddd42 (diff) |
i965: add extern C notation in headers
Otherwise symbols wont be annotated with C linkage and we'll fail at
link time.
Currently this is worked around by wrapping the header inclusion itself.
The latter in itself fragile and not recommended.
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_debug.h | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_screen.h | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_tex_obj.h | 7 |
3 files changed, 22 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_debug.h b/src/mesa/drivers/dri/i965/intel_debug.h index afca36eb33c..e8e329bc60d 100644 --- a/src/mesa/drivers/dri/i965/intel_debug.h +++ b/src/mesa/drivers/dri/i965/intel_debug.h @@ -24,6 +24,9 @@ */ #pragma once +#ifdef __cplusplus +extern "C" { +#endif /** * \file intel_debug.h * @@ -122,3 +125,7 @@ extern uint64_t INTEL_DEBUG; extern uint64_t intel_debug_flag_for_shader_stage(gl_shader_stage stage); extern void brw_process_intel_debug_variable(void); + +#ifdef __cplusplus +} +#endif diff --git a/src/mesa/drivers/dri/i965/intel_screen.h b/src/mesa/drivers/dri/i965/intel_screen.h index a1e2b31774c..147af257beb 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.h +++ b/src/mesa/drivers/dri/i965/intel_screen.h @@ -37,6 +37,10 @@ #include "i915_drm.h" #include "xmlconfig.h" +#ifdef __cplusplus +extern "C" { +#endif + struct intel_screen { int deviceID; @@ -154,4 +158,8 @@ can_do_predicate_writes(const struct intel_screen *screen) return screen->kernel_features & KERNEL_ALLOWS_PREDICATE_WRITES; } +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/mesa/drivers/dri/i965/intel_tex_obj.h b/src/mesa/drivers/dri/i965/intel_tex_obj.h index 844aad1ab30..27c18b7c3ce 100644 --- a/src/mesa/drivers/dri/i965/intel_tex_obj.h +++ b/src/mesa/drivers/dri/i965/intel_tex_obj.h @@ -28,6 +28,9 @@ #include "swrast/s_context.h" +#ifdef __cplusplus +extern "C" { +#endif struct intel_texture_object { @@ -90,4 +93,8 @@ intel_texture_image(struct gl_texture_image *img) return (struct intel_texture_image *) img; } +#ifdef __cplusplus +} +#endif + #endif /* _INTEL_TEX_OBJ_H */ |