From 72b96636fc74611b4597c56eb0a6b09a78be3acc Mon Sep 17 00:00:00 2001 From: Mike Gelfand Date: Mon, 23 Jun 2025 22:26:46 +0100 Subject: [PATCH] glx: move include guards up to wrap the whole file See: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html Signed-off-by: Mike Gelfand --- glx/glxcontext.h | 14 +++++++------- glx/glxdrawable.h | 14 +++++++------- glx/glxext.h | 14 +++++++------- glx/glxscreens.h | 14 +++++++------- glx/glxserver.h | 14 +++++++------- glx/glxutil.h | 14 +++++++------- glx/singlesize.h | 14 +++++++------- glx/unpack.h | 14 +++++++------- 8 files changed, 56 insertions(+), 56 deletions(-) diff --git a/glx/glxcontext.h b/glx/glxcontext.h index 5dd0ebca6..9c52eefe7 100644 --- a/glx/glxcontext.h +++ b/glx/glxcontext.h @@ -1,10 +1,3 @@ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _GLX_context_h_ -#define _GLX_context_h_ - /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. @@ -35,6 +28,13 @@ * Silicon Graphics, Inc. */ +#ifndef _GLX_context_h_ +#define _GLX_context_h_ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + struct __GLXcontext { void (*destroy) (__GLXcontext * context); int (*makeCurrent) (__GLXcontext * context); diff --git a/glx/glxdrawable.h b/glx/glxdrawable.h index 441d72dd7..f9e7f281a 100644 --- a/glx/glxdrawable.h +++ b/glx/glxdrawable.h @@ -1,10 +1,3 @@ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _GLX_drawable_h_ -#define _GLX_drawable_h_ - /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. @@ -35,6 +28,13 @@ * Silicon Graphics, Inc. */ +#ifndef _GLX_drawable_h_ +#define _GLX_drawable_h_ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + /* We just need to avoid clashing with DRAWABLE_{WINDOW,PIXMAP} */ enum { GLX_DRAWABLE_WINDOW, diff --git a/glx/glxext.h b/glx/glxext.h index abaf1225c..179d5daf9 100644 --- a/glx/glxext.h +++ b/glx/glxext.h @@ -1,10 +1,3 @@ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _glxext_h_ -#define _glxext_h_ - /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. @@ -35,6 +28,13 @@ * Silicon Graphics, Inc. */ +#ifndef _glxext_h_ +#define _glxext_h_ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + /* doing #include & #include could cause problems * with overlapping definitions, so let's use the easy way */ diff --git a/glx/glxscreens.h b/glx/glxscreens.h index 02170b0c6..1412f1114 100644 --- a/glx/glxscreens.h +++ b/glx/glxscreens.h @@ -1,10 +1,3 @@ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _GLX_screens_h_ -#define _GLX_screens_h_ - /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. @@ -35,6 +28,13 @@ * Silicon Graphics, Inc. */ +#ifndef _GLX_screens_h_ +#define _GLX_screens_h_ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + #include "extension_string.h" #include "glxvndabi.h" diff --git a/glx/glxserver.h b/glx/glxserver.h index 79f4944d0..c134d62c5 100644 --- a/glx/glxserver.h +++ b/glx/glxserver.h @@ -1,10 +1,3 @@ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _GLX_server_h_ -#define _GLX_server_h_ - /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. @@ -35,6 +28,13 @@ * Silicon Graphics, Inc. */ +#ifndef _GLX_server_h_ +#define _GLX_server_h_ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + #include #include #include diff --git a/glx/glxutil.h b/glx/glxutil.h index 314606da2..27dd49a18 100644 --- a/glx/glxutil.h +++ b/glx/glxutil.h @@ -1,10 +1,3 @@ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _glxcmds_h_ -#define _glxcmds_h_ - /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. @@ -35,6 +28,13 @@ * Silicon Graphics, Inc. */ +#ifndef _glxcmds_h_ +#define _glxcmds_h_ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + extern GLboolean __glXDrawableInit(__GLXdrawable * drawable, __GLXscreen * screen, DrawablePtr pDraw, int type, XID drawID, diff --git a/glx/singlesize.h b/glx/singlesize.h index dc85d3d36..3f9930c22 100644 --- a/glx/singlesize.h +++ b/glx/singlesize.h @@ -1,10 +1,3 @@ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _singlesize_h_ -#define _singlesize_h_ - /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. @@ -35,6 +28,13 @@ * Silicon Graphics, Inc. */ +#ifndef _singlesize_h_ +#define _singlesize_h_ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + #include "indirect_size.h" extern GLint __glReadPixels_size(GLenum format, GLenum type, diff --git a/glx/unpack.h b/glx/unpack.h index 256073470..44a7975da 100644 --- a/glx/unpack.h +++ b/glx/unpack.h @@ -1,10 +1,3 @@ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef __GLX_unpack_h__ -#define __GLX_unpack_h__ - /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. @@ -35,6 +28,13 @@ * Silicon Graphics, Inc. */ +#ifndef __GLX_unpack_h__ +#define __GLX_unpack_h__ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + #define __GLX_PAD(s) (((s)+3) & (GLuint)~3) /*