[Mesa-dev] [PATCH 10/11] gallium: do not wrap header inclusion in extern "C"
Jose Fonseca
jfonseca at vmware.com
Tue Nov 24 09:08:10 PST 2015
On 24/11/15 16:29, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
>
> Add one missing extern C guard within include/pipe/p_video_enums.h, and
> remove the wrapping throughout gallium.
>
> On Haiku one could even use the gallium debug_printf() although
> that's another topic.
>
> Cc: Jose Fonseca <jfonseca at vmware.com>
> Cc: Brian Paul <brianp at vmware.com>
> Cc: Alexander von Gluck IV <kallisti5 at unixzen.com>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
> src/gallium/auxiliary/tgsi/tgsi_sanity.h | 4 ++--
> src/gallium/auxiliary/tgsi/tgsi_text.h | 4 ++--
> src/gallium/auxiliary/util/dbghelp.h | 7 +++----
> src/gallium/auxiliary/util/u_debug.h | 8 +++++---
> src/gallium/auxiliary/util/u_draw_quad.h | 3 +--
> src/gallium/auxiliary/util/u_helpers.h | 4 ++--
> src/gallium/auxiliary/util/u_video.h | 8 ++++----
> src/gallium/include/pipe/p_format.h | 4 ++--
> src/gallium/include/pipe/p_video_codec.h | 4 ++--
> src/gallium/include/pipe/p_video_enums.h | 8 ++++++++
> 10 files changed, 31 insertions(+), 23 deletions(-)
>
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.h b/src/gallium/auxiliary/tgsi/tgsi_sanity.h
> index 1ff7874..b78d1ab 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_sanity.h
> +++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.h
> @@ -28,12 +28,12 @@
> #ifndef TGSI_SANITY_H
> #define TGSI_SANITY_H
>
> +#include "pipe/p_compiler.h"
> +
> #if defined __cplusplus
> extern "C" {
> #endif
>
> -#include "pipe/p_compiler.h"
> -
> struct tgsi_token;
>
> /* Check the given token stream for errors and common mistakes.
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.h b/src/gallium/auxiliary/tgsi/tgsi_text.h
> index 6a306e6..a345657 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_text.h
> +++ b/src/gallium/auxiliary/tgsi/tgsi_text.h
> @@ -28,12 +28,12 @@
> #ifndef TGSI_TEXT_H
> #define TGSI_TEXT_H
>
> +#include "pipe/p_compiler.h"
> +
> #if defined __cplusplus
> extern "C" {
> #endif
>
> -#include "pipe/p_compiler.h"
> -
> struct tgsi_token;
>
> boolean
> diff --git a/src/gallium/auxiliary/util/dbghelp.h b/src/gallium/auxiliary/util/dbghelp.h
> index bc7c53c..b78e634 100644
> --- a/src/gallium/auxiliary/util/dbghelp.h
> +++ b/src/gallium/auxiliary/util/dbghelp.h
> @@ -6,6 +6,9 @@
> #ifndef _DBGHELP_
> #define _DBGHELP_
>
> +#include <pshpack4.h>
> +#include <poppack.h>
The poppack.h has to be moved to after
#ifdef __cplusplus
}
#endif
These push/pop pack headers, have special pragmas that change the
packing of structures declared between them.
Otherwise patch looks great. Thanks.
Jose
More information about the mesa-dev
mailing list