[Mesa-dev] [PATCH 7/7] mapi: remove u_compiler.h
Jose Fonseca
jfonseca at vmware.com
Wed Mar 4 06:29:43 PST 2015
On 04/03/15 04:07, Brian Paul wrote:
> Just include c99_compat.h or util/macros.h where needed.
> ---
> src/mapi/Makefile.sources | 1 -
> src/mapi/entry.h | 1 -
> src/mapi/glapi/glapi.h | 1 +
> src/mapi/mapi.h | 2 --
> src/mapi/table.h | 4 +++-
> src/mapi/u_compiler.h | 7 -------
> src/mapi/u_current.h | 6 ++++--
> src/mapi/u_execmem.c | 2 +-
> src/mapi/u_thread.h | 2 +-
> 9 files changed, 10 insertions(+), 16 deletions(-)
> delete mode 100644 src/mapi/u_compiler.h
>
> diff --git a/src/mapi/Makefile.sources b/src/mapi/Makefile.sources
> index 41dbb24..a179662 100644
> --- a/src/mapi/Makefile.sources
> +++ b/src/mapi/Makefile.sources
> @@ -15,7 +15,6 @@
> # this mode, compile MAPI_BRIDGE_FILES with MAPI_MODE_BRIDGE defined.
>
> MAPI_UTIL_FILES = \
> - u_compiler.h \
> u_current.c \
> u_current.h \
> u_execmem.c \
> diff --git a/src/mapi/entry.h b/src/mapi/entry.h
> index dba1c06..7c8137c 100644
> --- a/src/mapi/entry.h
> +++ b/src/mapi/entry.h
> @@ -28,7 +28,6 @@
> #ifndef _ENTRY_H_
> #define _ENTRY_H_
>
> -#include "u_compiler.h"
>
> typedef void (*mapi_func)(void);
>
> diff --git a/src/mapi/glapi/glapi.h b/src/mapi/glapi/glapi.h
> index e2fa925..e3f76b4 100644
> --- a/src/mapi/glapi/glapi.h
> +++ b/src/mapi/glapi/glapi.h
> @@ -44,6 +44,7 @@
> #ifndef _GLAPI_H
> #define _GLAPI_H
>
> +#include "util/macros.h"
> #include "u_thread.h"
>
>
> diff --git a/src/mapi/mapi.h b/src/mapi/mapi.h
> index 2aa8d9f..9adf8b5 100644
> --- a/src/mapi/mapi.h
> +++ b/src/mapi/mapi.h
> @@ -28,8 +28,6 @@
> #ifndef _MAPI_H_
> #define _MAPI_H_
>
> -#include "u_compiler.h"
> -
> #ifdef _WIN32
> #ifdef MAPI_DLL_EXPORTS
> #define MAPI_EXPORT __declspec(dllexport)
> diff --git a/src/mapi/table.h b/src/mapi/table.h
> index 8180db9..e2d6ef0 100644
> --- a/src/mapi/table.h
> +++ b/src/mapi/table.h
> @@ -28,7 +28,7 @@
> #ifndef _TABLE_H_
> #define _TABLE_H_
>
> -#include "u_compiler.h"
> +#include "c99_compat.h"
> #include "entry.h"
>
> #define MAPI_TMP_TABLE
> @@ -37,6 +37,8 @@
> #define MAPI_TABLE_NUM_SLOTS (MAPI_TABLE_NUM_STATIC + MAPI_TABLE_NUM_DYNAMIC)
> #define MAPI_TABLE_SIZE (MAPI_TABLE_NUM_SLOTS * sizeof(mapi_func))
>
> +struct mapi_table;
> +
> extern const mapi_func table_noop_array[];
>
> /**
> diff --git a/src/mapi/u_compiler.h b/src/mapi/u_compiler.h
> deleted file mode 100644
> index cd80f68..0000000
> --- a/src/mapi/u_compiler.h
> +++ /dev/null
> @@ -1,7 +0,0 @@
> -#ifndef _U_COMPILER_H_
> -#define _U_COMPILER_H_
> -
> -#include "c99_compat.h" /* inline, __func__, etc. */
> -#include "util/macros.h"
> -
> -#endif /* _U_COMPILER_H_ */
> diff --git a/src/mapi/u_current.h b/src/mapi/u_current.h
> index 252e696..ea4f817 100644
> --- a/src/mapi/u_current.h
> +++ b/src/mapi/u_current.h
> @@ -1,6 +1,10 @@
> #ifndef _U_CURRENT_H_
> #define _U_CURRENT_H_
>
> +#include "c99_compat.h"
> +#include "util/macros.h"
> +
> +
> #if defined(MAPI_MODE_UTIL) || defined(MAPI_MODE_GLAPI) || \
> defined(MAPI_MODE_BRIDGE)
>
> @@ -24,8 +28,6 @@
>
> #else /* MAPI_MODE_UTIL || MAPI_MODE_GLAPI || MAPI_MODE_BRIDGE */
>
> -#include "u_compiler.h"
> -
> struct mapi_table;
>
> #ifdef GLX_USE_TLS
> diff --git a/src/mapi/u_execmem.c b/src/mapi/u_execmem.c
> index ac1cae0..ad6427b 100644
> --- a/src/mapi/u_execmem.c
> +++ b/src/mapi/u_execmem.c
> @@ -32,7 +32,7 @@
> */
>
>
> -#include "u_compiler.h"
> +#include "c99_compat.h"
> #include "u_thread.h"
> #include "u_execmem.h"
>
> diff --git a/src/mapi/u_thread.h b/src/mapi/u_thread.h
> index 3cd07b5..4dd9515 100644
> --- a/src/mapi/u_thread.h
> +++ b/src/mapi/u_thread.h
> @@ -44,7 +44,7 @@
>
> #include <stdio.h>
> #include <stdlib.h>
> -#include "u_compiler.h"
> +#include "c99_compat.h"
>
> #include "c11/threads.h"
>
>
Series looks good to me.
Reviewed-by: Jose Fonseca <jfonseca at vmware.com>
More information about the mesa-dev
mailing list