From 824ca40d42fc347d41783ca1622e0ba9b21f3a0a Mon Sep 17 00:00:00 2001 From: Mike Gelfand Date: Mon, 23 Jun 2025 22:40:50 +0100 Subject: [PATCH] miext: move include guards up to wrap the whole file See: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html Signed-off-by: Mike Gelfand --- miext/damage/damage.h | 6 +++--- miext/damage/damagestr.h | 6 +++--- miext/rootless/rootless.h | 6 +++--- miext/rootless/rootlessCommon.h | 5 +++-- miext/rootless/rootlessConfig.h | 6 +++--- miext/rootless/rootlessWindow.h | 6 +++--- miext/sync/misync.h | 6 +++--- miext/sync/misyncstr.h | 6 +++--- 8 files changed, 24 insertions(+), 23 deletions(-) diff --git a/miext/damage/damage.h b/miext/damage/damage.h index 525b2db5d..408161e66 100644 --- a/miext/damage/damage.h +++ b/miext/damage/damage.h @@ -20,13 +20,13 @@ * PERFORMANCE OF THIS SOFTWARE. */ +#ifndef _DAMAGE_H_ +#define _DAMAGE_H_ + #ifdef HAVE_DIX_CONFIG_H #include #endif -#ifndef _DAMAGE_H_ -#define _DAMAGE_H_ - typedef struct _damage *DamagePtr; typedef enum _damageReportLevel { diff --git a/miext/damage/damagestr.h b/miext/damage/damagestr.h index 5517d24e0..ade651c39 100644 --- a/miext/damage/damagestr.h +++ b/miext/damage/damagestr.h @@ -20,13 +20,13 @@ * PERFORMANCE OF THIS SOFTWARE. */ +#ifndef _DAMAGESTR_H_ +#define _DAMAGESTR_H_ + #ifdef HAVE_DIX_CONFIG_H #include #endif -#ifndef _DAMAGESTR_H_ -#define _DAMAGESTR_H_ - #include "damage.h" #include "gcstruct.h" #include "privates.h" diff --git a/miext/rootless/rootless.h b/miext/rootless/rootless.h index b375731bf..74245eb35 100644 --- a/miext/rootless/rootless.h +++ b/miext/rootless/rootless.h @@ -28,13 +28,13 @@ * use or other dealings in this Software without prior written authorization. */ +#ifndef _ROOTLESS_H +#define _ROOTLESS_H + #ifdef HAVE_DIX_CONFIG_H #include #endif -#ifndef _ROOTLESS_H -#define _ROOTLESS_H - #include "rootlessConfig.h" #include "mi.h" #include "gcstruct.h" diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h index 9fdb98e40..8ed52f730 100644 --- a/miext/rootless/rootlessCommon.h +++ b/miext/rootless/rootlessCommon.h @@ -28,13 +28,14 @@ * use or other dealings in this Software without prior written authorization. */ +#ifndef _ROOTLESSCOMMON_H +#define _ROOTLESSCOMMON_H + #ifdef HAVE_DIX_CONFIG_H #include #endif #include -#ifndef _ROOTLESSCOMMON_H -#define _ROOTLESSCOMMON_H #include "misc.h" #include "rootless.h" diff --git a/miext/rootless/rootlessConfig.h b/miext/rootless/rootlessConfig.h index 80c2f6d8a..7d8a19c92 100644 --- a/miext/rootless/rootlessConfig.h +++ b/miext/rootless/rootlessConfig.h @@ -27,13 +27,13 @@ * use or other dealings in this Software without prior written authorization. */ +#ifndef _ROOTLESSCONFIG_H +#define _ROOTLESSCONFIG_H + #ifdef HAVE_DIX_CONFIG_H #include #endif -#ifndef _ROOTLESSCONFIG_H -#define _ROOTLESSCONFIG_H - /*# define ROOTLESSDEBUG*/ #define ROOTLESS_PROTECT_ALPHA TRUE diff --git a/miext/rootless/rootlessWindow.h b/miext/rootless/rootlessWindow.h index 00e95b8a0..5dd360a0e 100644 --- a/miext/rootless/rootlessWindow.h +++ b/miext/rootless/rootlessWindow.h @@ -27,13 +27,13 @@ * use or other dealings in this Software without prior written authorization. */ +#ifndef _ROOTLESSWINDOW_H +#define _ROOTLESSWINDOW_H + #ifdef HAVE_DIX_CONFIG_H #include #endif -#ifndef _ROOTLESSWINDOW_H -#define _ROOTLESSWINDOW_H - #include "dix/screen_hooks_priv.h" #include "rootlessCommon.h" diff --git a/miext/sync/misync.h b/miext/sync/misync.h index 4748fa4ae..b247259b3 100644 --- a/miext/sync/misync.h +++ b/miext/sync/misync.h @@ -21,13 +21,13 @@ * DEALINGS IN THE SOFTWARE. */ +#ifndef _MISYNC_H_ +#define _MISYNC_H_ + #ifdef HAVE_DIX_CONFIG_H #include #endif -#ifndef _MISYNC_H_ -#define _MISYNC_H_ - typedef struct _SyncObject SyncObject; typedef struct _SyncFence SyncFence; typedef struct _SyncTrigger SyncTrigger; diff --git a/miext/sync/misyncstr.h b/miext/sync/misyncstr.h index 21cb0b257..4465b0c3c 100644 --- a/miext/sync/misyncstr.h +++ b/miext/sync/misyncstr.h @@ -21,13 +21,13 @@ * DEALINGS IN THE SOFTWARE. */ +#ifndef _MISYNCSTR_H_ +#define _MISYNCSTR_H_ + #ifdef HAVE_DIX_CONFIG_H #include #endif -#ifndef _MISYNCSTR_H_ -#define _MISYNCSTR_H_ - #include #include "dix.h" #include "misync.h"