Hi,
The attached patch is the result of "as few extra
inclusions as possible", by creating a dummy file
including just that header, and making it compile.
This was done in the loader directory, and I added
some extra -I for module headers, but including in
the build tree.
I would like some feedback on if it would be correct to,
check in the build directory of the header if AM_CFLAGS
is defined somewhat like:
AM_CFLAGS = $(DIX_CFLAGS) ...
and in that case, ensure the header either itself does:
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
or include a header that has that in the start.
There are also several different styles for the sequence
#ifndef HEADER_H
#define HEADER_H
...
#endif /* HEADER_H */
I used the _HEADER_H_ stype for headers without multiple
inclusion protection, as it appears to be the most common,
but without start/ending underlines is also very common.
Maybe a common style should be used ?
Also, another question is about the generation of the
file sdksyms.c. What would be the better approach to have
a Makefile rule to regenerate sdksyms.c if sdksyms.o needs
to be regenerated due to a header being updated?
Paulo
>From cfb29abf144380a45eefd03fa5a80fa5c19cfe84 Mon Sep 17 00:00:00 2001
From: Paulo Cesar Pereira de Andrade <[EMAIL PROTECTED]>
Date: Thu, 11 Dec 2008 04:02:44 -0200
Subject: [PATCH] Include sdk header dependencies and protect agains't multiple inclusion.
---
Xext/geext.h | 3 +++
Xext/panoramiX.h | 2 +-
Xext/shmint.h | 1 +
dbe/dbestruct.h | 3 ++-
fb/fboverlay.h | 2 +-
fb/fbrop.h | 2 ++
fb/wfbrename.h | 5 +++++
hw/xfree86/common/vidmodeproc.h | 3 ++-
hw/xfree86/common/xf86Opt.h | 3 +++
hw/xfree86/common/xisb.h | 1 +
hw/xfree86/ddc/edid.h | 5 ++---
hw/xfree86/dixmods/extmod/dgaproc.h | 1 +
hw/xfree86/dri/dri.h | 5 ++---
hw/xfree86/dri2/dri2.h | 2 ++
hw/xfree86/modes/xf86RandR12.h | 1 +
hw/xfree86/os-support/solaris/agpgart.h | 2 ++
hw/xfree86/ramdac/BT.h | 4 ++++
hw/xfree86/ramdac/IBM.h | 4 ++++
hw/xfree86/ramdac/TI.h | 4 ++++
hw/xfree86/vbe/vbeModes.h | 5 ++++-
hw/xfree86/xaa/xaaWrapper.h | 2 ++
hw/xfree86/xaa/xaarop.h | 2 ++
include/XIstubs.h | 3 +++
include/closestr.h | 1 +
include/dix.h | 2 ++
include/dixevents.h | 3 +++
include/dixgrabs.h | 3 +++
include/exevents.h | 1 +
include/extension.h | 2 ++
include/hotplug.h | 2 ++
include/misc.h | 1 +
include/swaprep.h | 2 ++
include/swapreq.h | 2 ++
include/xkbfile.h | 3 +++
include/xkbrules.h | 2 ++
include/xkbstr.h | 1 +
mi/mifillarc.h | 2 ++
mi/mifpoly.h | 2 +-
mi/migc.h | 6 ++++++
mi/miline.h | 1 +
mi/mioverlay.h | 4 ++++
mi/mispans.h | 4 ++++
mi/miwideline.h | 4 ++++
mi/mizerarc.h | 6 ++++++
miext/damage/damage.h | 3 +++
render/glyphstr.h | 3 ++-
render/picturestr.h | 1 +
render/renderedge.h | 1 +
xfixes/xfixes.h | 1 +
49 files changed, 115 insertions(+), 13 deletions(-)
diff --git a/Xext/geext.h b/Xext/geext.h
index 3074431..37adebb 100644
--- a/Xext/geext.h
+++ b/Xext/geext.h
@@ -32,6 +32,9 @@ from the author.
#ifndef _GEEXT_H_
#define _GEEXT_H_
+
+#include "input.h"
+
#include <X11/extensions/geproto.h>
diff --git a/Xext/panoramiX.h b/Xext/panoramiX.h
index 89c7547..4e9154f 100644
--- a/Xext/panoramiX.h
+++ b/Xext/panoramiX.h
@@ -40,8 +40,8 @@ Equipment Corporation.
#ifndef _PANORAMIX_H_
#define _PANORAMIX_H_
-#include <X11/extensions/panoramiXext.h>
#include "gcstruct.h"
+#include <X11/extensions/panoramiXext.h>
typedef struct _PanoramiXData {
diff --git a/Xext/shmint.h b/Xext/shmint.h
index ec1688d..4b25282 100644
--- a/Xext/shmint.h
+++ b/Xext/shmint.h
@@ -29,6 +29,7 @@
#include "screenint.h"
#include "pixmap.h"
#include "gc.h"
+#include "resource.h"
extern _X_EXPORT void
ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs);
diff --git a/dbe/dbestruct.h b/dbe/dbestruct.h
index e067f37..db9d184 100644
--- a/dbe/dbestruct.h
+++ b/dbe/dbestruct.h
@@ -37,9 +37,10 @@
/* INCLUDES */
#define NEED_DBE_PROTOCOL
-#include <X11/extensions/Xdbeproto.h>
+#include "scrnintstr.h"
#include "windowstr.h"
#include "privates.h"
+#include <X11/extensions/Xdbeproto.h>
/* DEFINES */
diff --git a/fb/fboverlay.h b/fb/fboverlay.h
index ed355af..92c2da3 100644
--- a/fb/fboverlay.h
+++ b/fb/fboverlay.h
@@ -25,7 +25,7 @@
#ifndef _FBOVERLAY_H_
#define _FBOVERLAY_H_
-#include "privates.h"
+#include "fb.h"
extern _X_EXPORT DevPrivateKey fbOverlayGetScreenPrivateKey(void);
diff --git a/fb/fbrop.h b/fb/fbrop.h
index a01fdab..d4d084c 100644
--- a/fb/fbrop.h
+++ b/fb/fbrop.h
@@ -23,6 +23,8 @@
#ifndef _FBROP_H_
#define _FBROP_H_
+#include "fb.h"
+
typedef struct _mergeRopBits {
FbBits ca1, cx1, ca2, cx2;
} FbMergeRopRec, *FbMergeRopPtr;
diff --git a/fb/wfbrename.h b/fb/wfbrename.h
index 73ee510..9733e8c 100644
--- a/fb/wfbrename.h
+++ b/fb/wfbrename.h
@@ -1,3 +1,6 @@
+#ifndef _WFBRENAME_H_
+#define _WFBRENAME_H_
+
#define fb16Lane wfb16Lane
#define fb24_32CopyMtoN wfb24_32CopyMtoN
#define fb24_32CreateScreenResources wfb24_32CreateScreenResources
@@ -188,3 +191,5 @@
#define free_pixman_pict wfb_free_pixman_pict
#define image_from_pict wfb_image_from_pict
#define composeFunctions wfbComposeFunctions
+
+#endif /* _WFBRENAME_H_ */
diff --git a/hw/xfree86/common/vidmodeproc.h b/hw/xfree86/common/vidmodeproc.h
index da4d05e..b0654a5 100644
--- a/hw/xfree86/common/vidmodeproc.h
+++ b/hw/xfree86/common/vidmodeproc.h
@@ -8,6 +8,7 @@
#ifndef _VIDMODEPROC_H_
#define _VIDMODEPROC_H_
+#include "xf86str.h"
typedef enum {
VIDMODE_H_DISPLAY,
@@ -72,6 +73,6 @@ extern _X_EXPORT Bool VidModeSetGammaRamp(int, int, CARD16 *, CARD16 *, CARD16 *
extern _X_EXPORT Bool VidModeGetGammaRamp(int, int, CARD16 *, CARD16 *, CARD16 *);
extern _X_EXPORT int VidModeGetGammaRampSize(int scrnIndex);
-#endif
+#endif /* _VIDMODEPROC_H_ */
diff --git a/hw/xfree86/common/xf86Opt.h b/hw/xfree86/common/xf86Opt.h
index ce3d767..b8ce76a 100644
--- a/hw/xfree86/common/xf86Opt.h
+++ b/hw/xfree86/common/xf86Opt.h
@@ -31,6 +31,9 @@
#ifndef _XF86_OPT_H_
#define _XF86_OPT_H_
+#include <X11/Xfuncproto.h>
+#include <X11/Xdefs.h>
+
typedef struct {
double freq;
int units;
diff --git a/hw/xfree86/common/xisb.h b/hw/xfree86/common/xisb.h
index bacfde1..b37e45c 100644
--- a/hw/xfree86/common/xisb.h
+++ b/hw/xfree86/common/xisb.h
@@ -29,6 +29,7 @@
#define _xisb_H_
#include <unistd.h>
+#include <X11/Xfuncproto.h>
/******************************************************************************
* Definitions
diff --git a/hw/xfree86/ddc/edid.h b/hw/xfree86/ddc/edid.h
index 31bc7c1..d9d1897 100644
--- a/hw/xfree86/ddc/edid.h
+++ b/hw/xfree86/ddc/edid.h
@@ -12,9 +12,8 @@
#ifndef _EDID_H_
#define _EDID_H_
-#ifndef _X_EXPORT
-# include <X11/Xfuncproto.h>
-#endif
+#include <X11/Xfuncproto.h>
+#include <X11/Xmd.h>
/* read complete EDID record */
#define EDID1_LEN 128
diff --git a/hw/xfree86/dixmods/extmod/dgaproc.h b/hw/xfree86/dixmods/extmod/dgaproc.h
index 6745a6e..afd7ade 100644
--- a/hw/xfree86/dixmods/extmod/dgaproc.h
+++ b/hw/xfree86/dixmods/extmod/dgaproc.h
@@ -4,6 +4,7 @@
#include <X11/Xproto.h>
#include "pixmap.h"
+#include "input.h"
#define DGA_CONCURRENT_ACCESS 0x00000001
#define DGA_FILL_RECT 0x00000002
diff --git a/hw/xfree86/dri/dri.h b/hw/xfree86/dri/dri.h
index f690e23..6f0be85 100644
--- a/hw/xfree86/dri/dri.h
+++ b/hw/xfree86/dri/dri.h
@@ -34,6 +34,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/* Prototypes for DRI functions */
#ifndef _DRI_H_
+#define _DRI_H_
#include <pciaccess.h>
@@ -379,6 +380,4 @@ extern _X_EXPORT void DRIGetTexOffsetFuncs(ScreenPtr pScreen,
DRITexOffsetStartProcPtr *texOffsetStartFunc,
DRITexOffsetFinishProcPtr *texOffsetFinishFunc);
-#define _DRI_H_
-
-#endif
+#endif /* _DRI_H_ */
diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h
index 847e57c..ef06468 100644
--- a/hw/xfree86/dri2/dri2.h
+++ b/hw/xfree86/dri2/dri2.h
@@ -33,6 +33,8 @@
#ifndef _DRI2_H_
#define _DRI2_H_
+#include "scrnintstr.h"
+#include <drm/drm.h>
#include <X11/extensions/dri2tokens.h>
typedef struct {
diff --git a/hw/xfree86/modes/xf86RandR12.h b/hw/xfree86/modes/xf86RandR12.h
index c8d9918..e24543e 100644
--- a/hw/xfree86/modes/xf86RandR12.h
+++ b/hw/xfree86/modes/xf86RandR12.h
@@ -22,6 +22,7 @@
#ifndef _XF86_RANDR_H_
#define _XF86_RANDR_H_
+#include "xf86str.h"
#include <randrstr.h>
#include <X11/extensions/render.h>
#if XF86_MODES_RENAME
diff --git a/hw/xfree86/os-support/solaris/agpgart.h b/hw/xfree86/os-support/solaris/agpgart.h
index 566de80..c631b54 100644
--- a/hw/xfree86/os-support/solaris/agpgart.h
+++ b/hw/xfree86/os-support/solaris/agpgart.h
@@ -54,6 +54,8 @@
#ifndef _AGPGART_H
#define _AGPGART_H
+#include <stdint.h>
+
#pragma ident "@(#)agpgart.h 1.1 05/04/04 SMI"
typedef struct _agp_version {
diff --git a/hw/xfree86/ramdac/BT.h b/hw/xfree86/ramdac/BT.h
index 35d0bdb..57ecc4c 100644
--- a/hw/xfree86/ramdac/BT.h
+++ b/hw/xfree86/ramdac/BT.h
@@ -1,3 +1,5 @@
+#ifndef _BT_H_
+#define _BT_H_
#include "xf86RamDac.h"
@@ -30,3 +32,5 @@ extern _X_EXPORT void BTramdacSetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr RamDacRe
#define BT_CURS_X_HIGH 0x0D
#define BT_CURS_Y_LOW 0x0E
#define BT_CURS_Y_HIGH 0x0F
+
+#endif /* _BT_H_ */
diff --git a/hw/xfree86/ramdac/IBM.h b/hw/xfree86/ramdac/IBM.h
index 6fa18b2..06010b5 100644
--- a/hw/xfree86/ramdac/IBM.h
+++ b/hw/xfree86/ramdac/IBM.h
@@ -1,3 +1,5 @@
+#ifndef _IBM_H_
+#define _IBM_H_
#include <xf86RamDac.h>
@@ -383,3 +385,5 @@ extern _X_EXPORT IBMramdac526SetBppProc *IBMramdac526SetBppWeak(void);
#define RGB640_CURS_COL1 0x4801
#define RGB640_CURS_COL2 0x4802
#define RGB640_CURS_COL3 0x4803
+
+#endif /* _IBM_H_ */
diff --git a/hw/xfree86/ramdac/TI.h b/hw/xfree86/ramdac/TI.h
index f5499f9..96e8ec5 100644
--- a/hw/xfree86/ramdac/TI.h
+++ b/hw/xfree86/ramdac/TI.h
@@ -1,3 +1,5 @@
+#ifndef _TI_H_
+#define _TI_H_
#include <xf86RamDac.h>
@@ -89,3 +91,5 @@ extern _X_EXPORT TIramdacLoadPaletteProc *TIramdacLoadPaletteWeak(void);
/* Constants */
#define TIDAC_TVP_3026_ID 0x26
#define TIDAC_TVP_3030_ID 0x30
+
+#endif /* _TI_H_ */
diff --git a/hw/xfree86/vbe/vbeModes.h b/hw/xfree86/vbe/vbeModes.h
index 4477987..f3aa27e 100644
--- a/hw/xfree86/vbe/vbeModes.h
+++ b/hw/xfree86/vbe/vbeModes.h
@@ -29,6 +29,9 @@
*/
#ifndef _VBE_MODES_H
+#define _VBE_MODES_H
+
+#include "vbe.h"
/*
* This is intended to be stored in the DisplayModeRec's private area.
@@ -87,4 +90,4 @@ extern _X_EXPORT int VBEValidateModes(ScrnInfoPtr scrp, DisplayModePtr availMode
LookupModeFlags strategy);
extern _X_EXPORT void VBEPrintModes(ScrnInfoPtr scrp);
-#endif /* VBE_MODES_H */
+#endif /* _VBE_MODES_H */
diff --git a/hw/xfree86/xaa/xaaWrapper.h b/hw/xfree86/xaa/xaaWrapper.h
index f554741..141997c 100644
--- a/hw/xfree86/xaa/xaaWrapper.h
+++ b/hw/xfree86/xaa/xaaWrapper.h
@@ -2,6 +2,8 @@
#ifndef _XAA_WRAPPER_H
# define _XAA_WRAPPER_H
+#include "xaa.h"
+
typedef void (*SyncFunc)(ScreenPtr);
extern _X_EXPORT Bool xaaSetupWrapper(ScreenPtr pScreen,
diff --git a/hw/xfree86/xaa/xaarop.h b/hw/xfree86/xaa/xaarop.h
index edfd75a..ef19c21 100644
--- a/hw/xfree86/xaa/xaarop.h
+++ b/hw/xfree86/xaa/xaarop.h
@@ -30,6 +30,8 @@
#ifndef _XAAROP_H
#define _XAAROP_H
+#include "xf86str.h"
+
#define ROP_DST 0x00000001
#define ROP_SRC 0x00000002
#define ROP_PAT 0x00000004
diff --git a/include/XIstubs.h b/include/XIstubs.h
index ba2f861..87a1395 100644
--- a/include/XIstubs.h
+++ b/include/XIstubs.h
@@ -26,6 +26,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef XI_STUBS_H
#define XI_STUBS_H 1
+#include "input.h"
+#include <X11/extensions/XIproto.h>
+
extern _X_EXPORT void
CloseInputDevice (
DeviceIntPtr /* d */,
diff --git a/include/closestr.h b/include/closestr.h
index 8855a5f..fc0766c 100644
--- a/include/closestr.h
+++ b/include/closestr.h
@@ -36,6 +36,7 @@ from The Open Group.
#include "dix.h"
#include "misc.h"
#include "gcstruct.h"
+#include <X11/fonts/font.h>
/* closure structures */
diff --git a/include/dix.h b/include/dix.h
index 4aa03c2..2102223 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -514,7 +514,9 @@ extern _X_EXPORT void
ScreenRestructured (ScreenPtr pScreen);
#endif
+#ifndef HAVE_FFS
extern _X_EXPORT int ffs(int i);
+#endif
/*
* callback manager stuff
diff --git a/include/dixevents.h b/include/dixevents.h
index b915345..ffc49e4 100644
--- a/include/dixevents.h
+++ b/include/dixevents.h
@@ -26,6 +26,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef DIXEVENTS_H
#define DIXEVENTS_H
+#include "input.h"
+#include "cursor.h"
+
extern _X_EXPORT void SetCriticalEvent(int /* event */);
extern _X_EXPORT CursorPtr GetSpriteCursor(DeviceIntPtr /*pDev*/);
diff --git a/include/dixgrabs.h b/include/dixgrabs.h
index 36ab2b9..95b895f 100644
--- a/include/dixgrabs.h
+++ b/include/dixgrabs.h
@@ -26,6 +26,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef DIXGRABS_H
#define DIXGRABS_H 1
+#include "input.h"
+#include "cursor.h"
+
extern _X_EXPORT GrabPtr CreateGrab(
int /* client */,
DeviceIntPtr /* device */,
diff --git a/include/exevents.h b/include/exevents.h
index 2a7ec97..3bf24da 100644
--- a/include/exevents.h
+++ b/include/exevents.h
@@ -31,6 +31,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define EXEVENTS_H
#include <X11/extensions/XIproto.h>
+#include "inputstr.h"
/**
* Attached to the devPrivates of each client. Specifies the version number as
diff --git a/include/extension.h b/include/extension.h
index 29a11c3..79f4808 100644
--- a/include/extension.h
+++ b/include/extension.h
@@ -48,6 +48,8 @@ SOFTWARE.
#ifndef EXTENSION_H
#define EXTENSION_H
+#include "dix.h"
+
_XFUNCPROTOBEGIN
extern _X_EXPORT unsigned short StandardMinorOpcode(ClientPtr /*client*/);
diff --git a/include/hotplug.h b/include/hotplug.h
index d074df3..5be1eec 100644
--- a/include/hotplug.h
+++ b/include/hotplug.h
@@ -26,6 +26,8 @@
#ifndef HOTPLUG_H
#define HOTPLUG_H
+#include <X11/Xfuncproto.h>
+
extern _X_EXPORT void config_init(void);
extern _X_EXPORT void config_fini(void);
diff --git a/include/misc.h b/include/misc.h
index 6a920cc..ccdb83a 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -242,6 +242,7 @@ typedef struct pixman_box16 *BoxPtr;
typedef struct _xEvent *xEventPtr;
typedef struct _xRectangle *xRectanglePtr;
typedef struct _GrabRec *GrabPtr;
+typedef struct _xArc xArc;
/* typedefs from other places - duplicated here to minimize the amount
* of unnecessary junk that one would normally have to include to get
diff --git a/include/swaprep.h b/include/swaprep.h
index 8c02737..6ad3c71 100644
--- a/include/swaprep.h
+++ b/include/swaprep.h
@@ -26,6 +26,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SWAPREP_H
#define SWAPREP_H 1
+#include "dix.h"
+
extern _X_EXPORT void Swap32Write(
ClientPtr /* pClient */,
int /* size */,
diff --git a/include/swapreq.h b/include/swapreq.h
index 8038f02..79fd293 100644
--- a/include/swapreq.h
+++ b/include/swapreq.h
@@ -26,6 +26,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef SWAPREQ_H
#define SWAPREQ_H 1
+#include "dix.h"
+
extern _X_EXPORT void SwapColorItem(
xColorItem * /* pItem */);
diff --git a/include/xkbfile.h b/include/xkbfile.h
index 346f213..bfdd4f1 100644
--- a/include/xkbfile.h
+++ b/include/xkbfile.h
@@ -27,6 +27,9 @@
#ifndef _XKBFILE_H_
#define _XKBFILE_H_ 1
+#include <stdio.h>
+#include <X11/Xdefs.h>
+#include <X11/Xfuncproto.h>
#include "xkbstr.h"
/***====================================================================***/
diff --git a/include/xkbrules.h b/include/xkbrules.h
index ff77ddc..b975681 100644
--- a/include/xkbrules.h
+++ b/include/xkbrules.h
@@ -1,6 +1,8 @@
#ifndef _XKBRULES_H_
#define _XKBRULES_H_ 1
+#include "xkbstr.h"
+
/************************************************************
Copyright (c) 1996 by Silicon Graphics Computer Systems, Inc.
diff --git a/include/xkbstr.h b/include/xkbstr.h
index 5eebe41..73d4d82 100644
--- a/include/xkbstr.h
+++ b/include/xkbstr.h
@@ -28,6 +28,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define _XKBSTR_H_
#include <X11/extensions/XKB.h>
+#include "misc.h"
#define XkbCharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f))
#define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff)))
diff --git a/mi/mifillarc.h b/mi/mifillarc.h
index 1158754..6f7ec6d 100644
--- a/mi/mifillarc.h
+++ b/mi/mifillarc.h
@@ -28,6 +28,8 @@ in this Software without prior written authorization from The Open Group.
#ifndef __MIFILLARC_H__
#define __MIFILLARC_H__
+#include "gc.h"
+
#define FULLCIRCLE (360 * 64)
typedef struct _miFillArc {
diff --git a/mi/mifpoly.h b/mi/mifpoly.h
index ffd19a3..e607ec1 100644
--- a/mi/mifpoly.h
+++ b/mi/mifpoly.h
@@ -48,7 +48,7 @@ SOFTWARE.
#ifndef __MIFPOLY_H__
#define __MIFPOLY_H__
-#include <X11/Xfuncproto.h>
+#include "gc.h"
#define EPSILON 0.000001
#define ISEQUAL(a,b) (Fabs((a) - (b)) <= EPSILON)
diff --git a/mi/migc.h b/mi/migc.h
index df5805f..4313396 100644
--- a/mi/migc.h
+++ b/mi/migc.h
@@ -26,6 +26,10 @@ from The Open Group.
*/
+#ifndef _MIGC_H_
+#define _MIGC_H_
+
+#include "gc.h"
extern _X_EXPORT void miChangeGC(
GCPtr /*pGC*/,
@@ -62,3 +66,5 @@ extern _X_EXPORT void miComputeCompositeClip(
GCPtr /*pGC*/,
DrawablePtr /*pDrawable*/
);
+
+#endif /* _MIGC_H_ */
diff --git a/mi/miline.h b/mi/miline.h
index e1dd6d5..a7d1b18 100644
--- a/mi/miline.h
+++ b/mi/miline.h
@@ -26,6 +26,7 @@ in this Software without prior written authorization from The Open Group.
*/
#ifndef MILINE_H
+#define MILINE_H
#include "screenint.h"
#include "privates.h"
diff --git a/mi/mioverlay.h b/mi/mioverlay.h
index dca65ad..7cc44bf 100644
--- a/mi/mioverlay.h
+++ b/mi/mioverlay.h
@@ -6,6 +6,10 @@
#ifndef __MIOVERLAY_H
#define __MIOVERLAY_H
+#include "screenint.h"
+#include "window.h"
+#include "gc.h"
+
typedef void (*miOverlayTransFunc)(ScreenPtr, int, BoxPtr);
typedef Bool (*miOverlayInOverlayFunc)(WindowPtr);
diff --git a/mi/mispans.h b/mi/mispans.h
index 8151415..5c8a9d7 100644
--- a/mi/mispans.h
+++ b/mi/mispans.h
@@ -48,6 +48,10 @@ SOFTWARE.
#ifndef MISPANS_H
#define MISPANS_H
+#include "misc.h"
+#include "gc.h"
+#include "region.h"
+
typedef struct {
int count; /* number of spans */
DDXPointPtr points; /* pointer to list of start points */
diff --git a/mi/miwideline.h b/mi/miwideline.h
index 1f615d6..0dd8dcd 100644
--- a/mi/miwideline.h
+++ b/mi/miwideline.h
@@ -28,6 +28,9 @@ from The Open Group.
/* Author: Keith Packard, MIT X Consortium */
+#ifndef _MIWIDELINE_H_
+#define _MIWIDELINE_H_
+
#include "mispans.h"
#include "mifpoly.h" /* for ICEIL */
@@ -178,3 +181,4 @@ extern _X_EXPORT int miPolyBuildPoly(PolyVertexPtr vertices, PolySlopePtr slopes
PolyEdgePtr right, int *pnleft, int *pnright,
int *h);
+#endif /* _MIWIDELINE_H_ */
diff --git a/mi/mizerarc.h b/mi/mizerarc.h
index 1612a52..8c9a065 100644
--- a/mi/mizerarc.h
+++ b/mi/mizerarc.h
@@ -24,6 +24,10 @@ in this Software without prior written authorization from The Open Group.
********************************************************/
+#ifndef _MIZERARC_H_
+#define _MIZERARC_H_
+
+#include "misc.h"
typedef struct {
int x;
@@ -124,3 +128,5 @@ extern _X_EXPORT Bool miZeroArcSetup(
miZeroArcRec * /*info*/,
Bool /*ok360*/
);
+
+#endif /* _MIZERARC_H_ */
diff --git a/miext/damage/damage.h b/miext/damage/damage.h
index 9ead925..58ff812 100644
--- a/miext/damage/damage.h
+++ b/miext/damage/damage.h
@@ -27,6 +27,9 @@
#ifndef _DAMAGE_H_
#define _DAMAGE_H_
+#include "region.h"
+#include "pixmap.h"
+
typedef struct _damage *DamagePtr;
typedef enum _damageReportLevel {
diff --git a/render/glyphstr.h b/render/glyphstr.h
index 6c1a837..0c40a87 100644
--- a/render/glyphstr.h
+++ b/render/glyphstr.h
@@ -25,13 +25,14 @@
#ifndef _GLYPHSTR_H_
#define _GLYPHSTR_H_
-#include <X11/extensions/renderproto.h>
#include "picture.h"
#include "screenint.h"
#include "regionstr.h"
#include "miscstruct.h"
#include "privates.h"
+#include <X11/extensions/renderproto.h>
+
#define GlyphFormat1 0
#define GlyphFormat4 1
#define GlyphFormat8 2
diff --git a/render/picturestr.h b/render/picturestr.h
index 194db11..ed6145e 100644
--- a/render/picturestr.h
+++ b/render/picturestr.h
@@ -24,6 +24,7 @@
#ifndef _PICTURESTR_H_
#define _PICTURESTR_H_
+#include "pixmapstr.h"
#include "scrnintstr.h"
#include "glyphstr.h"
#include "resource.h"
diff --git a/render/renderedge.h b/render/renderedge.h
index 6585aeb..7827b60 100644
--- a/render/renderedge.h
+++ b/render/renderedge.h
@@ -23,6 +23,7 @@
#ifndef _RENDEREDGE_H_
#define _RENDEREDGE_H_
+#include "picture.h"
#include "picturestr.h"
#define MAX_ALPHA(n) ((1 << (n)) - 1)
diff --git a/xfixes/xfixes.h b/xfixes/xfixes.h
index ade2f82..4614f26 100644
--- a/xfixes/xfixes.h
+++ b/xfixes/xfixes.h
@@ -27,6 +27,7 @@
#ifndef _XFIXES_H_
#define _XFIXES_H_
+#include "region.h"
#include "resource.h"
extern _X_EXPORT RESTYPE RegionResType;
--
1.5.6
_______________________________________________
xorg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xorg