summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--XTrap/xtrapdi.c2
-rw-r--r--XTrap/xtrapdiswp.c2
-rw-r--r--XTrap/xtrapditbl.c2
-rw-r--r--Xext/appgroup.c2
-rw-r--r--Xext/bigreq.c4
-rw-r--r--Xext/cup.c2
-rw-r--r--Xext/dpms.c4
-rw-r--r--Xext/fontcache.c2
-rw-r--r--Xext/mbuf.c2
-rw-r--r--Xext/mbufbf.c4
-rw-r--r--Xext/mbufpx.c4
-rw-r--r--Xext/mitmisc.c4
-rw-r--r--Xext/panoramiX.c2
-rw-r--r--Xext/panoramiXSwap.c2
-rw-r--r--Xext/panoramiXprocs.c2
-rw-r--r--Xext/saver.c4
-rw-r--r--Xext/shape.c4
-rw-r--r--Xext/shm.c4
-rw-r--r--Xext/sleepuntil.c2
-rw-r--r--Xext/sync.c4
-rw-r--r--Xext/xcmisc.c4
-rw-r--r--Xext/xevie.c2
-rw-r--r--Xext/xf86bigfont.c4
-rw-r--r--Xext/xprint.c2
-rw-r--r--Xext/xres.c4
-rw-r--r--Xext/xtest.c4
-rw-r--r--Xext/xtest1dd.c2
-rw-r--r--Xext/xtest1di.c4
-rw-r--r--Xext/xvdisp.c2
-rw-r--r--Xext/xvmain.c4
-rw-r--r--Xext/xvmc.c4
-rw-r--r--Xprint/Init.c4
-rw-r--r--Xprint/Util.c2
-rw-r--r--Xprint/mediaSizes.c2
-rw-r--r--Xprint/pcl/Pcl.h2
-rw-r--r--Xprint/ps/Ps.h2
-rw-r--r--Xprint/ps/psout.c2
-rw-r--r--Xprint/ps/psout_ft.c2
-rw-r--r--Xprint/ps/psout_ftpstype1.c2
-rw-r--r--Xprint/ps/psout_ftpstype3.c2
-rw-r--r--Xprint/raster/Raster.c2
-rw-r--r--Xprint/raster/Raster.h2
-rw-r--r--Xprint/raster/RasterAttVal.c2
-rw-r--r--afb/afbbres.c2
-rw-r--r--afb/afbbresd.c2
-rw-r--r--afb/afbgetsp.c2
-rw-r--r--afb/afbmisc.c2
-rw-r--r--afb/afbsetsp.c2
-rw-r--r--cfb/cfbbres.c2
-rw-r--r--cfb/cfbbresd.c2
-rw-r--r--cfb/cfbgetsp.c2
-rw-r--r--cfb/cfbsetsp.c2
-rw-r--r--composite/compint.h4
-rw-r--r--damageext/damageextint.h4
-rw-r--r--dbe/midbe.c4
-rw-r--r--dix/atom.c2
-rw-r--r--dix/colormap.c4
-rw-r--r--dix/devices.c2
-rw-r--r--dix/dixfonts.c2
-rw-r--r--dix/dixutils.c2
-rw-r--r--dix/events.c2
-rw-r--r--dix/extension.c2
-rw-r--r--dix/gc.c2
-rw-r--r--dix/globals.c4
-rw-r--r--dix/glyphcurs.c2
-rw-r--r--dix/grabs.c2
-rw-r--r--dix/initatoms.c2
-rw-r--r--dix/main.c4
-rw-r--r--dix/pixmap.c4
-rw-r--r--dix/privates.c4
-rw-r--r--dix/resource.c4
-rw-r--r--dix/swaprep.c2
-rw-r--r--dix/swapreq.c2
-rw-r--r--dix/window.c4
-rw-r--r--dix/xpstubs.c2
-rw-r--r--hw/darwin/darwin.c2
-rw-r--r--hw/darwin/iokit/xfIOKit.c2
-rw-r--r--hw/darwin/quartz/applewm.c2
-rw-r--r--hw/darwin/quartz/xpr/appledri.c2
-rw-r--r--hw/darwin/quartz/xpr/dri.c2
-rw-r--r--hw/dmx/dmx.c4
-rw-r--r--hw/xfree86/common/xf86Bus.c2
-rw-r--r--hw/xfree86/common/xf86Configure.c2
-rw-r--r--hw/xfree86/common/xf86DPMS.c2
-rw-r--r--hw/xfree86/common/xf86Debug.c2
-rw-r--r--hw/xfree86/common/xf86DoProbe.c2
-rw-r--r--hw/xfree86/common/xf86DoScanPci.c2
-rw-r--r--hw/xfree86/common/xf86Events.c2
-rw-r--r--hw/xfree86/common/xf86Globals.c2
-rw-r--r--hw/xfree86/common/xf86Helper.c2
-rw-r--r--hw/xfree86/common/xf86MiscExt.c2
-rw-r--r--hw/xfree86/common/xf86Mode.c2
-rw-r--r--hw/xfree86/common/xf86Module.h2
-rw-r--r--hw/xfree86/common/xf86Option.c2
-rw-r--r--hw/xfree86/common/xf86RandR.c2
-rw-r--r--hw/xfree86/common/xf86VidMode.c2
-rw-r--r--hw/xfree86/common/xf86cmap.c2
-rw-r--r--hw/xfree86/common/xf86fbBus.c2
-rw-r--r--hw/xfree86/common/xf86fbman.c2
-rw-r--r--hw/xfree86/common/xf86isaBus.c2
-rw-r--r--hw/xfree86/common/xf86noBus.c2
-rw-r--r--hw/xfree86/common/xf86pciBus.c2
-rw-r--r--hw/xfree86/common/xf86sbusBus.c2
-rw-r--r--hw/xfree86/common/xf86str.h2
-rw-r--r--hw/xfree86/common/xf86xv.c2
-rw-r--r--hw/xfree86/common/xf86xvmc.c2
-rw-r--r--hw/xfree86/common/xorgHelper.c2
-rw-r--r--hw/xfree86/ddc/ddcProperty.c2
-rw-r--r--hw/xfree86/ddc/edid.c2
-rw-r--r--hw/xfree86/ddc/interpret_edid.c2
-rw-r--r--hw/xfree86/ddc/print_edid.c2
-rw-r--r--hw/xfree86/ddc/print_vdif.c2
-rw-r--r--hw/xfree86/ddc/xf86DDC.c2
-rw-r--r--hw/xfree86/dixmods/extmod/xf86dga.c2
-rw-r--r--hw/xfree86/dixmods/extmod/xf86dga2.c2
-rw-r--r--hw/xfree86/dixmods/extmod/xf86misc.c2
-rw-r--r--hw/xfree86/dixmods/extmod/xf86vmode.c2
-rw-r--r--hw/xfree86/dixmods/extmod/xvmod.c2
-rw-r--r--hw/xfree86/dri/dri.c2
-rw-r--r--hw/xfree86/dri/xf86dri.c2
-rw-r--r--hw/xfree86/dummylib/fatalerror.c2
-rw-r--r--hw/xfree86/dummylib/getvalidbios.c2
-rw-r--r--hw/xfree86/dummylib/logvwrite.c2
-rw-r--r--hw/xfree86/dummylib/pcitestmulti.c2
-rw-r--r--hw/xfree86/dummylib/verrorf.c2
-rw-r--r--hw/xfree86/dummylib/xalloc.c2
-rw-r--r--hw/xfree86/dummylib/xf86allocscripi.c2
-rw-r--r--hw/xfree86/dummylib/xf86drvmsg.c2
-rw-r--r--hw/xfree86/dummylib/xf86drvmsgverb.c2
-rw-r--r--hw/xfree86/dummylib/xf86errorf.c2
-rw-r--r--hw/xfree86/dummylib/xf86errorfverb.c2
-rw-r--r--hw/xfree86/dummylib/xf86getpagesize.c2
-rw-r--r--hw/xfree86/dummylib/xf86getverb.c2
-rw-r--r--hw/xfree86/dummylib/xf86info.c2
-rw-r--r--hw/xfree86/dummylib/xf86msg.c2
-rw-r--r--hw/xfree86/dummylib/xf86msgverb.c2
-rw-r--r--hw/xfree86/dummylib/xf86opt.c2
-rw-r--r--hw/xfree86/dummylib/xf86screens.c2
-rw-r--r--hw/xfree86/dummylib/xf86servisinit.c2
-rw-r--r--hw/xfree86/dummylib/xf86verbose.c2
-rw-r--r--hw/xfree86/i2c/xf86i2c.c2
-rw-r--r--hw/xfree86/loader/aoutloader.c2
-rw-r--r--hw/xfree86/loader/coffloader.c2
-rw-r--r--hw/xfree86/loader/dixsym.c4
-rw-r--r--hw/xfree86/loader/dlloader.c2
-rw-r--r--hw/xfree86/loader/elfloader.c2
-rw-r--r--hw/xfree86/loader/extsym.c2
-rw-r--r--hw/xfree86/loader/hash.c2
-rw-r--r--hw/xfree86/loader/loader.c2
-rw-r--r--hw/xfree86/loader/loadext.c2
-rw-r--r--hw/xfree86/loader/loadfont.c2
-rw-r--r--hw/xfree86/loader/loadmod.c4
-rw-r--r--hw/xfree86/loader/misym.c2
-rw-r--r--hw/xfree86/loader/xf86sym.c2
-rw-r--r--hw/xfree86/os-support/bsd/bsd_apm.c2
-rw-r--r--hw/xfree86/os-support/bsd/bsd_axp.c2
-rw-r--r--hw/xfree86/os-support/bsd/bsd_jstk.c2
-rw-r--r--hw/xfree86/os-support/bsd/bsd_kqueue_apm.c2
-rw-r--r--hw/xfree86/os-support/bus/xf86Pci.h2
-rw-r--r--hw/xfree86/os-support/linux/lnx_apm.c2
-rw-r--r--hw/xfree86/os-support/linux/lnx_axp.c2
-rw-r--r--hw/xfree86/os-support/linux/lnx_pci.c2
-rw-r--r--hw/xfree86/os-support/misc/xf86_Util.c2
-rw-r--r--hw/xfree86/os-support/shared/libc_wrapper.c2
-rw-r--r--hw/xfree86/os-support/shared/pm_noop.c2
-rw-r--r--hw/xfree86/os-support/xf86_ansic.h2
-rw-r--r--hw/xfree86/rac/xf86RAC.c2
-rw-r--r--hw/xfree86/rac/xf86RAC.h2
-rw-r--r--hw/xfree86/ramdac/xf86HWCurs.c2
-rw-r--r--hw/xfree86/scanpci/xf86ScanPci.c2
-rw-r--r--hw/xfree86/shadowfb/shadow.c2
-rw-r--r--hw/xfree86/utils/pcitweak/pcitweak.c2
-rw-r--r--hw/xfree86/utils/scanpci/scanpci.c2
-rw-r--r--hw/xfree86/vgahw/vgaHW.c2
-rw-r--r--hw/xfree86/vgahw/vgaHW.h2
-rw-r--r--hw/xfree86/xaa/xaaBitBlt.c2
-rw-r--r--hw/xfree86/xaa/xaaCpyArea.c2
-rw-r--r--hw/xfree86/xaa/xaaCpyPlane.c2
-rw-r--r--hw/xfree86/xaa/xaaCpyWin.c2
-rw-r--r--hw/xfree86/xaa/xaaDashLine.c2
-rw-r--r--hw/xfree86/xaa/xaaFallback.c2
-rw-r--r--hw/xfree86/xaa/xaaFillArc.c2
-rw-r--r--hw/xfree86/xaa/xaaFillPoly.c2
-rw-r--r--hw/xfree86/xaa/xaaFillRect.c2
-rw-r--r--hw/xfree86/xaa/xaaGC.c2
-rw-r--r--hw/xfree86/xaa/xaaGCmisc.c2
-rw-r--r--hw/xfree86/xaa/xaaImage.c2
-rw-r--r--hw/xfree86/xaa/xaaInit.c2
-rw-r--r--hw/xfree86/xaa/xaaInitAccel.c2
-rw-r--r--hw/xfree86/xaa/xaaLine.c2
-rw-r--r--hw/xfree86/xaa/xaaLineMisc.c2
-rw-r--r--hw/xfree86/xaa/xaaNonTEText.c2
-rw-r--r--hw/xfree86/xaa/xaaOffscreen.c2
-rw-r--r--hw/xfree86/xaa/xaaOverlay.c2
-rw-r--r--hw/xfree86/xaa/xaaOverlayDF.c2
-rw-r--r--hw/xfree86/xaa/xaaPCache.c2
-rw-r--r--hw/xfree86/xaa/xaaPaintWin.c2
-rw-r--r--hw/xfree86/xaa/xaaPict.c2
-rw-r--r--hw/xfree86/xaa/xaaROP.c2
-rw-r--r--hw/xfree86/xaa/xaaRect.c2
-rw-r--r--hw/xfree86/xaa/xaaSpans.c2
-rw-r--r--hw/xfree86/xaa/xaaStateChange.c2
-rw-r--r--hw/xfree86/xaa/xaaTEText.c2
-rw-r--r--hw/xfree86/xaa/xaaWideLine.c2
-rw-r--r--hw/xfree86/xf4bpp/OScompiler.h2
-rw-r--r--hw/xfree86/xf4bpp/vgaVideo.h2
-rw-r--r--hw/xfree86/xf8_16bpp/cfbscrinit.c2
-rw-r--r--hw/xfree86/xf8_32bpp/cfbscrinit.c2
-rw-r--r--hw/xfree86/xf8_32bpp/xf86overlay.c2
-rw-r--r--hw/xfree86/xf8_32wid/cfbscrinit.c2
-rw-r--r--hw/xfree86/xf8_32wid/cfbwid.c2
-rw-r--r--hw/xnest/Args.c2
-rw-r--r--hw/xnest/Cursor.c2
-rw-r--r--hw/xnest/Display.c2
-rw-r--r--hw/xnest/Events.c2
-rw-r--r--hw/xnest/Font.c2
-rw-r--r--hw/xnest/GetTime.c2
-rw-r--r--hw/xnest/Handlers.c2
-rw-r--r--hw/xnest/Init.c2
-rw-r--r--hw/xnest/Keyboard.c2
-rw-r--r--hw/xnest/Pointer.c2
-rw-r--r--hw/xnest/TestExt.c2
-rw-r--r--hw/xwin/winprefs.h2
-rwxr-xr-xhw/xwin/winwindowswm.c2
-rw-r--r--ilbm/ilbmbres.c2
-rw-r--r--ilbm/ilbmbresd.c2
-rw-r--r--ilbm/ilbmgetsp.c2
-rw-r--r--ilbm/ilbmmisc.c2
-rw-r--r--ilbm/ilbmsetsp.c2
-rw-r--r--include/closestr.h2
-rw-r--r--include/cursor.h2
-rw-r--r--include/extnsionst.h2
-rw-r--r--include/input.h2
-rw-r--r--include/misc.h2
-rw-r--r--include/miscstruct.h2
-rw-r--r--include/os.h2
-rw-r--r--include/pixmap.h2
-rw-r--r--include/propertyst.h2
-rw-r--r--include/resource.h2
-rw-r--r--include/screenint.h2
-rw-r--r--include/window.h2
-rw-r--r--iplan2p4/iplbres.c2
-rw-r--r--iplan2p4/iplbresd.c2
-rw-r--r--iplan2p4/iplgetsp.c2
-rw-r--r--iplan2p4/iplsetsp.c2
-rw-r--r--lbx/lbxcmap.c4
-rw-r--r--lbx/lbxdix.c4
-rw-r--r--lbx/lbxexts.c2
-rw-r--r--lbx/lbxgfx.c4
-rw-r--r--lbx/lbxmain.c4
-rw-r--r--lbx/lbxopts.c2
-rw-r--r--lbx/lbxprop.c4
-rw-r--r--lbx/lbxsquish.c2
-rw-r--r--lbx/lbxswap.c4
-rw-r--r--lbx/lbxtags.c2
-rw-r--r--mfb/mfbbres.c2
-rw-r--r--mfb/mfbbresd.c2
-rw-r--r--mfb/mfbgetsp.c2
-rw-r--r--mfb/mfbmisc.c2
-rw-r--r--mfb/mfbsetsp.c2
-rw-r--r--mi/miarc.c2
-rw-r--r--mi/mibitblt.c2
-rw-r--r--mi/mibstore.c2
-rw-r--r--mi/micursor.c2
-rw-r--r--mi/miexpose.c2
-rw-r--r--mi/mifillrct.c2
-rw-r--r--mi/miinitext.c2
-rw-r--r--mi/mipolyutil.c2
-rw-r--r--mi/miscrinit.c2
-rw-r--r--mi/mispans.c2
-rw-r--r--mi/mizerclip.c2
-rw-r--r--mi/mizerline.c2
-rw-r--r--os/WaitFor.c2
-rw-r--r--os/access.c2
-rw-r--r--os/connection.c2
-rw-r--r--os/io.c4
-rw-r--r--os/k5auth.c2
-rw-r--r--os/lbxio.c4
-rw-r--r--os/mitauth.c2
-rw-r--r--os/oscolor.c4
-rw-r--r--os/osinit.c2
-rw-r--r--os/rpcauth.c4
-rw-r--r--os/secauth.c2
-rw-r--r--os/utils.c2
-rw-r--r--os/xalloc.c2
-rw-r--r--os/xdmauth.c2
-rw-r--r--os/xdmcp.c2
-rw-r--r--os/xprintf.c2
-rw-r--r--randr/randr.c4
-rw-r--r--record/set.c2
-rw-r--r--render/filter.c4
-rw-r--r--render/glyph.c4
-rw-r--r--render/picture.c4
-rw-r--r--render/render.c4
-rwxr-xr-xxfixes/xfixesint.h4
-rw-r--r--xkb/ddxConfig.c2
-rw-r--r--xkb/xkb.c2
-rw-r--r--xkb/xkbActions.c2
-rw-r--r--xkb/xkbInit.c2
-rw-r--r--xkb/xkbLEDs.c2
-rw-r--r--xkb/xkbPrKeyEv.c2
-rw-r--r--xkb/xkbPrOtherEv.c2
-rw-r--r--xkb/xkbSwap.c2
-rw-r--r--xkb/xkbUtils.c2
304 files changed, 350 insertions, 350 deletions
diff --git a/XTrap/xtrapdi.c b/XTrap/xtrapdi.c
index 1435dcd80..f08c6155a 100644
--- a/XTrap/xtrapdi.c
+++ b/XTrap/xtrapdi.c
@@ -65,7 +65,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/X.h>
#include <X11/Xproto.h>
#include "input.h" /* Server DevicePtr definitions */
-#include <X11/misc.h> /* Server swapping macros */
+#include "misc.h" /* Server swapping macros */
#include "dixstruct.h" /* Server ClientRec definitions */
#include "resource.h" /* Used with the MakeAtom call */
#ifdef PC
diff --git a/XTrap/xtrapdiswp.c b/XTrap/xtrapdiswp.c
index 77aa0f1a3..c43f6e332 100644
--- a/XTrap/xtrapdiswp.c
+++ b/XTrap/xtrapdiswp.c
@@ -56,7 +56,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/Xprotostr.h>
#include <X11/extensions/xtrapdi.h>
#include "input.h" /* Server DevicePtr definitions */
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#ifdef PC
# include "extnsist.h"
diff --git a/XTrap/xtrapditbl.c b/XTrap/xtrapditbl.c
index ae1586028..a9ceddb3d 100644
--- a/XTrap/xtrapditbl.c
+++ b/XTrap/xtrapditbl.c
@@ -46,7 +46,7 @@ SOFTWARE.
#include <X11/Xprotostr.h>
#include <X11/extensions/xtrapdi.h>
#include "input.h" /* Server DevicePtr definitions */
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#ifdef PC
# include "extnsist.h"
diff --git a/Xext/appgroup.c b/Xext/appgroup.c
index bd2d2f8d9..ad4afa9e4 100644
--- a/Xext/appgroup.c
+++ b/Xext/appgroup.c
@@ -34,7 +34,7 @@ from The Open Group.
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include "scrnintstr.h"
diff --git a/Xext/bigreq.c b/Xext/bigreq.c
index 8b08ba5dc..1af8a930b 100644
--- a/Xext/bigreq.c
+++ b/Xext/bigreq.c
@@ -35,8 +35,8 @@ from The Open Group.
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include <X11/extensions/bigreqstr.h>
diff --git a/Xext/cup.c b/Xext/cup.c
index 1ce2885b7..4db62cf15 100644
--- a/Xext/cup.c
+++ b/Xext/cup.c
@@ -34,7 +34,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include "colormapst.h"
diff --git a/Xext/dpms.c b/Xext/dpms.c
index 5739da6a2..3e79602d1 100644
--- a/Xext/dpms.c
+++ b/Xext/dpms.c
@@ -41,8 +41,8 @@ Equipment Corporation.
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include "opaque.h"
diff --git a/Xext/fontcache.c b/Xext/fontcache.c
index 57f788954..9ab23a122 100644
--- a/Xext/fontcache.c
+++ b/Xext/fontcache.c
@@ -39,7 +39,7 @@
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include "scrnintstr.h"
diff --git a/Xext/mbuf.c b/Xext/mbuf.c
index 51cc91a27..3129edd87 100644
--- a/Xext/mbuf.c
+++ b/Xext/mbuf.c
@@ -35,7 +35,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/X.h>
#include <X11/Xproto.h>
#include "window.h"
-#include <X11/os.h>
+#include "os.h"
#include "windowstr.h"
#include "scrnintstr.h"
#include "pixmapstr.h"
diff --git a/Xext/mbufbf.c b/Xext/mbufbf.c
index 7af856b98..8585c52d2 100644
--- a/Xext/mbufbf.c
+++ b/Xext/mbufbf.c
@@ -36,8 +36,8 @@ in this Software without prior written authorization from The Open Group.
#include <stdio.h>
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "windowstr.h"
#include "scrnintstr.h"
#include "pixmapstr.h"
diff --git a/Xext/mbufpx.c b/Xext/mbufpx.c
index 297614e43..c986217ee 100644
--- a/Xext/mbufpx.c
+++ b/Xext/mbufpx.c
@@ -35,8 +35,8 @@ in this Software without prior written authorization from The Open Group.
#include <stdio.h>
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "windowstr.h"
#include "scrnintstr.h"
#include "pixmapstr.h"
diff --git a/Xext/mitmisc.c b/Xext/mitmisc.c
index 18c58ab8f..f7b0ee55c 100644
--- a/Xext/mitmisc.c
+++ b/Xext/mitmisc.c
@@ -36,8 +36,8 @@ in this Software without prior written authorization from The Open Group.
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "dixstruct.h"
#include "extnsionst.h"
#define _MITMISC_SERVER_
diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index 1fa8756e2..f1d7aa77d 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -34,7 +34,7 @@ Equipment Corporation.
#include <X11/X.h>
#include <X11/Xproto.h>
#include <X11/Xarch.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "cursor.h"
#include "cursorstr.h"
#include "extnsionst.h"
diff --git a/Xext/panoramiXSwap.c b/Xext/panoramiXSwap.c
index 51b816695..e0548df7b 100644
--- a/Xext/panoramiXSwap.c
+++ b/Xext/panoramiXSwap.c
@@ -32,7 +32,7 @@ Equipment Corporation.
#include <stdio.h>
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "cursor.h"
#include "cursorstr.h"
#include "extnsionst.h"
diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c
index 0b6183c42..79a5a3290 100644
--- a/Xext/panoramiXprocs.c
+++ b/Xext/panoramiXprocs.c
@@ -45,7 +45,7 @@ Equipment Corporation.
#include "opaque.h"
#include "inputstr.h"
#include "migc.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include "panoramiX.h"
#include "panoramiXsrv.h"
diff --git a/Xext/saver.c b/Xext/saver.c
index 53ce7e4bc..7f9a84faa 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -38,8 +38,8 @@ in this Software without prior written authorization from the X Consortium.
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "windowstr.h"
#include "scrnintstr.h"
#include "pixmapstr.h"
diff --git a/Xext/shape.c b/Xext/shape.c
index 81861186a..e797878ab 100644
--- a/Xext/shape.c
+++ b/Xext/shape.c
@@ -35,8 +35,8 @@ in this Software without prior written authorization from The Open Group.
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "windowstr.h"
#include "scrnintstr.h"
#include "pixmapstr.h"
diff --git a/Xext/shm.c b/Xext/shm.c
index 751d51fbe..b30a36849 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -49,8 +49,8 @@ in this Software without prior written authorization from The Open Group.
#define NEED_EVENTS
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "dixstruct.h"
#include "resource.h"
#include "scrnintstr.h"
diff --git a/Xext/sleepuntil.c b/Xext/sleepuntil.c
index b30f7fd8e..8e0008cab 100644
--- a/Xext/sleepuntil.c
+++ b/Xext/sleepuntil.c
@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
#include "sleepuntil.h"
#include <X11/X.h>
#include <X11/Xmd.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "windowstr.h"
#include "dixstruct.h"
#include "pixmapstr.h"
diff --git a/Xext/sync.c b/Xext/sync.c
index 0d69c02bd..0e0df8305 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -61,8 +61,8 @@ PERFORMANCE OF THIS SOFTWARE.
#include <X11/X.h>
#include <X11/Xproto.h>
#include <X11/Xmd.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "extnsionst.h"
#include "dixstruct.h"
#include "resource.h"
diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c
index ee3af3f72..45629e660 100644
--- a/Xext/xcmisc.c
+++ b/Xext/xcmisc.c
@@ -36,8 +36,8 @@ from The Open Group.
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include "swaprep.h"
diff --git a/Xext/xevie.c b/Xext/xevie.c
index 300f3c9f4..556641876 100644
--- a/Xext/xevie.c
+++ b/Xext/xevie.c
@@ -40,7 +40,7 @@ of the copyright holder.
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include "colormapst.h"
diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index 145596782..f9cedca4b 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -66,8 +66,8 @@
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "dixstruct.h"
#include "gcstruct.h"
#include "dixfontstr.h"
diff --git a/Xext/xprint.c b/Xext/xprint.c
index 86e74bee3..c59a8c008 100644
--- a/Xext/xprint.c
+++ b/Xext/xprint.c
@@ -76,7 +76,7 @@ copyright holders.
#define NEED_EVENTS
#include <X11/Xproto.h>
#undef NEED_EVENTS
-#include <X11/misc.h>
+#include "misc.h"
#include "windowstr.h"
#include "scrnintstr.h"
#include "pixmapstr.h"
diff --git a/Xext/xres.c b/Xext/xres.c
index 1d3105a28..5c42da426 100644
--- a/Xext/xres.c
+++ b/Xext/xres.c
@@ -12,8 +12,8 @@
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include "swaprep.h"
diff --git a/Xext/xtest.c b/Xext/xtest.c
index 965f0845b..413437192 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -36,8 +36,8 @@ from The Open Group.
#include <X11/X.h>
#define NEED_EVENTS
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include "windowstr.h"
diff --git a/Xext/xtest1dd.c b/Xext/xtest1dd.c
index c232715ba..81d283c36 100644
--- a/Xext/xtest1dd.c
+++ b/Xext/xtest1dd.c
@@ -70,7 +70,7 @@ University of California.
#include <X11/X.h>
#include <X11/Xmd.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#define XTestSERVER_SIDE
#include <X11/extensions/xtestext1.h>
diff --git a/Xext/xtest1di.c b/Xext/xtest1di.c
index bc35d0590..6a66c7f95 100644
--- a/Xext/xtest1di.c
+++ b/Xext/xtest1di.c
@@ -69,8 +69,8 @@ University of California.
#include <stdio.h>
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "gcstruct.h"
#include "extnsionst.h"
#include "dixstruct.h"
diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
index 709b75ca7..98e854fed 100644
--- a/Xext/xvdisp.c
+++ b/Xext/xvdisp.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "scrnintstr.h"
#include "windowstr.h"
#include "pixmapstr.h"
diff --git a/Xext/xvmain.c b/Xext/xvmain.c
index 36046f89b..3a4e82179 100644
--- a/Xext/xvmain.c
+++ b/Xext/xvmain.c
@@ -81,8 +81,8 @@ SOFTWARE.
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "scrnintstr.h"
#include "windowstr.h"
#include "pixmapstr.h"
diff --git a/Xext/xvmc.c b/Xext/xvmc.c
index 65211faa0..37fb153ab 100644
--- a/Xext/xvmc.c
+++ b/Xext/xvmc.c
@@ -8,8 +8,8 @@
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "dixstruct.h"
#include "resource.h"
#include "scrnintstr.h"
diff --git a/Xprint/Init.c b/Xprint/Init.c
index 194e434f3..0779eda10 100644
--- a/Xprint/Init.c
+++ b/Xprint/Init.c
@@ -77,7 +77,7 @@ copyright holders.
#include "screenint.h"
#include "input.h"
#include "cursor.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "windowstr.h"
#include "inputstr.h"
@@ -94,7 +94,7 @@ typedef char *XPointer;
#include "DiPrint.h"
#include "attributes.h"
-#include <X11/os.h>
+#include "os.h"
#include "spooler.h"
static void GenericScreenInit(
diff --git a/Xprint/Util.c b/Xprint/Util.c
index c1696becf..069595b9a 100644
--- a/Xprint/Util.c
+++ b/Xprint/Util.c
@@ -45,7 +45,7 @@ copyright holders.
#include <stdio.h>
#include <sys/wait.h>
#include <sys/stat.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include <X11/extensions/Print.h>
diff --git a/Xprint/mediaSizes.c b/Xprint/mediaSizes.c
index aedf32f1f..7f582199d 100644
--- a/Xprint/mediaSizes.c
+++ b/Xprint/mediaSizes.c
@@ -62,7 +62,7 @@ copyright holders.
#include <X11/X.h>
#include "dixstruct.h"
#include "screenint.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "scrnintstr.h"
#include <X11/fonts/fontstruct.h>
diff --git a/Xprint/pcl/Pcl.h b/Xprint/pcl/Pcl.h
index 59656be1a..bb1f52b2c 100644
--- a/Xprint/pcl/Pcl.h
+++ b/Xprint/pcl/Pcl.h
@@ -77,7 +77,7 @@ typedef char *XPointer;
#define Status int
#define True 1
#define False 0
-#include <X11/misc.h>
+#include "misc.h"
#include <X11/Xfuncproto.h>
#include <X11/Xresource.h>
#include "attributes.h"
diff --git a/Xprint/ps/Ps.h b/Xprint/ps/Ps.h
index 32a2b5346..781161d8a 100644
--- a/Xprint/ps/Ps.h
+++ b/Xprint/ps/Ps.h
@@ -112,7 +112,7 @@ typedef char *XPointer;
#define False 0
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include <X11/Xfuncproto.h>
#include <X11/Xresource.h>
#include "attributes.h"
diff --git a/Xprint/ps/psout.c b/Xprint/ps/psout.c
index ffaf863ed..376feec03 100644
--- a/Xprint/ps/psout.c
+++ b/Xprint/ps/psout.c
@@ -80,7 +80,7 @@ in this Software without prior written authorization from The Open Group.
#include <stdlib.h>
#include <stdio.h>
-#include <X11/os.h>
+#include "os.h"
#define USE_PSOUT_PRIVATE 1
#include "psout.h"
#ifdef XP_USE_FREETYPE
diff --git a/Xprint/ps/psout_ft.c b/Xprint/ps/psout_ft.c
index fbb7e3ec4..a140ebcb1 100644
--- a/Xprint/ps/psout_ft.c
+++ b/Xprint/ps/psout_ft.c
@@ -27,7 +27,7 @@ THE SOFTWARE.
#include <stdlib.h>
#include <stdio.h>
-#include <X11/os.h>
+#include "os.h"
#define USE_PSOUT_PRIVATE 1
#include "psout.h"
diff --git a/Xprint/ps/psout_ftpstype1.c b/Xprint/ps/psout_ftpstype1.c
index 6860eaf2a..806338efd 100644
--- a/Xprint/ps/psout_ftpstype1.c
+++ b/Xprint/ps/psout_ftpstype1.c
@@ -31,7 +31,7 @@ THE SOFTWARE.
#include <errno.h>
#include <sys/wait.h>
-#include <X11/os.h>
+#include "os.h"
#define USE_PSOUT_PRIVATE 1
#include "psout.h"
diff --git a/Xprint/ps/psout_ftpstype3.c b/Xprint/ps/psout_ftpstype3.c
index 1d9b00c7c..71cac8609 100644
--- a/Xprint/ps/psout_ftpstype3.c
+++ b/Xprint/ps/psout_ftpstype3.c
@@ -27,7 +27,7 @@ THE SOFTWARE.
#include <stdlib.h>
#include <stdio.h>
-#include <X11/os.h>
+#include "os.h"
#define USE_PSOUT_PRIVATE 1
#include "psout.h"
diff --git a/Xprint/raster/Raster.c b/Xprint/raster/Raster.c
index 3651c3f5d..781327b33 100644
--- a/Xprint/raster/Raster.c
+++ b/Xprint/raster/Raster.c
@@ -66,7 +66,7 @@ copyright holders.
#include <X11/Xproto.h>
#undef NEED_EVENTS
#include <X11/Xatom.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include "scrnintstr.h"
#include "screenint.h"
diff --git a/Xprint/raster/Raster.h b/Xprint/raster/Raster.h
index d4dbc22d4..25da756e5 100644
--- a/Xprint/raster/Raster.h
+++ b/Xprint/raster/Raster.h
@@ -61,7 +61,7 @@ typedef char *XPointer;
#define Status int
#define True 1
#define False 0
-#include <X11/misc.h>
+#include "misc.h"
#include <X11/Xfuncproto.h>
#include <X11/Xresource.h>
#include "attributes.h"
diff --git a/Xprint/raster/RasterAttVal.c b/Xprint/raster/RasterAttVal.c
index 3bba176d1..fc00cde5a 100644
--- a/Xprint/raster/RasterAttVal.c
+++ b/Xprint/raster/RasterAttVal.c
@@ -38,7 +38,7 @@ copyright holders.
#include <stdio.h>
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include "scrnintstr.h"
#include "screenint.h"
diff --git a/afb/afbbres.c b/afb/afbbres.c
index baf8d996f..6ee09b9e4 100644
--- a/afb/afbbres.c
+++ b/afb/afbbres.c
@@ -54,7 +54,7 @@ SOFTWARE.
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "afb.h"
#include "maskbits.h"
#include "miline.h"
diff --git a/afb/afbbresd.c b/afb/afbbresd.c
index a5a9cd134..52cb62cab 100644
--- a/afb/afbbresd.c
+++ b/afb/afbbresd.c
@@ -53,7 +53,7 @@ SOFTWARE.
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "afb.h"
#include "maskbits.h"
#include "miline.h"
diff --git a/afb/afbgetsp.c b/afb/afbgetsp.c
index 10384615a..3cc2e2f6e 100644
--- a/afb/afbgetsp.c
+++ b/afb/afbgetsp.c
@@ -56,7 +56,7 @@ SOFTWARE.
#include <X11/X.h>
#include <X11/Xmd.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "region.h"
#include "gc.h"
#include "windowstr.h"
diff --git a/afb/afbmisc.c b/afb/afbmisc.c
index 08ebc62f7..e5a4f492d 100644
--- a/afb/afbmisc.c
+++ b/afb/afbmisc.c
@@ -53,7 +53,7 @@ SOFTWARE.
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "cursor.h"
#include "scrnintstr.h"
diff --git a/afb/afbsetsp.c b/afb/afbsetsp.c
index f039cd9f0..3a078ffa9 100644
--- a/afb/afbsetsp.c
+++ b/afb/afbsetsp.c
@@ -56,7 +56,7 @@ SOFTWARE.
#include <X11/X.h>
#include <X11/Xmd.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "regionstr.h"
#include "gcstruct.h"
#include "windowstr.h"
diff --git a/cfb/cfbbres.c b/cfb/cfbbres.c
index fc6de4898..2251fb885 100644
--- a/cfb/cfbbres.c
+++ b/cfb/cfbbres.c
@@ -51,7 +51,7 @@ SOFTWARE.
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "cfb.h"
#include "cfbmskbits.h"
#include "servermd.h"
diff --git a/cfb/cfbbresd.c b/cfb/cfbbresd.c
index ada5034d5..cc27eb5dc 100644
--- a/cfb/cfbbresd.c
+++ b/cfb/cfbbresd.c
@@ -51,7 +51,7 @@ SOFTWARE.
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "cfb.h"
#include "cfbmskbits.h"
#include "miline.h"
diff --git a/cfb/cfbgetsp.c b/cfb/cfbgetsp.c
index 08651a9ba..44e31a241 100644
--- a/cfb/cfbgetsp.c
+++ b/cfb/cfbgetsp.c
@@ -55,7 +55,7 @@ SOFTWARE.
#include <X11/Xmd.h>
#include "servermd.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "region.h"
#include "gc.h"
#include "windowstr.h"
diff --git a/cfb/cfbsetsp.c b/cfb/cfbsetsp.c
index 7501d938b..56317cb91 100644
--- a/cfb/cfbsetsp.c
+++ b/cfb/cfbsetsp.c
@@ -55,7 +55,7 @@ SOFTWARE.
#include <X11/Xmd.h>
#include "servermd.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "regionstr.h"
#include "gcstruct.h"
#include "windowstr.h"
diff --git a/composite/compint.h b/composite/compint.h
index 989e5ed94..88f0e6899 100644
--- a/composite/compint.h
+++ b/composite/compint.h
@@ -29,9 +29,9 @@
#ifndef _COMPINT_H_
#define _COMPINT_H_
-#include <X11/misc.h>
+#include "misc.h"
#include "scrnintstr.h"
-#include <X11/os.h>
+#include "os.h"
#include "regionstr.h"
#include "validate.h"
#include "windowstr.h"
diff --git a/damageext/damageextint.h b/damageext/damageextint.h
index 4e1a29e44..6f14e4e97 100644
--- a/damageext/damageextint.h
+++ b/damageext/damageextint.h
@@ -32,8 +32,8 @@
#define NEED_EVENTS
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include <X11/extensions/damageproto.h>
diff --git a/dbe/midbe.c b/dbe/midbe.c
index c639583f1..235693bb2 100644
--- a/dbe/midbe.c
+++ b/dbe/midbe.c
@@ -43,8 +43,8 @@
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "windowstr.h"
#include "scrnintstr.h"
#include "pixmapstr.h"
diff --git a/dix/atom.c b/dix/atom.c
index fbfa60716..207174280 100644
--- a/dix/atom.c
+++ b/dix/atom.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <X11/X.h>
#include <X11/Xatom.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "resource.h"
#include "dix.h"
diff --git a/dix/colormap.c b/dix/colormap.c
index 5d2d40f28..c21623cd1 100644
--- a/dix/colormap.c
+++ b/dix/colormap.c
@@ -56,10 +56,10 @@ SOFTWARE.
#include <X11/X.h>
#define NEED_EVENTS
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dix.h"
#include "colormapst.h"
-#include <X11/os.h>
+#include "os.h"
#include "scrnintstr.h"
#include "resource.h"
#include "windowstr.h"
diff --git a/dix/devices.c b/dix/devices.c
index 97ad3af37..ab286ad04 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -55,7 +55,7 @@ SOFTWARE.
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "resource.h"
#define NEED_EVENTS
#define NEED_REPLIES
diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index 5d11480f5..3c1d65daf 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -63,7 +63,7 @@ Equipment Corporation.
#include "resource.h"
#include "dixstruct.h"
#include "cursorstr.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "opaque.h"
#include "dixfontstr.h"
#include "closestr.h"
diff --git a/dix/dixutils.c b/dix/dixutils.c
index 7ce248959..e7d4ccd4d 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -90,7 +90,7 @@ Author: Adobe Systems Incorporated
#include <X11/X.h>
#include <X11/Xmd.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "windowstr.h"
#include "dixstruct.h"
#include "pixmapstr.h"
diff --git a/dix/events.c b/dix/events.c
index 7db0d81e6..9ea23f2d1 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -116,7 +116,7 @@ of the copyright holder.
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "resource.h"
#define NEED_EVENTS
#define NEED_REPLIES
diff --git a/dix/extension.c b/dix/extension.c
index a3f83291c..270d54f9b 100644
--- a/dix/extension.c
+++ b/dix/extension.c
@@ -55,7 +55,7 @@ SOFTWARE.
#define NEED_EVENTS
#define NEED_REPLIES
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include "gcstruct.h"
diff --git a/dix/gc.c b/dix/gc.c
index dce737cf2..dc71b82d2 100644
--- a/dix/gc.c
+++ b/dix/gc.c
@@ -55,7 +55,7 @@ SOFTWARE.
#include <X11/X.h>
#include <X11/Xmd.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "resource.h"
#include "gcstruct.h"
#include "pixmapstr.h"
diff --git a/dix/globals.c b/dix/globals.c
index 67267eda1..26dca5792 100644
--- a/dix/globals.c
+++ b/dix/globals.c
@@ -55,14 +55,14 @@ SOFTWARE.
#include <X11/X.h>
#include <X11/Xmd.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "windowstr.h"
#include "scrnintstr.h"
#include "input.h"
#include "dixfont.h"
#include "site.h"
#include "dixstruct.h"
-#include <X11/os.h>
+#include "os.h"
ScreenInfo screenInfo;
KeybdCtrl defaultKeyboardControl = {
diff --git a/dix/glyphcurs.c b/dix/glyphcurs.c
index 20c7ba2a3..8f8adf5ce 100644
--- a/dix/glyphcurs.c
+++ b/dix/glyphcurs.c
@@ -51,7 +51,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include <X11/fonts/fontstruct.h>
#include "dixfontstr.h"
#include "scrnintstr.h"
diff --git a/dix/grabs.c b/dix/grabs.c
index d3f88294d..1d76f7f07 100644
--- a/dix/grabs.c
+++ b/dix/grabs.c
@@ -53,7 +53,7 @@ SOFTWARE.
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#define NEED_EVENTS
#include <X11/Xproto.h>
#include "windowstr.h"
diff --git a/dix/initatoms.c b/dix/initatoms.c
index d25c20d70..a5972afd6 100644
--- a/dix/initatoms.c
+++ b/dix/initatoms.c
@@ -9,7 +9,7 @@
#include <X11/X.h>
#include <X11/Xatom.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dix.h"
void MakePredeclaredAtoms()
{
diff --git a/dix/main.c b/dix/main.c
index f047e790a..9605c7043 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -88,8 +88,8 @@ Equipment Corporation.
#include <X11/Xos.h> /* for unistd.h */
#include <X11/Xproto.h>
#include "scrnintstr.h"
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "windowstr.h"
#include "resource.h"
#include "dixstruct.h"
diff --git a/dix/pixmap.c b/dix/pixmap.c
index e77ddaf66..f76c557f4 100644
--- a/dix/pixmap.c
+++ b/dix/pixmap.c
@@ -34,8 +34,8 @@ from The Open Group.
#include <X11/X.h>
#include "scrnintstr.h"
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "windowstr.h"
#include "resource.h"
#include "dixstruct.h"
diff --git a/dix/privates.c b/dix/privates.c
index 1b384d080..933810517 100644
--- a/dix/privates.c
+++ b/dix/privates.c
@@ -35,8 +35,8 @@ from The Open Group.
#include <X11/X.h>
#include "scrnintstr.h"
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "windowstr.h"
#include "resource.h"
#include "dixstruct.h"
diff --git a/dix/resource.c b/dix/resource.c
index 62481d0c1..48b695f62 100644
--- a/dix/resource.c
+++ b/dix/resource.c
@@ -107,8 +107,8 @@ Equipment Corporation.
#endif
#include <X11/X.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "resource.h"
#include "dixstruct.h"
#include "opaque.h"
diff --git a/dix/swaprep.c b/dix/swaprep.c
index b424ffcfa..9776cd437 100644
--- a/dix/swaprep.c
+++ b/dix/swaprep.c
@@ -56,7 +56,7 @@ SOFTWARE.
#define NEED_REPLIES
#define NEED_EVENTS
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include <X11/fonts/fontstruct.h>
#include "scrnintstr.h"
diff --git a/dix/swapreq.c b/dix/swapreq.c
index ec19cf2a6..7d57d551f 100644
--- a/dix/swapreq.c
+++ b/dix/swapreq.c
@@ -56,7 +56,7 @@ SOFTWARE.
#define NEED_EVENTS
#include <X11/Xproto.h>
#include <X11/Xprotostr.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include "extnsionst.h" /* for SendEvent */
#include "swapreq.h"
diff --git a/dix/window.c b/dix/window.c
index dba641d4a..bd320fabe 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -84,9 +84,9 @@ Equipment Corporation.
#include <dix-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "scrnintstr.h"
-#include <X11/os.h>
+#include "os.h"
#include "regionstr.h"
#include "validate.h"
#include "windowstr.h"
diff --git a/dix/xpstubs.c b/dix/xpstubs.c
index 09338eb92..5135cc398 100644
--- a/dix/xpstubs.c
+++ b/dix/xpstubs.c
@@ -31,7 +31,7 @@ from The Open Group.
#include <dix-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include <X11/fonts/font.h>
#ifdef XPRINT
#include "DiPrint.h"
diff --git a/hw/darwin/darwin.c b/hw/darwin/darwin.c
index ce48c75ab..fe8cd2fd8 100644
--- a/hw/darwin/darwin.c
+++ b/hw/darwin/darwin.c
@@ -34,7 +34,7 @@
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/os.h>
+#include "os.h"
#include "servermd.h"
#include "inputstr.h"
#include "scrnintstr.h"
diff --git a/hw/darwin/iokit/xfIOKit.c b/hw/darwin/iokit/xfIOKit.c
index 5bf163708..7d69382af 100644
--- a/hw/darwin/iokit/xfIOKit.c
+++ b/hw/darwin/iokit/xfIOKit.c
@@ -38,7 +38,7 @@
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/os.h>
+#include "os.h"
#include "servermd.h"
#include "inputstr.h"
#include "scrnintstr.h"
diff --git a/hw/darwin/quartz/applewm.c b/hw/darwin/quartz/applewm.c
index 1933ba05b..d79df4cee 100644
--- a/hw/darwin/quartz/applewm.c
+++ b/hw/darwin/quartz/applewm.c
@@ -30,7 +30,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NEED_REPLIES
#define NEED_EVENTS
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include "globals.h"
#include "extnsionst.h"
diff --git a/hw/darwin/quartz/xpr/appledri.c b/hw/darwin/quartz/xpr/appledri.c
index 9e6676b99..d4cd27b8f 100644
--- a/hw/darwin/quartz/xpr/appledri.c
+++ b/hw/darwin/quartz/xpr/appledri.c
@@ -40,7 +40,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NEED_EVENTS
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include "colormapst.h"
diff --git a/hw/darwin/quartz/xpr/dri.c b/hw/darwin/quartz/xpr/dri.c
index 6846afab3..e8e49f965 100644
--- a/hw/darwin/quartz/xpr/dri.c
+++ b/hw/darwin/quartz/xpr/dri.c
@@ -47,7 +47,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NEED_EVENTS
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include "colormapst.h"
diff --git a/hw/dmx/dmx.c b/hw/dmx/dmx.c
index 57673d746..ac6416d54 100644
--- a/hw/dmx/dmx.c
+++ b/hw/dmx/dmx.c
@@ -49,8 +49,8 @@
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "dixstruct.h"
#define EXTENSION_PROC_ARGS void *
#include "extnsionst.h"
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index a4779d0d9..e0cc4dd65 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -39,7 +39,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86Resources.h"
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index b77d53038..0e7f7491e 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -36,7 +36,7 @@
#include <fcntl.h>
#include <X11/X.h>
#include <X11/Xmd.h>
-#include <X11/os.h>
+#include "os.h"
#ifdef XFree86LOADER
#include "loaderProcs.h"
#endif
diff --git a/hw/xfree86/common/xf86DPMS.c b/hw/xfree86/common/xf86DPMS.c
index 535c7e8fa..7d135e0ec 100644
--- a/hw/xfree86/common/xf86DPMS.c
+++ b/hw/xfree86/common/xf86DPMS.c
@@ -37,7 +37,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "globals.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/common/xf86Debug.c b/hw/xfree86/common/xf86Debug.c
index a41d0dd75..15c267232 100644
--- a/hw/xfree86/common/xf86Debug.c
+++ b/hw/xfree86/common/xf86Debug.c
@@ -38,7 +38,7 @@
#include <sys/time.h>
#include <unistd.h>
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86_OSlib.h"
diff --git a/hw/xfree86/common/xf86DoProbe.c b/hw/xfree86/common/xf86DoProbe.c
index 3208e6da8..2f5b03eb1 100644
--- a/hw/xfree86/common/xf86DoProbe.c
+++ b/hw/xfree86/common/xf86DoProbe.c
@@ -39,7 +39,7 @@
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xmd.h>
-#include <X11/os.h>
+#include "os.h"
#ifdef XFree86LOADER
#include "loaderProcs.h"
#include "xf86Config.h"
diff --git a/hw/xfree86/common/xf86DoScanPci.c b/hw/xfree86/common/xf86DoScanPci.c
index c9c8128b2..9f8c15651 100644
--- a/hw/xfree86/common/xf86DoScanPci.c
+++ b/hw/xfree86/common/xf86DoScanPci.c
@@ -39,7 +39,7 @@
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xmd.h>
-#include <X11/os.h>
+#include "os.h"
#ifdef XFree86LOADER
#include "loaderProcs.h"
#endif
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 90beb5688..699188421 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -64,7 +64,7 @@
#include <X11/X.h>
#include <X11/Xpoll.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "compiler.h"
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index c6488d677..a295fb980 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -36,7 +36,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "windowstr.h"
#include "propertyst.h"
#include "xf86.h"
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 04f0d0150..a6c7d5c89 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -41,7 +41,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "servermd.h"
#include "pixmapstr.h"
#include "windowstr.h"
diff --git a/hw/xfree86/common/xf86MiscExt.c b/hw/xfree86/common/xf86MiscExt.c
index 75a1d71fc..62d011f42 100644
--- a/hw/xfree86/common/xf86MiscExt.c
+++ b/hw/xfree86/common/xf86MiscExt.c
@@ -40,7 +40,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/common/xf86Mode.c b/hw/xfree86/common/xf86Mode.c
index 0211e3ced..7328b1b76 100644
--- a/hw/xfree86/common/xf86Mode.c
+++ b/hw/xfree86/common/xf86Mode.c
@@ -41,7 +41,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "servermd.h"
#include "mibank.h"
#include "globals.h"
diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index 7e11e776f..44643d9b1 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -47,7 +47,7 @@
#ifndef _XF86MODULE_H
#define _XF86MODULE_H
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86Version.h"
#ifndef NULL
#define NULL ((void *)0)
diff --git a/hw/xfree86/common/xf86Option.c b/hw/xfree86/common/xf86Option.c
index 695d97707..9bffdee70 100644
--- a/hw/xfree86/common/xf86Option.c
+++ b/hw/xfree86/common/xf86Option.c
@@ -39,7 +39,7 @@
#include <stdlib.h>
#include <ctype.h>
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Xinput.h"
#include "xf86Optrec.h"
diff --git a/hw/xfree86/common/xf86RandR.c b/hw/xfree86/common/xf86RandR.c
index a020e97b2..0a927ed36 100644
--- a/hw/xfree86/common/xf86RandR.c
+++ b/hw/xfree86/common/xf86RandR.c
@@ -28,7 +28,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "mibank.h"
#include "globals.h"
#include "xf86.h"
diff --git a/hw/xfree86/common/xf86VidMode.c b/hw/xfree86/common/xf86VidMode.c
index ec371f299..81e4b969e 100644
--- a/hw/xfree86/common/xf86VidMode.c
+++ b/hw/xfree86/common/xf86VidMode.c
@@ -40,7 +40,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/common/xf86cmap.c b/hw/xfree86/common/xf86cmap.c
index 019d84287..200048717 100644
--- a/hw/xfree86/common/xf86cmap.c
+++ b/hw/xfree86/common/xf86cmap.c
@@ -41,7 +41,7 @@
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include <X11/Xproto.h>
#include "colormapst.h"
#include "scrnintstr.h"
diff --git a/hw/xfree86/common/xf86fbBus.c b/hw/xfree86/common/xf86fbBus.c
index bceca0dd8..28a65302d 100644
--- a/hw/xfree86/common/xf86fbBus.c
+++ b/hw/xfree86/common/xf86fbBus.c
@@ -39,7 +39,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86Resources.h"
diff --git a/hw/xfree86/common/xf86fbman.c b/hw/xfree86/common/xf86fbman.c
index 3228c9bdf..31c84c49f 100644
--- a/hw/xfree86/common/xf86fbman.c
+++ b/hw/xfree86/common/xf86fbman.c
@@ -31,7 +31,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include <X11/X.h>
diff --git a/hw/xfree86/common/xf86isaBus.c b/hw/xfree86/common/xf86isaBus.c
index 97d5c3f53..2cad85de8 100644
--- a/hw/xfree86/common/xf86isaBus.c
+++ b/hw/xfree86/common/xf86isaBus.c
@@ -39,7 +39,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86Resources.h"
diff --git a/hw/xfree86/common/xf86noBus.c b/hw/xfree86/common/xf86noBus.c
index 70cdf1cc0..09f2f4407 100644
--- a/hw/xfree86/common/xf86noBus.c
+++ b/hw/xfree86/common/xf86noBus.c
@@ -39,7 +39,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86Resources.h"
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index f01c7add8..0d8016ff9 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -39,7 +39,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "Pci.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/common/xf86sbusBus.c b/hw/xfree86/common/xf86sbusBus.c
index ae4688737..3d6576f52 100644
--- a/hw/xfree86/common/xf86sbusBus.c
+++ b/hw/xfree86/common/xf86sbusBus.c
@@ -30,7 +30,7 @@
#include <stdio.h>
#include <unistd.h>
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86_OSlib.h"
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index 186959708..9a1e2bf92 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -39,7 +39,7 @@
#ifndef _XF86STR_H
#define _XF86STR_H
-#include <X11/misc.h>
+#include "misc.h"
#include "input.h"
#include "scrnintstr.h"
#include "pixmapstr.h"
diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index 0c8b39a70..35695bd9e 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -34,7 +34,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/common/xf86xvmc.c b/hw/xfree86/common/xf86xvmc.c
index bad2233e2..a39e1bd4d 100644
--- a/hw/xfree86/common/xf86xvmc.c
+++ b/hw/xfree86/common/xf86xvmc.c
@@ -31,7 +31,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/common/xorgHelper.c b/hw/xfree86/common/xorgHelper.c
index 3eed90a11..d5e0fc159 100644
--- a/hw/xfree86/common/xorgHelper.c
+++ b/hw/xfree86/common/xorgHelper.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "servermd.h"
#include "pixmapstr.h"
#include "windowstr.h"
diff --git a/hw/xfree86/ddc/ddcProperty.c b/hw/xfree86/ddc/ddcProperty.c
index a3d7068ec..c2b0f4aba 100644
--- a/hw/xfree86/ddc/ddcProperty.c
+++ b/hw/xfree86/ddc/ddcProperty.c
@@ -9,7 +9,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
/* #include "xf86_ansic.h" */
/* #include "xf86_OSproc.h" */
diff --git a/hw/xfree86/ddc/edid.c b/hw/xfree86/ddc/edid.c
index a6c05bfe2..ef4848eef 100644
--- a/hw/xfree86/ddc/edid.c
+++ b/hw/xfree86/ddc/edid.c
@@ -11,7 +11,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c
index 36983f452..3e41276a2 100644
--- a/hw/xfree86/ddc/interpret_edid.c
+++ b/hw/xfree86/ddc/interpret_edid.c
@@ -8,7 +8,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/ddc/print_edid.c b/hw/xfree86/ddc/print_edid.c
index e23256bcc..1cec91283 100644
--- a/hw/xfree86/ddc/print_edid.c
+++ b/hw/xfree86/ddc/print_edid.c
@@ -8,7 +8,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/ddc/print_vdif.c b/hw/xfree86/ddc/print_vdif.c
index 6c890c210..ededa21b2 100644
--- a/hw/xfree86/ddc/print_vdif.c
+++ b/hw/xfree86/ddc/print_vdif.c
@@ -5,7 +5,7 @@
#endif
#include "vdif.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86DDC.h"
static void print_vdif(xf86VdifPtr l, char *s);
diff --git a/hw/xfree86/ddc/xf86DDC.c b/hw/xfree86/ddc/xf86DDC.c
index b323f6b22..f526cb484 100644
--- a/hw/xfree86/ddc/xf86DDC.c
+++ b/hw/xfree86/ddc/xf86DDC.c
@@ -8,7 +8,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/dixmods/extmod/xf86dga.c b/hw/xfree86/dixmods/extmod/xf86dga.c
index 1fdead0bc..9c55d8731 100644
--- a/hw/xfree86/dixmods/extmod/xf86dga.c
+++ b/hw/xfree86/dixmods/extmod/xf86dga.c
@@ -15,7 +15,7 @@ Copyright (c) 1995, 1996, 1999 XFree86 Inc
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include "colormapst.h"
diff --git a/hw/xfree86/dixmods/extmod/xf86dga2.c b/hw/xfree86/dixmods/extmod/xf86dga2.c
index 990d71da2..ee3600f1a 100644
--- a/hw/xfree86/dixmods/extmod/xf86dga2.c
+++ b/hw/xfree86/dixmods/extmod/xf86dga2.c
@@ -14,7 +14,7 @@
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include "dixevents.h"
#include "pixmapstr.h"
diff --git a/hw/xfree86/dixmods/extmod/xf86misc.c b/hw/xfree86/dixmods/extmod/xf86misc.c
index 8c0f481b1..176401b13 100644
--- a/hw/xfree86/dixmods/extmod/xf86misc.c
+++ b/hw/xfree86/dixmods/extmod/xf86misc.c
@@ -14,7 +14,7 @@
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include "scrnintstr.h"
diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c
index 005c96102..11e01757a 100644
--- a/hw/xfree86/dixmods/extmod/xf86vmode.c
+++ b/hw/xfree86/dixmods/extmod/xf86vmode.c
@@ -41,7 +41,7 @@ from Kaleb S. KEITHLEY
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include "scrnintstr.h"
diff --git a/hw/xfree86/dixmods/extmod/xvmod.c b/hw/xfree86/dixmods/extmod/xvmod.c
index 9f15129c3..777504978 100644
--- a/hw/xfree86/dixmods/extmod/xvmod.c
+++ b/hw/xfree86/dixmods/extmod/xvmod.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "scrnintstr.h"
#include "gc.h"
#include <X11/extensions/Xv.h>
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index 7308b3d0e..f7af5a6ea 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -50,7 +50,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NEED_EVENTS
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include "colormapst.h"
diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c
index 4a58b6c9e..aa603dc3f 100644
--- a/hw/xfree86/dri/xf86dri.c
+++ b/hw/xfree86/dri/xf86dri.c
@@ -48,7 +48,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NEED_EVENTS
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include "colormapst.h"
diff --git a/hw/xfree86/dummylib/fatalerror.c b/hw/xfree86/dummylib/fatalerror.c
index 7677fc055..6e7d035df 100644
--- a/hw/xfree86/dummylib/fatalerror.c
+++ b/hw/xfree86/dummylib/fatalerror.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/dummylib/getvalidbios.c b/hw/xfree86/dummylib/getvalidbios.c
index 4a578ca46..d7c613122 100644
--- a/hw/xfree86/dummylib/getvalidbios.c
+++ b/hw/xfree86/dummylib/getvalidbios.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/dummylib/logvwrite.c b/hw/xfree86/dummylib/logvwrite.c
index fc560f10f..1a36f4912 100644
--- a/hw/xfree86/dummylib/logvwrite.c
+++ b/hw/xfree86/dummylib/logvwrite.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/dummylib/pcitestmulti.c b/hw/xfree86/dummylib/pcitestmulti.c
index 80804627e..43e417560 100644
--- a/hw/xfree86/dummylib/pcitestmulti.c
+++ b/hw/xfree86/dummylib/pcitestmulti.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/dummylib/verrorf.c b/hw/xfree86/dummylib/verrorf.c
index 5deb56d70..7d6e8f81b 100644
--- a/hw/xfree86/dummylib/verrorf.c
+++ b/hw/xfree86/dummylib/verrorf.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/dummylib/xalloc.c b/hw/xfree86/dummylib/xalloc.c
index 4676a93cf..48a346866 100644
--- a/hw/xfree86/dummylib/xalloc.c
+++ b/hw/xfree86/dummylib/xalloc.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/dummylib/xf86allocscripi.c b/hw/xfree86/dummylib/xf86allocscripi.c
index 05a9cca06..9d9e72154 100644
--- a/hw/xfree86/dummylib/xf86allocscripi.c
+++ b/hw/xfree86/dummylib/xf86allocscripi.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/dummylib/xf86drvmsg.c b/hw/xfree86/dummylib/xf86drvmsg.c
index 4cd9de04c..40f956594 100644
--- a/hw/xfree86/dummylib/xf86drvmsg.c
+++ b/hw/xfree86/dummylib/xf86drvmsg.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/dummylib/xf86drvmsgverb.c b/hw/xfree86/dummylib/xf86drvmsgverb.c
index 2dcc2eccb..04cbf59da 100644
--- a/hw/xfree86/dummylib/xf86drvmsgverb.c
+++ b/hw/xfree86/dummylib/xf86drvmsgverb.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/dummylib/xf86errorf.c b/hw/xfree86/dummylib/xf86errorf.c
index 9fa9e803f..6648eaf7c 100644
--- a/hw/xfree86/dummylib/xf86errorf.c
+++ b/hw/xfree86/dummylib/xf86errorf.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/dummylib/xf86errorfverb.c b/hw/xfree86/dummylib/xf86errorfverb.c
index 3a06b02d1..65399e334 100644
--- a/hw/xfree86/dummylib/xf86errorfverb.c
+++ b/hw/xfree86/dummylib/xf86errorfverb.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/dummylib/xf86getpagesize.c b/hw/xfree86/dummylib/xf86getpagesize.c
index f9454cb73..439b63ac9 100644
--- a/hw/xfree86/dummylib/xf86getpagesize.c
+++ b/hw/xfree86/dummylib/xf86getpagesize.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/dummylib/xf86getverb.c b/hw/xfree86/dummylib/xf86getverb.c
index 50d423d22..24046af67 100644
--- a/hw/xfree86/dummylib/xf86getverb.c
+++ b/hw/xfree86/dummylib/xf86getverb.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/dummylib/xf86info.c b/hw/xfree86/dummylib/xf86info.c
index 61c1fe4d6..bfbda9e18 100644
--- a/hw/xfree86/dummylib/xf86info.c
+++ b/hw/xfree86/dummylib/xf86info.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/dummylib/xf86msg.c b/hw/xfree86/dummylib/xf86msg.c
index 192d29dec..919625ead 100644
--- a/hw/xfree86/dummylib/xf86msg.c
+++ b/hw/xfree86/dummylib/xf86msg.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/dummylib/xf86msgverb.c b/hw/xfree86/dummylib/xf86msgverb.c
index 300311c89..a54c8a565 100644
--- a/hw/xfree86/dummylib/xf86msgverb.c
+++ b/hw/xfree86/dummylib/xf86msgverb.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/dummylib/xf86opt.c b/hw/xfree86/dummylib/xf86opt.c
index 9a24455f4..45779054a 100644
--- a/hw/xfree86/dummylib/xf86opt.c
+++ b/hw/xfree86/dummylib/xf86opt.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/dummylib/xf86screens.c b/hw/xfree86/dummylib/xf86screens.c
index d5a11ce65..dfd9d8a1a 100644
--- a/hw/xfree86/dummylib/xf86screens.c
+++ b/hw/xfree86/dummylib/xf86screens.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/dummylib/xf86servisinit.c b/hw/xfree86/dummylib/xf86servisinit.c
index 017f0b37e..f65bf1e9c 100644
--- a/hw/xfree86/dummylib/xf86servisinit.c
+++ b/hw/xfree86/dummylib/xf86servisinit.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/dummylib/xf86verbose.c b/hw/xfree86/dummylib/xf86verbose.c
index f6c5ed36e..0d31cb153 100644
--- a/hw/xfree86/dummylib/xf86verbose.c
+++ b/hw/xfree86/dummylib/xf86verbose.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/i2c/xf86i2c.c b/hw/xfree86/i2c/xf86i2c.c
index 321c1e2e1..d33ea97c1 100644
--- a/hw/xfree86/i2c/xf86i2c.c
+++ b/hw/xfree86/i2c/xf86i2c.c
@@ -13,7 +13,7 @@
#endif
#if 1
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/loader/aoutloader.c b/hw/xfree86/loader/aoutloader.c
index a000862ae..e03e80ef2 100644
--- a/hw/xfree86/loader/aoutloader.c
+++ b/hw/xfree86/loader/aoutloader.c
@@ -49,7 +49,7 @@
#endif
#include <X11/Xos.h>
-#include <X11/os.h>
+#include "os.h"
#include "aout.h"
#include "sym.h"
diff --git a/hw/xfree86/loader/coffloader.c b/hw/xfree86/loader/coffloader.c
index 32a229d2f..298ca5d61 100644
--- a/hw/xfree86/loader/coffloader.c
+++ b/hw/xfree86/loader/coffloader.c
@@ -44,7 +44,7 @@
#endif
#include <X11/Xos.h>
-#include <X11/os.h>
+#include "os.h"
#include "coff.h"
#include "sym.h"
diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
index 4e57d2e15..2316c8ecf 100644
--- a/hw/xfree86/loader/dixsym.c
+++ b/hw/xfree86/loader/dixsym.c
@@ -63,9 +63,9 @@
#include "dixevents.h"
#include "dixfont.h"
#include "dixstruct.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "globals.h"
-#include <X11/os.h>
+#include "os.h"
#include "osdep.h"
#include "resource.h"
#include "servermd.h"
diff --git a/hw/xfree86/loader/dlloader.c b/hw/xfree86/loader/dlloader.c
index 719b7b314..224157d43 100644
--- a/hw/xfree86/loader/dlloader.c
+++ b/hw/xfree86/loader/dlloader.c
@@ -34,7 +34,7 @@
#include <dlfcn.h>
#include <X11/Xos.h>
-#include <X11/os.h>
+#include "os.h"
#include "sym.h"
#include "loader.h"
diff --git a/hw/xfree86/loader/elfloader.c b/hw/xfree86/loader/elfloader.c
index 0275aa037..39772cf69 100644
--- a/hw/xfree86/loader/elfloader.c
+++ b/hw/xfree86/loader/elfloader.c
@@ -51,7 +51,7 @@
#endif
#include <X11/Xos.h>
-#include <X11/os.h>
+#include "os.h"
#include "elf.h"
#include "sym.h"
diff --git a/hw/xfree86/loader/extsym.c b/hw/xfree86/loader/extsym.c
index 0966466fd..1a841ac9a 100644
--- a/hw/xfree86/loader/extsym.c
+++ b/hw/xfree86/loader/extsym.c
@@ -31,7 +31,7 @@
#include "resource.h"
#include "sym.h"
-#include <X11/misc.h>
+#include "misc.h"
#ifdef PANORAMIX
#include "panoramiX.h"
#endif
diff --git a/hw/xfree86/loader/hash.c b/hw/xfree86/loader/hash.c
index 9cd4e6eb8..393360f94 100644
--- a/hw/xfree86/loader/hash.c
+++ b/hw/xfree86/loader/hash.c
@@ -28,7 +28,7 @@
#include <xorg-config.h>
#endif
-#include <X11/os.h>
+#include "os.h"
#include <X11/Xos.h>
#undef abs
#include <stdlib.h>
diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c
index 471510a30..945b9ef26 100644
--- a/hw/xfree86/loader/loader.c
+++ b/hw/xfree86/loader/loader.c
@@ -73,7 +73,7 @@
#include "elf.h"
#include "coff.h"
-#include <X11/os.h>
+#include "os.h"
#include "sym.h"
#include "loader.h"
#include "loaderProcs.h"
diff --git a/hw/xfree86/loader/loadext.c b/hw/xfree86/loader/loadext.c
index fb0affeba..5a795d372 100644
--- a/hw/xfree86/loader/loadext.c
+++ b/hw/xfree86/loader/loadext.c
@@ -34,7 +34,7 @@
#endif
#include "loaderProcs.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
ExtensionModule *ExtensionModuleList = NULL;
diff --git a/hw/xfree86/loader/loadfont.c b/hw/xfree86/loader/loadfont.c
index f9bbbfeb4..675828412 100644
--- a/hw/xfree86/loader/loadfont.c
+++ b/hw/xfree86/loader/loadfont.c
@@ -34,7 +34,7 @@
#endif
#include "loaderProcs.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
FontModule *FontModuleList = NULL;
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index 48220719b..f1a9ab4db 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -53,13 +53,13 @@
#include <xorg-config.h>
#endif
-#include <X11/os.h>
+#include "os.h"
/* For stat() and related stuff */
#define NO_OSLIB_PROTOTYPES
#include "xf86_OSlib.h"
#define LOADERDECLARATIONS
#include "loaderProcs.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86Priv.h"
#ifdef XINPUT
diff --git a/hw/xfree86/loader/misym.c b/hw/xfree86/loader/misym.c
index 29d6a2f89..3e10cd72e 100644
--- a/hw/xfree86/loader/misym.c
+++ b/hw/xfree86/loader/misym.c
@@ -56,7 +56,7 @@
#endif
#include "sym.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "mi.h"
#include "mibank.h"
#include "miwideline.h"
diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c
index de7e638bb..70aec096b 100644
--- a/hw/xfree86/loader/xf86sym.c
+++ b/hw/xfree86/loader/xf86sym.c
@@ -58,7 +58,7 @@
#include <fcntl.h>
#include <setjmp.h>
#include "sym.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "mi.h"
#include "cursor.h"
#include "mipointer.h"
diff --git a/hw/xfree86/os-support/bsd/bsd_apm.c b/hw/xfree86/os-support/bsd/bsd_apm.c
index 3554edddc..c8e204307 100644
--- a/hw/xfree86/os-support/bsd/bsd_apm.c
+++ b/hw/xfree86/os-support/bsd/bsd_apm.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
#define XF86_OS_PRIVS
diff --git a/hw/xfree86/os-support/bsd/bsd_axp.c b/hw/xfree86/os-support/bsd/bsd_axp.c
index 8328e5115..00b928a5e 100644
--- a/hw/xfree86/os-support/bsd/bsd_axp.c
+++ b/hw/xfree86/os-support/bsd/bsd_axp.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86Axp.h"
diff --git a/hw/xfree86/os-support/bsd/bsd_jstk.c b/hw/xfree86/os-support/bsd/bsd_jstk.c
index acd9fc111..00f457b88 100644
--- a/hw/xfree86/os-support/bsd/bsd_jstk.c
+++ b/hw/xfree86/os-support/bsd/bsd_jstk.c
@@ -37,7 +37,7 @@
#include <fcntl.h>
#ifdef XFree86LOADER
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86_libc.h"
#endif
#include "xf86.h"
diff --git a/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c b/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
index 06544eedf..5215d54e4 100644
--- a/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
+++ b/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c
@@ -33,7 +33,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
#define XF86_OS_PRIVS
diff --git a/hw/xfree86/os-support/bus/xf86Pci.h b/hw/xfree86/os-support/bus/xf86Pci.h
index f0ab4307a..886c830fb 100644
--- a/hw/xfree86/os-support/bus/xf86Pci.h
+++ b/hw/xfree86/os-support/bus/xf86Pci.h
@@ -110,7 +110,7 @@
#define _XF86PCI_H 1
#include <X11/Xarch.h>
#include <X11/Xfuncproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#define PCI_NOT_FOUND 0xFFFFFFFFU
diff --git a/hw/xfree86/os-support/linux/lnx_apm.c b/hw/xfree86/os-support/linux/lnx_apm.c
index 9a50947f5..ebc4534a8 100644
--- a/hw/xfree86/os-support/linux/lnx_apm.c
+++ b/hw/xfree86/os-support/linux/lnx_apm.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
#define XF86_OS_PRIVS
diff --git a/hw/xfree86/os-support/linux/lnx_axp.c b/hw/xfree86/os-support/linux/lnx_axp.c
index b479ca8ed..4f5aa87ae 100644
--- a/hw/xfree86/os-support/linux/lnx_axp.c
+++ b/hw/xfree86/os-support/linux/lnx_axp.c
@@ -6,7 +6,7 @@
#include <stdio.h>
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86Axp.h"
diff --git a/hw/xfree86/os-support/linux/lnx_pci.c b/hw/xfree86/os-support/linux/lnx_pci.c
index a20298ed4..97edd11a6 100644
--- a/hw/xfree86/os-support/linux/lnx_pci.c
+++ b/hw/xfree86/os-support/linux/lnx_pci.c
@@ -6,7 +6,7 @@
#include <stdio.h>
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
#define XF86_OS_PRIVS
diff --git a/hw/xfree86/os-support/misc/xf86_Util.c b/hw/xfree86/os-support/misc/xf86_Util.c
index 9f251440a..afcdd5b69 100644
--- a/hw/xfree86/os-support/misc/xf86_Util.c
+++ b/hw/xfree86/os-support/misc/xf86_Util.c
@@ -42,7 +42,7 @@ int _xf86misc;
/* For use only with gcc */
#ifdef __GNUC__
-#include <X11/os.h>
+#include "os.h"
char *
debug_alloca(char *file, int line, int size)
diff --git a/hw/xfree86/os-support/shared/libc_wrapper.c b/hw/xfree86/os-support/shared/libc_wrapper.c
index a77e2b94c..4bd17914c 100644
--- a/hw/xfree86/os-support/shared/libc_wrapper.c
+++ b/hw/xfree86/os-support/shared/libc_wrapper.c
@@ -50,7 +50,7 @@
#include <stdarg.h>
#include <fcntl.h>
#include <X11/Xfuncproto.h>
-#include <X11/os.h>
+#include "os.h"
#include <ctype.h>
#include <unistd.h>
#include <string.h>
diff --git a/hw/xfree86/os-support/shared/pm_noop.c b/hw/xfree86/os-support/shared/pm_noop.c
index d17ce3812..6e24653ba 100644
--- a/hw/xfree86/os-support/shared/pm_noop.c
+++ b/hw/xfree86/os-support/shared/pm_noop.c
@@ -33,7 +33,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
#define XF86_OS_PRIVS
diff --git a/hw/xfree86/os-support/xf86_ansic.h b/hw/xfree86/os-support/xf86_ansic.h
index ea2216b39..6d2352cd6 100644
--- a/hw/xfree86/os-support/xf86_ansic.h
+++ b/hw/xfree86/os-support/xf86_ansic.h
@@ -90,7 +90,7 @@
#endif
#ifndef FONTMODULE
-#include <X11/misc.h>
+#include "misc.h"
#endif
#include "xf86_libc.h"
#ifndef SHRT_MAX
diff --git a/hw/xfree86/rac/xf86RAC.c b/hw/xfree86/rac/xf86RAC.c
index 13b697d85..243bcfbbc 100644
--- a/hw/xfree86/rac/xf86RAC.c
+++ b/hw/xfree86/rac/xf86RAC.c
@@ -4,7 +4,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/rac/xf86RAC.h b/hw/xfree86/rac/xf86RAC.h
index f500b56d7..438c6acb1 100644
--- a/hw/xfree86/rac/xf86RAC.h
+++ b/hw/xfree86/rac/xf86RAC.h
@@ -8,7 +8,7 @@
#define __XF86RAC_H 1
#include "screenint.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
Bool xf86RACInit(ScreenPtr pScreen, unsigned int flag);
diff --git a/hw/xfree86/ramdac/xf86HWCurs.c b/hw/xfree86/ramdac/xf86HWCurs.c
index 527638fac..83e6e4611 100644
--- a/hw/xfree86/ramdac/xf86HWCurs.c
+++ b/hw/xfree86/ramdac/xf86HWCurs.c
@@ -4,7 +4,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/scanpci/xf86ScanPci.c b/hw/xfree86/scanpci/xf86ScanPci.c
index 1daebdc5f..91455d412 100644
--- a/hw/xfree86/scanpci/xf86ScanPci.c
+++ b/hw/xfree86/scanpci/xf86ScanPci.c
@@ -56,7 +56,7 @@
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86Pci.h"
diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c
index 4363ad0f9..7da9617cb 100644
--- a/hw/xfree86/shadowfb/shadow.c
+++ b/hw/xfree86/shadowfb/shadow.c
@@ -14,7 +14,7 @@
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "pixmapstr.h"
#include "input.h"
#include <X11/fonts/font.h>
diff --git a/hw/xfree86/utils/pcitweak/pcitweak.c b/hw/xfree86/utils/pcitweak/pcitweak.c
index f11922ece..a7c6a3263 100644
--- a/hw/xfree86/utils/pcitweak/pcitweak.c
+++ b/hw/xfree86/utils/pcitweak/pcitweak.c
@@ -33,7 +33,7 @@
*/
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/utils/scanpci/scanpci.c b/hw/xfree86/utils/scanpci/scanpci.c
index b1378ff59..4ed4a1108 100644
--- a/hw/xfree86/utils/scanpci/scanpci.c
+++ b/hw/xfree86/utils/scanpci/scanpci.c
@@ -26,7 +26,7 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/etc/scanpci.c,v 3.91tsi Exp $ */
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/vgahw/vgaHW.c b/hw/xfree86/vgahw/vgaHW.c
index 07a41d128..8b98190cb 100644
--- a/hw/xfree86/vgahw/vgaHW.c
+++ b/hw/xfree86/vgahw/vgaHW.c
@@ -17,7 +17,7 @@
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/vgahw/vgaHW.h b/hw/xfree86/vgahw/vgaHW.h
index 568d45093..5fb114073 100644
--- a/hw/xfree86/vgahw/vgaHW.h
+++ b/hw/xfree86/vgahw/vgaHW.h
@@ -19,7 +19,7 @@
#define _VGAHW_H
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "input.h"
#include "scrnintstr.h"
#include "colormapst.h"
diff --git a/hw/xfree86/xaa/xaaBitBlt.c b/hw/xfree86/xaa/xaaBitBlt.c
index 73aab81cd..de0244848 100644
--- a/hw/xfree86/xaa/xaaBitBlt.c
+++ b/hw/xfree86/xaa/xaaBitBlt.c
@@ -11,7 +11,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaCpyArea.c b/hw/xfree86/xaa/xaaCpyArea.c
index 45e3b6e4a..8d5bbf9aa 100644
--- a/hw/xfree86/xaa/xaaCpyArea.c
+++ b/hw/xfree86/xaa/xaaCpyArea.c
@@ -4,7 +4,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaCpyPlane.c b/hw/xfree86/xaa/xaaCpyPlane.c
index 5d2af7584..b60ba3f83 100644
--- a/hw/xfree86/xaa/xaaCpyPlane.c
+++ b/hw/xfree86/xaa/xaaCpyPlane.c
@@ -14,7 +14,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaCpyWin.c b/hw/xfree86/xaa/xaaCpyWin.c
index d35434a18..e50e88f91 100644
--- a/hw/xfree86/xaa/xaaCpyWin.c
+++ b/hw/xfree86/xaa/xaaCpyWin.c
@@ -4,7 +4,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaDashLine.c b/hw/xfree86/xaa/xaaDashLine.c
index a2ba8f590..059804c70 100644
--- a/hw/xfree86/xaa/xaaDashLine.c
+++ b/hw/xfree86/xaa/xaaDashLine.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaFallback.c b/hw/xfree86/xaa/xaaFallback.c
index 3fca17cbb..2f8851c38 100644
--- a/hw/xfree86/xaa/xaaFallback.c
+++ b/hw/xfree86/xaa/xaaFallback.c
@@ -4,7 +4,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaFillArc.c b/hw/xfree86/xaa/xaaFillArc.c
index 43a351e22..4c4f0d38d 100644
--- a/hw/xfree86/xaa/xaaFillArc.c
+++ b/hw/xfree86/xaa/xaaFillArc.c
@@ -38,7 +38,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaFillPoly.c b/hw/xfree86/xaa/xaaFillPoly.c
index 1136cbc8f..55177d319 100644
--- a/hw/xfree86/xaa/xaaFillPoly.c
+++ b/hw/xfree86/xaa/xaaFillPoly.c
@@ -35,7 +35,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaFillRect.c b/hw/xfree86/xaa/xaaFillRect.c
index d459e979c..bf6328272 100644
--- a/hw/xfree86/xaa/xaaFillRect.c
+++ b/hw/xfree86/xaa/xaaFillRect.c
@@ -4,7 +4,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaGC.c b/hw/xfree86/xaa/xaaGC.c
index 451ade394..83df2a0e2 100644
--- a/hw/xfree86/xaa/xaaGC.c
+++ b/hw/xfree86/xaa/xaaGC.c
@@ -4,7 +4,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaGCmisc.c b/hw/xfree86/xaa/xaaGCmisc.c
index 24a916bd6..5c04e2266 100644
--- a/hw/xfree86/xaa/xaaGCmisc.c
+++ b/hw/xfree86/xaa/xaaGCmisc.c
@@ -4,7 +4,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaImage.c b/hw/xfree86/xaa/xaaImage.c
index 5de432fed..b87cc4eec 100644
--- a/hw/xfree86/xaa/xaaImage.c
+++ b/hw/xfree86/xaa/xaaImage.c
@@ -4,7 +4,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaInit.c b/hw/xfree86/xaa/xaaInit.c
index ca53aaf7a..35ee34c6c 100644
--- a/hw/xfree86/xaa/xaaInit.c
+++ b/hw/xfree86/xaa/xaaInit.c
@@ -4,7 +4,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaInitAccel.c b/hw/xfree86/xaa/xaaInitAccel.c
index 9016c6127..8f4043537 100644
--- a/hw/xfree86/xaa/xaaInitAccel.c
+++ b/hw/xfree86/xaa/xaaInitAccel.c
@@ -4,7 +4,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaLine.c b/hw/xfree86/xaa/xaaLine.c
index be1feb4fd..2314869cf 100644
--- a/hw/xfree86/xaa/xaaLine.c
+++ b/hw/xfree86/xaa/xaaLine.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaLineMisc.c b/hw/xfree86/xaa/xaaLineMisc.c
index e8a28d5d0..7f39229f8 100644
--- a/hw/xfree86/xaa/xaaLineMisc.c
+++ b/hw/xfree86/xaa/xaaLineMisc.c
@@ -4,7 +4,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaNonTEText.c b/hw/xfree86/xaa/xaaNonTEText.c
index 0c17a4abf..0d0d8cf11 100644
--- a/hw/xfree86/xaa/xaaNonTEText.c
+++ b/hw/xfree86/xaa/xaaNonTEText.c
@@ -22,7 +22,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaOffscreen.c b/hw/xfree86/xaa/xaaOffscreen.c
index fbe029f92..d227579a9 100644
--- a/hw/xfree86/xaa/xaaOffscreen.c
+++ b/hw/xfree86/xaa/xaaOffscreen.c
@@ -11,7 +11,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaOverlay.c b/hw/xfree86/xaa/xaaOverlay.c
index 48968c41f..12d2a959b 100644
--- a/hw/xfree86/xaa/xaaOverlay.c
+++ b/hw/xfree86/xaa/xaaOverlay.c
@@ -5,7 +5,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaOverlayDF.c b/hw/xfree86/xaa/xaaOverlayDF.c
index 359e4d4a6..0cfd46f50 100644
--- a/hw/xfree86/xaa/xaaOverlayDF.c
+++ b/hw/xfree86/xaa/xaaOverlayDF.c
@@ -10,7 +10,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaPCache.c b/hw/xfree86/xaa/xaaPCache.c
index 139fb7b81..a4fadb9aa 100644
--- a/hw/xfree86/xaa/xaaPCache.c
+++ b/hw/xfree86/xaa/xaaPCache.c
@@ -4,7 +4,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaPaintWin.c b/hw/xfree86/xaa/xaaPaintWin.c
index cde39d9ea..041ee1831 100644
--- a/hw/xfree86/xaa/xaaPaintWin.c
+++ b/hw/xfree86/xaa/xaaPaintWin.c
@@ -5,7 +5,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaPict.c b/hw/xfree86/xaa/xaaPict.c
index b12750421..60cfe0843 100644
--- a/hw/xfree86/xaa/xaaPict.c
+++ b/hw/xfree86/xaa/xaaPict.c
@@ -26,7 +26,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaROP.c b/hw/xfree86/xaa/xaaROP.c
index f9fe04d1c..80e700153 100644
--- a/hw/xfree86/xaa/xaaROP.c
+++ b/hw/xfree86/xaa/xaaROP.c
@@ -5,7 +5,7 @@
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaRect.c b/hw/xfree86/xaa/xaaRect.c
index 9bbecae8b..b176e51fd 100644
--- a/hw/xfree86/xaa/xaaRect.c
+++ b/hw/xfree86/xaa/xaaRect.c
@@ -4,7 +4,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaSpans.c b/hw/xfree86/xaa/xaaSpans.c
index a1de98c0a..315024ef3 100644
--- a/hw/xfree86/xaa/xaaSpans.c
+++ b/hw/xfree86/xaa/xaaSpans.c
@@ -4,7 +4,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaStateChange.c b/hw/xfree86/xaa/xaaStateChange.c
index 480462588..c0dd6da3e 100644
--- a/hw/xfree86/xaa/xaaStateChange.c
+++ b/hw/xfree86/xaa/xaaStateChange.c
@@ -4,7 +4,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaTEText.c b/hw/xfree86/xaa/xaaTEText.c
index 3079c6db5..6f8dc6de2 100644
--- a/hw/xfree86/xaa/xaaTEText.c
+++ b/hw/xfree86/xaa/xaaTEText.c
@@ -22,7 +22,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xaa/xaaWideLine.c b/hw/xfree86/xaa/xaaWideLine.c
index 8e0e5d828..481ff8cc3 100644
--- a/hw/xfree86/xaa/xaaWideLine.c
+++ b/hw/xfree86/xaa/xaaWideLine.c
@@ -29,7 +29,7 @@ Original mi code written by Keith Packard.
#endif
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xf4bpp/OScompiler.h b/hw/xfree86/xf4bpp/OScompiler.h
index 0e70d6354..cff5d9d3f 100644
--- a/hw/xfree86/xf4bpp/OScompiler.h
+++ b/hw/xfree86/xf4bpp/OScompiler.h
@@ -35,7 +35,7 @@
#define MIN(a,b) (((a)<(b))?(a):(b))
#define ABS(x) (((x)>0)?(x):-(x))
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86_ansic.h"
#include "compiler.h"
diff --git a/hw/xfree86/xf4bpp/vgaVideo.h b/hw/xfree86/xf4bpp/vgaVideo.h
index 1e613bb30..ba0aae662 100644
--- a/hw/xfree86/xf4bpp/vgaVideo.h
+++ b/hw/xfree86/xf4bpp/vgaVideo.h
@@ -28,7 +28,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h> /* GJA -- for pointer data type */
+#include "misc.h" /* GJA -- for pointer data type */
#ifdef lint
#if defined(volatile)
#undef volatile
diff --git a/hw/xfree86/xf8_16bpp/cfbscrinit.c b/hw/xfree86/xf8_16bpp/cfbscrinit.c
index a6bc2a67e..d7e6665d9 100644
--- a/hw/xfree86/xf8_16bpp/cfbscrinit.c
+++ b/hw/xfree86/xf8_16bpp/cfbscrinit.c
@@ -12,7 +12,7 @@
#include <X11/X.h>
#include <X11/Xmd.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "servermd.h"
#include "scrnintstr.h"
#include "pixmapstr.h"
diff --git a/hw/xfree86/xf8_32bpp/cfbscrinit.c b/hw/xfree86/xf8_32bpp/cfbscrinit.c
index 9deda1f5f..2e4dd7296 100644
--- a/hw/xfree86/xf8_32bpp/cfbscrinit.c
+++ b/hw/xfree86/xf8_32bpp/cfbscrinit.c
@@ -7,7 +7,7 @@
#include <X11/X.h>
#include <X11/Xmd.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "servermd.h"
#include "scrnintstr.h"
#include "pixmapstr.h"
diff --git a/hw/xfree86/xf8_32bpp/xf86overlay.c b/hw/xfree86/xf8_32bpp/xf86overlay.c
index 9b04eba43..2766bf871 100644
--- a/hw/xfree86/xf8_32bpp/xf86overlay.c
+++ b/hw/xfree86/xf8_32bpp/xf86overlay.c
@@ -10,7 +10,7 @@
#include <xorg-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "xf86.h"
#include "xf86_ansic.h"
#include "xf86_OSproc.h"
diff --git a/hw/xfree86/xf8_32wid/cfbscrinit.c b/hw/xfree86/xf8_32wid/cfbscrinit.c
index 438ea0882..b23161d01 100644
--- a/hw/xfree86/xf8_32wid/cfbscrinit.c
+++ b/hw/xfree86/xf8_32wid/cfbscrinit.c
@@ -15,7 +15,7 @@
#include <X11/X.h>
#include <X11/Xmd.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "servermd.h"
#include "scrnintstr.h"
#include "pixmapstr.h"
diff --git a/hw/xfree86/xf8_32wid/cfbwid.c b/hw/xfree86/xf8_32wid/cfbwid.c
index 4fcd4725e..432242bbc 100644
--- a/hw/xfree86/xf8_32wid/cfbwid.c
+++ b/hw/xfree86/xf8_32wid/cfbwid.c
@@ -6,7 +6,7 @@
#include <X11/X.h>
#include <X11/Xmd.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "servermd.h"
#include "scrnintstr.h"
#include "pixmapstr.h"
diff --git a/hw/xnest/Args.c b/hw/xnest/Args.c
index 0998b1307..75aa396fb 100644
--- a/hw/xnest/Args.c
+++ b/hw/xnest/Args.c
@@ -18,7 +18,7 @@ is" without express or implied warranty.
#include <X11/Xproto.h>
#include "screenint.h"
#include "input.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "scrnintstr.h"
#include "servermd.h"
diff --git a/hw/xnest/Cursor.c b/hw/xnest/Cursor.c
index 8ba943e91..cea8b60d0 100644
--- a/hw/xnest/Cursor.c
+++ b/hw/xnest/Cursor.c
@@ -18,7 +18,7 @@ is" without express or implied warranty.
#include <X11/Xproto.h>
#include "screenint.h"
#include "input.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "cursor.h"
#include "cursorstr.h"
#include "scrnintstr.h"
diff --git a/hw/xnest/Display.c b/hw/xnest/Display.c
index 51f7f943f..602a6c9b2 100644
--- a/hw/xnest/Display.c
+++ b/hw/xnest/Display.c
@@ -19,7 +19,7 @@ is" without express or implied warranty.
#include <X11/Xproto.h>
#include "screenint.h"
#include "input.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "scrnintstr.h"
#include "servermd.h"
diff --git a/hw/xnest/Events.c b/hw/xnest/Events.c
index 2b2d4a8ca..98b7e5046 100644
--- a/hw/xnest/Events.c
+++ b/hw/xnest/Events.c
@@ -19,7 +19,7 @@ is" without express or implied warranty.
#include <X11/Xproto.h>
#include "screenint.h"
#include "input.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "scrnintstr.h"
#include "windowstr.h"
#include "servermd.h"
diff --git a/hw/xnest/Font.c b/hw/xnest/Font.c
index d5ce79f85..bdc0180ae 100644
--- a/hw/xnest/Font.c
+++ b/hw/xnest/Font.c
@@ -17,7 +17,7 @@ is" without express or implied warranty.
#include <X11/X.h>
#include <X11/Xatom.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "regionstr.h"
#include <X11/fonts/font.h>
#include <X11/fonts/fontstruct.h>
diff --git a/hw/xnest/GetTime.c b/hw/xnest/GetTime.c
index b7b22862c..421234316 100644
--- a/hw/xnest/GetTime.c
+++ b/hw/xnest/GetTime.c
@@ -32,7 +32,7 @@ from the X Consortium.
#include <X11/Xos.h>
-#include <X11/os.h>
+#include "os.h"
#include <time.h>
CARD32
diff --git a/hw/xnest/Handlers.c b/hw/xnest/Handlers.c
index 3b7ba8e04..362e9a4b6 100644
--- a/hw/xnest/Handlers.c
+++ b/hw/xnest/Handlers.c
@@ -18,7 +18,7 @@ is" without express or implied warranty.
#include <X11/Xproto.h>
#include "screenint.h"
#include "input.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "scrnintstr.h"
#include "windowstr.h"
#include "servermd.h"
diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c
index 3e9a4bd9b..d520a4ef5 100644
--- a/hw/xnest/Init.c
+++ b/hw/xnest/Init.c
@@ -18,7 +18,7 @@ is" without express or implied warranty.
#include <X11/Xproto.h>
#include "screenint.h"
#include "input.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "scrnintstr.h"
#include "windowstr.h"
#include "servermd.h"
diff --git a/hw/xnest/Keyboard.c b/hw/xnest/Keyboard.c
index 903750346..d1260c694 100644
--- a/hw/xnest/Keyboard.c
+++ b/hw/xnest/Keyboard.c
@@ -21,7 +21,7 @@ is" without express or implied warranty.
#include "keysym.h"
#include "screenint.h"
#include "inputstr.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "scrnintstr.h"
#include "servermd.h"
diff --git a/hw/xnest/Pointer.c b/hw/xnest/Pointer.c
index e02064d6e..7613122be 100644
--- a/hw/xnest/Pointer.c
+++ b/hw/xnest/Pointer.c
@@ -19,7 +19,7 @@ is" without express or implied warranty.
#include "screenint.h"
#include "inputstr.h"
#include "input.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "scrnintstr.h"
#include "servermd.h"
#include "mipointer.h"
diff --git a/hw/xnest/TestExt.c b/hw/xnest/TestExt.c
index afe0281b1..be9299c31 100644
--- a/hw/xnest/TestExt.c
+++ b/hw/xnest/TestExt.c
@@ -20,7 +20,7 @@ is" without express or implied warranty.
#undef Bool
#include "screenint.h"
#include "input.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "scrnintstr.h"
#include "servermd.h"
#include "mipointer.h"
diff --git a/hw/xwin/winprefs.h b/hw/xwin/winprefs.h
index 0252d37a2..5230b16e0 100644
--- a/hw/xwin/winprefs.h
+++ b/hw/xwin/winprefs.h
@@ -34,7 +34,7 @@
/* Need Bool */
#include <X11/Xdefs.h>
/* Need TRUE */
-#include <X11/misc.h>
+#include "misc.h"
/* Need to know how long paths can be... */
#include <limits.h>
diff --git a/hw/xwin/winwindowswm.c b/hw/xwin/winwindowswm.c
index e149c3e41..a63c09210 100755
--- a/hw/xwin/winwindowswm.c
+++ b/hw/xwin/winwindowswm.c
@@ -30,7 +30,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NEED_REPLIES
#define NEED_EVENTS
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include "colormapst.h"
diff --git a/ilbm/ilbmbres.c b/ilbm/ilbmbres.c
index 1e27e0b93..49058d446 100644
--- a/ilbm/ilbmbres.c
+++ b/ilbm/ilbmbres.c
@@ -57,7 +57,7 @@ SOFTWARE.
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "ilbm.h"
#include "maskbits.h"
#include "miline.h"
diff --git a/ilbm/ilbmbresd.c b/ilbm/ilbmbresd.c
index fad901e4a..78eb392a6 100644
--- a/ilbm/ilbmbresd.c
+++ b/ilbm/ilbmbresd.c
@@ -56,7 +56,7 @@ SOFTWARE.
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "ilbm.h"
#include "maskbits.h"
#include "miline.h"
diff --git a/ilbm/ilbmgetsp.c b/ilbm/ilbmgetsp.c
index 764e138a3..37b8d8537 100644
--- a/ilbm/ilbmgetsp.c
+++ b/ilbm/ilbmgetsp.c
@@ -59,7 +59,7 @@ SOFTWARE.
#include <X11/X.h>
#include <X11/Xmd.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "region.h"
#include "gc.h"
#include "windowstr.h"
diff --git a/ilbm/ilbmmisc.c b/ilbm/ilbmmisc.c
index 86a641649..32b1a4b4c 100644
--- a/ilbm/ilbmmisc.c
+++ b/ilbm/ilbmmisc.c
@@ -56,7 +56,7 @@ SOFTWARE.
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "cursor.h"
#include "scrnintstr.h"
diff --git a/ilbm/ilbmsetsp.c b/ilbm/ilbmsetsp.c
index fb73a78e6..0e2df7028 100644
--- a/ilbm/ilbmsetsp.c
+++ b/ilbm/ilbmsetsp.c
@@ -59,7 +59,7 @@ SOFTWARE.
#include <X11/X.h>
#include <X11/Xmd.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "regionstr.h"
#include "gcstruct.h"
#include "windowstr.h"
diff --git a/include/closestr.h b/include/closestr.h
index 3ef8de48f..64f348448 100644
--- a/include/closestr.h
+++ b/include/closestr.h
@@ -40,7 +40,7 @@ from The Open Group.
#include <X11/Xproto.h>
#include "closure.h"
#include "dix.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "gcstruct.h"
/* closure structures */
diff --git a/include/cursor.h b/include/cursor.h
index dc776bb1a..6f8c0a24f 100644
--- a/include/cursor.h
+++ b/include/cursor.h
@@ -54,7 +54,7 @@ SOFTWARE.
#ifndef CURSOR_H
#define CURSOR_H
-#include <X11/misc.h>
+#include "misc.h"
#include "screenint.h"
#include "window.h"
diff --git a/include/extnsionst.h b/include/extnsionst.h
index f830d03e2..b5b02dabe 100644
--- a/include/extnsionst.h
+++ b/include/extnsionst.h
@@ -54,7 +54,7 @@ SOFTWARE.
#ifndef EXTENSIONSTRUCT_H
#define EXTENSIONSTRUCT_H
-#include <X11/misc.h>
+#include "misc.h"
#include "screenint.h"
#include "extension.h"
#include "gc.h"
diff --git a/include/input.h b/include/input.h
index 8cda1964b..f51dc44f0 100644
--- a/include/input.h
+++ b/include/input.h
@@ -54,7 +54,7 @@ SOFTWARE.
#ifndef INPUT_H
#define INPUT_H
-#include <X11/misc.h>
+#include "misc.h"
#include "screenint.h"
#include <X11/Xmd.h>
#include <X11/Xproto.h>
diff --git a/include/misc.h b/include/misc.h
index 99f855f7d..5944a427f 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -114,7 +114,7 @@ typedef struct _CallbackList *CallbackListPtr; /* also in dix.h */
typedef struct _xReq *xReqPtr;
-#include <X11/os.h> /* for ALLOCATE_LOCAL and DEALLOCATE_LOCAL */
+#include "os.h" /* for ALLOCATE_LOCAL and DEALLOCATE_LOCAL */
#ifndef IN_MODULE
#include <X11/Xfuncs.h> /* for bcopy, bzero, and bcmp */
#endif
diff --git a/include/miscstruct.h b/include/miscstruct.h
index ec90dfb29..f58b678c6 100644
--- a/include/miscstruct.h
+++ b/include/miscstruct.h
@@ -54,7 +54,7 @@ SOFTWARE.
#ifndef MISCSTRUCT_H
#define MISCSTRUCT_H 1
-#include <X11/misc.h>
+#include "misc.h"
#include <X11/Xprotostr.h>
#include "gc.h"
diff --git a/include/os.h b/include/os.h
index 3cd0c4b65..7823b795d 100644
--- a/include/os.h
+++ b/include/os.h
@@ -51,7 +51,7 @@ SOFTWARE.
#ifndef OS_H
#define OS_H
-#include <X11/misc.h>
+#include "misc.h"
#define ALLOCATE_LOCAL_FALLBACK(_size) Xalloc((unsigned long)(_size))
#define DEALLOCATE_LOCAL_FALLBACK(_ptr) Xfree((pointer)(_ptr))
#include <X11/Xalloca.h>
diff --git a/include/pixmap.h b/include/pixmap.h
index dc0655ffc..64702fa29 100644
--- a/include/pixmap.h
+++ b/include/pixmap.h
@@ -54,7 +54,7 @@ SOFTWARE.
#ifndef PIXMAP_H
#define PIXMAP_H
-#include <X11/misc.h>
+#include "misc.h"
#include "screenint.h"
/* types for Drawable */
diff --git a/include/propertyst.h b/include/propertyst.h
index 57759933d..daac37e13 100644
--- a/include/propertyst.h
+++ b/include/propertyst.h
@@ -53,7 +53,7 @@ SOFTWARE.
#ifndef PROPERTYSTRUCT_H
#define PROPERTYSTRUCT_H
-#include <X11/misc.h>
+#include "misc.h"
#include "property.h"
/*
* PROPERTY -- property element
diff --git a/include/resource.h b/include/resource.h
index e896bf076..260c7ebb0 100644
--- a/include/resource.h
+++ b/include/resource.h
@@ -53,7 +53,7 @@ SOFTWARE.
#ifndef RESOURCE_H
#define RESOURCE_H 1
-#include <X11/misc.h>
+#include "misc.h"
/*****************************************************************
* STUFF FOR RESOURCES
diff --git a/include/screenint.h b/include/screenint.h
index edd875e94..c3a7204e1 100644
--- a/include/screenint.h
+++ b/include/screenint.h
@@ -53,7 +53,7 @@ SOFTWARE.
#ifndef SCREENINT_H
#define SCREENINT_H
-#include <X11/misc.h>
+#include "misc.h"
typedef struct _PixmapFormat *PixmapFormatPtr;
typedef struct _Visual *VisualPtr;
diff --git a/include/window.h b/include/window.h
index 1265727d5..e22e571e5 100644
--- a/include/window.h
+++ b/include/window.h
@@ -54,7 +54,7 @@ SOFTWARE.
#ifndef WINDOW_H
#define WINDOW_H
-#include <X11/misc.h>
+#include "misc.h"
#include "region.h"
#include "screenint.h"
#include <X11/Xproto.h>
diff --git a/iplan2p4/iplbres.c b/iplan2p4/iplbres.c
index a9d6966e9..4fa9a3256 100644
--- a/iplan2p4/iplbres.c
+++ b/iplan2p4/iplbres.c
@@ -56,7 +56,7 @@ interleaved planes */
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "ipl.h"
#include "servermd.h"
#include "miline.h"
diff --git a/iplan2p4/iplbresd.c b/iplan2p4/iplbresd.c
index d78ed4b61..61b154135 100644
--- a/iplan2p4/iplbresd.c
+++ b/iplan2p4/iplbresd.c
@@ -56,7 +56,7 @@ interleaved planes */
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "ipl.h"
#include "miline.h"
#include "iplmskbits.h"
diff --git a/iplan2p4/iplgetsp.c b/iplan2p4/iplgetsp.c
index 619c438db..c325ad1fe 100644
--- a/iplan2p4/iplgetsp.c
+++ b/iplan2p4/iplgetsp.c
@@ -59,7 +59,7 @@ interleaved planes */
#include <X11/Xmd.h>
#include "servermd.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "region.h"
#include "gc.h"
#include "windowstr.h"
diff --git a/iplan2p4/iplsetsp.c b/iplan2p4/iplsetsp.c
index e64dbf4e4..9a6c8128d 100644
--- a/iplan2p4/iplsetsp.c
+++ b/iplan2p4/iplsetsp.c
@@ -59,7 +59,7 @@ interleaved planes */
#include <X11/Xmd.h>
#include "servermd.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "regionstr.h"
#include "gcstruct.h"
#include "windowstr.h"
diff --git a/lbx/lbxcmap.c b/lbx/lbxcmap.c
index e65f8efd2..3ae598bc6 100644
--- a/lbx/lbxcmap.c
+++ b/lbx/lbxcmap.c
@@ -37,8 +37,8 @@ from The Open Group.
#include <X11/X.h>
#include <X11/Xproto.h>
#include <X11/Xos.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "dixstruct.h"
#include "resource.h"
#include "scrnintstr.h"
diff --git a/lbx/lbxdix.c b/lbx/lbxdix.c
index 9b12453b3..e2a1a7adc 100644
--- a/lbx/lbxdix.c
+++ b/lbx/lbxdix.c
@@ -60,8 +60,8 @@ in this Software without prior written authorization from The Open Group.
#define NEED_EVENTS
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "dixstruct.h"
#include "resource.h"
#include "inputstr.h"
diff --git a/lbx/lbxexts.c b/lbx/lbxexts.c
index 2dbd7e9af..1086b4bc5 100644
--- a/lbx/lbxexts.c
+++ b/lbx/lbxexts.c
@@ -29,7 +29,7 @@
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "dixstruct.h"
#include "colormapst.h"
#include "propertyst.h"
diff --git a/lbx/lbxgfx.c b/lbx/lbxgfx.c
index 877ce8e05..506859a20 100644
--- a/lbx/lbxgfx.c
+++ b/lbx/lbxgfx.c
@@ -35,8 +35,8 @@
#define NEED_EVENTS
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "dixstruct.h"
#include "resource.h"
#include "servermd.h"
diff --git a/lbx/lbxmain.c b/lbx/lbxmain.c
index f99e7af05..9139dfbed 100644
--- a/lbx/lbxmain.c
+++ b/lbx/lbxmain.c
@@ -57,8 +57,8 @@ in this Software without prior written authorization from The Open Group.
#include <X11/X.h>
#include <X11/Xproto.h>
#include <X11/Xos.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "dixstruct.h"
#include "resource.h"
#include "scrnintstr.h"
diff --git a/lbx/lbxopts.c b/lbx/lbxopts.c
index 53f5efed9..eac51bcea 100644
--- a/lbx/lbxopts.c
+++ b/lbx/lbxopts.c
@@ -32,7 +32,7 @@
#endif
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "colormapst.h"
#include "propertyst.h"
#include "lbxserve.h"
diff --git a/lbx/lbxprop.c b/lbx/lbxprop.c
index 09d818f0c..53c4ef424 100644
--- a/lbx/lbxprop.c
+++ b/lbx/lbxprop.c
@@ -60,8 +60,8 @@ in this Software without prior written authorization from The Open Group.
#define NEED_EVENTS
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "dixstruct.h"
#include "resource.h"
#include "servermd.h"
diff --git a/lbx/lbxsquish.c b/lbx/lbxsquish.c
index 65c66e717..8f1cad7c0 100644
--- a/lbx/lbxsquish.c
+++ b/lbx/lbxsquish.c
@@ -56,7 +56,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/X.h>
#include <X11/Xproto.h>
#include <X11/Xos.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "colormapst.h"
#include "propertyst.h"
#include "lbxserve.h"
diff --git a/lbx/lbxswap.c b/lbx/lbxswap.c
index cfed6a4c5..848be7f70 100644
--- a/lbx/lbxswap.c
+++ b/lbx/lbxswap.c
@@ -57,8 +57,8 @@ in this Software without prior written authorization from The Open Group.
#include <X11/X.h>
#include <X11/Xproto.h>
#include <X11/Xos.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "dixstruct.h"
#include "pixmapstr.h"
#include "scrnintstr.h"
diff --git a/lbx/lbxtags.c b/lbx/lbxtags.c
index 10a7ca4bb..84365b253 100644
--- a/lbx/lbxtags.c
+++ b/lbx/lbxtags.c
@@ -53,7 +53,7 @@ in this Software without prior written authorization from The Open Group.
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "lbxdata.h"
#include "resource.h"
#include "colormapst.h"
diff --git a/mfb/mfbbres.c b/mfb/mfbbres.c
index b16569804..07c59d184 100644
--- a/mfb/mfbbres.c
+++ b/mfb/mfbbres.c
@@ -52,7 +52,7 @@ SOFTWARE.
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "mfb.h"
#include "maskbits.h"
#include "miline.h"
diff --git a/mfb/mfbbresd.c b/mfb/mfbbresd.c
index 0c4a058d4..266111e65 100644
--- a/mfb/mfbbresd.c
+++ b/mfb/mfbbresd.c
@@ -51,7 +51,7 @@ SOFTWARE.
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "mfb.h"
#include "maskbits.h"
#include "miline.h"
diff --git a/mfb/mfbgetsp.c b/mfb/mfbgetsp.c
index fd6bbeb8d..c1017e177 100644
--- a/mfb/mfbgetsp.c
+++ b/mfb/mfbgetsp.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include <X11/X.h>
#include <X11/Xmd.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "region.h"
#include "gc.h"
#include "windowstr.h"
diff --git a/mfb/mfbmisc.c b/mfb/mfbmisc.c
index 98db7c1da..19ab3fa75 100644
--- a/mfb/mfbmisc.c
+++ b/mfb/mfbmisc.c
@@ -50,7 +50,7 @@ SOFTWARE.
#endif
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "cursor.h"
#include "scrnintstr.h"
diff --git a/mfb/mfbsetsp.c b/mfb/mfbsetsp.c
index d681bc37b..485b4e265 100644
--- a/mfb/mfbsetsp.c
+++ b/mfb/mfbsetsp.c
@@ -55,7 +55,7 @@ SOFTWARE.
#include <X11/X.h>
#include <X11/Xmd.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "regionstr.h"
#include "gcstruct.h"
#include "windowstr.h"
diff --git a/mi/miarc.c b/mi/miarc.c
index a1057788d..e6eed58dc 100644
--- a/mi/miarc.c
+++ b/mi/miarc.c
@@ -64,7 +64,7 @@ SOFTWARE.
#endif
#include <X11/X.h>
#include <X11/Xprotostr.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "gcstruct.h"
#include "scrnintstr.h"
#include "pixmapstr.h"
diff --git a/mi/mibitblt.c b/mi/mibitblt.c
index fe60b59ba..0caad083f 100644
--- a/mi/mibitblt.c
+++ b/mi/mibitblt.c
@@ -55,7 +55,7 @@ SOFTWARE.
#include <X11/X.h>
#include <X11/Xprotostr.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "gcstruct.h"
#include "pixmapstr.h"
#include "windowstr.h"
diff --git a/mi/mibstore.c b/mi/mibstore.c
index 6db860d72..98947217c 100644
--- a/mi/mibstore.c
+++ b/mi/mibstore.c
@@ -52,7 +52,7 @@ implied warranty.
#include <X11/X.h>
#include <X11/Xmd.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "regionstr.h"
#include "scrnintstr.h"
#include "gcstruct.h"
diff --git a/mi/micursor.c b/mi/micursor.c
index ce5778c37..d499e60f5 100644
--- a/mi/micursor.c
+++ b/mi/micursor.c
@@ -52,7 +52,7 @@ SOFTWARE.
#include "scrnintstr.h"
#include "cursor.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "mi.h"
extern Bool Must_have_memory;
diff --git a/mi/miexpose.c b/mi/miexpose.c
index fdd2025ec..73987de6d 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -85,7 +85,7 @@ Equipment Corporation.
#include <X11/Xproto.h>
#include <X11/Xprotostr.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "regionstr.h"
#include "scrnintstr.h"
#include "gcstruct.h"
diff --git a/mi/mifillrct.c b/mi/mifillrct.c
index 06d448f9e..9f68db720 100644
--- a/mi/mifillrct.c
+++ b/mi/mifillrct.c
@@ -57,7 +57,7 @@ SOFTWARE.
#include "windowstr.h"
#include "pixmap.h"
#include "mi.h"
-#include <X11/misc.h>
+#include "misc.h"
/* mi rectangles
written by newman, with debts to all and sundry
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 48e533805..1cc464ac6 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -52,7 +52,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "extension.h"
#include "micmap.h"
diff --git a/mi/mipolyutil.c b/mi/mipolyutil.c
index 8bb736c94..be62250ee 100644
--- a/mi/mipolyutil.c
+++ b/mi/mipolyutil.c
@@ -54,7 +54,7 @@ SOFTWARE.
#include "gc.h"
#include "miscanfill.h"
#include "mipoly.h"
-#include <X11/misc.h> /* MAXINT */
+#include "misc.h" /* MAXINT */
/*
* fillUtils.c
diff --git a/mi/miscrinit.c b/mi/miscrinit.c
index b6d8c3dbd..ae9b6c2ee 100644
--- a/mi/miscrinit.c
+++ b/mi/miscrinit.c
@@ -34,7 +34,7 @@ from The Open Group.
#include <X11/X.h>
#include "servermd.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "mi.h"
#include "scrnintstr.h"
#include "pixmapstr.h"
diff --git a/mi/mispans.c b/mi/mispans.c
index c0b40b8da..48252f323 100644
--- a/mi/mispans.c
+++ b/mi/mispans.c
@@ -52,7 +52,7 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "pixmapstr.h"
#include "gcstruct.h"
#include "mispans.h"
diff --git a/mi/mizerclip.c b/mi/mizerclip.c
index 9c9a07e6d..e648b21d4 100644
--- a/mi/mizerclip.c
+++ b/mi/mizerclip.c
@@ -51,7 +51,7 @@ SOFTWARE.
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "scrnintstr.h"
#include "gcstruct.h"
#include "windowstr.h"
diff --git a/mi/mizerline.c b/mi/mizerline.c
index c88b62e81..8e62a8c94 100644
--- a/mi/mizerline.c
+++ b/mi/mizerline.c
@@ -52,7 +52,7 @@ SOFTWARE.
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "scrnintstr.h"
#include "gcstruct.h"
#include "windowstr.h"
diff --git a/os/WaitFor.c b/os/WaitFor.c
index 899ad42f7..31e16210b 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -67,7 +67,7 @@ SOFTWARE.
#include <errno.h>
#include <stdio.h>
#include <X11/X.h>
-#include <X11/misc.h>
+#include "misc.h"
#ifdef __UNIXOS2__
#define select(n,r,w,x,t) os2PseudoSelect(n,r,w,x,t)
diff --git a/os/access.c b/os/access.c
index 4e5f75f3f..329d1cfea 100644
--- a/os/access.c
+++ b/os/access.c
@@ -71,7 +71,7 @@ SOFTWARE.
#include <X11/Xauth.h>
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "site.h"
#include <errno.h>
#include <sys/types.h>
diff --git a/os/connection.c b/os/connection.c
index fd4024577..0a12c655d 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -142,7 +142,7 @@ extern __const__ int _nfiles;
#endif
#endif
#endif /* WIN32 */
-#include <X11/misc.h> /* for typedef of pointer */
+#include "misc.h" /* for typedef of pointer */
#include "osdep.h"
#include <X11/Xpoll.h>
#include "opaque.h"
diff --git a/os/io.c b/os/io.c
index 87166fb79..76edbaeee 100644
--- a/os/io.c
+++ b/os/io.c
@@ -79,12 +79,12 @@ SOFTWARE.
#include <X11/X.h>
#define NEED_REPLIES
#include <X11/Xproto.h>
-#include <X11/os.h>
+#include "os.h"
#include "osdep.h"
#include <X11/Xpoll.h>
#include "opaque.h"
#include "dixstruct.h"
-#include <X11/misc.h>
+#include "misc.h"
#ifdef LBX
#include "colormapst.h"
#include "propertyst.h"
diff --git a/os/k5auth.c b/os/k5auth.c
index b23a3d440..78301ad10 100644
--- a/os/k5auth.c
+++ b/os/k5auth.c
@@ -55,7 +55,7 @@ from The Open Group.
#undef xfree
#include <krb5/los-proto.h>
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "osdep.h"
#include <X11/Xproto.h>
#include <X11/Xfuncs.h>
diff --git a/os/lbxio.c b/os/lbxio.c
index 0a128df5b..97ae958e3 100644
--- a/os/lbxio.c
+++ b/os/lbxio.c
@@ -67,12 +67,12 @@ SOFTWARE.
#endif
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/os.h>
+#include "os.h"
#include <X11/Xpoll.h>
#include "osdep.h"
#include "opaque.h"
#include "dixstruct.h"
-#include <X11/misc.h>
+#include "misc.h"
#include "colormapst.h"
#include "propertyst.h"
#include "lbxserve.h"
diff --git a/os/mitauth.c b/os/mitauth.c
index 9a806c02b..2f42fd41f 100644
--- a/os/mitauth.c
+++ b/os/mitauth.c
@@ -38,7 +38,7 @@ from The Open Group.
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "osdep.h"
#include "dixstruct.h"
diff --git a/os/oscolor.c b/os/oscolor.c
index 65de9e4f5..fdbde7906 100644
--- a/os/oscolor.c
+++ b/os/oscolor.c
@@ -63,7 +63,7 @@ SOFTWARE.
#endif
#endif
#include "rgb.h"
-#include <X11/os.h>
+#include "os.h"
#include "opaque.h"
/* Note that we are assuming there is only one database for all the screens. */
@@ -152,7 +152,7 @@ OsLookupColor(int screen, char *name, unsigned int len,
*/
#include <stdio.h>
-#include <X11/os.h>
+#include "os.h"
#include "opaque.h"
#define HASHSIZE 511
diff --git a/os/osinit.c b/os/osinit.c
index b820c91be..f9e253f2d 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -53,7 +53,7 @@ SOFTWARE.
#include <stdio.h>
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "osdep.h"
#include <X11/Xos.h>
diff --git a/os/rpcauth.c b/os/rpcauth.c
index 71f87e9a4..3c5cb5946 100644
--- a/os/rpcauth.c
+++ b/os/rpcauth.c
@@ -42,8 +42,8 @@ from The Open Group.
#include <X11/X.h>
#include "Xauth.h"
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "dixstruct.h"
#include <rpc/rpc.h>
diff --git a/os/secauth.c b/os/secauth.c
index ff057992f..1000b4e79 100644
--- a/os/secauth.c
+++ b/os/secauth.c
@@ -31,7 +31,7 @@ from The Open Group.
#endif
#include <X11/X.h>
-#include <X11/os.h>
+#include "os.h"
#include "osdep.h"
#include "dixstruct.h"
#include "swaprep.h"
diff --git a/os/utils.c b/os/utils.c
index a3a0c99f6..f23e1036c 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -66,7 +66,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
#endif
#include <X11/Xos.h>
#include <stdio.h>
-#include <X11/misc.h>
+#include "misc.h"
#include <X11/X.h>
#include <X11/Xtrans/Xtrans.h>
#include "input.h"
diff --git a/os/xalloc.c b/os/xalloc.c
index c266ca5ab..e1cdbfc5b 100644
--- a/os/xalloc.c
+++ b/os/xalloc.c
@@ -40,7 +40,7 @@ Pascal Haible.
#include <stdlib.h> /* for malloc() etc. */
#include <X11/Xos.h>
-#include <X11/misc.h>
+#include "misc.h"
#include <X11/X.h>
#ifdef XALLOC_LOG
diff --git a/os/xdmauth.c b/os/xdmauth.c
index f54c83da8..e02ca349c 100644
--- a/os/xdmauth.c
+++ b/os/xdmauth.c
@@ -42,7 +42,7 @@ from The Open Group.
#include <stdio.h>
#include <X11/X.h>
#include <X11/Xtrans/Xtrans.h>
-#include <X11/os.h>
+#include "os.h"
#include "osdep.h"
#include "dixstruct.h"
diff --git a/os/xdmcp.c b/os/xdmcp.c
index 44994380b..3aad4eee3 100644
--- a/os/xdmcp.c
+++ b/os/xdmcp.c
@@ -41,7 +41,7 @@
#include <stdlib.h>
#include <X11/X.h>
#include <X11/Xmd.h>
-#include <X11/misc.h>
+#include "misc.h"
#include <X11/Xpoll.h>
#include "osdep.h"
#include "input.h"
diff --git a/os/xprintf.c b/os/xprintf.c
index bd8b1f339..07eaa1f58 100644
--- a/os/xprintf.c
+++ b/os/xprintf.c
@@ -31,7 +31,7 @@
#endif
#include <X11/Xos.h>
-#include <X11/os.h>
+#include "os.h"
#include <stdarg.h>
#include <stdio.h>
diff --git a/randr/randr.c b/randr/randr.c
index f63abcb20..3911a3498 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -33,8 +33,8 @@
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "dixstruct.h"
#include "resource.h"
#include "scrnintstr.h"
diff --git a/record/set.c b/record/set.c
index 3b494e74b..83fb0e7d7 100644
--- a/record/set.c
+++ b/record/set.c
@@ -56,7 +56,7 @@ from The Open Group.
#endif
#ifndef TESTING
-#include <X11/misc.h>
+#include "misc.h"
#else
#include <stdio.h>
#include <stdlib.h>
diff --git a/render/filter.c b/render/filter.c
index bee26dde7..2367f9acc 100644
--- a/render/filter.c
+++ b/render/filter.c
@@ -26,9 +26,9 @@
#include <dix-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "scrnintstr.h"
-#include <X11/os.h>
+#include "os.h"
#include "regionstr.h"
#include "validate.h"
#include "windowstr.h"
diff --git a/render/glyph.c b/render/glyph.c
index f3056711a..45c5dd975 100644
--- a/render/glyph.c
+++ b/render/glyph.c
@@ -27,9 +27,9 @@
#include <dix-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "scrnintstr.h"
-#include <X11/os.h>
+#include "os.h"
#include "regionstr.h"
#include "validate.h"
#include "windowstr.h"
diff --git a/render/picture.c b/render/picture.c
index a13ac5d05..b4c59f19f 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -27,9 +27,9 @@
#include <dix-config.h>
#endif
-#include <X11/misc.h>
+#include "misc.h"
#include "scrnintstr.h"
-#include <X11/os.h>
+#include "os.h"
#include "regionstr.h"
#include "validate.h"
#include "windowstr.h"
diff --git a/render/render.c b/render/render.c
index 8ef321980..1aea07d35 100644
--- a/render/render.c
+++ b/render/render.c
@@ -32,8 +32,8 @@
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "dixstruct.h"
#include "resource.h"
#include "scrnintstr.h"
diff --git a/xfixes/xfixesint.h b/xfixes/xfixesint.h
index 079246797..787a4c4f0 100755
--- a/xfixes/xfixesint.h
+++ b/xfixes/xfixesint.h
@@ -32,8 +32,8 @@
#define NEED_EVENTS
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
-#include <X11/os.h>
+#include "misc.h"
+#include "os.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include <X11/extensions/xfixesproto.h>
diff --git a/xkb/ddxConfig.c b/xkb/ddxConfig.c
index 4f395d558..b023531dc 100644
--- a/xkb/ddxConfig.c
+++ b/xkb/ddxConfig.c
@@ -38,7 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "inputstr.h"
#include "scrnintstr.h"
#include "windowstr.h"
-#include <X11/os.h>
+#include "os.h"
#define XKBSRV_NEED_FILE_FUNCS
#include <X11/extensions/XKBsrv.h>
#include <X11/extensions/XKBconfig.h>
diff --git a/xkb/xkb.c b/xkb/xkb.c
index d347646c0..240509079 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -35,7 +35,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define NEED_EVENTS
#define NEED_REPLIES
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "inputstr.h"
#define XKBSRV_NEED_FILE_FUNCS
#include <X11/extensions/XKBsrv.h>
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index 2f229686e..e4f74fb76 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -37,7 +37,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/X.h>
#include <X11/Xproto.h>
#include <X11/keysym.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "inputstr.h"
#include <X11/extensions/XKBsrv.h>
#include "xkb.h"
diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
index 3ff14cca5..0c3aee7e8 100644
--- a/xkb/xkbInit.c
+++ b/xkb/xkbInit.c
@@ -41,7 +41,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/Xproto.h>
#include <X11/keysym.h>
#include <X11/Xatom.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "inputstr.h"
#include "opaque.h"
#include "property.h"
diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c
index 0b4fcaeab..e04c05f14 100644
--- a/xkb/xkbLEDs.c
+++ b/xkb/xkbLEDs.c
@@ -36,7 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define NEED_EVENTS 1
#include <X11/X.h>
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "inputstr.h"
#include <X11/extensions/XI.h>
diff --git a/xkb/xkbPrKeyEv.c b/xkb/xkbPrKeyEv.c
index ec850d89c..ee521be69 100644
--- a/xkb/xkbPrKeyEv.c
+++ b/xkb/xkbPrKeyEv.c
@@ -36,7 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/X.h>
#include <X11/Xproto.h>
#include <X11/keysym.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "inputstr.h"
#include <X11/extensions/XKBsrv.h>
#include <ctype.h>
diff --git a/xkb/xkbPrOtherEv.c b/xkb/xkbPrOtherEv.c
index f69ff00d6..82f476790 100644
--- a/xkb/xkbPrOtherEv.c
+++ b/xkb/xkbPrOtherEv.c
@@ -36,7 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/X.h>
#include <X11/Xproto.h>
#include <X11/keysym.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "inputstr.h"
#include <X11/extensions/XKBsrv.h>
diff --git a/xkb/xkbSwap.c b/xkb/xkbSwap.c
index 193a4f463..be1cd94fc 100644
--- a/xkb/xkbSwap.c
+++ b/xkb/xkbSwap.c
@@ -35,7 +35,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define NEED_EVENTS
#define NEED_REPLIES
#include <X11/Xproto.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "inputstr.h"
#include <X11/extensions/XKBsrv.h>
#include <X11/extensions/XKBstr.h>
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index d655efc75..f3c3ff8ca 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -38,7 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/Xproto.h>
#define XK_CYRILLIC
#include <X11/keysym.h>
-#include <X11/misc.h>
+#include "misc.h"
#include "inputstr.h"
#define XKBSRV_NEED_FILE_FUNCS