xserver: Branch 'xorg-server-1.5-apple' - 13 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Mon Aug 24 12:36:43 PDT 2009


 Xext/Makefile.am                         |   31 -
 Xext/cup.c                               |  342 ------------
 Xext/dpms.c                              |    4 
 Xext/fontcache.c                         |  323 ------------
 Xext/mitmisc.c                           |  155 -----
 Xext/saver.c                             |    3 
 Xext/shape.c                             |    3 
 Xext/shm.c                               |    3 
 Xext/shmint.h                            |   30 +
 Xext/sync.c                              |    5 
 Xext/syncsrv.h                           |  176 ++++++
 Xext/xevie.c                             |    1 
 Xext/xtest.c                             |    4 
 Xext/xvdisp.c                            |    3 
 configure.ac                             |   35 -
 dbe/dbestruct.h                          |   16 
 dix/main.c                               |    3 
 hw/dmx/dmx-config.h                      |    7 
 hw/xfree86/common/Makefile.am            |    2 
 hw/xfree86/common/xf86Config.c           |   14 
 hw/xfree86/common/xf86DPMS.c             |    3 
 hw/xfree86/common/xf86Events.c           |    3 
 hw/xfree86/common/xf86Globals.c          |    4 
 hw/xfree86/common/xf86Init.c             |   21 
 hw/xfree86/common/xf86MiscExt.c          |  561 ---------------------
 hw/xfree86/common/xf86Priv.h             |    4 
 hw/xfree86/common/xf86Xinput.c           |    3 
 hw/xfree86/dixmods/extmod/Makefile.am    |    5 
 hw/xfree86/dixmods/extmod/modinit.c      |   72 --
 hw/xfree86/dixmods/extmod/modinit.h      |   69 --
 hw/xfree86/dixmods/extmod/xf86misc.c     |  821 -------------------------------
 hw/xfree86/dixmods/extmod/xf86miscproc.h |   69 --
 hw/xfree86/fbdevhw/fbdevhw.c             |    3 
 hw/xfree86/loader/dixsym.c               |   26 
 hw/xfree86/loader/xf86sym.c              |   18 
 hw/xfree86/modes/xf86Crtc.c              |    3 
 hw/xfree86/modes/xf86Cursors.c           |    3 
 hw/xfree86/modes/xf86Rotate.c            |    3 
 hw/xfree86/os-support/misc/Makefile.am   |    2 
 hw/xfree86/os-support/misc/xf86_Util.c   |   94 ---
 hw/xfree86/vbe/vbe.c                     |    3 
 hw/xfree86/vgahw/vgaHW.h                 |    3 
 hw/xquartz/darwin.c                      |    3 
 hw/xwin/InitInput.c                      |    3 
 include/dix-config.h.in                  |   12 
 include/globals.h                        |   32 -
 include/xorg-server.h.in                 |    6 
 mi/mieq.c                                |    3 
 mi/miinitext.c                           |  109 ----
 mi/miscrinit.c                           |    3 
 os/WaitFor.c                             |    5 
 os/io.c                                  |   20 
 os/utils.c                               |   24 
 53 files changed, 270 insertions(+), 2903 deletions(-)

New commits:
commit 1755239330c0bdac820d88a3e06ff391d65f29be
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri Aug 7 00:02:21 2009 -0700

    XQuartz: Use internal xshm header for new xextproto

diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index cf9863a..c8bd3f1 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -67,8 +67,7 @@
 #include <IOKit/hidsystem/IOHIDLib.h>
 
 #ifdef MITSHM
-#define _XSHM_SERVER_
-#include <X11/extensions/XShm.h>
+#include "shmint.h"
 #endif
 
 #include "darwin.h"
commit d8ae7e546f930415494a0a45f848297ed835ac80
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu Jul 16 17:43:31 2009 -0400

    dbe: Adapt to new headers
    (cherry picked from commit bb6fa39eb3aa044ffc18632288fd59909ff06344)

diff --git a/dbe/dbestruct.h b/dbe/dbestruct.h
index 7d5a115..d753016 100644
--- a/dbe/dbestruct.h
+++ b/dbe/dbestruct.h
@@ -37,10 +37,24 @@
 /* INCLUDES */
 
 #define NEED_DBE_PROTOCOL
-#include <X11/extensions/Xdbeproto.h>
+#include <X11/extensions/dbeproto.h>
 #include "windowstr.h"
 #include "privates.h"
 
+typedef struct
+{
+        VisualID    visual;    /* one visual ID that supports double-buffering */
+            int         depth;     /* depth of visual in bits                      */
+                int         perflevel; /* performance level of visual                  */
+}
+XdbeVisualInfo;
+
+typedef struct
+{
+        int                 count;          /* number of items in visual_depth   */
+            XdbeVisualInfo      *visinfo;       /* list of visuals & depths for scrn */
+}
+XdbeScreenVisualInfo;
 
 /* DEFINES */
 
commit 0a9f57c499c50aad48a939bce54c6179eb0234b3
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu Aug 6 23:40:40 2009 -0700

    Update to xextproto 7.0.99.1.
    
    xextproto had Xlib client headers moved into libXext.
    Protocol header files are named fooproto.h, header files with constants
    foo.h or fooconst.h where foo.h was already in use for client-side headers.
    (cherry picked from commit d3f6b43a240eb763025b3cbf546cb7ae502c94fa)

diff --git a/Xext/dpms.c b/Xext/dpms.c
index e3204fe..0e54f9f 100644
--- a/Xext/dpms.c
+++ b/Xext/dpms.c
@@ -44,9 +44,7 @@ Equipment Corporation.
 #include "dixstruct.h"
 #include "extnsionst.h"
 #include "opaque.h"
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
-#include <X11/extensions/dpmsstr.h>
+#include <X11/extensions/dpmsproto.h>
 #include "dpmsproc.h"
 #include "modinit.h"
 
diff --git a/Xext/saver.c b/Xext/saver.c
index feab972..1e8feb6 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -54,8 +54,7 @@ in this Software without prior written authorization from the X Consortium.
 #include "panoramiXsrv.h"
 #endif
 #ifdef DPMSExtension
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
 #endif
 
 #include <stdio.h>
diff --git a/Xext/shape.c b/Xext/shape.c
index 2f1baf9..0b7c3ee 100644
--- a/Xext/shape.c
+++ b/Xext/shape.c
@@ -43,8 +43,7 @@ in this Software without prior written authorization from The Open Group.
 #include "dixstruct.h"
 #include "resource.h"
 #include "opaque.h"
-#define _SHAPE_SERVER_	/* don't want Xlib structures */
-#include <X11/extensions/shapestr.h>
+#include <X11/extensions/shapeproto.h>
 #include "regionstr.h"
 #include "gcstruct.h"
 #include "modinit.h"
diff --git a/Xext/shm.c b/Xext/shm.c
index 34c8752..63d55e8 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -59,8 +59,7 @@ in this Software without prior written authorization from The Open Group.
 #include "servermd.h"
 #include "shmint.h"
 #include "xace.h"
-#define _XSHM_SERVER_
-#include <X11/extensions/shmstr.h>
+#include <X11/extensions/shmproto.h>
 #include <X11/Xfuncproto.h>
 
 /* Needed for Solaris cross-zone shared memory extension */
diff --git a/Xext/shmint.h b/Xext/shmint.h
index fc056bc..5ee4f6e 100644
--- a/Xext/shmint.h
+++ b/Xext/shmint.h
@@ -23,13 +23,39 @@
 #ifndef _SHMINT_H_
 #define _SHMINT_H_
 
-#define _XSHM_SERVER_
-#include <X11/extensions/shmstr.h>
+#include <X11/extensions/shmproto.h>
 
 #include "screenint.h"
 #include "pixmap.h"
 #include "gc.h"
 
+#define XSHM_PUT_IMAGE_ARGS \
+    DrawablePtr		/* dst */, \
+    GCPtr		/* pGC */, \
+    int			/* depth */, \
+    unsigned int	/* format */, \
+    int			/* w */, \
+    int			/* h */, \
+    int			/* sx */, \
+    int			/* sy */, \
+    int			/* sw */, \
+    int			/* sh */, \
+    int			/* dx */, \
+    int			/* dy */, \
+    char *		/* data */
+
+#define XSHM_CREATE_PIXMAP_ARGS \
+    ScreenPtr	/* pScreen */, \
+    int		/* width */, \
+    int		/* height */, \
+    int		/* depth */, \
+    char *	/* addr */
+
+typedef struct _ShmFuncs {
+    PixmapPtr	(* CreatePixmap)(XSHM_CREATE_PIXMAP_ARGS);
+    void	(* PutImage)(XSHM_PUT_IMAGE_ARGS);
+} ShmFuncs, *ShmFuncsPtr;
+
 void
 ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs);
 
diff --git a/Xext/sync.c b/Xext/sync.c
index cc98ee6..24a4b60 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -67,8 +67,7 @@ PERFORMANCE OF THIS SOFTWARE.
 #include "dixstruct.h"
 #include "resource.h"
 #include "opaque.h"
-#include <X11/extensions/sync.h>
-#include <X11/extensions/syncstr.h>
+#include <X11/extensions/syncproto.h>
 #include "syncsrv.h"
 
 #include <stdio.h>
diff --git a/Xext/xtest.c b/Xext/xtest.c
index db6d545..ad7988e 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -42,9 +42,7 @@ from The Open Group.
 #include "scrnintstr.h"
 #include "dixevents.h"
 #include "sleepuntil.h"
-#define _XTEST_SERVER_
-#include <X11/extensions/XTest.h>
-#include <X11/extensions/xteststr.h>
+#include <X11/extensions/xtestproto.h>
 #ifdef XINPUT
 #include <X11/extensions/XI.h>
 #include <X11/extensions/XIproto.h>
diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
index de0128e..83daf11 100644
--- a/Xext/xvdisp.c
+++ b/Xext/xvdisp.c
@@ -42,8 +42,7 @@ SOFTWARE.
 #include <X11/extensions/Xvproto.h>
 #include "xvdix.h"
 #ifdef MITSHM
-#define _XSHM_SERVER_
-#include <X11/extensions/shmstr.h>
+#include <X11/extensions/shmproto.h>
 #endif
 
 #include "xvdisp.h"
diff --git a/configure.ac b/configure.ac
index 98e26b8..3d985bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -700,7 +700,7 @@ else
 	RENDERPROTO="renderproto"
 fi
 
-REQUIRED_MODULES="[randrproto >= 1.2] $RENDERPROTO [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto xextproto [xproto >= 7.0.9] [xtrans >= 1.2.2] [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto [inputproto >= 1.4.4] [kbproto >= 1.0.3]"
+REQUIRED_MODULES="[randrproto >= 1.2] $RENDERPROTO [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto [xextproto >= 7.0.99.1] [xproto >= 7.0.9] [xtrans >= 1.2.2] [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto [inputproto >= 1.4.4] [kbproto >= 1.0.3]"
 REQUIRED_LIBS="xfont xau fontenc [pixman-1 >= 0.9.5]"
 
 dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas
diff --git a/dix/main.c b/dix/main.c
index b955790..f7b586d 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -111,8 +111,7 @@ Equipment Corporation.
 #endif
 
 #ifdef DPMSExtension
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
 #include "dpmsproc.h"
 #endif
 
diff --git a/hw/xfree86/common/xf86DPMS.c b/hw/xfree86/common/xf86DPMS.c
index 4fb901a..1ba20bb 100644
--- a/hw/xfree86/common/xf86DPMS.c
+++ b/hw/xfree86/common/xf86DPMS.c
@@ -40,8 +40,7 @@
 #include "xf86.h"
 #include "xf86Priv.h"
 #ifdef DPMSExtension
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
 #include "dpmsproc.h"
 #endif
 
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 76c207a..3cd1a62 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -92,8 +92,7 @@ extern Bool noXkbExtension;
 #endif
 
 #ifdef DPMSExtension
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
 #include "dpmsproc.h"
 #endif
 
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 28188be..25fc27f 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -87,8 +87,7 @@
 #include "globals.h"
 
 #ifdef DPMSExtension
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
 #include "dpmsproc.h"
 #endif
 
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 710e787..9cc5d04 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -67,8 +67,7 @@
 #include "xf86InPriv.h"
 
 #ifdef DPMSExtension
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
 #include "dpmsproc.h"
 #endif
 
diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h
index 7bcefc9..c03af5e 100644
--- a/hw/xfree86/dixmods/extmod/modinit.h
+++ b/hw/xfree86/dixmods/extmod/modinit.h
@@ -7,22 +7,16 @@
 #define INITARGS void
 #endif
 
-#ifdef SHAPE
-#define _SHAPE_SERVER_  /* don't want Xlib structures */
-#include <X11/extensions/shapestr.h>
-#endif
+#include <X11/extensions/shapeproto.h>
 
 #ifdef MULTIBUFFER
 extern void MultibufferExtensionInit(INITARGS);
-#define _MULTIBUF_SERVER_	/* don't want Xlib structures */
-#include <X11/extensions/multibufst.h>
+#include <X11/extensions/multibufproto.h>
 #endif
 
 #ifdef XTEST
 extern void XTestExtensionInit(INITARGS);
-#define _XTEST_SERVER_
-#include <X11/extensions/XTest.h>
-#include <X11/extensions/xteststr.h>
+#include <X11/extensions/xtestproto.h>
 #endif
 
 #if 1
@@ -49,7 +43,7 @@ extern void XFree86DGARegister(INITARGS);
 
 #ifdef DPMSExtension
 extern void DPMSExtensionInit(INITARGS);
-#include <X11/extensions/dpmsstr.h>
+#include <X11/extensions/dpmsconst.h>
 #endif
 
 #ifdef XV
@@ -67,7 +61,7 @@ extern void ResExtensionInit(INITARGS);
 
 #ifdef SHM
 extern void ShmExtensionInit(INITARGS);
-#include <X11/extensions/shmstr.h>
+#include <X11/extensions/shmproto.h>
 extern void ShmSetPixmapFormat(
     ScreenPtr pScreen,
     int format);
diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
index 4d51422..e5baa97 100644
--- a/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/hw/xfree86/fbdevhw/fbdevhw.c
@@ -25,8 +25,7 @@
 #endif
 
 #include "globals.h"
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
 
 #define DEBUG 0
 
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 1facf86..ac6122e 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -40,8 +40,7 @@
 #include "xf86Priv.h"
 #include "xf86RandR12.h"
 #include "X11/extensions/render.h"
-#define DPMS_SERVER
-#include "X11/extensions/dpms.h"
+#include "X11/extensions/dpmsconst.h"
 #include "X11/Xatom.h"
 #ifdef RENDER
 #include "picturestr.h"
diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index fee02df..43c4278 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -38,8 +38,7 @@
 #include "xf86Modes.h"
 #include "xf86RandR12.h"
 #include "X11/extensions/render.h"
-#define DPMS_SERVER
-#include "X11/extensions/dpms.h"
+#include "X11/extensions/dpmsconst.h"
 #include "X11/Xatom.h"
 #ifdef RENDER
 #include "picturestr.h"
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index e2d6295..b42a45c 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -40,8 +40,7 @@
 #include "xf86Modes.h"
 #include "xf86RandR12.h"
 #include "X11/extensions/render.h"
-#define DPMS_SERVER
-#include "X11/extensions/dpms.h"
+#include "X11/extensions/dpmsconst.h"
 #include "X11/Xatom.h"
 
 /* borrowed from composite extension, move to Render and publish? */
diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c
index 8af1727..5214eed 100644
--- a/hw/xfree86/vbe/vbe.c
+++ b/hw/xfree86/vbe/vbe.c
@@ -18,8 +18,7 @@
 #include "xf86.h"
 #include "vbe.h"
 #include <X11/Xarch.h>
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
 
 #define VERSION(x) VBE_VERSION_MAJOR(x),VBE_VERSION_MINOR(x)
 
diff --git a/hw/xfree86/vgahw/vgaHW.h b/hw/xfree86/vgahw/vgaHW.h
index a38ea75..73c0cd0 100644
--- a/hw/xfree86/vgahw/vgaHW.h
+++ b/hw/xfree86/vgahw/vgaHW.h
@@ -25,8 +25,7 @@
 #include "xf86DDC.h"
 
 #include "globals.h"
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
 
 extern int vgaHWGetIndex(void);
 
diff --git a/mi/mieq.c b/mi/mieq.c
index 88eda10..3665bf1 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -54,8 +54,7 @@ in this Software without prior written authorization from The Open Group.
 
 #ifdef DPMSExtension
 # include "dpmsproc.h"
-# define DPMS_SERVER
-# include <X11/extensions/dpms.h>
+# include <X11/extensions/dpmsconst.h>
 #endif
 
 #define QUEUE_SIZE  512
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 8e60d6b..1046ed7 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -173,19 +173,17 @@ typedef void (*InitExtension)(INITARGS);
 #endif
 
 #ifdef MITSHM
-#define _XSHM_SERVER_
-#include <X11/extensions/shmstr.h>
+#include <X11/extensions/shm.h>
 #endif
 #ifdef XTEST
-#define _XTEST_SERVER_
-#include <X11/extensions/XTest.h>
+#include <X11/extensions/xtest.h>
 #endif
 #ifdef XKB
 #include <X11/extensions/XKB.h>
 #endif
 #ifdef XCSECURITY
 #include "securitysrv.h"
-#include <X11/extensions/securstr.h>
+#include <X11/extensions/secur.h>
 #endif
 #ifdef XSELINUX
 #include "xselinux.h"
diff --git a/mi/miscrinit.c b/mi/miscrinit.c
index 7ca5f5d..c0a9eb4 100644
--- a/mi/miscrinit.c
+++ b/mi/miscrinit.c
@@ -39,8 +39,7 @@ from The Open Group.
 #include "dix.h"
 #include "miline.h"
 #ifdef MITSHM
-#define _XSHM_SERVER_
-#include <X11/extensions/XShm.h>
+#include <X11/extensions/shm.h>
 #endif
 
 /* We use this structure to propogate some information from miScreenInit to
diff --git a/os/WaitFor.c b/os/WaitFor.c
index f07388b..a6d1dfe 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -109,8 +109,7 @@ mffs(fd_mask mask)
 }
 
 #ifdef DPMSExtension
-#define DPMS_SERVER
-#include <X11/extensions/dpms.h>
+#include <X11/extensions/dpmsconst.h>
 #endif
 
 struct _OsTimerRec {
commit 2f08077533fdd87071115cf0f66dfce0431c4d7d
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Dec 10 13:32:04 2008 -0500

    xsync: Use a local header for server API definitions
    (cherry picked from commit e0d8f6a8084a3fe6c549c1dee11e4502e316c382)

diff --git a/Xext/Makefile.am b/Xext/Makefile.am
index 9ed51da..828d31e 100644
--- a/Xext/Makefile.am
+++ b/Xext/Makefile.am
@@ -25,6 +25,7 @@ BUILTIN_SRCS =			\
 	sleepuntil.c		\
 	sleepuntil.h		\
 	sync.c			\
+	syncsrv.h		\
 	xcmisc.c		\
 	xtest.c
 
diff --git a/Xext/sync.c b/Xext/sync.c
index 10d4481..cc98ee6 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -67,9 +67,9 @@ PERFORMANCE OF THIS SOFTWARE.
 #include "dixstruct.h"
 #include "resource.h"
 #include "opaque.h"
-#define _SYNC_SERVER
 #include <X11/extensions/sync.h>
 #include <X11/extensions/syncstr.h>
+#include "syncsrv.h"
 
 #include <stdio.h>
 #if !defined(WIN32) && !defined(Lynx)
diff --git a/Xext/syncsrv.h b/Xext/syncsrv.h
new file mode 100644
index 0000000..93f6b9d
--- /dev/null
+++ b/Xext/syncsrv.h
@@ -0,0 +1,176 @@
+/*
+
+Copyright 1991, 1993, 1994, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+
+/***********************************************************
+Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts,
+and Olivetti Research Limited, Cambridge, England.
+
+                        All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its 
+documentation for any purpose and without fee is hereby granted, 
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in 
+supporting documentation, and that the names of Digital or Olivetti
+not be used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.  
+
+DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL THEY BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+******************************************************************/
+
+#ifndef _SYNCSTR_H_
+#define _SYNCSTR_H_
+
+#define CARD64 XSyncValue /* XXX temporary! need real 64 bit values for Alpha */
+
+typedef struct _SyncCounter {
+    ClientPtr		client;	/* Owning client. 0 for system counters */
+    XSyncCounter	id;		/* resource ID */
+    CARD64		value;		/* counter value */
+    struct _SyncTriggerList *pTriglist;	/* list of triggers */
+    Bool		beingDestroyed; /* in process of going away */
+    struct _SysCounterInfo *pSysCounterInfo; /* NULL if not a system counter */
+} SyncCounter;
+
+/*
+ * The System Counter interface
+ */
+
+typedef enum {
+    XSyncCounterNeverChanges,
+    XSyncCounterNeverIncreases,
+    XSyncCounterNeverDecreases,
+    XSyncCounterUnrestricted
+} SyncCounterType;
+
+typedef struct _SysCounterInfo {
+    char	*name;
+    CARD64	resolution;
+    CARD64	bracket_greater;
+    CARD64	bracket_less;
+    SyncCounterType counterType;  /* how can this counter change */
+    void        (*QueryValue)(
+			      pointer /*pCounter*/,
+			      CARD64 * /*freshvalue*/
+);
+    void	(*BracketValues)(
+				 pointer /*pCounter*/,
+				 CARD64 * /*lessthan*/,
+				 CARD64 * /*greaterthan*/
+);
+} SysCounterInfo;
+
+
+
+typedef struct _SyncTrigger {
+    SyncCounter *pCounter;
+    CARD64	wait_value;	/* wait value */
+    unsigned int value_type;     /* Absolute or Relative */
+    unsigned int test_type;	/* transition or Comparision type */
+    CARD64	test_value;	/* trigger event threshold value */
+    Bool	(*CheckTrigger)(
+				struct _SyncTrigger * /*pTrigger*/,
+				CARD64 /*newval*/
+				);
+    void	(*TriggerFired)(
+				struct _SyncTrigger * /*pTrigger*/
+				);
+    void	(*CounterDestroyed)(
+				struct _SyncTrigger * /*pTrigger*/
+				    );
+} SyncTrigger;
+
+typedef struct _SyncTriggerList {
+    SyncTrigger *pTrigger;
+    struct _SyncTriggerList *next;
+} SyncTriggerList;
+
+typedef struct _SyncAlarmClientList {
+    ClientPtr	client;
+    XID		delete_id;
+    struct _SyncAlarmClientList *next;
+} SyncAlarmClientList;
+
+typedef struct _SyncAlarm {
+    SyncTrigger trigger;
+    ClientPtr	client;
+    XSyncAlarm 	alarm_id;
+    CARD64	delta;
+    int		events;
+    int		state;
+    SyncAlarmClientList *pEventClients;
+} SyncAlarm;
+
+typedef struct {
+    ClientPtr	client;
+    CARD32 	delete_id;
+    int		num_waitconditions;
+} SyncAwaitHeader;
+
+typedef struct {
+    SyncTrigger trigger;
+    CARD64	event_threshold;
+    SyncAwaitHeader *pHeader;
+} SyncAwait;
+
+typedef union {
+    SyncAwaitHeader header;
+    SyncAwait	    await;
+} SyncAwaitUnion;
+
+
+extern pointer SyncCreateSystemCounter(
+    char *	/* name */,
+    CARD64  	/* inital_value */,
+    CARD64  	/* resolution */,
+    SyncCounterType /* change characterization */,
+    void        (* /*QueryValue*/ ) (
+        pointer /* pCounter */,
+        CARD64 * /* pValue_return */), /* XXX prototype */
+    void        (* /*BracketValues*/) (
+        pointer /* pCounter */, 
+        CARD64 * /* pbracket_less */,
+        CARD64 * /* pbracket_greater */)
+);
+
+extern void SyncChangeCounter(
+    SyncCounter *	/* pCounter*/,
+    CARD64  		/* new_value */
+);
+
+extern void SyncDestroySystemCounter(
+    pointer pCounter
+);
+extern void InitServertime(void);
+
+#endif /* _SYNCSTR_H_ */
commit 0570adfe05c411a35de4a5829ccf2917bae5e062
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu Aug 6 23:36:00 2009 -0700

    Sync is built-in and mandatory.
    (cherry picked from commit f3ff2386016ced7e677817e9761a535f0f385813)

