hw: move include guards up to wrap the whole file

See: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
This commit is contained in:
Mike Gelfand 2025-06-23 22:36:32 +01:00
parent 72b96636fc
commit 12b327c0da
No known key found for this signature in database
GPG Key ID: CC4DBBE3299B16F8
19 changed files with 60 additions and 58 deletions

View File

@ -31,13 +31,13 @@
* video drivers must not include this file.
*/
#ifndef _XF86_BUS_H
#define _XF86_BUS_H
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#ifndef _XF86_BUS_H
#define _XF86_BUS_H
#include "xf86pciBus.h"
#if defined(__sparc__) || defined(__sparc)
#include "xf86sbusBus.h"

View File

@ -1,4 +1,3 @@
/*
* Copyright (c) 1997-2000 by The XFree86 Project, Inc.
*
@ -26,13 +25,13 @@
* authorization from the copyright holder(s) and author(s).
*/
#ifndef _xf86_config_h
#define _xf86_config_h
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#ifndef _xf86_config_h
#define _xf86_config_h
#include "xf86Optrec.h"
#include "xf86Parser.h"
#include "xf86str.h"

View File

@ -1,4 +1,3 @@
/*
* Copyright (c) 1999 by The XFree86 Project, Inc.
*
@ -26,13 +25,13 @@
* authorization from the copyright holder(s) and author(s).
*/
#ifndef _xf86InPriv_h
#define _xf86InPriv_h
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#ifndef _xf86InPriv_h
#define _xf86InPriv_h
/* xf86Globals.c */
extern InputDriverPtr *xf86InputDriverList;
extern int xf86NumInputDrivers;

View File

@ -1,4 +1,3 @@
/*
* Copyright (c) 1999-2003 by The XFree86 Project, Inc.
*
@ -26,13 +25,13 @@
* authorization from the copyright holder(s) and author(s).
*/
#ifndef _XF86_PCI_BUS_H
#define _XF86_PCI_BUS_H
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#ifndef _XF86_PCI_BUS_H
#define _XF86_PCI_BUS_H
#include "xf86MatchDrivers.h"
void xf86PciProbe(void);

View File

@ -31,15 +31,16 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
/* Prototypes for DRI functions */
#ifndef _DRI_H_
#define _DRI_H_
#include <pciaccess.h>
#include "scrnintstr.h"
#include "xf86dri.h"
/* Prototypes for DRI functions */
typedef int DRISyncType;
#define DRI_NO_SYNC 0
@ -333,6 +334,4 @@ extern _X_EXPORT void DRIGetTexOffsetFuncs(ScreenPtr pScreen,
DRITexOffsetFinishProcPtr *
texOffsetFinishFunc);
#define _DRI_H_
#endif

View File

@ -3,13 +3,13 @@
* removed internal stuff (#ifdef __KERNEL__)
*/
#ifndef _LINUX_FB_H
#define _LINUX_FB_H
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#ifndef _LINUX_FB_H
#define _LINUX_FB_H
#include <asm/types.h>
/* Definitions of frame buffers */

View File

@ -3,12 +3,14 @@
* execute BIOS int 10h calls in x86 real mode environment
* Copyright 1999 Egbert Eich
*/
#ifndef XF86X86EMU_H_
#define XF86X86EMU_H_
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#ifndef XF86X86EMU_H_
#define XF86X86EMU_H_
#include <x86emu.h>
#define M _X86EMU_env

View File

@ -46,13 +46,13 @@
* authorization from the copyright holder(s) and author(s).
*/
#ifndef _LOADER_H
#define _LOADER_H
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#ifndef _LOADER_H
#define _LOADER_H
#include <X11/Xosdefs.h>
#include <X11/Xfuncproto.h>
#include <X11/Xmd.h>

View File

@ -46,13 +46,13 @@
* authorization from the copyright holder(s) and author(s).
*/
#ifndef _LOADERPROCS_H
#define _LOADERPROCS_H
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#ifndef _LOADERPROCS_H
#define _LOADERPROCS_H
#include "xf86Module.h"
typedef struct module_desc {

View File

@ -2,13 +2,13 @@
* Memory range attribute operations, performed on /dev/mem
*/
#ifndef _MEMRANGE_H
#define _MEMRANGE_H
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#ifndef _MEMRANGE_H
#define _MEMRANGE_H
/* Memory range attributes */
#define MDF_UNCACHEABLE (1<<0) /* region not cached */
#define MDF_WRITECOMBINE (1<<1) /* region supports "write combine"

View File

@ -99,13 +99,14 @@
* This file has the private Pci definitions. The public ones are imported
* from xf86Pci.h. Drivers should not use this file.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#ifndef _PCI_H
#define _PCI_H 1
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <X11/Xdefs.h>
#include "xf86Pci.h"

View File

@ -21,13 +21,13 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef _XF86_SBUS_H
#define _XF86_SBUS_H
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#ifndef _XF86_SBUS_H
#define _XF86_SBUS_H
#if defined(__linux__)
#include <asm/types.h>
#include <linux/fb.h>

View File

@ -25,13 +25,13 @@
* authorization from the copyright holder(s) and author(s).
*/
#ifndef _INT10DEFINES_H_
#define _INT10DEFINES_H_ 1
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#ifndef _INT10DEFINES_H_
#define _INT10DEFINES_H_ 1
#ifdef _VM86_LINUX
#include <asm/vm86.h>

View File

@ -57,13 +57,13 @@
* they should not be visible outside of the parser.
*/
#ifndef _Configint_h_
#define _Configint_h_
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#ifndef _Configint_h_
#define _Configint_h_
#include <stdio.h>
#include <string.h>
#include <stdarg.h>

View File

@ -56,12 +56,14 @@
* This file contains the Option Record that is passed between the Parser,
* and Module setup procs.
*/
#ifndef _xf86Optrec_h_
#define _xf86Optrec_h_
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#ifndef _xf86Optrec_h_
#define _xf86Optrec_h_
#include <stdio.h>
#include <string.h>
#include "xf86Optionstr.h"

View File

@ -56,13 +56,14 @@
* This file contains the external interfaces for the XFree86 configuration
* file parser.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#ifndef _xf86Parser_h_
#define _xf86Parser_h_
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <X11/Xdefs.h>
#include "xf86Optrec.h"
#include "list.h"

View File

@ -52,13 +52,13 @@
* authorization from the copyright holder(s) and author(s).
*/
#ifndef _xf86_tokens_h
#define _xf86_tokens_h
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#ifndef _xf86_tokens_h
#define _xf86_tokens_h
/*
* Each token should have a unique value regardless of the section
* it is used in.

View File

@ -1,11 +1,10 @@
#ifndef _XF86CURSORPRIV_H
#define _XF86CURSORPRIV_H
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#ifndef _XF86CURSORPRIV_H
#define _XF86CURSORPRIV_H
#include "xf86Cursor.h"
#include "mipointrst.h"

View File

@ -1,9 +1,10 @@
#ifndef __XWIN_DDRAW_H
#define __XWIN_DDRAW_H
#ifdef __MINGW64_VERSION_MAJOR
#include_next <ddraw.h>
#define __XWIN_DDRAW_H
#endif
#ifndef __XWIN_DDRAW_H
#define __XWIN_DDRAW_H
#include <winnt.h>
#include <wingdi.h>