diff --git a/Xext/Makefile.am b/Xext/Makefile.am
index a952935..9ed51da 100644
--- a/Xext/Makefile.am
+++ b/Xext/Makefile.am
@@ -24,13 +24,13 @@ BUILTIN_SRCS =			\
 	shape.c			\
 	sleepuntil.c		\
 	sleepuntil.h		\
+	sync.c			\
 	xcmisc.c		\
 	xtest.c
 
 # Sources always included in libXextmodule.la & libXext.la
 MODULE_SRCS =			\
-	shape.c			\
-	sync.c
+	shape.c
 
 # Optional sources included if extension enabled by configure.ac rules
 
diff --git a/hw/xfree86/dixmods/extmod/modinit.c b/hw/xfree86/dixmods/extmod/modinit.c
index 2b67ff8..8096fb0 100644
--- a/hw/xfree86/dixmods/extmod/modinit.c
+++ b/hw/xfree86/dixmods/extmod/modinit.c
@@ -74,15 +74,6 @@ static ExtensionModule extensionModules[] = {
 	NULL
     },
 #endif
-#ifdef XSYNC
-    {
-	SyncExtensionInit,
-	SYNC_NAME,
-	&noSyncExtension,
-	NULL,
-	NULL
-    },
-#endif
 #ifdef SCREENSAVER
     {
 	ScreenSaverExtensionInit,
diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h
index bc4ae78..7bcefc9 100644
--- a/hw/xfree86/dixmods/extmod/modinit.h
+++ b/hw/xfree86/dixmods/extmod/modinit.h
@@ -29,13 +29,6 @@ extern void XTestExtensionInit(INITARGS);
 extern void XTestExtension1Init(INITARGS);
 #endif
 
-#ifdef XSYNC
-extern void SyncExtensionInit(INITARGS);
-#define _SYNC_SERVER
-#include <X11/extensions/sync.h>
-#include <X11/extensions/syncstr.h>
-#endif
-
 #ifdef SCREENSAVER
 extern void ScreenSaverExtensionInit (INITARGS);
 #include <X11/extensions/saver.h>
diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
index c4c532b..5566a20 100644
--- a/hw/xfree86/loader/dixsym.c
+++ b/hw/xfree86/loader/dixsym.c
@@ -375,9 +375,6 @@ _X_HIDDEN void *dixLookupTab[] = {
 #ifdef XCSECURITY
     SYMVAR(noSecurityExtension)
 #endif
-#ifdef XSYNC
-    SYMVAR(noSyncExtension)
-#endif
 #ifdef RES
     SYMVAR(noResExtension)
 #endif
diff --git a/include/globals.h b/include/globals.h
index 4af307c..7a4b708 100644
--- a/include/globals.h
+++ b/include/globals.h
@@ -94,10 +94,6 @@ extern Bool noShapeExtension;
 extern Bool noSecurityExtension;
 #endif
 
-#ifdef XSYNC
-extern Bool noSyncExtension;
-#endif
-
 #ifdef RES
 extern Bool noResExtension;
 #endif
diff --git a/mi/miinitext.c b/mi/miinitext.c
index ca7f0fb..8e60d6b 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -121,9 +121,6 @@ extern Bool noShapeExtension;
 #ifdef XCSECURITY
 extern Bool noSecurityExtension;
 #endif
-#ifdef XSYNC
-extern Bool noSyncExtension;
-#endif
 #ifdef RES
 extern Bool noResExtension;
 #endif
@@ -236,9 +233,7 @@ extern void ScreenSaverExtensionInit (INITARGS);
 extern void XvExtensionInit(INITARGS);
 extern void XvMCExtensionInit(INITARGS);
 #endif
-#ifdef XSYNC
 extern void SyncExtensionInit(INITARGS);
-#endif
 #ifdef XKB
 extern void XkbExtensionInit(INITARGS);
 #endif
@@ -348,9 +343,6 @@ static ExtensionToggle ExtensionToggleList[] =
 #ifdef XCSECURITY
     { "SECURITY", &noSecurityExtension },
 #endif
-#ifdef XSYNC
-    { "SYNC", &noSyncExtension },
-#endif
 #ifdef RES
     { "X-Resource", &noResExtension },
 #endif
@@ -463,9 +455,7 @@ InitExtensions(argc, argv)
       XvMCExtensionInit();
     }
 #endif
-#ifdef XSYNC
-    if (!noSyncExtension) SyncExtensionInit();
-#endif
+    SyncExtensionInit();
 #if defined(XKB)
     if (!noXkbExtension) XkbExtensionInit();
 #endif
@@ -554,6 +544,7 @@ static ExtensionModule staticExtensions[] = {
 #ifdef XIDLE
     { XIdleExtensionInit, "XIDLE", &noXIdleExtension, NULL, NULL },
 #endif
+    { SyncExtensionInit, "SYNC", NULL, NULL, NULL },
 #ifdef XKB
     { XkbExtensionInit, XkbName, &noXkbExtension, NULL, NULL },
 #endif
diff --git a/os/WaitFor.c b/os/WaitFor.c
index da12976..f07388b 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -364,7 +364,6 @@ WaitForSomething(int *pClientsReady)
 	    curclient = XFD_FD(&savedClientsReadable, i);
 	    client_index = GetConnectionTranslation(curclient);
 #endif
-#ifdef XSYNC
 		/*  We implement "strict" priorities.
 		 *  Only the highest priority client is returned to
 		 *  dix.  If multiple clients at the same priority are
@@ -391,7 +390,6 @@ WaitForSomething(int *pClientsReady)
 		 *  clients get batched together
 		 */
 		else if (client_priority == highest_priority)
-#endif
 		{
 		    pClientsReady[nready++] = client_index;
 		}
diff --git a/os/utils.c b/os/utils.c
index 9878327..a2d687f 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -167,9 +167,6 @@ _X_EXPORT Bool noShapeExtension = FALSE;
 #ifdef XCSECURITY
 _X_EXPORT Bool noSecurityExtension = FALSE;
 #endif
-#ifdef XSYNC
-_X_EXPORT Bool noSyncExtension = FALSE;
-#endif
 #ifdef RES
 _X_EXPORT Bool noResExtension = FALSE;
 #endif
commit 79ae3d47ed8a5e98eb2609e4dac28c1a9361eeb9
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu Aug 6 23:35:01 2009 -0700

    XC-MISC is built-in and mandatory.
    (cherry picked from commit 3fcf4d3eb89fecaa2be7b5ac4933b693c9c3d97e)

diff --git a/Xext/Makefile.am b/Xext/Makefile.am
index 7eaf240..a952935 100644
--- a/Xext/Makefile.am
+++ b/Xext/Makefile.am
@@ -24,13 +24,13 @@ BUILTIN_SRCS =			\
 	shape.c			\
 	sleepuntil.c		\
 	sleepuntil.h		\
+	xcmisc.c		\
 	xtest.c
 
 # Sources always included in libXextmodule.la & libXext.la
 MODULE_SRCS =			\
 	shape.c			\
-	sync.c			\
-	xcmisc.c
+	sync.c
 
 # Optional sources included if extension enabled by configure.ac rules
 
diff --git a/hw/xfree86/dixmods/extmod/modinit.c b/hw/xfree86/dixmods/extmod/modinit.c
index cc5888a..2b67ff8 100644
--- a/hw/xfree86/dixmods/extmod/modinit.c
+++ b/hw/xfree86/dixmods/extmod/modinit.c
@@ -92,15 +92,6 @@ static ExtensionModule extensionModules[] = {
 	NULL
     },
 #endif
-#ifdef XCMISC
-    {
-	XCMiscExtensionInit,
-	XCMiscExtensionName,
-	&noXCMiscExtension,
-	NULL,
-	NULL
-    },
-#endif
 #ifdef XF86VIDMODE
     {
 	XFree86VidModeExtensionInit,
diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h
index 9ebcf00..bc4ae78 100644
--- a/hw/xfree86/dixmods/extmod/modinit.h
+++ b/hw/xfree86/dixmods/extmod/modinit.h
@@ -41,11 +41,6 @@ extern void ScreenSaverExtensionInit (INITARGS);
 #include <X11/extensions/saver.h>
 #endif
 
-#ifdef XCMISC
-extern void XCMiscExtensionInit(INITARGS);
-#include <X11/extensions/xcmiscstr.h>
-#endif
-
 #ifdef XF86VIDMODE
 extern void	XFree86VidModeExtensionInit(INITARGS);
 #define _XF86VIDMODE_SERVER_
diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
index 2736cd4..c4c532b 100644
--- a/hw/xfree86/loader/dixsym.c
+++ b/hw/xfree86/loader/dixsym.c
@@ -381,9 +381,6 @@ _X_HIDDEN void *dixLookupTab[] = {
 #ifdef RES
     SYMVAR(noResExtension)
 #endif
-#ifdef XCMISC
-    SYMVAR(noXCMiscExtension)
-#endif
 #ifdef XEVIE
     SYMVAR(noXevieExtension)
 #endif
diff --git a/include/globals.h b/include/globals.h
index 1f2d909..4af307c 100644
--- a/include/globals.h
+++ b/include/globals.h
@@ -102,10 +102,6 @@ extern Bool noSyncExtension;
 extern Bool noResExtension;
 #endif
 
-#ifdef XCMISC
-extern Bool noXCMiscExtension;
-#endif
-
 #ifdef XEVIE
 extern Bool noXevieExtension;
 #endif
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 5b35c04..ca7f0fb 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -127,9 +127,6 @@ extern Bool noSyncExtension;
 #ifdef RES
 extern Bool noResExtension;
 #endif
-#ifdef XCMISC
-extern Bool noXCMiscExtension;
-#endif
 #ifdef XEVIE
 extern Bool noXevieExtension;
 #endif
@@ -245,9 +242,7 @@ extern void SyncExtensionInit(INITARGS);
 #ifdef XKB
 extern void XkbExtensionInit(INITARGS);
 #endif
-#ifdef XCMISC
 extern void XCMiscExtensionInit(INITARGS);
-#endif
 #ifdef XRECORD
 extern void RecordExtensionInit(INITARGS);
 #endif
@@ -359,9 +354,6 @@ static ExtensionToggle ExtensionToggleList[] =
 #ifdef RES
     { "X-Resource", &noResExtension },
 #endif
-#ifdef XCMISC
-    { "XC-MISC", &noXCMiscExtension },
-#endif
 #ifdef XEVIE
     { "XEVIE", &noXevieExtension },
 #endif
@@ -477,9 +469,7 @@ InitExtensions(argc, argv)
 #if defined(XKB)
     if (!noXkbExtension) XkbExtensionInit();
 #endif
-#ifdef XCMISC
-    if (!noXCMiscExtension) XCMiscExtensionInit();
-#endif
+    XCMiscExtensionInit();
 #ifdef XRECORD
     if (!noTestExtensions) RecordExtensionInit(); 
 #endif
@@ -567,6 +557,7 @@ static ExtensionModule staticExtensions[] = {
 #ifdef XKB
     { XkbExtensionInit, XkbName, &noXkbExtension, NULL, NULL },
 #endif
+    { XCMiscExtensionInit, "XC-MISC", NULL, NULL, NULL },
 #ifdef XCSECURITY
     { SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, NULL, NULL },
 #endif
diff --git a/os/utils.c b/os/utils.c
index 6babd7f..9878327 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -173,9 +173,6 @@ _X_EXPORT Bool noSyncExtension = FALSE;
 #ifdef RES
 _X_EXPORT Bool noResExtension = FALSE;
 #endif
-#ifdef XCMISC
-_X_EXPORT Bool noXCMiscExtension = FALSE;
-#endif
 #ifdef XEVIE
 /* Xevie is disabled by default for now until the
  * interface is stable */
commit 2b145ba81d4f7ee85428097bd94e8e67159bcbf2
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu Aug 6 23:33:10 2009 -0700

    Bigreqs are built-in and mandatory.
    (cherry picked from commit f65c50c4e902c7b5619fb7bbee8462434d809ec7)

diff --git a/Xext/Makefile.am b/Xext/Makefile.am
index 6374bdc..7eaf240 100644
--- a/Xext/Makefile.am
+++ b/Xext/Makefile.am
@@ -20,6 +20,7 @@ endif
 
 # Sources always included in libXextbuiltin.la & libXext.la
 BUILTIN_SRCS =			\
+	bigreq.c		\
 	shape.c			\
 	sleepuntil.c		\
 	sleepuntil.h		\
@@ -27,7 +28,6 @@ BUILTIN_SRCS =			\
 
 # Sources always included in libXextmodule.la & libXext.la
 MODULE_SRCS =			\
-	bigreq.c		\
 	shape.c			\
 	sync.c			\
 	xcmisc.c
diff --git a/hw/xfree86/dixmods/extmod/modinit.c b/hw/xfree86/dixmods/extmod/modinit.c
index a18118a..cc5888a 100644
--- a/hw/xfree86/dixmods/extmod/modinit.c
+++ b/hw/xfree86/dixmods/extmod/modinit.c
@@ -74,15 +74,6 @@ static ExtensionModule extensionModules[] = {
 	NULL
     },
 #endif
-#ifdef BIGREQS
-     {
-	BigReqExtensionInit,
-	XBigReqExtensionName,
-	&noBigReqExtension,
-	NULL,
-	NULL
-     },
-#endif
 #ifdef XSYNC
     {
 	SyncExtensionInit,
diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h
index fe95c49..9ebcf00 100644
--- a/hw/xfree86/dixmods/extmod/modinit.h
+++ b/hw/xfree86/dixmods/extmod/modinit.h
@@ -29,11 +29,6 @@ extern void XTestExtensionInit(INITARGS);
 extern void XTestExtension1Init(INITARGS);
 #endif
 
-#ifdef BIGREQS
-extern void BigReqExtensionInit(INITARGS);
-#include <X11/extensions/bigreqstr.h>
-#endif
-
 #ifdef XSYNC
 extern void SyncExtensionInit(INITARGS);
 #define _SYNC_SERVER
diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
index ef909d6..2736cd4 100644
--- a/hw/xfree86/loader/dixsym.c
+++ b/hw/xfree86/loader/dixsym.c
@@ -226,8 +226,6 @@ _X_HIDDEN void *dixLookupTab[] = {
     SYMVAR(DPMSDisabledSwitch)
     SYMVAR(defaultDPMSEnabled)
 #endif
-    /* bigreq */
-    SYMVAR(maxBigRequestSize)
 #ifdef XV
     /* XXX These are exported from the DDX, not DIX. */
     SYMVAR(XvScreenInitProc)
@@ -341,9 +339,6 @@ _X_HIDDEN void *dixLookupTab[] = {
     SYMVAR(noTestExtensions)
     SYMFUNC(GiveUp)
 
-#ifdef BIGREQS
-    SYMVAR(noBigReqExtension)
-#endif
 #ifdef COMPOSITE
     SYMVAR(noCompositeExtension)
 #endif
diff --git a/include/globals.h b/include/globals.h
index 0d29e02..1f2d909 100644
--- a/include/globals.h
+++ b/include/globals.h
@@ -46,10 +46,6 @@ extern Bool DPMSCapableFlag;
 extern Bool PanoramiXExtensionDisabledHack;
 #endif
 
-#ifdef BIGREQS
-extern Bool noBigReqExtension;
-#endif
-
 #ifdef COMPOSITE
 extern Bool noCompositeExtension;
 #endif
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 2ce96c3..5b35c04 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -88,9 +88,6 @@ SOFTWARE.
 
 extern Bool noTestExtensions;
 
-#ifdef BIGREQS
-extern Bool noBigReqExtension;
-#endif
 #ifdef COMPOSITE
 extern Bool noCompositeExtension;
 #endif
@@ -228,9 +225,7 @@ extern void XInputExtensionInit(INITARGS);
 #ifdef XTEST
 extern void XTestExtensionInit(INITARGS);
 #endif
-#ifdef BIGREQS
 extern void BigReqExtensionInit(INITARGS);
-#endif
 #ifdef XIDLE
 extern void XIdleExtensionInit(INITARGS);
 #endif
@@ -322,9 +317,6 @@ typedef struct {
 static ExtensionToggle ExtensionToggleList[] =
 {
     /* sort order is extension name string as shown in xdpyinfo */
-#ifdef BIGREQS
-    { "BIG-REQUESTS", &noBigReqExtension },
-#endif
 #ifdef COMPOSITE
     { "Composite", &noCompositeExtension },
 #endif
@@ -463,9 +455,7 @@ InitExtensions(argc, argv)
 #ifdef XTEST
     if (!noTestExtensions) XTestExtensionInit();
 #endif
-#ifdef BIGREQS
-    if (!noBigReqExtension) BigReqExtensionInit();
-#endif
+    BigReqExtensionInit();
 #ifdef XIDLE
     if (!noXIdleExtension) XIdleExtensionInit();
 #endif
@@ -570,6 +560,7 @@ static ExtensionModule staticExtensions[] = {
 #ifdef XTEST
     { XTestExtensionInit, XTestExtensionName, &noTestExtensions, NULL, NULL },
 #endif
+    { BigReqExtensionInit, "BIG-REQUESTS", NULL, NULL, NULL },
 #ifdef XIDLE
     { XIdleExtensionInit, "XIDLE", &noXIdleExtension, NULL, NULL },
 #endif
diff --git a/os/io.c b/os/io.c
index e7ec609..ccbe059 100644
--- a/os/io.c
+++ b/os/io.c
@@ -118,13 +118,11 @@ static OsCommPtr AvailableInput = (OsCommPtr)NULL;
 #define get_req_len(req,cli) ((cli)->swapped ? \
 			      lswaps((req)->length) : (req)->length)
 
-#ifdef BIGREQS
 #include <X11/extensions/bigreqstr.h>
 
 #define get_big_req_len(req,cli) ((cli)->swapped ? \
 				  lswapl(((xBigReq *)(req))->length) : \
 				  ((xBigReq *)(req))->length)
-#endif
 
 #define MAX_TIMES_PER         10
 
@@ -204,9 +202,7 @@ ReadRequestFromClient(ClientPtr client)
     int result;
     register xReq *request;
     Bool need_header;
-#ifdef BIGREQS
     Bool move_header;
-#endif
 
     /* If an input buffer was empty, either free it if it is too big
      * or link it into our list of free input buffers.  This means that
@@ -255,9 +251,7 @@ ReadRequestFromClient(ClientPtr client)
     oci->bufptr += oci->lenLastReq;
 
     need_header = FALSE;
-#ifdef BIGREQS
     move_header = FALSE;
-#endif
     gotnow = oci->bufcnt + oci->buffer - oci->bufptr;
     if (gotnow < sizeof(xReq))
     {
@@ -274,7 +268,6 @@ ReadRequestFromClient(ClientPtr client)
 	 */
 	request = (xReq *)oci->bufptr;
 	needed = get_req_len(request, client);
-#ifdef BIGREQS
 	if (!needed && client->big_requests)
 	{
 	    /* It's a Big Request. */
@@ -288,7 +281,6 @@ ReadRequestFromClient(ClientPtr client)
 	    else
 		needed = get_big_req_len(request, client);
 	}
-#endif
 	client->req_len = needed;
 	needed <<= 2; /* needed is in bytes now */
     }
@@ -301,14 +293,12 @@ ReadRequestFromClient(ClientPtr client)
 	 */
 
 	oci->lenLastReq = 0;
-#ifdef BIGREQS
 	if (needed > maxBigRequestSize << 2)
 	{
 	    /* request is too big for us to handle */
 	    YieldControlDeath();
 	    return -1;
 	}
-#endif
 	if ((gotnow == 0) ||
 	    ((oci->bufptr - oci->buffer + needed) > oci->size))
 	{
@@ -385,7 +375,6 @@ ReadRequestFromClient(ClientPtr client)
 	    /* We wanted an xReq, now we've gotten it. */
 	    request = (xReq *)oci->bufptr;
 	    needed = get_req_len(request, client);
-#ifdef BIGREQS
 	    if (!needed && client->big_requests)
 	    {
 		move_header = TRUE;
@@ -394,7 +383,6 @@ ReadRequestFromClient(ClientPtr client)
 		else
 		    needed = get_big_req_len(request, client);
 	    }
-#endif
 	    client->req_len = needed;
 	    needed <<= 2;
 	}
@@ -407,11 +395,9 @@ ReadRequestFromClient(ClientPtr client)
     }
     if (needed == 0)
     {
-#ifdef BIGREQS
 	if (client->big_requests)
 	    needed = sizeof(xBigReq);
 	else
-#endif
 	    needed = sizeof(xReq);
     }
     oci->lenLastReq = needed;
@@ -429,12 +415,10 @@ ReadRequestFromClient(ClientPtr client)
     {
 	request = (xReq *)(oci->bufptr + needed);
 	if (gotnow >= (result = (get_req_len(request, client) << 2))
-#ifdef BIGREQS
 	    && (result ||
 		(client->big_requests &&
 		 (gotnow >= sizeof(xBigReq) &&
 		  gotnow >= (get_big_req_len(request, client) << 2))))
-#endif
 	    )
 	    FD_SET(fd, &ClientsWithInput);
 	else
@@ -463,7 +447,6 @@ ReadRequestFromClient(ClientPtr client)
 #endif
     if (++timesThisConnection >= MAX_TIMES_PER)
 	YieldControl();
-#ifdef BIGREQS
     if (move_header)
     {
 	request = (xReq *)oci->bufptr;
@@ -472,7 +455,6 @@ ReadRequestFromClient(ClientPtr client)
 	oci->lenLastReq -= (sizeof(xBigReq) - sizeof(xReq));
 	client->req_len -= (sizeof(xBigReq) - sizeof(xReq)) >> 2;
     }
-#endif
     client->requestBuffer = (pointer)oci->bufptr;
 #ifdef DEBUG_COMMUNICATION
     {
@@ -584,7 +566,6 @@ ResetCurrentRequest(ClientPtr client)
     {
 	request = (xReq *)oci->bufptr;
 	needed = get_req_len(request, client);
-#ifdef BIGREQS
 	if (!needed && client->big_requests)
 	{
 	    oci->bufptr -= sizeof(xBigReq) - sizeof(xReq);
@@ -596,7 +577,6 @@ ResetCurrentRequest(ClientPtr client)
 		swapl(&((xBigReq *)oci->bufptr)->length, n);
 	    }
 	}
-#endif
 	if (gotnow >= (needed << 2))
 	{
 	    if (FD_ISSET(fd, &AllClients))
diff --git a/os/utils.c b/os/utils.c
index c65c659..6babd7f 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -129,9 +129,6 @@ OR PERFORMANCE OF THIS SOFTWARE.
 #endif
 
 _X_EXPORT Bool noTestExtensions;
-#ifdef BIGREQS
-_X_EXPORT Bool noBigReqExtension = FALSE;
-#endif
 #ifdef COMPOSITE
 _X_EXPORT Bool noCompositeExtension = FALSE;
 #endif
commit 2fe86459cfb7754075934cd44bb3d19a431f0fb5
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu Aug 6 23:24:51 2009 -0700

    Drop the FONTCACHE extension.
    
    This appears to have been dead code since X-TT was merged.
    (cherry picked from commit 0b45ba488d8a3e901b83e445d17e7e9a67047b6c)

diff --git a/Xext/Makefile.am b/Xext/Makefile.am
index c5c5d2e..6374bdc 100644
--- a/Xext/Makefile.am
+++ b/Xext/Makefile.am
@@ -105,12 +105,6 @@ if MULTIBUFFER
 MODULE_SRCS  += $(MULTIBUFFER_SRCS)
 endif
 
-# Font Cache extension
-FONTCACHE_SRCS = fontcache.c
-if FONTCACHE
-MODULE_SRCS  += $(FONTCACHE_SRCS)
-endif
-
 # XF86 Big Font extension
 BIGFONT_SRCS = xf86bigfont.c
 if XF86BIGFONT
diff --git a/Xext/fontcache.c b/Xext/fontcache.c
deleted file mode 100644
index 0338d4a..0000000
--- a/Xext/fontcache.c
+++ /dev/null
@@ -1,323 +0,0 @@
-/*-
- * Copyright (c) 1998-1999 Shunsuke Akiyama <akiyama at jp.FreeBSD.org>.
- * All rights reserved.
- * Copyright (c) 1998-1999 X-TrueType Server Project, All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/* THIS IS NOT AN X CONSORTIUM STANDARD */
-
-#define NEED_REPLIES
-#define NEED_EVENTS
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include "misc.h"
-#include "dixstruct.h"
-#include "extnsionst.h"
-#include "scrnintstr.h"
-#include "inputstr.h"
-#include "servermd.h"
-#define _FONTCACHE_SERVER_
-#include <X11/extensions/fontcacheP.h>
-#include <X11/extensions/fontcachstr.h>
-#include <X11/Xfuncproto.h>
-
-#include "swaprep.h"
-#include "modinit.h"
-
-static int miscErrorBase;
-
-static void FontCacheResetProc(
-    ExtensionEntry* /* extEntry */
-);
-
-static DISPATCH_PROC(ProcFontCacheDispatch);
-static DISPATCH_PROC(ProcFontCacheGetCacheSettings);
-static DISPATCH_PROC(ProcFontCacheGetCacheStatistics);
-static DISPATCH_PROC(ProcFontCacheQueryVersion);
-static DISPATCH_PROC(ProcFontCacheChangeCacheSettings);
-static DISPATCH_PROC(SProcFontCacheDispatch);
-static DISPATCH_PROC(SProcFontCacheGetCacheSettings);
-static DISPATCH_PROC(SProcFontCacheGetCacheStatistics);
-static DISPATCH_PROC(SProcFontCacheQueryVersion);
-static DISPATCH_PROC(SProcFontCacheChangeCacheSettings);
-
-void
-FontCacheExtensionInit(INITARGS)
-{
-    ExtensionEntry* extEntry;
-
-    if (
-	(extEntry = AddExtension(FONTCACHENAME,
-				FontCacheNumberEvents,
-				FontCacheNumberErrors,
-				ProcFontCacheDispatch,
-				SProcFontCacheDispatch,
-				FontCacheResetProc,
-				StandardMinorOpcode))) {
-	miscErrorBase = extEntry->errorBase;
-    }
-}
-
-/*ARGSUSED*/
-static void
-FontCacheResetProc (extEntry)
-    ExtensionEntry* extEntry;
-{
-}
-
-static int
-ProcFontCacheQueryVersion(client)
-    register ClientPtr client;
-{
-    xFontCacheQueryVersionReply rep;
-    register int n;
-
-    REQUEST_SIZE_MATCH(xFontCacheQueryVersionReq);
-    rep.type = X_Reply;
-    rep.length = 0;
-    rep.sequenceNumber = client->sequence;
-    rep.majorVersion = FONTCACHE_MAJOR_VERSION;
-    rep.minorVersion = FONTCACHE_MINOR_VERSION;
-    if (client->swapped) {
-    	swaps(&rep.sequenceNumber, n);
-    	swapl(&rep.length, n);
-    	swaps(&rep.majorVersion, n);
-    	swaps(&rep.minorVersion, n);
-    }
-    WriteToClient(client, SIZEOF(xFontCacheQueryVersionReply), (char *)&rep);
-    return (client->noClientException);
-}
-
-static int
-ProcFontCacheGetCacheSettings(client)
-    register ClientPtr client;
-{
-    xFontCacheGetCacheSettingsReply rep;
-    FontCacheSettings cinfo;
-    register int n;
-
-    REQUEST_SIZE_MATCH(xFontCacheGetCacheSettingsReq);
-    rep.type = X_Reply;
-    rep.sequenceNumber = client->sequence;
-    rep.length = 0;
-
-    /* XXX */
-    FontCacheGetSettings(&cinfo);
-    rep.himark = cinfo.himark;
-    rep.lowmark = cinfo.lowmark;
-    rep.balance = cinfo.balance;
-    rep.reserve0 = 0;
-    rep.reserve1 = 0;
-    rep.reserve2 = 0;
-
-    if (client->swapped) {
-    	swaps(&rep.sequenceNumber, n);
-    	swapl(&rep.himark, n);
-    	swapl(&rep.lowmark, n);
-    	swapl(&rep.balance, n);
-    	swapl(&rep.reserve0, n);
-    	swapl(&rep.reserve1, n);
-    	swapl(&rep.reserve2, n);
-    }
-    /* XXX */
-
-    WriteToClient(client, SIZEOF(xFontCacheGetCacheSettingsReply),
-		  (char *)&rep);
-    return (client->noClientException);
-}
-
-static int
-ProcFontCacheGetCacheStatistics(client)
-    register ClientPtr client;
-{
-    xFontCacheGetCacheStatisticsReply rep;
-    FontCacheStatistics cstats;
-    register int n;
-
-    REQUEST_SIZE_MATCH(xFontCacheGetCacheStatisticsReq);
-    rep.type = X_Reply;
-    rep.sequenceNumber = client->sequence;
-    rep.length = (sz_xFontCacheGetCacheStatisticsReply - 32) >> 2;
-
-    /* XXX */
-    FontCacheGetStatistics(&cstats);
-    rep.purge_runs = cstats.purge_runs;
-    rep.purge_stat = cstats.purge_stat;
-    rep.balance = cstats.balance;
-    rep.reserve0 = 0;
-    rep.f_hits = cstats.f.hits;
-    rep.f_misshits = cstats.f.misshits;
-    rep.f_purged = cstats.f.purged;
-    rep.f_usage = cstats.f.usage;
-    rep.f_reserve0 = 0;
-    rep.v_hits = cstats.v.hits;
-    rep.v_misshits = cstats.v.misshits;
-    rep.v_purged = cstats.v.purged;
-    rep.v_usage = cstats.v.usage;
-    rep.v_reserve0 = 0;
-    if (client->swapped) {
-    	swaps(&rep.sequenceNumber, n);
-    	swapl(&rep.length, n);
-	swapl(&rep.purge_runs, n);
-	swapl(&rep.purge_stat, n);
-    	swapl(&rep.balance, n);
-	swapl(&rep.reserve0, n);
-    	swapl(&rep.f_hits, n);
-    	swapl(&rep.f_misshits, n);
-	swapl(&rep.f_purged, n);
-    	swapl(&rep.f_usage, n);
-	swapl(&rep.f_reserve0, n);
-	swapl(&rep.v_hits, n);
-	swapl(&rep.v_misshits, n);
-	swapl(&rep.v_purged, n);
-	swapl(&rep.v_usage, n);
-	swapl(&rep.v_reserve0, n);
-    }
-    /* XXX */
-    WriteToClient(client, SIZEOF(xFontCacheGetCacheStatisticsReply),
-		  (char *)&rep);
-    return (client->noClientException);
-}
-
-static int
-ProcFontCacheChangeCacheSettings(client)
-    register ClientPtr client;
-{
-    FontCacheSettings cs;
-
-    REQUEST(xFontCacheChangeCacheSettingsReq);
-
-    REQUEST_SIZE_MATCH(xFontCacheChangeCacheSettingsReq);
-
-    /* XXX */
-    cs.himark = stuff->himark;
-    cs.lowmark = stuff->lowmark;
-    cs.balance = stuff->balance;
-
-    if (cs.himark < 0 || cs.lowmark < 0)
-        return BadValue;
-    if (cs.himark <= cs.lowmark)
-	return BadValue;
-    if (!(10 <= cs.balance && cs.balance <= 90))
-	return BadValue;
-
-    if (FontCacheChangeSettings(&cs) == 0)
-	return miscErrorBase + FontCacheCannotAllocMemory;
-    /* XXX */
-
-    return (client->noClientException);
-}
-
-static int
-ProcFontCacheDispatch (client)
-    register ClientPtr	client;
-{
-    REQUEST(xReq);
-    switch (stuff->data)
-    {
-    case X_FontCacheQueryVersion:
-	return ProcFontCacheQueryVersion(client);
-    case X_FontCacheGetCacheSettings:
-	return ProcFontCacheGetCacheSettings(client);
-    case X_FontCacheGetCacheStatistics:
-	return ProcFontCacheGetCacheStatistics(client);
-    case X_FontCacheChangeCacheSettings:
-	return ProcFontCacheChangeCacheSettings(client);
-    default:
-	return miscErrorBase + FontCacheBadProtocol;
-    }
-}
-
-static int
-SProcFontCacheQueryVersion(client)
-    register ClientPtr	client;
-{
-    register int n;
-    REQUEST(xFontCacheQueryVersionReq);
-    swaps(&stuff->length, n);
-    return ProcFontCacheQueryVersion(client);
-}
-
-static int
-SProcFontCacheGetCacheSettings(client)
-    ClientPtr client;
-{
-    register int n;
-    REQUEST(xFontCacheGetCacheSettingsReq);
-    swaps(&stuff->length, n);
-    REQUEST_SIZE_MATCH(xFontCacheGetCacheSettingsReq);
-    return ProcFontCacheGetCacheSettings(client);
-}
-
-static int
-SProcFontCacheGetCacheStatistics(client)
-    ClientPtr client;
-{
-    register int n;
-    REQUEST(xFontCacheGetCacheStatisticsReq);
-    swaps(&stuff->length, n);
-    REQUEST_SIZE_MATCH(xFontCacheGetCacheStatisticsReq);
-    return ProcFontCacheGetCacheStatistics(client);
-}
-
-static int
-SProcFontCacheChangeCacheSettings(client)
-    ClientPtr client;
-{
-    register int n;
-    REQUEST(xFontCacheChangeCacheSettingsReq);
-    swaps(&stuff->length, n);
-    REQUEST_SIZE_MATCH(xFontCacheChangeCacheSettingsReq);
-    /* XXX */
-    swapl(&stuff->himark, n);
-    swapl(&stuff->lowmark, n);
-    swapl(&stuff->balance, n);
-    /* XXX */
-    return ProcFontCacheChangeCacheSettings(client);
-}
-
-static int
-SProcFontCacheDispatch (client)
-    register ClientPtr	client;
-{
-    REQUEST(xReq);
-    switch (stuff->data)
-    {
-    case X_FontCacheQueryVersion:
-	return SProcFontCacheQueryVersion(client);
-    case X_FontCacheGetCacheSettings:
-	return SProcFontCacheGetCacheSettings(client);
-    case X_FontCacheGetCacheStatistics:
-	return SProcFontCacheGetCacheStatistics(client);
-    case X_FontCacheChangeCacheSettings:
-	return SProcFontCacheChangeCacheSettings(client);
-    default:
-	return miscErrorBase + FontCacheBadProtocol;
-    }
-}
diff --git a/configure.ac b/configure.ac
index 1f40d75..98e26b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -559,7 +559,6 @@ AC_ARG_ENABLE(tslib,          AS_HELP_STRING([--enable-tslib], [Build kdrive tsl
 AC_ARG_ENABLE(xevie,          AS_HELP_STRING([--disable-xevie], [Build XEvIE extension (default: enabled)]), [XEVIE=$enableval], [XEVIE=yes])
 AC_ARG_ENABLE(cup,            AS_HELP_STRING([--disable-cup], [Build TOG-CUP extension (default: enabled)]), [CUP=$enableval], [CUP=yes])
 AC_ARG_ENABLE(multibuffer,    AS_HELP_STRING([--enable-multibuffer], [Build Multibuffer extension (default: disabled)]), [MULTIBUFFER=$enableval], [MULTIBUFFER=no])
-AC_ARG_ENABLE(fontcache,      AS_HELP_STRING([--enable-fontcache], [Build FontCache extension (default: disabled)]), [FONTCACHE=$enableval], [FONTCACHE=no])
 AC_ARG_ENABLE(dbe,            AS_HELP_STRING([--disable-dbe], [Build DBE extension (default: enabled)]), [DBE=$enableval], [DBE=yes])
 AC_ARG_ENABLE(xf86bigfont,    AS_HELP_STRING([--disable-xf86bigfont], [Build XF86 Big Font extension (default: enabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=auto])
 AC_ARG_ENABLE(dpms,           AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes])
@@ -969,12 +968,6 @@ if test "x$MULTIBUFFER" = xyes; then
 	# Requires xextproto which is always required
 fi
 
-AM_CONDITIONAL(FONTCACHE, [test "x$FONTCACHE" = xyes])
-if test "x$FONTCACHE" = xyes; then
-	AC_DEFINE(FONTCACHE, 1, [Build FontCache extension])
-	REQUIRED_MODULES="$REQUIRED_MODULES fontcacheproto"
-fi
-
 AM_CONDITIONAL(DBE, [test "x$DBE" = xyes])
 if test "x$DBE" = xyes; then
 	AC_DEFINE(DBE, 1, [Support DBE extension])
diff --git a/hw/dmx/dmx-config.h b/hw/dmx/dmx-config.h
index 715977c..5b7b605 100644
--- a/hw/dmx/dmx-config.h
+++ b/hw/dmx/dmx-config.h
@@ -73,11 +73,8 @@
 #define DMXEXT
 
 /* Disable the extensions that are not currently supported */
-#undef BEZIER
-#undef PEXEXT
 #undef MULTIBUFFER
 #undef XV
-#undef XIE
 #undef DBE
 #undef XF86VIDMODE
 #undef XFreeXDGA
@@ -87,6 +84,5 @@
 #undef XFIXES
 #undef DAMAGE
 #undef COMPOSITE
-#undef FONTCACHE
 
 #endif /* DMX_CONFIG_H */
diff --git a/hw/xfree86/dixmods/extmod/modinit.c b/hw/xfree86/dixmods/extmod/modinit.c
index 2f81319..a18118a 100644
--- a/hw/xfree86/dixmods/extmod/modinit.c
+++ b/hw/xfree86/dixmods/extmod/modinit.c
@@ -137,15 +137,6 @@ static ExtensionModule extensionModules[] = {
 	NULL
     },
 #endif
-#ifdef FONTCACHE
-    {
-	FontCacheExtensionInit,
-	FONTCACHENAME,
-	&noFontCacheExtension,
-	NULL,
-	NULL
-    },
-#endif
 #ifdef XV
     {
 	XvExtensionInit,
diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h
index 463a400..fe95c49 100644
--- a/hw/xfree86/dixmods/extmod/modinit.h
+++ b/hw/xfree86/dixmods/extmod/modinit.h
@@ -69,13 +69,6 @@ extern void DPMSExtensionInit(INITARGS);
 #include <X11/extensions/dpmsstr.h>
 #endif
 
-#ifdef FONTCACHE
-extern void FontCacheExtensionInit(INITARGS);
-#define _FONTCACHE_SERVER_
-#include "fontcacheP.h"
-#include "fontcachstr.h"
-#endif
-
 #ifdef XV
 extern void XvExtensionInit(INITARGS);
 extern void XvMCExtensionInit(INITARGS);
diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
index 5d4d89e..ef909d6 100644
--- a/hw/xfree86/loader/dixsym.c
+++ b/hw/xfree86/loader/dixsym.c
@@ -356,9 +356,6 @@ _X_HIDDEN void *dixLookupTab[] = {
 #ifdef DPMSExtension
     SYMVAR(noDPMSExtension)
 #endif
-#ifdef FONTCACHE
-    SYMVAR(noFontCacheExtension)
-#endif
 #ifdef GLXEXT
     SYMVAR(noGlxExtension)
 #endif
diff --git a/include/globals.h b/include/globals.h
index 82e7b4b..0d29e02 100644
--- a/include/globals.h
+++ b/include/globals.h
@@ -66,10 +66,6 @@ extern Bool noDbeExtension;
 extern Bool noDPMSExtension;
 #endif
 
-#ifdef FONTCACHE
-extern Bool noFontCacheExtension;
-#endif
-
 #ifdef GLXEXT
 extern Bool noGlxExtension;
 #endif
diff --git a/mi/miinitext.c b/mi/miinitext.c
index dd79931..2ce96c3 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -100,9 +100,6 @@ extern Bool noDbeExtension;
 #ifdef DPMSExtension
 extern Bool noDPMSExtension;
 #endif
-#ifdef FONTCACHE
-extern Bool noFontCacheExtension;
-#endif
 #ifdef GLXEXT
 extern Bool noGlxExtension;
 #endif
@@ -289,9 +286,6 @@ extern void XFree86DRIExtensionInit(INITARGS);
 #ifdef DPMSExtension
 extern void DPMSExtensionInit(INITARGS);
 #endif
-#ifdef FONTCACHE
-extern void FontCacheExtensionInit(INITARGS);
-#endif
 #ifdef RENDER
 extern void RenderExtensionInit(INITARGS);
 #endif
@@ -343,9 +337,6 @@ static ExtensionToggle ExtensionToggleList[] =
 #ifdef DPMSExtension
     { "DPMS", &noDPMSExtension },
 #endif
-#ifdef FONTCACHE
-    { "FontCache", &noFontCacheExtension },
-#endif
 #ifdef GLXEXT
     { "GLX", &noGlxExtension },
 #endif
@@ -514,9 +505,6 @@ InitExtensions(argc, argv)
 #if defined(DPMSExtension) && !defined(NO_HW_ONLY_EXTS)
     if (!noDPMSExtension) DPMSExtensionInit();
 #endif
-#ifdef FONTCACHE
-    if (!noFontCacheExtension) FontCacheExtensionInit();
-#endif
 #ifdef XF86BIGFONT
     if (!noXFree86BigfontExtension) XFree86BigfontExtensionInit();
 #endif
diff --git a/os/utils.c b/os/utils.c
index 7ad06d7..c65c659 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -145,9 +145,6 @@ _X_EXPORT Bool noDbeExtension = FALSE;
 #ifdef DPMSExtension
 _X_EXPORT Bool noDPMSExtension = FALSE;
 #endif
-#ifdef FONTCACHE
-_X_EXPORT Bool noFontCacheExtension = FALSE;
-#endif
 #ifdef GLXEXT
 _X_EXPORT Bool noGlxExtension = FALSE;
 _X_EXPORT Bool noGlxVisualInit = FALSE;
commit 725c24f0460ae1a3db16e78d9034d3aa2c6c238b
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu Aug 6 23:24:07 2009 -0700

    XFree86: Remove XFree86-Misc extension
    
    Its last remaining purpose in life has been destroyed by input
    properties.  Au revoir: it's been fun, by which I mean awful.
    (cherry picked from commit 22e64108ec63ba77779891f8df237913ef9ca731)

diff --git a/configure.ac b/configure.ac
index b005dc1..1f40d75 100644
--- a/configure.ac
+++ b/configure.ac
@@ -550,7 +550,6 @@ AC_ARG_ENABLE(dri,            AS_HELP_STRING([--enable-dri], [Build DRI extensio
 AC_ARG_ENABLE(dri2,           AS_HELP_STRING([--enable-dri2], [Build DRI2 extension (default: no)]), [DRI2=$enableval], [DRI2=no])
 AC_ARG_ENABLE(xinerama,	      AS_HELP_STRING([--disable-xinerama], [Build Xinerama extension (default: enabled)]), [XINERAMA=$enableval], [XINERAMA=yes])
 AC_ARG_ENABLE(xf86vidmode,    AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: auto)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=auto])
-AC_ARG_ENABLE(xf86misc,       AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: auto)]), [XF86MISC=$enableval], [XF86MISC=auto])
 AC_ARG_ENABLE(xace,           AS_HELP_STRING([--disable-xace], [Build X-ACE extension (default: enabled)]), [XACE=$enableval], [XACE=yes])
 AC_ARG_ENABLE(xselinux,       AS_HELP_STRING([--disable-xselinux], [Build SELinux extension (default: disabled)]), [XSELINUX=$enableval], [XSELINUX=no])
 AC_ARG_ENABLE(xcsecurity,     AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: disabled)]), [XCSECURITY=$enableval], [XCSECURITY=no])
@@ -682,7 +681,6 @@ case $host_os in
 			DGA=no
 			DPMSExtension=no
 			XF86BIGFONT=no
-			XF86MISC=no
 			XF86VIDMODE=no
 		fi
 		;;
@@ -1479,15 +1477,6 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then
 		AC_DEFINE(XFreeXDGA, 1, [Build XDGA support])
 	fi
 
-	if test "x$XF86MISC" = xauto; then
-		PKG_CHECK_MODULES(XF86MISC, xf86miscproto, [XF86MISC=yes], [XF86MISC=no])
-	fi
-	if test "x$XF86MISC" = xyes; then
-		XORG_MODULES="$XORG_MODULES xf86miscproto"
-		PKG_CHECK_MODULES(XF86MISC, xf86miscproto)
-		AC_DEFINE(XF86MISC, 1, [Support XFree86 miscellaneous extensions])
-	fi
-
 	if test "x$XF86VIDMODE" = xauto; then
 		PKG_CHECK_MODULES(XF86VIDMODE, xf86vidmodeproto, [XF86VIDMODE=yes], [XF86VIDMODE=no])
 	fi
@@ -1577,7 +1566,6 @@ AM_CONDITIONAL([LNXACPI], [test "x$linux_acpi" = xyes])
 AM_CONDITIONAL([SOLARIS_USL_CONSOLE], [test "x$solaris_usl_console" = xyes])
 AM_CONDITIONAL([SOLARIS_ASM_INLINE], [test "x$solaris_asm_inline" = xyes])
 AM_CONDITIONAL([DGA], [test "x$DGA" = xyes])
-AM_CONDITIONAL([XF86MISC], [test "x$XF86MISC" = xyes])
 AM_CONDITIONAL([XF86VIDMODE], [test "x$XF86VIDMODE" = xyes])
 
 dnl legacy fb support
@@ -1643,10 +1631,6 @@ if test "x$XWIN" = xyes; then
 		AC_MSG_NOTICE([Disabling XF86VidMode extension])
 		XF86VIDMODE=no
 	fi
-	if test "x$XF86MISC" = xyes; then
-		AC_MSG_NOTICE([Disabling XF86Misc extension])
-		XF86MISC=no
-	fi
 	if test "x$COMPOSITE" = xyes; then
 		AC_MSG_NOTICE([Disabling Composite extension])
 		COMPOSITE=no
@@ -1939,7 +1923,7 @@ AC_ARG_ENABLE(xorgcfg, AS_HELP_STRING([--enable-xorgcfg],
 	[XORGCFG=$enableval],[XORGCFG=no])
 if test x$XORGCFG = xyes ; then
 	PKG_CHECK_MODULES([XORGCFG_DEP], 
-	    [xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11])
+	    [xkbui >= 1.0.2 xkbfile xxf86vm xaw7 xmu xt xpm xext x11])
 	XORGCFG_DEP_CFLAGS="$XORGCFG_DEP_CFLAGS"
 	AC_CHECK_LIB([curses],[waddstr],
 	    [XORGCFG_DEP_LIBS="$XORGCFG_DEP_LIBS -lcurses"; CURSES=yes],
diff --git a/hw/dmx/dmx-config.h b/hw/dmx/dmx-config.h
index 4a2dfe0..715977c 100644
--- a/hw/dmx/dmx-config.h
+++ b/hw/dmx/dmx-config.h
@@ -80,7 +80,6 @@
 #undef XIE
 #undef DBE
 #undef XF86VIDMODE
-#undef XF86MISC
 #undef XFreeXDGA
 #undef XF86DRI
 #undef SCREENSAVER
diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am
index 1379f45..2cd67e3 100644
--- a/hw/xfree86/common/Makefile.am
+++ b/hw/xfree86/common/Makefile.am
@@ -34,7 +34,7 @@ libcommon_la_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \
                       xf86Cursor.c xf86DGA.c xf86DPMS.c \
                       xf86DoProbe.c xf86Events.c \
                       xf86Globals.c xf86AutoConfig.c \
-                      xf86MiscExt.c xf86Option.c \
+                      xf86Option.c \
                       xf86VidMode.c xf86fbman.c xf86cmap.c \
                       xf86Helper.c xf86PM.c \
                       xf86Mode.c xf86Build.h xorgHelper.c xf86Versions.c \
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 9255cc6..88905c2 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -915,13 +915,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
 	xf86Info.vidModeAllowNonLocal = value;
 #endif
 
-#ifdef XF86MISC
-    if (xf86GetOptValBool(FlagOptions, FLAG_DISABLEMODINDEV, &value))
-	xf86Info.miscModInDevEnabled = !value;
-    if (xf86GetOptValBool(FlagOptions, FLAG_MODINDEVALLOWNONLOCAL, &value))
-	xf86Info.miscModInDevAllowNonLocal = value;
-#endif
-
     if (xf86GetOptValBool(FlagOptions, FLAG_ALLOWMOUSEOPENFAIL, &value))
 	xf86Info.allowMouseOpenFail = value;
 
@@ -2616,13 +2609,6 @@ xf86HandleConfigFile(Bool autoconfig)
 	xf86Info.vidModeAllowNonLocal = TRUE;
 #endif
 
-#ifdef XF86MISC
-    if (xf86MiscModInDevDisabled)
-	xf86Info.miscModInDevEnabled = FALSE;
-    if (xf86MiscModInDevAllowNonLocal)
-	xf86Info.miscModInDevAllowNonLocal = TRUE;
-#endif
-
     if (xf86AllowMouseOpenFail)
 	xf86Info.allowMouseOpenFail = TRUE;
 
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index f5babbc..cf5f904 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -196,10 +196,6 @@ Bool xf86AllowMouseOpenFail = FALSE;
 Bool xf86VidModeDisabled = FALSE;
 Bool xf86VidModeAllowNonLocal = FALSE;
 #endif
-#ifdef XF86MISC
-Bool xf86MiscModInDevDisabled = FALSE;
-Bool xf86MiscModInDevAllowNonLocal = FALSE;
-#endif
 RootWinPropPtr *xf86RegisteredPropertiesTable = NULL;
 _X_EXPORT Bool xf86inSuspend = FALSE;
 Bool xorgHWAccess = FALSE;
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index fc50caf..28188be 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1649,18 +1649,6 @@ ddxProcessArgument(int argc, char **argv, int i)
     return 1;
   }
 #endif
-#ifdef XF86MISC
-  if (!strcmp(argv[i],"-disableModInDev"))
-  {
-    xf86MiscModInDevDisabled = TRUE;
-    return 1;
-  }
-  if (!strcmp(argv[i],"-allowNonLocalModInDev"))
-  {
-    xf86MiscModInDevAllowNonLocal = TRUE;
-    return 1;
-  }
-#endif
   if (!strcmp(argv[i],"-allowMouseOpenFail"))
   {
     xf86AllowMouseOpenFail = TRUE;
@@ -1961,12 +1949,6 @@ ddxUseMsg()
   ErrorF("-disableVidMode        disable mode adjustments with xvidtune\n");
   ErrorF("-allowNonLocalXvidtune allow xvidtune to be run as a non-local client\n");
 #endif
-#ifdef XF86MISC
-  ErrorF("-disableModInDev       disable dynamic modification of input device settings\n");
-  ErrorF("-allowNonLocalModInDev allow changes to keyboard and mouse settings\n");
-  ErrorF("                       from non-local clients\n");
-  ErrorF("-allowMouseOpenFail    start server even if the mouse can't be initialized\n");
-#endif
   ErrorF("-bestRefresh           choose modes with the best refresh rate\n");
   ErrorF("-ignoreABI             make module ABI mismatches non-fatal\n");
   ErrorF("-isolateDevice bus_id  restrict device resets to bus_id (PCI only)\n");
diff --git a/hw/xfree86/common/xf86MiscExt.c b/hw/xfree86/common/xf86MiscExt.c
deleted file mode 100644
index 40c196a..0000000
--- a/hw/xfree86/common/xf86MiscExt.c
+++ /dev/null
@@ -1,561 +0,0 @@
-/*
- * Copyright (c) 1999-2003 by The XFree86 Project, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name of the copyright holder(s)
- * and author(s) shall not be used in advertising or otherwise to promote
- * the sale, use or other dealings in this Software without prior written
- * authorization from the copyright holder(s) and author(s).
- */
-
-/*
- * This file contains the Pointer/Keyboard functions needed by the 
- * XFree86-Misc extension.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "os.h"
-#include "xf86.h"
-#include "xf86Priv.h"
-
-#ifdef XF86MISC
-#define _XF86MISC_SERVER_
-#include <X11/extensions/xf86misc.h>
-#include "xf86miscproc.h"
-#endif
-
-#define XF86_OS_PRIVS
-#include "xf86_OSlib.h"
-
-#ifdef XINPUT
-#include <X11/extensions/XI.h>
-#include <X11/extensions/XIproto.h>
-#include "xf86Xinput.h"
-#else
-#include "inputstr.h"
-#endif
-
-#include "xf86OSmouse.h"
-
-#ifdef DEBUG
-# define DEBUG_P(x) ErrorF(x"\n");
-#else
-# define DEBUG_P(x) /**/
-#endif
-
-#ifdef XF86MISC
-
-typedef struct {
-	int	type;
-	int	baudrate;
-	int	samplerate;
-	int	resolution;
-	int	buttons;
-	Bool	em3buttons;
-	int	em3timeout;
-	Bool	chordmiddle;
-	int	flags;
-        char*   device;
-        pointer	private;
-} mseParamsRec, *mseParamsPtr;
-
-typedef struct {
-	int	type;
-	int	rate;
-	int	delay;
-	int	serverNumLock;	/* obsolete */
-        pointer private;
-} kbdParamsRec, *kbdParamsPtr;
-
-/*
-    Sigh...
-
-    The extension should probably be changed to use protocol
-    names instead of ID numbers
-*/
-static struct mouse_map {
-    int mtype;
-    MouseProtocolID proto;
-} m_map[] =
-{
-	{ MTYPE_MICROSOFT, PROT_MS },
-	{ MTYPE_MOUSESYS, PROT_MSC },
-	{ MTYPE_MMSERIES, PROT_MM },
-	{ MTYPE_LOGITECH, PROT_LOGI },
-	{ MTYPE_LOGIMAN, PROT_LOGIMAN },
-	{ MTYPE_MMHIT, PROT_MMHIT },
-	{ MTYPE_GLIDEPOINT, PROT_GLIDE },
-	{ MTYPE_IMSERIAL, PROT_IMSERIAL },
-	{ MTYPE_THINKING, PROT_THINKING },
-	{ MTYPE_ACECAD, PROT_ACECAD },
-	{ MTYPE_PS_2, PROT_PS2 },
-	{ MTYPE_IMPS2, PROT_IMPS2 },
-	{ MTYPE_EXPPS2, PROT_EXPPS2 },
-	{ MTYPE_THINKINGPS2, PROT_THINKPS2 },
-	{ MTYPE_MMANPLUSPS2, PROT_MMPS2 },
-	{ MTYPE_GLIDEPOINTPS2, PROT_GLIDEPS2 },
-	{ MTYPE_NETPS2, PROT_NETPS2 },
-	{ MTYPE_NETSCROLLPS2, PROT_NETSCPS2 },
-	{ MTYPE_BUSMOUSE, PROT_BM },
-	{ MTYPE_AUTOMOUSE, PROT_AUTO },
-	{ MTYPE_SYSMOUSE, PROT_SYSMOUSE },
-	{ MTYPE_UNKNOWN, PROT_UNKNOWN }
-};
-
-static int
-MapMseProtoToMisc(MouseProtocolID proto)
-{
-    int i;
-    
-	for (i = 0; m_map[i].proto != PROT_UNKNOWN; i++)
-	if (proto == m_map[i].proto)
-	    return m_map[i].mtype;
-
-	return MTYPE_UNKNOWN;
-}
-
-static MouseProtocolID
-MapMseMiscToProto(int proto)
-{
-    int i;
-
-	for (i = 0; m_map[i].mtype != MTYPE_UNKNOWN; i++)
-	if (proto == m_map[i].mtype)
-	    return m_map[i].proto;
-
-	return PROT_UNKNOWN;
-}
-
-_X_EXPORT Bool
-MiscExtGetMouseSettings(pointer *mouse, char **devname)
-{
-    mseParamsPtr mseptr;
-
-    mseptr = MiscExtCreateStruct(MISC_POINTER);
-    if (!mseptr)
-	return FALSE;
-
-    {
-	InputInfoPtr pInfo = mseptr->private;
-	MouseDevPtr pMse;
-
-	*devname = xf86FindOptionValue(pInfo->options, "Device");
-	pMse = pInfo->private;
-
-	mseptr->type =		MapMseProtoToMisc(pMse->protocolID);
-	mseptr->baudrate =	pMse->baudRate;
-	mseptr->samplerate =	pMse->sampleRate;
-	mseptr->resolution =	pMse->resolution;
-	mseptr->buttons =	pMse->buttons;
-	mseptr->em3buttons =	pMse->emulate3Buttons;
-	mseptr->em3timeout =	pMse->emulate3Timeout;
-	mseptr->chordmiddle =	pMse->chordMiddle;
-	mseptr->flags =		pMse->mouseFlags;
-    }
-    *mouse = mseptr;
-    return TRUE;
-}
-
-_X_EXPORT int
-MiscExtGetMouseValue(pointer mouse, MiscExtMseValType valtype)
-{
-    mseParamsPtr mse = mouse;
-
-    switch (valtype) {
-	case MISC_MSE_PROTO:		return mse->type;
-	case MISC_MSE_BAUDRATE:		return mse->baudrate;
-	case MISC_MSE_SAMPLERATE:	return mse->samplerate;
-	case MISC_MSE_RESOLUTION:	return mse->resolution;
-	case MISC_MSE_BUTTONS:		return mse->buttons;
-	case MISC_MSE_EM3BUTTONS:	return mse->em3buttons;
-	case MISC_MSE_EM3TIMEOUT:	return mse->em3timeout;
-	case MISC_MSE_CHORDMIDDLE:	return mse->chordmiddle;
-	case MISC_MSE_FLAGS:		return mse->flags;
-    }
-    return 0;
-}
-
-_X_EXPORT Bool
-MiscExtSetMouseValue(pointer mouse, MiscExtMseValType valtype, int value)
-{
-    mseParamsPtr mse = mouse;
-
-    switch (valtype) {
-	case MISC_MSE_PROTO:
-	    mse->type = value;
-		return TRUE;
-	case MISC_MSE_BAUDRATE:
-		mse->baudrate = value;
-		return TRUE;
-	case MISC_MSE_SAMPLERATE:
-		mse->samplerate = value;
-		return TRUE;
-	case MISC_MSE_RESOLUTION:
-		mse->resolution = value;
-		return TRUE;
-	case MISC_MSE_BUTTONS:
-		mse->buttons = value;
-		return TRUE;
-	case MISC_MSE_EM3BUTTONS:
-		mse->em3buttons = value;
-		return TRUE;
-	case MISC_MSE_EM3TIMEOUT:
-		mse->em3timeout = value;
-		return TRUE;
-	case MISC_MSE_CHORDMIDDLE:
-		mse->chordmiddle = value;
-		return TRUE;
-	case MISC_MSE_FLAGS:
-		mse->flags = value;
-		return TRUE;
-    }
-    return FALSE;
-}
-
-_X_EXPORT Bool
-MiscExtSetMouseDevice(pointer mouse, char* device)
-{
-    mseParamsPtr mse = mouse;
-    mse->device = device;
-    
-    return TRUE;
-}
-
-_X_EXPORT Bool
-MiscExtGetKbdSettings(pointer *kbd)
-{
-    return FALSE;
-}
-
-_X_EXPORT int
-MiscExtGetKbdValue(pointer keyboard, MiscExtKbdValType valtype)
-{
-    return 0;
-}
-
-_X_EXPORT Bool
-MiscExtSetKbdValue(pointer keyboard, MiscExtKbdValType valtype, int value)
-{
-    return FALSE;
-}
-
-static void
-MiscExtClientStateCallback(CallbackListPtr *callbacks,
-			   pointer data, pointer args)
-{
-    NewClientInfoRec *clientinfo = (NewClientInfoRec*)args;
-
-    if (clientinfo->client == xf86Info.grabInfo.override &&
-	clientinfo->client->clientState == ClientStateGone) {
-	xf86Info.grabInfo.override = NULL;
-	xf86Info.grabInfo.disabled = 0;
-	DeleteCallback(&ClientStateCallback, MiscExtClientStateCallback, NULL);
-    }
-}
-
-#define MiscExtGrabStateSuccess	0	/* No errors */
-#define MiscExtGrabStateLocked	1	/* A client already requested that
-					 * grabs cannot be removed/killed */
-#define MiscExtGrabStateAlready	2	/* Request for enabling/disabling
-					 * grab removeal/kill already done */
-_X_EXPORT int
-MiscExtSetGrabKeysState(ClientPtr client, int state)
-{
-    if (xf86Info.grabInfo.override == NULL ||
-	xf86Info.grabInfo.override == client) {
-	if (state == 0 && xf86Info.grabInfo.disabled == 0) {
-	    xf86Info.grabInfo.disabled = 1;
-	    AddCallback(&ClientStateCallback,
-			MiscExtClientStateCallback, NULL);
-	    xf86Info.grabInfo.override = client;
-	}
-	else if (state == 1 && xf86Info.grabInfo.disabled == 1) {
-	    xf86Info.grabInfo.disabled = 0;
-	    DeleteCallback(&ClientStateCallback,
-			   MiscExtClientStateCallback, NULL);
-	    xf86Info.grabInfo.override = NULL;
-	}
-	else
-	    return MiscExtGrabStateAlready;
-
-	return MiscExtGrabStateSuccess;
-    }
-
-    return MiscExtGrabStateLocked;
-}
-
-_X_EXPORT pointer
-MiscExtCreateStruct(MiscExtStructType mse_or_kbd)
-{
-    switch (mse_or_kbd) {
-    case MISC_POINTER:
-    {
-	mseParamsPtr mseptr;
-	InputInfoPtr pInfo = xf86InputDevs;
-	
-	while (pInfo) {
-	    if (pInfo->dev == inputInfo.pointer)
-		break;
-	    pInfo = pInfo->next;
-	}
-	if (!pInfo)
-	    return NULL;
-	
-	mseptr = xcalloc(sizeof(mseParamsRec),1);
-	if (mseptr)
-	    mseptr->private = pInfo;
-	return mseptr;
-    }
-    case MISC_KEYBOARD:
-	return xcalloc(sizeof(kbdParamsRec),1);
-    }
-    return 0;
-}
-
-_X_EXPORT void
-MiscExtDestroyStruct(pointer structure, MiscExtStructType mse_or_kbd)
-{
-    switch (mse_or_kbd) {
-	case MISC_POINTER:
-	case MISC_KEYBOARD:
-		xfree(structure);
-    }
-}
-
-static Bool
-MiscExtAuthorizeDevice(InputInfoPtr pInfo, char *device)
-{
-    Bool authorized = FALSE;
-    char *elem;
-    struct stat dev, dev_list;
-    const char *olddev = xf86FindOptionValue(pInfo->options, "Device");
-    
-    if (stat(device,&dev))
-	return FALSE;
-
-    if (!S_ISCHR(dev.st_mode))
-	return FALSE;
-
-    if (!stat(olddev,&dev_list)) {
-	if (dev_list.st_dev == dev.st_dev
-	    && dev_list.st_ino == dev.st_ino) {
-	    authorized = TRUE;
-	}
-    }
-
-    if (!authorized) {
-	char *path;
-
-	if (!xf86InputDeviceList
-	    || (path = strdup(xf86InputDeviceList)) == NULL) 
-	    return FALSE;
-	
-	elem = strtok(path,",");
-	
-	while (elem) {
-	    
-	    if (!stat(elem,&dev_list)) {
-		if (dev_list.st_dev == dev.st_dev
-		    && dev_list.st_ino == dev.st_ino) {
-		    authorized = TRUE;
-		    break;
-
-		}
-	    }
-	    elem = strtok(NULL,",");
-	}
-	xfree(path);
-    }
-#if 0
-    ErrorF("AUTHORIZED: %s\n",authorized?"Yes":"No");
-#endif
-    return (authorized);
-}
-
-_X_EXPORT MiscExtReturn
-MiscExtApply(pointer structure, MiscExtStructType mse_or_kbd)
-{
-    if (mse_or_kbd == MISC_POINTER) {
-	Bool protoChanged = FALSE;
-	int oldflags;
-	Bool reopen = FALSE;
-	MouseProtocolID newProtocol;
-	mseParamsPtr mse = structure;
-	InputInfoPtr pInfo;
-	MouseDevPtr pMse;
-	pointer xf86MouseProtocolIDToName
-	    = LoaderSymbol("xf86MouseProtocolIDToName");
-	if (!xf86MouseProtocolIDToName)
-	    return MISC_RET_NOMODULE;
-	if (mse->type < MTYPE_MICROSOFT
-		|| (mse->type > MTYPE_EXPPS2
-		    && (mse->type != MTYPE_OSMOUSE)))
-	    return MISC_RET_BADMSEPROTO;
-#ifdef OSMOUSE_ONLY
-	if (mse->type != MTYPE_OSMOUSE)
-	    return MISC_RET_BADMSEPROTO;
-#else
-	if (mse->type == MTYPE_OSMOUSE)
-	    return MISC_RET_BADMSEPROTO;
-#endif /* OSMOUSE_ONLY */
-
-	if (mse->em3timeout < 0)
-	    return MISC_RET_BADVAL;
-
-	if (mse->type == MTYPE_LOGIMAN
-	    && !(mse->baudrate == 0
-		 || mse->baudrate == 1200
-		 || mse->baudrate == 9600))
-	    return MISC_RET_BADBAUDRATE;
-	if (mse->type == MTYPE_LOGIMAN && mse->samplerate)
-	    return MISC_RET_BADCOMBO;
-
-	if (mse->flags & MF_REOPEN) {
-	    reopen = TRUE;
-	    mse->flags &= ~MF_REOPEN;
-	}
-	if (mse->type != MTYPE_OSMOUSE
-		&& mse->type != MTYPE_PS_2
-		&& mse->type != MTYPE_BUSMOUSE
-		&& mse->type != MTYPE_IMPS2
-		&& mse->type != MTYPE_THINKINGPS2
-		&& mse->type != MTYPE_MMANPLUSPS2
-		&& mse->type != MTYPE_GLIDEPOINTPS2
-		&& mse->type != MTYPE_NETPS2
-		&& mse->type != MTYPE_NETSCROLLPS2
-		&& mse->type != MTYPE_SYSMOUSE)
-	{
-	    if (mse->baudrate % 1200 != 0
-		|| (mse->baudrate != 0 && mse->baudrate < 1200)
-		|| mse->baudrate > 9600)
-		return MISC_RET_BADBAUDRATE;
-	}
-	if ((mse->flags & (MF_CLEAR_DTR|MF_CLEAR_RTS))
-		&& (mse->type != MTYPE_MOUSESYS))
-	    return MISC_RET_BADFLAGS;
-
-	if (mse->type != MTYPE_OSMOUSE
-		&& mse->type != MTYPE_BUSMOUSE)
-	{
-	    if (mse->samplerate < 0)
-		return MISC_RET_BADVAL;
-	}
-
-	if (mse->resolution < 0)
-	    return MISC_RET_BADVAL;
-	if (mse->chordmiddle)
-	{
-	    if (mse->em3buttons || !(mse->type == MTYPE_MICROSOFT
-				    || mse->type == MTYPE_LOGIMAN) )
-		return MISC_RET_BADCOMBO;
-	}
-
-	/* XXX - This still needs work */
-
-	pInfo = mse->private;
-	pMse = pInfo->private;
-	oldflags = pMse->mouseFlags;
-	
-	newProtocol = MapMseMiscToProto(mse->type);
-	protoChanged = pMse->protocolID != newProtocol;
-	if (protoChanged
-		|| pMse->baudRate != mse->baudrate
-		|| pMse->sampleRate != mse->samplerate
-		|| pMse->resolution != mse->resolution
-		|| pMse->mouseFlags != mse->flags)
-	    reopen = TRUE;
-
-	if (mse->device)
-	    reopen = TRUE;
-
-	if (reopen)
-	    (pMse->device->deviceProc)(pMse->device, DEVICE_CLOSE);
-	
-	pMse->protocolID      = newProtocol;
-	pMse->baudRate        = mse->baudrate;
-	pMse->sampleRate      = mse->samplerate;
-	pMse->resolution      = mse->resolution;
-	pMse->buttons         = mse->buttons;
-	pMse->emulate3Buttons = mse->em3buttons;
-	pMse->emulate3Timeout = mse->em3timeout;
-	pMse->chordMiddle     = mse->chordmiddle;
-	pMse->mouseFlags      = mse->flags;
-
-	pMse->protocol = ((const char *(*)(MouseProtocolID))
-			  xf86MouseProtocolIDToName)(pMse->protocolID);
-	
-	if (mse->device) {
-	    if (MiscExtAuthorizeDevice(pInfo, mse->device)) {
-		xf86ReplaceStrOption(pInfo->options, "Device", mse->device);
-	    } else {
-		return MISC_RET_BADVAL;
-	    }
-	}
-	
-	if (reopen) {
-	    /* Only if protocol is changed explicitely disable auto detect */
-	    if (protoChanged)
-		pMse->autoProbe = FALSE;
-	    (pMse->device->deviceProc)(pMse->device, DEVICE_ON);
-	}
-	/* Set pInfo->options too */
-	
-       if ((oldflags & MF_CLEAR_DTR) != (pMse->mouseFlags & MF_CLEAR_DTR))
-	   xf86ReplaceBoolOption(pInfo->options, "ClearDTR",
-				 pMse->mouseFlags | MF_CLEAR_DTR);
-       if ((oldflags & MF_CLEAR_RTS) != (pMse->mouseFlags & MF_CLEAR_RTS))
-	   xf86ReplaceBoolOption(pInfo->options, "ClearRTS",
-				 pMse->mouseFlags | MF_CLEAR_RTS);
-    }
-    return MISC_RET_BADVAL;
-}
-
-_X_EXPORT Bool
-MiscExtGetFilePaths(const char **configfile, const char **modulepath,
-		    const char **logfile)
-{
-    *configfile = xf86ConfigFile;
-    *modulepath = xf86ModulePath;
-    *logfile    = xf86LogFile;
-
-    return TRUE;
-}
-
-_X_EXPORT int
-MiscExtPassMessage(int scrnIndex, const char *msgtype, const char *msgval,
-		   char **retstr)
-{
-    ScrnInfoPtr pScr = xf86Screens[scrnIndex];
-
-    /* should check this in the protocol, but xf86NumScreens isn't exported */
-    if (scrnIndex >= xf86NumScreens)
-	return BadValue;
-
-    if (*pScr->HandleMessage == NULL)
-	    return BadImplementation;
-    return (*pScr->HandleMessage)(scrnIndex, msgtype, msgval, retstr);
-}
-
-#endif /* XF86MISC */
-
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index c0d240d..a4a7b30 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -50,10 +50,6 @@ extern Bool xf86AllowMouseOpenFail;
 extern Bool xf86VidModeDisabled;
 extern Bool xf86VidModeAllowNonLocal; 
 #endif 
-#ifdef XF86MISC
-extern Bool xf86MiscModInDevDisabled;
-extern Bool xf86MiscModInDevAllowNonLocal;
-#endif 
 extern Bool xf86fpFlag;
 extern Bool xf86coFlag;
 extern Bool xf86sFlag;
diff --git a/hw/xfree86/dixmods/extmod/Makefile.am b/hw/xfree86/dixmods/extmod/Makefile.am
index f90e144..894f3fa 100644
--- a/hw/xfree86/dixmods/extmod/Makefile.am
+++ b/hw/xfree86/dixmods/extmod/Makefile.am
@@ -11,10 +11,6 @@ if XV
 XV_SRCS = xvmod.c xvmodproc.h
 endif
 
-if XF86MISC
-XF86MISC_SRCS = xf86misc.c xf86miscproc.h
-endif
-
 if XF86VIDMODE
 XF86VMODE_SRCS = xf86vmode.c vidmodeproc.h
 endif
@@ -32,7 +28,6 @@ libextmod_la_LDFLAGS = -avoid-version
 libextmod_la_SOURCES = modinit.c \
                        modinit.h \
                        $(DGA_SRCS) \
-                       $(XF86MISC_SRCS) \
                        $(XF86VMODE_SRCS) \
                        $(XV_SRCS)
 libextmod_la_LIBADD = $(top_builddir)/Xext/libXextmodule.la
diff --git a/hw/xfree86/dixmods/extmod/modinit.c b/hw/xfree86/dixmods/extmod/modinit.c
index f8440f1..2f81319 100644
--- a/hw/xfree86/dixmods/extmod/modinit.c
+++ b/hw/xfree86/dixmods/extmod/modinit.c
@@ -119,15 +119,6 @@ static ExtensionModule extensionModules[] = {
 	NULL
     },
 #endif
-#ifdef XF86MISC
-    {
-	XFree86MiscExtensionInit,
-	XF86MISCNAME,
-	&noXFree86MiscExtension,
-	NULL,
-	NULL
-    },
-#endif
 #ifdef XFreeXDGA
     {
 	XFree86DGAExtensionInit,
diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h
index 32f7ed4..463a400 100644
--- a/hw/xfree86/dixmods/extmod/modinit.h
+++ b/hw/xfree86/dixmods/extmod/modinit.h
@@ -57,13 +57,6 @@ extern void	XFree86VidModeExtensionInit(INITARGS);
 #include <X11/extensions/xf86vmstr.h>
 #endif
 
-#ifdef XF86MISC
-extern void XFree86MiscExtensionInit(INITARGS);
-#define _XF86MISC_SERVER_
-#define _XF86MISC_SAVER_COMPAT_
-#include <X11/extensions/xf86mscstr.h>
-#endif
-
 #ifdef XFreeXDGA
 extern void XFree86DGAExtensionInit(INITARGS);
 extern void XFree86DGARegister(INITARGS);
diff --git a/hw/xfree86/dixmods/extmod/xf86misc.c b/hw/xfree86/dixmods/extmod/xf86misc.c
deleted file mode 100644
index 8127afd..0000000
--- a/hw/xfree86/dixmods/extmod/xf86misc.c
+++ /dev/null
@@ -1,821 +0,0 @@
-
-/*
- * Copyright (c) 1995, 1996  The XFree86 Project, Inc
- */
-
-/* THIS IS NOT AN X CONSORTIUM STANDARD */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#define NEED_REPLIES
-#define NEED_EVENTS
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include "misc.h"
-#include "dixstruct.h"
-#include "extnsionst.h"
-#include "scrnintstr.h"
-#include "inputstr.h"
-#include "servermd.h"
-#define _XF86MISC_SERVER_
-#undef _XF86MISC_SAVER_COMPAT_
-#include <X11/extensions/xf86mscstr.h>
-#include "swaprep.h"
-#include "xf86.h"
-#include <X11/Xfuncproto.h>
-#include "xf86miscproc.h"
-
-#if 0
-#include <X11/Xtrans/Xtrans.h>
-#include "../os/osdep.h"
-#include <X11/Xauth.h>
-#ifndef USL
-#ifndef Lynx
-#include <sys/socket.h>
-#else
-#include <socket.h>
-#endif
-#endif /* USL */
-#endif
-
-static int miscErrorBase;
-static DevPrivateKey MiscClientPrivateKey = &MiscClientPrivateKey;
-
-/* This holds the client's version information */
-typedef struct {
-    int		major;
-    int		minor;
-} MiscPrivRec, *MiscPrivPtr;
-
-#define M_GETPRIV(c) ((MiscPrivPtr) \
-    dixLookupPrivate(&(c)->devPrivates, MiscClientPrivateKey))
-#define M_SETPRIV(c,p) \
-    dixSetPrivate(&(c)->devPrivates, MiscClientPrivateKey, p)
-
-static void XF86MiscResetProc(
-    ExtensionEntry* /* extEntry */
-);
-
-static void
-ClientVersion(ClientPtr client, int *major, int *minor)
-{
-    MiscPrivPtr pPriv;
-
-    pPriv = M_GETPRIV(client);
-    if (!pPriv) {
-	if (major) *major = 0;
-	if (minor) *minor = 0;
-	return;
-    }
-    
-    if (major) *major = pPriv->major;
-    if (minor) *minor = pPriv->minor;
-}
-
-static DISPATCH_PROC(ProcXF86MiscDispatch);
-static DISPATCH_PROC(ProcXF86MiscQueryVersion);
-static DISPATCH_PROC(ProcXF86MiscGetKbdSettings);
-static DISPATCH_PROC(ProcXF86MiscGetMouseSettings);
-static DISPATCH_PROC(ProcXF86MiscSetKbdSettings);
-static DISPATCH_PROC(ProcXF86MiscSetMouseSettings);
-static DISPATCH_PROC(ProcXF86MiscSetGrabKeysState);
-static DISPATCH_PROC(ProcXF86MiscSetClientVersion);
-static DISPATCH_PROC(ProcXF86MiscGetFilePaths);
-static DISPATCH_PROC(ProcXF86MiscPassMessage);
-#ifdef _XF86MISC_SAVER_COMPAT_
-static DISPATCH_PROC(ProcXF86MiscGetSaver);
-static DISPATCH_PROC(ProcXF86MiscSetSaver);
-#endif
-static DISPATCH_PROC(SProcXF86MiscDispatch);
-static DISPATCH_PROC(SProcXF86MiscQueryVersion);
-static DISPATCH_PROC(SProcXF86MiscGetKbdSettings);
-static DISPATCH_PROC(SProcXF86MiscGetMouseSettings);
-static DISPATCH_PROC(SProcXF86MiscSetKbdSettings);
-static DISPATCH_PROC(SProcXF86MiscSetMouseSettings);
-static DISPATCH_PROC(SProcXF86MiscSetGrabKeysState);
-static DISPATCH_PROC(SProcXF86MiscSetClientVersion);
-static DISPATCH_PROC(SProcXF86MiscGetFilePaths);
-static DISPATCH_PROC(SProcXF86MiscPassMessage);
-#ifdef _XF86MISC_SAVER_COMPAT_
-static DISPATCH_PROC(SProcXF86MiscGetSaver);
-static DISPATCH_PROC(SProcXF86MiscSetSaver);
-#endif
-
-#if 0
-static unsigned char XF86MiscReqCode = 0;
-#endif
-
-#ifdef DEBUG
-# define DEBUG_P(x) ErrorF x;
-#else
-# define DEBUG_P(x) do {} while (0)
-#endif
-
-#define MISCERR(x)	(miscErrorBase + x)
-
-void
-XFree86MiscExtensionInit(void)
-{
-    ExtensionEntry* extEntry;
-
-    if (!xf86GetModInDevEnabled())
-	return;
-
-    if (
-	(extEntry = AddExtension(XF86MISCNAME,
-				XF86MiscNumberEvents,
-				XF86MiscNumberErrors,
-				ProcXF86MiscDispatch,
-				SProcXF86MiscDispatch,
-				XF86MiscResetProc,
-				StandardMinorOpcode))) {
-#if 0
-	XF86MiscReqCode = (unsigned char)extEntry->base;
-#endif
-	miscErrorBase = extEntry->errorBase;
-    }
-}
-
-/*ARGSUSED*/
-static void
-XF86MiscResetProc (extEntry)
-    ExtensionEntry* extEntry;
-{
-}
-
-static int
-ProcXF86MiscQueryVersion(client)
-    register ClientPtr client;
-{
-    xXF86MiscQueryVersionReply rep;
-    register int n;
-
-    REQUEST_SIZE_MATCH(xXF86MiscQueryVersionReq);
-    rep.type = X_Reply;
-    rep.length = 0;
-    rep.sequenceNumber = client->sequence;
-    rep.majorVersion = XF86MISC_MAJOR_VERSION;
-    rep.minorVersion = XF86MISC_MINOR_VERSION;
-    if (client->swapped) {
-    	swaps(&rep.sequenceNumber, n);
-    	swapl(&rep.length, n);
-    	swaps(&rep.majorVersion, n);
-    	swaps(&rep.minorVersion, n);
-    }
-    WriteToClient(client, sizeof(xXF86MiscQueryVersionReply), (char *)&rep);
-    return (client->noClientException);
-}
-
-#ifdef _XF86MISC_SAVER_COMPAT_
-/* THESE HAVE NOT BEEN CONVERTED TO THE NEW DESIGN */
-
-/*
- * This will go away, but remains for now for compatibility with older
- * clients.
- */
-static int
-ProcXF86MiscSetSaver(client)
-    register ClientPtr client;
-{
-    REQUEST(xXF86MiscSetSaverReq);
-    ScrnInfoPtr vptr;
-
-    if (stuff->screen > screenInfo.numScreens)
-	return BadValue;
-
-    vptr = (ScrnInfoPtr)
-	dixLookupPrivate(&screenInfo.screens[stuff->screen]->devPrivates,
-			 xf86ScreenKey);
-
-    REQUEST_SIZE_MATCH(xXF86MiscSetSaverReq);
-
-    if (stuff->suspendTime < 0)
-	return BadValue;
-    if (stuff->offTime < 0)
-	return BadValue;
-
-    return (client->noClientException);
-}
-
-/*
- * This will go away, but remains for now for compatibility with older
- * clients.
- */
-static int
-ProcXF86MiscGetSaver(client)
-    register ClientPtr client;
-{
-    REQUEST(xXF86MiscGetSaverReq);
-    xXF86MiscGetSaverReply rep;
-    register int n;
-    ScrnInfoPtr vptr;
-
-    if (stuff->screen > screenInfo.numScreens)
-	return BadValue;
-
-    vptr = (ScrnInfoPtr)
-	dixLookupPrivate(&screenInfo.screens[stuff->screen]->devPrivates,
-			 xf86ScreenKey);
-
-    REQUEST_SIZE_MATCH(xXF86MiscGetSaverReq);
-    rep.type = X_Reply;
-    rep.length = 0;
-    rep.sequenceNumber = client->sequence;
-    rep.suspendTime = 0;
-    rep.offTime = 0;
-    
-    if (client->swapped) {
-    	swaps(&rep.sequenceNumber, n);
-    	swapl(&rep.length, n);
-    	swapl(&rep.suspendTime, n);
-    	swapl(&rep.offTime, n);
-    }
-    WriteToClient(client, SIZEOF(xXF86MiscGetSaverReply), (char *)&rep);
-    return (client->noClientException);
-}
-
-#endif /* _XF86MISC_SAVER_COMPAT_ */
-
-static int
-ProcXF86MiscGetMouseSettings(client)
-    register ClientPtr client;
-{
-    xXF86MiscGetMouseSettingsReply rep;
-    char *devname;
-    pointer mouse;
-    register int n;
-    int devnamelen;
-
-    REQUEST_SIZE_MATCH(xXF86MiscGetMouseSettingsReq);
-    rep.type = X_Reply;
-    rep.sequenceNumber = client->sequence;
-
-    if (!MiscExtGetMouseSettings(&mouse, &devname))
-	return BadValue;
-
-    rep.mousetype =	  MiscExtGetMouseValue(mouse, MISC_MSE_PROTO);
-    rep.baudrate =	  MiscExtGetMouseValue(mouse, MISC_MSE_BAUDRATE);
-    rep.samplerate =	  MiscExtGetMouseValue(mouse, MISC_MSE_SAMPLERATE);
-    rep.resolution =	  MiscExtGetMouseValue(mouse, MISC_MSE_RESOLUTION);
-    rep.buttons =	  MiscExtGetMouseValue(mouse, MISC_MSE_BUTTONS);
-    rep.emulate3buttons = MiscExtGetMouseValue(mouse, MISC_MSE_EM3BUTTONS);
-    rep.emulate3timeout = MiscExtGetMouseValue(mouse, MISC_MSE_EM3TIMEOUT);
-    rep.chordmiddle =	  MiscExtGetMouseValue(mouse, MISC_MSE_CHORDMIDDLE);
-    rep.flags =		  MiscExtGetMouseValue(mouse, MISC_MSE_FLAGS);
-    devnamelen = rep.devnamelen = (devname? strlen(devname): 0);
-    rep.length = (sizeof(xXF86MiscGetMouseSettingsReply) -
-		  sizeof(xGenericReply) + ((rep.devnamelen+3) & ~3)) >> 2;
-    
-    if (client->swapped) {
-    	swaps(&rep.sequenceNumber, n);
-    	swapl(&rep.length, n);
-    	swapl(&rep.mousetype, n);
-    	swapl(&rep.baudrate, n);
-    	swapl(&rep.samplerate, n);
-    	swapl(&rep.resolution, n);
-    	swapl(&rep.buttons, n);
-    	swapl(&rep.emulate3buttons, n);
-    	swapl(&rep.emulate3timeout, n);
-    	swapl(&rep.chordmiddle, n);
-    	swapl(&rep.flags, n);
-    }
-    WriteToClient(client, SIZEOF(xXF86MiscGetMouseSettingsReply), (char *)&rep);
-    MiscExtDestroyStruct(mouse, MISC_POINTER);
-    
-    if (devnamelen)
-        WriteToClient(client, devnamelen, devname);
-    return (client->noClientException);
-}
-
-static int
-ProcXF86MiscGetKbdSettings(client)
-    register ClientPtr client;
-{
-    xXF86MiscGetKbdSettingsReply rep;
-    pointer kbd;
-    register int n;
-
-    REQUEST_SIZE_MATCH(xXF86MiscGetKbdSettingsReq);
-    rep.type = X_Reply;
-    rep.length = 0;
-    rep.sequenceNumber = client->sequence;
-    if (!MiscExtGetKbdSettings(&kbd))
-	return BadValue;
-
-    rep.kbdtype =	MiscExtGetKbdValue(kbd, MISC_KBD_TYPE);
-    rep.rate =		MiscExtGetKbdValue(kbd, MISC_KBD_RATE);
-    rep.delay =		MiscExtGetKbdValue(kbd, MISC_KBD_DELAY);
-    rep.servnumlock =	MiscExtGetKbdValue(kbd, MISC_KBD_SERVNUMLOCK);
-    if (client->swapped) {
-    	swaps(&rep.sequenceNumber, n);
-    	swapl(&rep.length, n);
-    	swapl(&rep.kbdtype, n);
-    	swapl(&rep.rate, n);
-    	swapl(&rep.delay, n);
-    }
-    WriteToClient(client, SIZEOF(xXF86MiscGetKbdSettingsReply), (char *)&rep);
-    return (client->noClientException);
-}
-
-static int
-ProcXF86MiscSetMouseSettings(client)
-    register ClientPtr client;
-{
-    MiscExtReturn ret;
-    pointer mouse;
-    char *devname = NULL;
-    int major, minor;
-    
-    REQUEST(xXF86MiscSetMouseSettingsReq);
-
-    REQUEST_AT_LEAST_SIZE(xXF86MiscSetMouseSettingsReq);
-
-    ClientVersion(client, &major, &minor);
-    
-    if (xf86GetVerbosity() > 1) {
-	DEBUG_P(("SetMouseSettings - type: %d brate: %d srate: %d chdmid: %d\n",
-		(int)stuff->mousetype, (int)stuff->baudrate,
-		(int)stuff->samplerate, stuff->chordmiddle));
-	DEBUG_P(("                   em3but: %d em3tim: %d res: %d flags: %ld\n",
-		stuff->emulate3buttons, (int)stuff->emulate3timeout,
-		(int)stuff->resolution, (unsigned long)stuff->flags));
-    }
-
-    if ((mouse = MiscExtCreateStruct(MISC_POINTER)) == (pointer) 0)
-	return BadAlloc;
-
-    MiscExtSetMouseValue(mouse, MISC_MSE_PROTO,		stuff->mousetype);
-    MiscExtSetMouseValue(mouse, MISC_MSE_BAUDRATE,	stuff->baudrate);
-    MiscExtSetMouseValue(mouse, MISC_MSE_SAMPLERATE,	stuff->samplerate);
-    MiscExtSetMouseValue(mouse, MISC_MSE_RESOLUTION,	stuff->resolution);
-    MiscExtSetMouseValue(mouse, MISC_MSE_BUTTONS,	stuff->buttons);
-    MiscExtSetMouseValue(mouse, MISC_MSE_EM3BUTTONS,	stuff->emulate3buttons);
-    MiscExtSetMouseValue(mouse, MISC_MSE_EM3TIMEOUT,	stuff->emulate3timeout);
-    MiscExtSetMouseValue(mouse, MISC_MSE_CHORDMIDDLE,	stuff->chordmiddle);
-    MiscExtSetMouseValue(mouse, MISC_MSE_FLAGS,		stuff->flags);
-    
-    if ((major > 0 || minor > 5) && stuff->devnamelen) {
-	int size = sizeof(xXF86MiscSetMouseSettingsReq) + stuff->devnamelen;
-	size = (size + 3) >> 2;
-	if (client->req_len < size)
-	    return BadLength;
-	if (stuff->devnamelen) {
-	    if (!(devname = xalloc(stuff->devnamelen)))
-		return BadAlloc;
-	    strncpy(devname,(char*)(&stuff[1]),stuff->devnamelen);
-	    if (xf86GetVerbosity() > 1)
-		DEBUG_P(("SetMouseSettings - device: %s\n",devname));
-	    MiscExtSetMouseDevice(mouse, devname);
-	}
-    }
-
-    ret = MiscExtApply(mouse, MISC_POINTER);
-
-    if (devname)
-	xfree(devname);
-    
-    switch ((ret)) {
-        case MISC_RET_SUCCESS:      break;
-	case MISC_RET_BADVAL:       return BadValue;
-	case MISC_RET_BADMSEPROTO:  return MISCERR(XF86MiscBadMouseProtocol);
-	case MISC_RET_BADBAUDRATE:  return MISCERR(XF86MiscBadMouseBaudRate);
-	case MISC_RET_BADFLAGS:     return MISCERR(XF86MiscBadMouseFlags);
-        case MISC_RET_BADCOMBO:     return MISCERR(XF86MiscBadMouseCombo);
-        case MISC_RET_NOMODULE:     return MISCERR(XF86MiscNoModule);
-        default:
-	    DEBUG_P(("Unexpected return from MiscExtApply(POINTER) = %d\n", ret));
-	    return BadImplementation;
-    }
-
-    if (xf86GetVerbosity() > 1)
-	DEBUG_P(("SetMouseSettings - Succeeded\n"));
-    return (client->noClientException);
-}
-
-static int
-ProcXF86MiscSetKbdSettings(client)
-    register ClientPtr client;
-{
-    MiscExtReturn ret;
-    pointer kbd;
-    REQUEST(xXF86MiscSetKbdSettingsReq);
-
-    REQUEST_SIZE_MATCH(xXF86MiscSetKbdSettingsReq);
-
-    if (xf86GetVerbosity() > 1)
-	DEBUG_P(("SetKbdSettings - type: %d rate: %d delay: %d snumlk: %d\n",
-		(int)stuff->kbdtype, (int)stuff->rate,
-		(int)stuff->delay, stuff->servnumlock));
-
-    if ((kbd = MiscExtCreateStruct(MISC_KEYBOARD)) == (pointer) 0)
-	return BadAlloc;
-
-    MiscExtSetKbdValue(kbd, MISC_KBD_TYPE,		stuff->kbdtype);
-    MiscExtSetKbdValue(kbd, MISC_KBD_RATE,		stuff->rate);
-    MiscExtSetKbdValue(kbd, MISC_KBD_DELAY,		stuff->delay);
-    MiscExtSetKbdValue(kbd, MISC_KBD_SERVNUMLOCK,	stuff->servnumlock);
-
-    switch ((ret = MiscExtApply(kbd, MISC_KEYBOARD))) {
-	case MISC_RET_SUCCESS:      break;
-	case MISC_RET_BADVAL:       return BadValue;
-	case MISC_RET_BADKBDTYPE:   return MISCERR(XF86MiscBadKbdType);
-	default:
-	    DEBUG_P(("Unexpected return from MiscExtApply(KEYBOARD) = %d\n", ret));
-	    return BadImplementation;
-    }
-
-    if (xf86GetVerbosity() > 1)
-	DEBUG_P(("SetKbdSettings - Succeeded\n"));
-    return (client->noClientException);
-}
-
-static int
-ProcXF86MiscSetGrabKeysState(client)
-    register ClientPtr client;
-{
-    int n, status;
-    xXF86MiscSetGrabKeysStateReply rep;
-    REQUEST(xXF86MiscSetGrabKeysStateReq);
-
-    REQUEST_SIZE_MATCH(xXF86MiscSetGrabKeysStateReq);
-
-    if ((status = MiscExtSetGrabKeysState(client, stuff->enable)) == 0) {
-	if (xf86GetVerbosity() > 1)
-	    DEBUG_P(("SetGrabKeysState - %s\n",
-		   stuff->enable ? "enabled" : "disabled"));
-    }
-
-    rep.type = X_Reply;
-    rep.length = 0;
-    rep.sequenceNumber = client->sequence;
-    rep.status = status;
-    if (client->swapped) {
-    	swaps(&rep.sequenceNumber, n);
-    	swapl(&rep.length, n);
-    	swapl(&rep.status, n);
-    }
-    WriteToClient(client, SIZEOF(xXF86MiscSetGrabKeysStateReply), (char *)&rep);
-
-    return (client->noClientException);
-}
-
-static int
-ProcXF86MiscSetClientVersion(ClientPtr client)
-{
-    REQUEST(xXF86MiscSetClientVersionReq);
-
-    MiscPrivPtr pPriv;
-
-    REQUEST_SIZE_MATCH(xXF86MiscSetClientVersionReq);
-
-    if ((pPriv = M_GETPRIV(client)) == NULL) {
-	pPriv = xalloc(sizeof(MiscPrivRec));
-	if (!pPriv)
-	    return BadAlloc;
-	M_SETPRIV(client, pPriv);
-    }
-    if (xf86GetVerbosity() > 1) 
-	    DEBUG_P(("SetClientVersion: %i %i\n",stuff->major,stuff->minor));
-    pPriv->major = stuff->major;
-    pPriv->minor = stuff->minor;
-    
-    return (client->noClientException);
-}
-
-static int
-ProcXF86MiscGetFilePaths(client)
-    register ClientPtr client;
-{
-    xXF86MiscGetFilePathsReply rep;
-    const char *configfile;
-    const char *modulepath;
-    const char *logfile;
-    register int n;
-    int configlen, modulelen, loglen;
-
-    REQUEST_SIZE_MATCH(xXF86MiscGetFilePathsReq);
-    rep.type = X_Reply;
-    rep.sequenceNumber = client->sequence;
-
-    if (!MiscExtGetFilePaths(&configfile, &modulepath, &logfile))
-	return BadValue;
-
-    configlen = rep.configlen = (configfile? strlen(configfile): 0);
-    modulelen = rep.modulelen = (modulepath? strlen(modulepath): 0);
-    loglen = rep.loglen = (logfile? strlen(logfile): 0);
-    rep.length = (SIZEOF(xXF86MiscGetFilePathsReply) - SIZEOF(xGenericReply) +
-		  ((rep.configlen + 3) & ~3) +
-		  ((rep.modulelen + 3) & ~3) +
-		  ((rep.loglen + 3) & ~3) ) >> 2;
-    
-    if (client->swapped) {
-    	swaps(&rep.sequenceNumber, n);
-    	swapl(&rep.length, n);
-    	swaps(&rep.configlen, n);
-    	swaps(&rep.modulelen, n);
-    	swaps(&rep.loglen, n);
-    }
-    WriteToClient(client, SIZEOF(xXF86MiscGetFilePathsReply), (char *)&rep);
-    
-    if (configlen)
-        WriteToClient(client, configlen, (char *)configfile);
-    if (modulelen)
-        WriteToClient(client, modulelen, (char *)modulepath);
-    if (loglen)
-        WriteToClient(client, loglen, (char *)logfile);
-
-    return (client->noClientException);
-}
-
-static int
-ProcXF86MiscPassMessage(client)
-    register ClientPtr client;
-{
-    xXF86MiscPassMessageReply rep;
-    char *msgtype, *msgval, *retstr;
-    int retval, size;
-    register int n;
-    int mesglen;
-
-    REQUEST(xXF86MiscPassMessageReq);
-
-    REQUEST_AT_LEAST_SIZE(xXF86MiscPassMessageReq);
-    size = (sizeof(xXF86MiscPassMessageReq) + 3) >> 2;
-    size+= (stuff->typelen + 3) >> 2;
-    size+= (stuff->vallen  + 3) >> 2;
-    if (client->req_len < size)
-	return BadLength;
-    if (stuff->typelen) {
-	if (!(msgtype = xalloc(stuff->typelen)))
-	    return BadAlloc;
-	strncpy(msgtype,(char*)(&stuff[1]),stuff->typelen);
-    } else return BadValue;
-    if (stuff->vallen) {
-	if (!(msgval = xalloc(stuff->vallen))) {
-	    xfree(msgtype);
-	    return BadAlloc;
-	}
-	strncpy(msgval,(char*)((char*)&stuff[1] + ((stuff->typelen + 3) & ~3)),
-			stuff->vallen);
-    } else {
-	xfree(msgtype);
-	return BadValue;
-    }
-
-    if ((retval = MiscExtPassMessage(stuff->screen,msgtype,msgval,&retstr)) != 0) {
-	xfree(msgtype);
-	xfree(msgval);
-	return retval;
-    }
-
-    rep.type = X_Reply;
-    rep.sequenceNumber = client->sequence;
-    mesglen = rep.mesglen = (retstr? strlen(retstr): 0);
-    rep.length = (SIZEOF(xXF86MiscPassMessageReply) - SIZEOF(xGenericReply) +
-		  ((rep.mesglen + 3) & ~3)) >> 2;
-    rep.status = 0;
-    
-    if (client->swapped) {
-    	swaps(&rep.sequenceNumber, n);
-    	swapl(&rep.length, n);
-    	swaps(&rep.mesglen, n);
-    }
-    WriteToClient(client, SIZEOF(xXF86MiscPassMessageReply), (char *)&rep);
-    
-    if (mesglen)
-        WriteToClient(client, mesglen, (char *)retstr);
-
-    xfree(msgtype);
-    xfree(msgval);
-    
-    return (client->noClientException);
-}
-
-static int
-ProcXF86MiscDispatch (client)
-    register ClientPtr	client;
-{
-    REQUEST(xReq);
-    switch (stuff->data)
-    {
-    case X_XF86MiscQueryVersion:
-	return ProcXF86MiscQueryVersion(client);
-#ifdef _XF86MISC_SAVER_COMPAT_
-    case X_XF86MiscGetSaver:
-	return ProcXF86MiscGetSaver(client);
-    case X_XF86MiscSetSaver:
-	return ProcXF86MiscSetSaver(client);
-#endif
-    case X_XF86MiscGetMouseSettings:
-	return ProcXF86MiscGetMouseSettings(client);
-    case X_XF86MiscGetKbdSettings:
-	return ProcXF86MiscGetKbdSettings(client);
-    case X_XF86MiscSetClientVersion:
-		return ProcXF86MiscSetClientVersion(client);
-    case X_XF86MiscGetFilePaths:
-	return ProcXF86MiscGetFilePaths(client);
-    case X_XF86MiscPassMessage:
-	return ProcXF86MiscPassMessage(client);
-    default:
-	if (!xf86GetModInDevEnabled())
-	    return miscErrorBase + XF86MiscModInDevDisabled;
-	if (xf86GetModInDevAllowNonLocal() || LocalClient (client)) {
-	    switch (stuff->data) {
-	        case X_XF86MiscSetMouseSettings:
-		    return ProcXF86MiscSetMouseSettings(client);
-	        case X_XF86MiscSetKbdSettings:
-		    return ProcXF86MiscSetKbdSettings(client);
-		case X_XF86MiscSetGrabKeysState:
-		    return ProcXF86MiscSetGrabKeysState(client);
-	        default:
-		    return BadRequest;
-	    }
-	} else
-	    return miscErrorBase + XF86MiscModInDevClientNotLocal;
-    }
-}
-
-static int
-SProcXF86MiscQueryVersion(client)
-    register ClientPtr	client;
-{
-    register int n;
-    REQUEST(xXF86MiscQueryVersionReq);
-    swaps(&stuff->length, n);
-    return ProcXF86MiscQueryVersion(client);
-}
-
-#ifdef _XF86MISC_SAVER_COMPAT_
-static int
-SProcXF86MiscGetSaver(client)
-    ClientPtr client;
-{
-    register int n;
-    REQUEST(xXF86MiscGetSaverReq);
-    swaps(&stuff->length, n);
-    REQUEST_SIZE_MATCH(xXF86MiscGetSaverReq);
-    swaps(&stuff->screen, n);
-    return ProcXF86MiscGetSaver(client);
-}
-
-static int
-SProcXF86MiscSetSaver(client)
-    ClientPtr client;
-{
-    register int n;
-    REQUEST(xXF86MiscSetSaverReq);
-    swaps(&stuff->length, n);
-    REQUEST_SIZE_MATCH(xXF86MiscSetSaverReq);
-    swaps(&stuff->screen, n);
-    swapl(&stuff->suspendTime, n);
-    swapl(&stuff->offTime, n);
-    return ProcXF86MiscSetSaver(client);
-}
-#endif /* _XF86MISC_SAVER_COMPAT_ */
-
-static int
-SProcXF86MiscGetMouseSettings(client)
-    ClientPtr client;
-{
-    register int n;
-    REQUEST(xXF86MiscGetMouseSettingsReq);
-    swaps(&stuff->length, n);
-    REQUEST_SIZE_MATCH(xXF86MiscGetMouseSettingsReq);
-    return ProcXF86MiscGetMouseSettings(client);
-}
-
-static int
-SProcXF86MiscGetKbdSettings(client)
-    ClientPtr client;
-{
-    register int n;
-    REQUEST(xXF86MiscGetKbdSettingsReq);
-    swaps(&stuff->length, n);
-    REQUEST_SIZE_MATCH(xXF86MiscGetKbdSettingsReq);
-    return ProcXF86MiscGetKbdSettings(client);
-}
-
-static int
-SProcXF86MiscSetMouseSettings(client)
-    ClientPtr client;
-{
-    register int n;
-    REQUEST(xXF86MiscSetMouseSettingsReq);
-    swaps(&stuff->length, n);
-    REQUEST_SIZE_MATCH(xXF86MiscSetMouseSettingsReq);
-    swapl(&stuff->mousetype, n);
-    swapl(&stuff->baudrate, n);
-    swapl(&stuff->samplerate, n);
-    swapl(&stuff->resolution, n);
-    swapl(&stuff->buttons, n);
-    swapl(&stuff->emulate3timeout, n);
-    swapl(&stuff->flags, n);
-    return ProcXF86MiscSetMouseSettings(client);
-}
-
-static int
-SProcXF86MiscSetKbdSettings(client)
-    ClientPtr client;
-{
-    register int n;
-    REQUEST(xXF86MiscSetKbdSettingsReq);
-    swaps(&stuff->length, n);
-    REQUEST_SIZE_MATCH(xXF86MiscSetKbdSettingsReq);
-    swapl(&stuff->kbdtype, n);
-    swapl(&stuff->rate, n);
-    swapl(&stuff->delay, n);
-    return ProcXF86MiscSetKbdSettings(client);
-}
-
-static int
-SProcXF86MiscSetGrabKeysState(client)
-    ClientPtr client;
-{
-    register int n;
-    REQUEST(xXF86MiscSetGrabKeysStateReq);
-    swaps(&stuff->length, n);
-    REQUEST_SIZE_MATCH(xXF86MiscSetGrabKeysStateReq);
-    swaps(&stuff->enable, n);
-    return ProcXF86MiscSetGrabKeysState(client);
-}
-
-static int
-SProcXF86MiscSetClientVersion(ClientPtr client)
-{
-    register int n;
-    REQUEST(xXF86MiscSetClientVersionReq);
-    swaps(&stuff->length, n);
-    REQUEST_SIZE_MATCH(xXF86MiscSetClientVersionReq);
-    swaps(&stuff->major, n);
-    swaps(&stuff->minor, n);
-    return ProcXF86MiscSetClientVersion(client);
-}
-
-static int
-SProcXF86MiscGetFilePaths(client)
-    ClientPtr client;
-{
-    register int n;
-    REQUEST(xXF86MiscGetFilePathsReq);
-    swaps(&stuff->length, n);
-    REQUEST_SIZE_MATCH(xXF86MiscGetFilePathsReq);
-    return ProcXF86MiscGetFilePaths(client);
-}
-
-static int
-SProcXF86MiscPassMessage(client)
-    ClientPtr client;
-{
-    register int n;
-    REQUEST(xXF86MiscPassMessageReq);
-    swaps(&stuff->length, n);
-    REQUEST_SIZE_MATCH(xXF86MiscPassMessageReq);
-    return ProcXF86MiscPassMessage(client);
-}
-
-static int
-SProcXF86MiscDispatch (client)
-    register ClientPtr	client;
-{
-    REQUEST(xReq);
-    switch (stuff->data)
-    {
-    case X_XF86MiscQueryVersion:
-	return SProcXF86MiscQueryVersion(client);
-#ifdef _XF86MISC_SAVER_COMPAT_
-    case X_XF86MiscGetSaver:
-	return SProcXF86MiscGetSaver(client);
-    case X_XF86MiscSetSaver:
-	return SProcXF86MiscSetSaver(client);
-#endif
-    case X_XF86MiscGetMouseSettings:
-	return SProcXF86MiscGetMouseSettings(client);
-    case X_XF86MiscGetKbdSettings:
-	return SProcXF86MiscGetKbdSettings(client);
-    case X_XF86MiscSetClientVersion:
-	return SProcXF86MiscSetClientVersion(client);
-    case X_XF86MiscGetFilePaths:
-	return SProcXF86MiscGetFilePaths(client);
-    case X_XF86MiscPassMessage:
-	return SProcXF86MiscPassMessage(client);
-    default:
-	if (!xf86GetModInDevEnabled())
-	    return miscErrorBase + XF86MiscModInDevDisabled;
-	if (xf86GetModInDevAllowNonLocal() || LocalClient (client)) {
-	    switch (stuff->data) {
-	        case X_XF86MiscSetMouseSettings:
-		    return SProcXF86MiscSetMouseSettings(client);
-	        case X_XF86MiscSetKbdSettings:
-		    return SProcXF86MiscSetKbdSettings(client);
-	        case X_XF86MiscSetGrabKeysState:
-		    return SProcXF86MiscSetGrabKeysState(client);
-	        default:
-		    return BadRequest;
-	    }
-	} else
-	    return miscErrorBase + XF86MiscModInDevClientNotLocal;
-    }
-}
-
diff --git a/hw/xfree86/dixmods/extmod/xf86miscproc.h b/hw/xfree86/dixmods/extmod/xf86miscproc.h
deleted file mode 100644
index 93b193c..0000000
--- a/hw/xfree86/dixmods/extmod/xf86miscproc.h
+++ /dev/null
@@ -1,69 +0,0 @@
-
-/* Prototypes for Pointer/Keyboard functions that the DDX must provide */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#ifndef _XF86MISCPROC_H_
-#define _XF86MISCPROC_H_
-
-typedef enum {
-    MISC_MSE_PROTO,
-    MISC_MSE_BAUDRATE,
-    MISC_MSE_SAMPLERATE,
-    MISC_MSE_RESOLUTION,
-    MISC_MSE_BUTTONS,
-    MISC_MSE_EM3BUTTONS,
-    MISC_MSE_EM3TIMEOUT,
-    MISC_MSE_CHORDMIDDLE,
-    MISC_MSE_FLAGS
-} MiscExtMseValType;
-
-typedef enum {
-    MISC_KBD_TYPE,
-    MISC_KBD_RATE,
-    MISC_KBD_DELAY,
-    MISC_KBD_SERVNUMLOCK
-} MiscExtKbdValType;
-
-typedef enum {
-    MISC_RET_SUCCESS,
-    MISC_RET_BADVAL,
-    MISC_RET_BADMSEPROTO,
-    MISC_RET_BADBAUDRATE,
-    MISC_RET_BADFLAGS,
-    MISC_RET_BADCOMBO,
-    MISC_RET_BADKBDTYPE,
-    MISC_RET_NOMODULE
-} MiscExtReturn;
-
-typedef enum {
-    MISC_POINTER,
-    MISC_KEYBOARD
-} MiscExtStructType;
-
-#define MISC_MSEFLAG_CLEARDTR	1
-#define MISC_MSEFLAG_CLEARRTS	2
-#define MISC_MSEFLAG_REOPEN	128
-
-void XFree86MiscExtensionInit(void);
-
-Bool MiscExtGetMouseSettings(pointer *mouse, char **devname);
-int  MiscExtGetMouseValue(pointer mouse, MiscExtMseValType valtype);
-Bool MiscExtSetMouseValue(pointer mouse, MiscExtMseValType valtype, int value);
-Bool MiscExtGetKbdSettings(pointer *kbd);
-int  MiscExtGetKbdValue(pointer kbd, MiscExtKbdValType valtype);
-Bool MiscExtSetKbdValue(pointer kbd, MiscExtKbdValType valtype, int value);
-int MiscExtSetGrabKeysState(ClientPtr client, int enable);
-pointer MiscExtCreateStruct(MiscExtStructType mse_or_kbd);
-void    MiscExtDestroyStruct(pointer structure, MiscExtStructType mse_or_kbd);
-MiscExtReturn MiscExtApply(pointer structure, MiscExtStructType mse_or_kbd);
-Bool MiscExtSetMouseDevice(pointer mouse, char* device);
-Bool MiscExtGetFilePaths(const char **configfile, const char **modulepath,
-			 const char **logfile);
-int  MiscExtPassMessage(int scrn, const char *msgtype, const char *msgval,
-			  char **retstr);
-
-#endif
-
diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
index b159604..5d4d89e 100644
--- a/hw/xfree86/loader/dixsym.c
+++ b/hw/xfree86/loader/dixsym.c
@@ -404,9 +404,6 @@ _X_HIDDEN void *dixLookupTab[] = {
 #ifdef XF86DRI
     SYMVAR(noXFree86DRIExtension)
 #endif
-#ifdef XF86MISC
-    SYMVAR(noXFree86MiscExtension)
-#endif
 #ifdef XF86VIDMODE
     SYMVAR(noXFree86VidModeExtension)
 #endif
diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c
index f9d74ea..de2a627 100644
--- a/hw/xfree86/loader/xf86sym.c
+++ b/hw/xfree86/loader/xf86sym.c
@@ -79,7 +79,6 @@
 #include "dpmsproc.h"
 #endif
 #include "vidmodeproc.h"
-#include "xf86miscproc.h"
 #include "loader.h"
 #include "xisb.h"
 #include "vbe.h"
@@ -649,23 +648,6 @@ _X_HIDDEN void *xfree86LookupTab[] = {
     SYMFUNC(xf86GetBuiltinInterfaceVersion)
     SYMFUNC(xf86RegisterBuiltinInterfaceVersion)
 
-    /* xf86MiscExt.c */
-#ifdef XF86MISC
-    SYMFUNC(MiscExtGetMouseSettings)
-    SYMFUNC(MiscExtGetMouseValue)
-    SYMFUNC(MiscExtSetMouseValue)
-    SYMFUNC(MiscExtSetMouseDevice)
-    SYMFUNC(MiscExtGetKbdSettings)
-    SYMFUNC(MiscExtGetKbdValue)
-    SYMFUNC(MiscExtSetKbdValue)
-    SYMFUNC(MiscExtSetGrabKeysState)
-    SYMFUNC(MiscExtCreateStruct)
-    SYMFUNC(MiscExtDestroyStruct)
-    SYMFUNC(MiscExtApply)
-    SYMFUNC(MiscExtGetFilePaths)
-    SYMFUNC(MiscExtPassMessage)
-#endif
-
     /* Misc */
     SYMFUNC(GetTimeInMillis)
 
diff --git a/hw/xfree86/os-support/misc/Makefile.am b/hw/xfree86/os-support/misc/Makefile.am
index 65fbe92..ad27cfc 100644
--- a/hw/xfree86/os-support/misc/Makefile.am
+++ b/hw/xfree86/os-support/misc/Makefile.am
@@ -12,7 +12,7 @@ ILHACK_SRCS = xf86_IlHack.c
 
 noinst_LTLIBRARIES = libmisc.la
 
-libmisc_la_SOURCES = xf86_Util.c Delay.c $(ARCH_SRCS)
+libmisc_la_SOURCES = Delay.c $(ARCH_SRCS)
 
 #AM_LDFLAGS = -r
 
diff --git a/hw/xfree86/os-support/misc/xf86_Util.c b/hw/xfree86/os-support/misc/xf86_Util.c
deleted file mode 100644
index 9e69059..0000000
--- a/hw/xfree86/os-support/misc/xf86_Util.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright 1993 by David Wexelblat <dwex at goblin.org>
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of David Wexelblat not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  David Wexelblat makes no representations
- * about the suitability of this software for any purpose.  It is provided
- * "as is" without express or implied warranty.
- *
- * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL DAVID WEXELBLAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- */
-
-/*
- * This file is for utility functions that will be shared by other pieces
- * of the system.  Putting things here ensure that all the linking order
- * dependencies are dealt with, as this library will be linked in last.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <ctype.h>
-
-/* To prevent empty source file warnings */
-int _xf86misc;
-
-#if 0
-/* For use only with gcc */
-#ifdef __GNUC__
-
-#include "os.h"
-
-char *
-debug_alloca(char *file, int line, int size)
-{
-	char *ptr;
-
-	ptr = Xalloc(size);
-	ErrorF("Alloc: %s line %d; ptr = 0x%x, length = %d\n", file, line,
-	       ptr, size);
-	return ptr;
-}
-
-void
-debug_dealloca(char *file, int line, char *ptr)
-{
-	ErrorF("Dealloc: %s line %d; ptr = 0x%x\n", file, line, ptr);
-	Xfree(ptr);
-}
-#endif
-#endif
-
-#if defined(ISC) || defined(Lynx)
-
-#include <math.h>
-
-/* Needed for apm_driver.c */
-/* These functions are modeled after the functions inside gnu's libc */
-
-static double
-copysign(double x, double y)
-{
-	x = fabs(x);
-	return y < 0 ? - x : x;
-}
-
-double
-RInt(double x)
-{
-	double s,t;
-	const double one = 1.0;
-	const static double L = 4503599627370496.0E0;
-
-	if (x!=x)
-		return(x);
-	if (copysign(x,one) >= L)
-		return(x);
-	s = copysign(L,x);
-	t = x + s;
-	return (t - s);
-}
-#endif
diff --git a/hw/xwin/InitInput.c b/hw/xwin/InitInput.c
index 6a850cd..550c5a0 100644
--- a/hw/xwin/InitInput.c
+++ b/hw/xwin/InitInput.c
@@ -30,9 +30,6 @@
 #include <xwin-config.h>
 #endif
 #include "win.h"
-#ifdef XWIN_CLIPBOARD
-# include "../../Xext/xf86miscproc.h"
-#endif
 #include "dixstruct.h"
 
 
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 6eb9dd6..d4e3050 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -368,9 +368,6 @@
 /* Build XFree86 BigFont extension */
 #undef XF86BIGFONT
 
-/* Support XFree86 miscellaneous extensions */
-#undef XF86MISC
-
 /* Support XFree86 Video Mode extension */
 #undef XF86VIDMODE
 
diff --git a/include/globals.h b/include/globals.h
index 9e5060d..82e7b4b 100644
--- a/include/globals.h
+++ b/include/globals.h
@@ -130,10 +130,6 @@ extern Bool noXFree86DGAExtension;
 extern Bool noXFree86DRIExtension;
 #endif
 
-#ifdef XF86MISC
-extern Bool noXFree86MiscExtension;
-#endif
-
 #ifdef XF86VIDMODE
 extern Bool noXFree86VidModeExtension;
 #endif
diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in
index c0997a9..7aada2e 100644
--- a/include/xorg-server.h.in
+++ b/include/xorg-server.h.in
@@ -109,9 +109,6 @@
 /* Build XFree86 BigFont extension */
 #undef XF86BIGFONT
 
-/* Support XFree86 miscellaneous extensions */
-#undef XF86MISC
-
 /* Support XFree86 Video Mode extension */
 #undef XF86VIDMODE
 
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 830ae8f..dd79931 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -65,7 +65,6 @@ SOFTWARE.
 #ifdef HAVE_KDRIVE_CONFIG_H
 #include <kdrive-config.h>
 /* there must be a better way... */
-#undef XF86MISC
 #undef XFreeXDGA
 #undef XF86DRI
 #undef XF86VIDMODE
@@ -73,7 +72,6 @@ SOFTWARE.
 
 #ifdef HAVE_XGL_CONFIG_H
 #include <xgl-config.h>
-#undef XF86MISC
 #undef XFreeXDGA
 #undef XF86DRI
 #undef XF86VIDMODE
@@ -150,9 +148,6 @@ extern Bool noXFree86DGAExtension;
 #ifdef XF86DRI
 extern Bool noXFree86DRIExtension;
 #endif
-#ifdef XF86MISC
-extern Bool noXFree86MiscExtension;
-#endif
 #ifdef XF86VIDMODE
 extern Bool noXFree86VidModeExtension;
 #endif
@@ -279,9 +274,6 @@ extern void XFree86BigfontExtensionInit(INITARGS);
 #ifdef XF86VIDMODE
 extern void XFree86VidModeExtensionInit(INITARGS);
 #endif
-#ifdef XF86MISC
-extern void XFree86MiscExtensionInit(INITARGS);
-#endif
 #ifdef XFreeXDGA
 extern void XFree86DGAExtensionInit(INITARGS);
 #endif
@@ -399,9 +391,6 @@ static ExtensionToggle ExtensionToggleList[] =
 #ifdef XF86DRI
     { "XFree86-DRI", &noXFree86DRIExtension },
 #endif
-#ifdef XF86MISC
-    { "XFree86-Misc", &noXFree86MiscExtension },
-#endif
 #ifdef XF86VIDMODE
     { "XFree86-VidModeExtension", &noXFree86VidModeExtension },
 #endif
@@ -535,9 +524,6 @@ InitExtensions(argc, argv)
 #if defined(XF86VIDMODE)
     if (!noXFree86VidModeExtension) XFree86VidModeExtensionInit();
 #endif
-#if defined(XF86MISC)
-    if (!noXFree86MiscExtension) XFree86MiscExtensionInit();
-#endif
 #if defined(XFreeXDGA)
     if (!noXFree86DGAExtension) XFree86DGAExtensionInit();
 #endif
diff --git a/os/utils.c b/os/utils.c
index 1ac63fa..7ad06d7 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -196,9 +196,6 @@ _X_EXPORT Bool noXFree86DGAExtension = FALSE;
 #ifdef XF86DRI
 _X_EXPORT Bool noXFree86DRIExtension = FALSE;
 #endif
-#ifdef XF86MISC
-_X_EXPORT Bool noXFree86MiscExtension = FALSE;
-#endif
 #ifdef XF86VIDMODE
 _X_EXPORT Bool noXFree86VidModeExtension = FALSE;
 #endif
commit 7e4572a5717bf9ba8e90db143d49b7270aaf28fe
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Fri Jun 13 21:42:37 2008 -0400

    Fix "warning: no previous prototype for ‘XevieExtensionInit’".
    (cherry picked from commit 720e44f9730b9e275579483c2a34b16bba77e146)

diff --git a/Xext/xevie.c b/Xext/xevie.c
index f401244..1e08529 100644
--- a/Xext/xevie.c
+++ b/Xext/xevie.c
@@ -55,6 +55,7 @@ of the copyright holder.
 #include <xkbsrv.h>
 
 #include "../os/osdep.h"
+#include "modinit.h"
 
 #define NoSuchEvent 0x80000000
 
diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h
index 7282e6e..32f7ed4 100644
--- a/hw/xfree86/dixmods/extmod/modinit.h
+++ b/hw/xfree86/dixmods/extmod/modinit.h
@@ -112,6 +112,10 @@ extern void SELinuxExtensionInit(INITARGS);
 #include "xselinux.h"
 #endif
 
+#ifdef XEVIE
+extern void XevieExtensionInit(INITARGS);
+#endif
+
 #if 1
 extern void SecurityExtensionInit(INITARGS);
 #endif
commit 6b37231bc5941cf2f30651821cec2f059db64bea
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Thu Aug 6 23:12:56 2009 -0700

    Death to TOG-CUP.
    
    If you still care about 8bpp visuals that much, fix Composite to provide
    synthetic visuals.
    (cherry picked from commit a7503615a6893749d512f75d37646273f31b9dbf)

diff --git a/Xext/Makefile.am b/Xext/Makefile.am
index 85a5cc6..c5c5d2e 100644
--- a/Xext/Makefile.am
+++ b/Xext/Makefile.am
@@ -98,13 +98,6 @@ if XEVIE
 BUILTIN_SRCS += $(XEVIE_SRCS)
 endif
 
-# Colormap Utilization Protocol: Less flashing when switching between
-# PsuedoColor apps and better sharing of limited colormap slots
-CUP_SRCS = cup.c
-if CUP
-MODULE_SRCS  += $(CUP_SRCS)
-endif
-
 # Multi-buffering extension
 MULTIBUFFER_SRCS = mbuf.c
 EXTRA_MULTIBUFFER_SRCS = mbufbf.c mbufpx.c
@@ -150,7 +143,6 @@ EXTRA_DIST = \
 	$(XCALIBRATE_SRCS) \
 	$(XINERAMA_SRCS) \
 	$(XEVIE_SRCS) \
-	$(CUP_SRCS) \
 	$(MULTIBUFFER_SRCS) \
 	$(EXTRA_MULTIBUFFER_SRCS) \
 	$(FONTCACHE_SRCS) \
diff --git a/Xext/cup.c b/Xext/cup.c
deleted file mode 100644
index fd1409e..0000000
--- a/Xext/cup.c
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
-
-Copyright 1997, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-
-#define NEED_REPLIES
-#define NEED_EVENTS
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include "misc.h"
-#include "dixstruct.h"
-#include "extnsionst.h"
-#include "colormapst.h"
-#include "scrnintstr.h"
-#include "servermd.h"
-#include "swapreq.h"
-#define _XCUP_SERVER_
-#include <X11/extensions/Xcupstr.h>
-#include <X11/Xfuncproto.h>
-
-#include "../os/osdep.h"
-
-#include "modinit.h"
-
-static int		ProcDispatch(ClientPtr client);
-static int              SProcDispatch(ClientPtr client);
-static void		ResetProc(ExtensionEntry* extEntry);
-
-#if defined(WIN32) || defined(TESTWIN32)
-#define HAVE_SPECIAL_DESKTOP_COLORS
-#endif
-
-static xColorItem citems[] = {
-#ifndef HAVE_SPECIAL_DESKTOP_COLORS
-#define CUP_BLACK_PIXEL 0
-#define CUP_WHITE_PIXEL 1
-  /*  pix     red   green    blue        */ 
-    {   0,      0,      0,      0, 0, 0 },
-    {   1, 0xffff, 0xffff, 0xffff, 0, 0 }
-#else
-#ifndef WIN32
-    /* 
-	This approximates the MS-Windows desktop colormap for testing 
-        purposes but has black and white pixels in the typical Unix 
-        locations, which should be switched if necessary if your system
-        has blackPixel and whitePixel swapped. No entries are provided
-        for colormap entries 254 and 255 because AllocColor/FindColor
-        will reuse entries zero and one.
-    */
-    {   0,      0,      0,      0, 0, 0 },
-    {   1, 0xffff, 0xffff, 0xffff, 0, 0 },
-    {   2, 0x8000,      0,      0, 0, 0 },
-    {   3,      0, 0x8000,      0, 0, 0 },
-    {   4, 0x8000, 0x8000,      0, 0, 0 },
-    {   5,      0,      0, 0x8000, 0, 0 },
-    {   6, 0x8000,      0, 0x8000, 0, 0 },
-    {   7,      0, 0x8000, 0x8000, 0, 0 },
-    {   8, 0xc000, 0xc000, 0xc000, 0, 0 },
-    {   9, 0xc000, 0xdc00, 0xc000, 0, 0 },
-    { 246, 0xa000, 0xa000, 0xa000, 0, 0 },
-    { 247, 0x8000, 0x8000, 0x8000, 0, 0 },
-    { 248, 0xffff,      0,      0, 0, 0 },
-    { 249,      0, 0xffff,      0, 0, 0 },
-    { 250, 0xffff, 0xffff,      0, 0, 0 },
-    { 251,      0,      0, 0xffff, 0, 0 },
-    { 252, 0xffff,      0, 0xffff, 0, 0 },
-    { 253,      0, 0xffff, 0xffff, 0, 0 }
-#else
-    /* 
-	this is the MS-Windows desktop, adjusted for X's 16-bit color
-	specifications.
-    */
-    {   0,      0,      0,      0, 0, 0 },
-    {   1, 0x8000,      0,      0, 0, 0 },
-    {   2,      0, 0x8000,      0, 0, 0 },
-    {   3, 0x8000, 0x8000,      0, 0, 0 },
-    {   4,      0,      0, 0x8000, 0, 0 },
-    {   5, 0x8000,      0, 0x8000, 0, 0 },
-    {   6,      0, 0x8000, 0x8000, 0, 0 },
-    {   7, 0xc000, 0xc000, 0xc000, 0, 0 },
-    {   8, 0xc000, 0xdc00, 0xc000, 0, 0 },
-    {   9, 0xa600, 0xca00, 0xf000, 0, 0 },
-    { 246, 0xff00, 0xfb00, 0xf000, 0, 0 },
-    { 247, 0xa000, 0xa000, 0xa400, 0, 0 },
-    { 248, 0x8000, 0x8000, 0x8000, 0, 0 },
-    { 249, 0xff00,      0,      0, 0, 0 },
-    { 250,      0, 0xff00,      0, 0, 0 },
-    { 251, 0xff00, 0xff00,      0, 0, 0 },
-    { 252,      0,      0, 0xff00, 0, 0 },
-    { 253, 0xff00,      0, 0xff00, 0, 0 },
-    { 254,      0, 0xff00, 0xff00, 0, 0 },
-    { 255, 0xff00, 0xff00, 0xff00, 0, 0 }
-#endif
-#endif
-};
-#define NUM_DESKTOP_COLORS (sizeof citems / sizeof citems[0])
-
-void
-XcupExtensionInit (INITARGS)
-{
-    (void) AddExtension (XCUPNAME,
-			0,
-			XcupNumberErrors,
-			ProcDispatch,
-			SProcDispatch,
-			ResetProc,
-			StandardMinorOpcode);
-
-    /* PC servers initialize the desktop colors (citems) here! */
-}
-
-/*ARGSUSED*/
-static 
-void ResetProc(
-    ExtensionEntry* extEntry)
-{
-}
-
-static 
-int ProcQueryVersion(
-    register ClientPtr client)
-{
-    /* REQUEST (xXcupQueryVersionReq); */
-    xXcupQueryVersionReply rep;
-    register int n;
-
-    REQUEST_SIZE_MATCH (xXcupQueryVersionReq);
-    rep.type = X_Reply;
-    rep.length = 0;
-    rep.sequence_number = client->sequence;
-    rep.server_major_version = XCUP_MAJOR_VERSION;
-    rep.server_minor_version = XCUP_MINOR_VERSION;
-    if (client->swapped) {
-    	swaps (&rep.sequence_number, n);
-    	swapl (&rep.length, n);
-    	swaps (&rep.server_major_version, n);
-    	swaps (&rep.server_minor_version, n);
-    }
-    WriteToClient (client, sizeof (xXcupQueryVersionReply), (char *)&rep);
-    return client->noClientException;
-}
-
-static
-int ProcGetReservedColormapEntries(
-    register ClientPtr client)
-{
-    REQUEST (xXcupGetReservedColormapEntriesReq);
-    xXcupGetReservedColormapEntriesReply rep;
-    xColorItem* cptr;
-    register int n;
-
-    REQUEST_SIZE_MATCH (xXcupGetReservedColormapEntriesReq);
-
-    if (stuff->screen >= screenInfo.numScreens)
-	return BadValue;
-
-#ifndef HAVE_SPECIAL_DESKTOP_COLORS
-    citems[CUP_BLACK_PIXEL].pixel = 
-	screenInfo.screens[stuff->screen]->blackPixel;
-    citems[CUP_WHITE_PIXEL].pixel = 
-	screenInfo.screens[stuff->screen]->whitePixel;
-#endif
-
-    rep.type = X_Reply;
-    rep.sequence_number = client->sequence;
-    rep.length = NUM_DESKTOP_COLORS * 3;
-    if (client->swapped) {
-    	swaps (&rep.sequence_number, n);
-    	swapl (&rep.length, n);
-    }
-    WriteToClient (client, sizeof (xXcupGetReservedColormapEntriesReply), (char *)&rep);
-    for (n = 0, cptr = citems; n < NUM_DESKTOP_COLORS; n++, cptr++) {
-	if (client->swapped) SwapColorItem (cptr);
-	WriteToClient (client, SIZEOF(xColorItem), (char *)cptr);
-    }
-    return client->noClientException;
-}
-
-static
-int ProcStoreColors(
-    register ClientPtr client)
-{
-    REQUEST (xXcupStoreColorsReq);
-    ColormapPtr pcmp;
-    int rc;
-
-    REQUEST_AT_LEAST_SIZE (xXcupStoreColorsReq);
-    rc = dixLookupResource((pointer *)&pcmp, stuff->cmap, RT_COLORMAP,
-			   client, DixAddAccess);
-
-    if (rc == Success) {
-	int ncolors, n;
-	xXcupStoreColorsReply rep;
-	xColorItem* cptr;
-
-	if (!(pcmp->class & DynamicClass))
-	    return BadMatch;
-
-	ncolors = (client->req_len << 2) - SIZEOF (xXcupStoreColorsReq);
-	if (ncolors % SIZEOF(xColorItem))
-	    return BadLength;
-
-	ncolors /= SIZEOF (xColorItem);
-
-
-	for (n = 0, cptr = (xColorItem*) &stuff[1]; n < ncolors; n++) {
-	    Pixel pixel = cptr->pixel;
-
-	    if (AllocColor (pcmp,
-			    &cptr->red, &cptr->green, &cptr->blue,
-			    &pixel, client->index) == Success) {
-		cptr->pixel = pixel;
-		cptr->flags = 0x08;
-	    } else
-		cptr->flags = 0;
-	    cptr = (xColorItem*) (((char*)cptr) + SIZEOF(xColorItem));
-	}
-
-	rep.type = X_Reply;
-	rep.sequence_number = client->sequence;
-	rep.length = ncolors * 3;
-	if (client->swapped) {
-    	    swaps (&rep.sequence_number, n);
-    	    swapl (&rep.length, n);
-	}
-	WriteToClient (client, sizeof (xXcupGetReservedColormapEntriesReply), (char *)&rep);
-	for (n = 0, cptr = (xColorItem*) &stuff[1]; n < ncolors; n++) {
-	    if (client->swapped) SwapColorItem (cptr);
-	    WriteToClient (client, SIZEOF(xColorItem), (char *)cptr);
-	    cptr = (xColorItem*) (((char*)cptr) + SIZEOF(xColorItem));
-	}
-	return client->noClientException;
-    } else {
-	client->errorValue = stuff->cmap;
-	return (rc == BadValue) ? BadColor : rc;
-    }
-}
-
-static 
-int ProcDispatch(
-    register ClientPtr client)
-{
-    REQUEST (xReq);
-    switch (stuff->data)
-    {
-    case X_XcupQueryVersion:
-	return ProcQueryVersion (client);
-    case X_XcupGetReservedColormapEntries:
-	return ProcGetReservedColormapEntries (client);
-    case X_XcupStoreColors:
-	return ProcStoreColors (client);
-    default:
-	return BadRequest;
-    }
-}
-
-static 
-int SProcQueryVersion(
-    register ClientPtr client)
-{
-    register int n;
-
-    REQUEST(xXcupQueryVersionReq);
-    swaps(&stuff->length, n);
-    return ProcQueryVersion(client);
-}
-
-static 
-int SProcGetReservedColormapEntries(
-    ClientPtr client)
-{
-    register int n;
-
-    REQUEST (xXcupGetReservedColormapEntriesReq);
-    swaps (&stuff->length, n);
-    swapl (&stuff->screen, n);
-    REQUEST_AT_LEAST_SIZE (xXcupGetReservedColormapEntriesReq);
-    return ProcGetReservedColormapEntries (client);
-}
-
-static 
-int SProcXcupStoreColors(
-    ClientPtr client)
-{
-    register int n;
-    int count;
-    xColorItem* pItem;
-
-    REQUEST (xXcupStoreColorsReq);
-    swaps (&stuff->length, n);
-    REQUEST_AT_LEAST_SIZE (xXcupStoreColorsReq);
-    swapl(&stuff->cmap, n);
-    pItem = (xColorItem*) &stuff[1];
-    for(count = LengthRestB(stuff)/sizeof(xColorItem); --count >= 0; )
-        SwapColorItem(pItem++);
-    return ProcStoreColors (client);
-}
-
-static 
-int SProcDispatch(
-    register ClientPtr client)
-{
-    REQUEST(xReq);
-    switch (stuff->data)
-    {
-    case X_XcupQueryVersion:
-	return SProcQueryVersion (client);
-    case X_XcupGetReservedColormapEntries:
-	return SProcGetReservedColormapEntries (client);
-    case X_XcupStoreColors:
-	return SProcXcupStoreColors (client);
-    default:
-	return BadRequest;
-    }
-}
-
-
diff --git a/hw/dmx/dmx-config.h b/hw/dmx/dmx-config.h
index df77f09..4a2dfe0 100644
--- a/hw/dmx/dmx-config.h
+++ b/hw/dmx/dmx-config.h
@@ -83,7 +83,6 @@
 #undef XF86MISC
 #undef XFreeXDGA
 #undef XF86DRI
-#undef TOGCUP
 #undef SCREENSAVER
 #undef RANDR
 #undef XFIXES
diff --git a/hw/xfree86/dixmods/extmod/modinit.c b/hw/xfree86/dixmods/extmod/modinit.c
index fe499fe..f8440f1 100644
--- a/hw/xfree86/dixmods/extmod/modinit.c
+++ b/hw/xfree86/dixmods/extmod/modinit.c
@@ -155,15 +155,6 @@ static ExtensionModule extensionModules[] = {
 	NULL
     },
 #endif
-#ifdef TOGCUP
-    {
-	XcupExtensionInit,
-	XCUPNAME,
-	&noXcupExtension,
-	NULL,
-	NULL
-    },
-#endif
 #ifdef XV
     {
 	XvExtensionInit,
diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h
index 6c87b15..7282e6e 100644
--- a/hw/xfree86/dixmods/extmod/modinit.h
+++ b/hw/xfree86/dixmods/extmod/modinit.h
@@ -83,12 +83,6 @@ extern void FontCacheExtensionInit(INITARGS);
 #include "fontcachstr.h"
 #endif
 
-#ifdef TOGCUP
-extern void XcupExtensionInit(INITARGS);
-#define _XCUP_SERVER_
-#include <X11/extensions/Xcupstr.h>
-#endif
-
 #ifdef XV
 extern void XvExtensionInit(INITARGS);
 extern void XvMCExtensionInit(INITARGS);
diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
index d96dde7..b159604 100644
--- a/hw/xfree86/loader/dixsym.c
+++ b/hw/xfree86/loader/dixsym.c
@@ -386,9 +386,6 @@ _X_HIDDEN void *dixLookupTab[] = {
 #ifdef XSYNC
     SYMVAR(noSyncExtension)
 #endif
-#ifdef TOGCUP
-    SYMVAR(noXcupExtension)
-#endif
 #ifdef RES
     SYMVAR(noResExtension)
 #endif
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index ec8a94e..6eb9dd6 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -425,9 +425,6 @@
 /* Support Xv extension */
 #undef XV
 
-/* Build TOG-CUP extension */
-#undef TOGCUP
-
 /* Build Multibuffer extension */
 #undef MULTIBUFFER
 
diff --git a/include/globals.h b/include/globals.h
index 62794f5..9e5060d 100644
--- a/include/globals.h
+++ b/include/globals.h
@@ -106,10 +106,6 @@ extern Bool noSecurityExtension;
 extern Bool noSyncExtension;
 #endif
 
-#ifdef TOGCUP
-extern Bool noXcupExtension;
-#endif
-
 #ifdef RES
 extern Bool noResExtension;
 #endif
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 71c2348..830ae8f 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -132,9 +132,6 @@ extern Bool noSecurityExtension;
 #ifdef XSYNC
 extern Bool noSyncExtension;
 #endif
-#ifdef TOGCUP
-extern Bool noXcupExtension;
-#endif
 #ifdef RES
 extern Bool noResExtension;
 #endif
@@ -297,9 +294,6 @@ extern void GlxExtensionInit(INITARGS);
 #ifdef XF86DRI
 extern void XFree86DRIExtensionInit(INITARGS);
 #endif
-#ifdef TOGCUP
-extern void XcupExtensionInit(INITARGS);
-#endif
 #ifdef DPMSExtension
 extern void DPMSExtensionInit(INITARGS);
 #endif
@@ -387,9 +381,6 @@ static ExtensionToggle ExtensionToggleList[] =
 #ifdef XSYNC
     { "SYNC", &noSyncExtension },
 #endif
-#ifdef TOGCUP
-    { "TOG-CUP", &noXcupExtension },
-#endif
 #ifdef RES
     { "X-Resource", &noResExtension },
 #endif
@@ -531,9 +522,6 @@ InitExtensions(argc, argv)
 #ifdef XSELINUX
     if (!noSELinuxExtension) SELinuxExtensionInit();
 #endif
-#ifdef TOGCUP
-    if (!noXcupExtension) XcupExtensionInit();
-#endif
 #if defined(DPMSExtension) && !defined(NO_HW_ONLY_EXTS)
     if (!noDPMSExtension) DPMSExtensionInit();
 #endif
diff --git a/os/utils.c b/os/utils.c
index 51a15c5..1ac63fa 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -176,9 +176,6 @@ _X_EXPORT Bool noSecurityExtension = FALSE;
 #ifdef XSYNC
 _X_EXPORT Bool noSyncExtension = FALSE;
 #endif
-#ifdef TOGCUP
-_X_EXPORT Bool noXcupExtension = FALSE;
-#endif
 #ifdef RES
 _X_EXPORT Bool noResExtension = FALSE;
 #endif
commit 0769b0d4006a5458f7534a62ecda266d9ed9098f
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Apr 18 15:32:04 2008 -0700

    Nuke the MIT-SUNDRY-NONSTANDARD extension.
    
    This extension provided bug-compatibility with pre-X11R6, but has been
    stubbed out in our server since 2006 to return BadRequest when you actually
    asked for it.
    (cherry picked from commit 25827fde68d3bb02a2b7e05fae53a1d97edf1f76)

diff --git a/Xext/Makefile.am b/Xext/Makefile.am
index a75f0ce..85a5cc6 100644
--- a/Xext/Makefile.am
+++ b/Xext/Makefile.am
@@ -28,7 +28,6 @@ BUILTIN_SRCS =			\
 # Sources always included in libXextmodule.la & libXext.la
 MODULE_SRCS =			\
 	bigreq.c		\
-	mitmisc.c		\
 	shape.c			\
 	sync.c			\
 	xcmisc.c
diff --git a/Xext/mitmisc.c b/Xext/mitmisc.c
deleted file mode 100644
index e793d4d..0000000
--- a/Xext/mitmisc.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/************************************************************
-
-Copyright 1989, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-********************************************************/
-
-/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM  BLESSING */
-
-
-#define NEED_EVENTS
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include "misc.h"
-#include "os.h"
-#include "dixstruct.h"
-#include "extnsionst.h"
-#define _MITMISC_SERVER_
-#include <X11/extensions/mitmiscstr.h>
-#include "modinit.h"
-
-static void MITResetProc(
-    ExtensionEntry * /* extEntry */
-);
-
-static DISPATCH_PROC(ProcMITDispatch);
-static DISPATCH_PROC(ProcMITGetBugMode);
-static DISPATCH_PROC(ProcMITSetBugMode);
-static DISPATCH_PROC(SProcMITDispatch);
-static DISPATCH_PROC(SProcMITGetBugMode);
-static DISPATCH_PROC(SProcMITSetBugMode);
-
-void
-MITMiscExtensionInit(INITARGS)
-{
-    AddExtension(MITMISCNAME, 0, 0,
-		 ProcMITDispatch, SProcMITDispatch,
-		 MITResetProc, StandardMinorOpcode);
-}
-
-/*ARGSUSED*/
-static void
-MITResetProc (extEntry)
-ExtensionEntry	*extEntry;
-{
-}
-
-static int
-ProcMITSetBugMode(client)
-    register ClientPtr client;
-{
-    REQUEST(xMITSetBugModeReq);
-
-    REQUEST_SIZE_MATCH(xMITSetBugModeReq);
-    if (stuff->onOff != xFalse)
-        return BadRequest;
-    return(client->noClientException);
-}
-
-static int
-ProcMITGetBugMode(client)
-    register ClientPtr client;
-{
-    xMITGetBugModeReply rep;
-    register int n;
-
-    REQUEST_SIZE_MATCH(xMITGetBugModeReq);
-    rep.type = X_Reply;
-    rep.length = 0;
-    rep.sequenceNumber = client->sequence;
-    rep.onOff = FALSE;
-    if (client->swapped) {
-    	swaps(&rep.sequenceNumber, n);
-    	swapl(&rep.length, n);
-    }
-    WriteToClient(client, sizeof(xMITGetBugModeReply), (char *)&rep);
-    return(client->noClientException);
-}
-
-static int
-ProcMITDispatch (client)
-    register ClientPtr	client;
-{
-    REQUEST(xReq);
-    switch (stuff->data)
-    {
-    case X_MITSetBugMode:
-	return ProcMITSetBugMode(client);
-    case X_MITGetBugMode:
-	return ProcMITGetBugMode(client);
-    default:
-	return BadRequest;
-    }
-}
-
-static int
-SProcMITSetBugMode(client)
-    register ClientPtr	client;
-{
-    register int n;
-    REQUEST(xMITSetBugModeReq);
-
-    swaps(&stuff->length, n);
-    return ProcMITSetBugMode(client);
-}
-
-static int
-SProcMITGetBugMode(client)
-    register ClientPtr	client;
-{
-    register int n;
-    REQUEST(xMITGetBugModeReq);
-
-    swaps(&stuff->length, n);
-    return ProcMITGetBugMode(client);
-}
-
-static int
-SProcMITDispatch (client)
-    register ClientPtr	client;
-{
-    REQUEST(xReq);
-    switch (stuff->data)
-    {
-    case X_MITSetBugMode:
-	return SProcMITSetBugMode(client);
-    case X_MITGetBugMode:
-	return SProcMITGetBugMode(client);
-    default:
-	return BadRequest;
-    }
-}
diff --git a/configure.ac b/configure.ac
index 68ffd3b..b005dc1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1116,7 +1116,6 @@ else
 fi
 AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes])
 
-AC_DEFINE(MITMISC, 1, [Support MIT Misc extension])
 AC_DEFINE(XTEST, 1, [Support XTest extension])
 AC_DEFINE(XSYNC, 1, [Support XSync extension])
 AC_DEFINE(XCMISC, 1, [Support XCMisc extension])
diff --git a/hw/dmx/dmx-config.h b/hw/dmx/dmx-config.h
index 343fdab..df77f09 100644
--- a/hw/dmx/dmx-config.h
+++ b/hw/dmx/dmx-config.h
@@ -84,7 +84,6 @@
 #undef XFreeXDGA
 #undef XF86DRI
 #undef TOGCUP
-#undef MITMISC
 #undef SCREENSAVER
 #undef RANDR
 #undef XFIXES
diff --git a/hw/xfree86/dixmods/extmod/modinit.c b/hw/xfree86/dixmods/extmod/modinit.c
index 3b6b36a..fe499fe 100644
--- a/hw/xfree86/dixmods/extmod/modinit.c
+++ b/hw/xfree86/dixmods/extmod/modinit.c
@@ -65,15 +65,6 @@ static ExtensionModule extensionModules[] = {
 	NULL
     },
 #endif
-#ifdef MITMISC
-    {
-	MITMiscExtensionInit,
-	MITMISCNAME,
-	&noMITMiscExtension,
-	NULL,
-	NULL
-    },
-#endif
 #ifdef notyet
     {
 	XTestExtensionInit,
diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h
index 3224850..6c87b15 100644
--- a/hw/xfree86/dixmods/extmod/modinit.h
+++ b/hw/xfree86/dixmods/extmod/modinit.h
@@ -18,12 +18,6 @@ extern void MultibufferExtensionInit(INITARGS);
 #include <X11/extensions/multibufst.h>
 #endif
 
-#ifdef MITMISC
-extern void MITMiscExtensionInit(INITARGS);
-#define _MITMISC_SERVER_
-#include <X11/extensions/mitmiscstr.h>
-#endif
-
 #ifdef XTEST
 extern void XTestExtensionInit(INITARGS);
 #define _XTEST_SERVER_
diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
index c6b657d..d96dde7 100644
--- a/hw/xfree86/loader/dixsym.c
+++ b/hw/xfree86/loader/dixsym.c
@@ -368,9 +368,6 @@ _X_HIDDEN void *dixLookupTab[] = {
 #ifdef MITSHM
     SYMVAR(noMITShmExtension)
 #endif
-#ifdef MITMISC
-    SYMVAR(noMITMiscExtension)
-#endif
 #ifdef MULTIBUFFER
     SYMVAR(noMultibufferExtension)
 #endif
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 3184497..ec8a94e 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -267,9 +267,6 @@
 /* Support os-specific local connections */
 #undef LOCALCONN
 
-/* Support MIT Misc extension */
-#undef MITMISC
-
 /* Support MIT-SHM Extension */
 #undef MITSHM
 
diff --git a/include/globals.h b/include/globals.h
index cfb6c2c..62794f5 100644
--- a/include/globals.h
+++ b/include/globals.h
@@ -82,10 +82,6 @@ extern Bool noScreenSaverExtension;
 extern Bool noMITShmExtension;
 #endif
 
-#ifdef MITMISC
-extern Bool noMITMiscExtension;
-#endif
-
 #ifdef MULTIBUFFER
 extern Bool noMultibufferExtension;
 #endif
diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in
index 4dd2f27..c0997a9 100644
--- a/include/xorg-server.h.in
+++ b/include/xorg-server.h.in
@@ -46,9 +46,6 @@
 /* Support IPv6 for TCP connections */
 #undef IPv6
 
-/* Support MIT Misc extension */
-#undef MITMISC
-
 /* Support MIT-SHM Extension */
 #undef MITSHM
 
diff --git a/mi/miinitext.c b/mi/miinitext.c
index cecac38..71c2348 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -114,9 +114,6 @@ extern Bool noScreenSaverExtension;
 #ifdef MITSHM
 extern Bool noMITShmExtension;
 #endif
-#ifdef MITMISC
-extern Bool noMITMiscExtension;
-#endif
 #ifdef MULTIBUFFER
 extern Bool noMultibufferExtension;
 #endif
@@ -245,9 +242,6 @@ extern void XTestExtensionInit(INITARGS);
 #ifdef BIGREQS
 extern void BigReqExtensionInit(INITARGS);
 #endif
-#ifdef MITMISC
-extern void MITMiscExtensionInit(INITARGS);
-#endif
 #ifdef XIDLE
 extern void XIdleExtensionInit(INITARGS);
 #endif
@@ -375,9 +369,6 @@ static ExtensionToggle ExtensionToggleList[] =
 #ifdef MITSHM
     { SHMNAME, &noMITShmExtension },
 #endif
-#ifdef MITMISC
-    { "MIT-SUNDRY-NONSTANDARD", &noMITMiscExtension },
-#endif
 #ifdef MULTIBUFFER
     { "Multi-Buffering", &noMultibufferExtension },
 #endif
@@ -504,9 +495,6 @@ InitExtensions(argc, argv)
 #ifdef BIGREQS
     if (!noBigReqExtension) BigReqExtensionInit();
 #endif
-#ifdef MITMISC
-    if (!noMITMiscExtension) MITMiscExtensionInit();
-#endif
 #ifdef XIDLE
     if (!noXIdleExtension) XIdleExtensionInit();
 #endif
diff --git a/os/utils.c b/os/utils.c
index a38a34d..51a15c5 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -158,9 +158,6 @@ _X_EXPORT Bool noScreenSaverExtension = FALSE;
 #ifdef MITSHM
 _X_EXPORT Bool noMITShmExtension = FALSE;
 #endif
-#ifdef MITMISC
-_X_EXPORT Bool noMITMiscExtension = FALSE;
-#endif
 #ifdef MULTIBUFFER
 _X_EXPORT Bool noMultibufferExtension = FALSE;
 #endif
commit 95cfb2ce88b0a41207e13c2ae60609dcb9ae2004
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Apr 18 18:28:01 2008 -0400

    Death to Extended Visual Information.
    (cherry picked from commit f6617b4127125516583f321c961d70f762f728be)

diff --git a/Xext/Makefile.am b/Xext/Makefile.am
index af4bfc7..a75f0ce 100644
--- a/Xext/Makefile.am
+++ b/Xext/Makefile.am
@@ -106,12 +106,6 @@ if CUP
 MODULE_SRCS  += $(CUP_SRCS)
 endif
 
-# Extended Visual Information
-EVI_SRCS = EVI.c sampleEVI.c EVIstruct.h
-if EVI
-MODULE_SRCS  += $(EVI_SRCS)
-endif
-
 # Multi-buffering extension
 MULTIBUFFER_SRCS = mbuf.c
 EXTRA_MULTIBUFFER_SRCS = mbufbf.c mbufpx.c
@@ -158,7 +152,6 @@ EXTRA_DIST = \
 	$(XINERAMA_SRCS) \
 	$(XEVIE_SRCS) \
 	$(CUP_SRCS) \
-	$(EVI_SRCS) \
 	$(MULTIBUFFER_SRCS) \
 	$(EXTRA_MULTIBUFFER_SRCS) \
 	$(FONTCACHE_SRCS) \
diff --git a/configure.ac b/configure.ac
index 7b49574..68ffd3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -559,7 +559,6 @@ AC_ARG_ENABLE(xcalibrate,     AS_HELP_STRING([--enable-xcalibrate], [Build XCali
 AC_ARG_ENABLE(tslib,          AS_HELP_STRING([--enable-tslib], [Build kdrive tslib touchscreen support (default: disabled)]), [TSLIB=$enableval], [TSLIB=no])
 AC_ARG_ENABLE(xevie,          AS_HELP_STRING([--disable-xevie], [Build XEvIE extension (default: enabled)]), [XEVIE=$enableval], [XEVIE=yes])
 AC_ARG_ENABLE(cup,            AS_HELP_STRING([--disable-cup], [Build TOG-CUP extension (default: enabled)]), [CUP=$enableval], [CUP=yes])
-AC_ARG_ENABLE(evi,            AS_HELP_STRING([--disable-evi], [Build Extended-Visual-Information extension (default: enabled)]), [EVI=$enableval], [EVI=yes])
 AC_ARG_ENABLE(multibuffer,    AS_HELP_STRING([--enable-multibuffer], [Build Multibuffer extension (default: disabled)]), [MULTIBUFFER=$enableval], [MULTIBUFFER=no])
 AC_ARG_ENABLE(fontcache,      AS_HELP_STRING([--enable-fontcache], [Build FontCache extension (default: disabled)]), [FONTCACHE=$enableval], [FONTCACHE=no])
 AC_ARG_ENABLE(dbe,            AS_HELP_STRING([--disable-dbe], [Build DBE extension (default: enabled)]), [DBE=$enableval], [DBE=yes])
@@ -966,12 +965,6 @@ if test "x$CUP" = xyes; then
 	# Requires xextproto which is always required
 fi
 
-AM_CONDITIONAL(EVI, [test "x$EVI" = xyes])
-if test "x$EVI" = xyes; then
-	AC_DEFINE(EVI, 1, [Build Extended-Visual-Information extension])
-	# Requires xextproto which is always required
-fi
-
 AM_CONDITIONAL(MULTIBUFFER, [test "x$MULTIBUFFER" = xyes])
 if test "x$MULTIBUFFER" = xyes; then
 	AC_DEFINE(MULTIBUFFER, 1, [Build Multibuffer extension])
diff --git a/hw/xfree86/dixmods/extmod/modinit.c b/hw/xfree86/dixmods/extmod/modinit.c
index 8c8a4ce..3b6b36a 100644
--- a/hw/xfree86/dixmods/extmod/modinit.c
+++ b/hw/xfree86/dixmods/extmod/modinit.c
@@ -173,15 +173,6 @@ static ExtensionModule extensionModules[] = {
 	NULL
     },
 #endif
-#ifdef EVI
-    {
-	EVIExtensionInit,
-	EVINAME,
-	&noEVIExtension,
-	NULL,
-	NULL
-    },
-#endif
 #ifdef XV
     {
 	XvExtensionInit,
diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h
index 857ad39..3224850 100644
--- a/hw/xfree86/dixmods/extmod/modinit.h
+++ b/hw/xfree86/dixmods/extmod/modinit.h
@@ -95,12 +95,6 @@ extern void XcupExtensionInit(INITARGS);
 #include <X11/extensions/Xcupstr.h>
 #endif
 
-#ifdef EVI
-extern void EVIExtensionInit(INITARGS);
-#define _XEVI_SERVER_
-#include <X11/extensions/XEVIstr.h>
-#endif
-
 #ifdef XV
 extern void XvExtensionInit(INITARGS);
 extern void XvMCExtensionInit(INITARGS);
diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
index 38e3cdb..c6b657d 100644
--- a/hw/xfree86/loader/dixsym.c
+++ b/hw/xfree86/loader/dixsym.c
@@ -356,9 +356,6 @@ _X_HIDDEN void *dixLookupTab[] = {
 #ifdef DPMSExtension
     SYMVAR(noDPMSExtension)
 #endif
-#ifdef EVI
-    SYMVAR(noEVIExtension)
-#endif
 #ifdef FONTCACHE
     SYMVAR(noFontCacheExtension)
 #endif
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index e71e9e6..3184497 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -431,9 +431,6 @@
 /* Build TOG-CUP extension */
 #undef TOGCUP
 
-/* Build Extended-Visual-Information extension */
-#undef EVI
-
 /* Build Multibuffer extension */
 #undef MULTIBUFFER
 
diff --git a/include/globals.h b/include/globals.h
index 19c2190..cfb6c2c 100644
--- a/include/globals.h
+++ b/include/globals.h
@@ -66,10 +66,6 @@ extern Bool noDbeExtension;
 extern Bool noDPMSExtension;
 #endif
 
-#ifdef EVI
-extern Bool noEVIExtension;
-#endif
-
 #ifdef FONTCACHE
 extern Bool noFontCacheExtension;
 #endif
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 5e0c229..cecac38 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -102,9 +102,6 @@ extern Bool noDbeExtension;
 #ifdef DPMSExtension
 extern Bool noDPMSExtension;
 #endif
-#ifdef EVI
-extern Bool noEVIExtension;
-#endif
 #ifdef FONTCACHE
 extern Bool noFontCacheExtension;
 #endif
@@ -227,9 +224,6 @@ typedef void (*InitExtension)(INITARGS);
 #endif
 
 /* FIXME: this whole block of externs should be from the appropriate headers */
-#ifdef EVI
-extern void EVIExtensionInit(INITARGS);
-#endif
 #ifdef MITSHM
 extern void ShmExtensionInit(INITARGS);
 #endif
@@ -369,9 +363,6 @@ static ExtensionToggle ExtensionToggleList[] =
 #ifdef DPMSExtension
     { "DPMS", &noDPMSExtension },
 #endif
-#ifdef EVI
-    { "Extended-Visual-Information", &noEVIExtension },
-#endif
 #ifdef FONTCACHE
     { "FontCache", &noFontCacheExtension },
 #endif
@@ -501,9 +492,6 @@ InitExtensions(argc, argv)
 #ifdef MITSHM
     if (!noMITShmExtension) ShmExtensionInit();
 #endif
-#ifdef EVI
-    if (!noEVIExtension) EVIExtensionInit();
-#endif
 #ifdef MULTIBUFFER
     if (!noMultibufferExtension) MultibufferExtensionInit();
 #endif
diff --git a/os/utils.c b/os/utils.c
index 9da8fcd..a38a34d 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -145,9 +145,6 @@ _X_EXPORT Bool noDbeExtension = FALSE;
 #ifdef DPMSExtension
 _X_EXPORT Bool noDPMSExtension = FALSE;
 #endif
-#ifdef EVI
-_X_EXPORT Bool noEVIExtension = FALSE;
-#endif
 #ifdef FONTCACHE
 _X_EXPORT Bool noFontCacheExtension = FALSE;
 #endif


More information about the xorg-commit mailing list