[56677] trunk/dports/x11

jeremyhu at macports.org jeremyhu at macports.org
Mon Aug 31 17:48:04 PDT 2009


Revision: 56677
          http://trac.macports.org/changeset/56677
Author:   jeremyhu at macports.org
Date:     2009-08-31 17:48:00 -0700 (Mon, 31 Aug 2009)
Log Message:
-----------
xorg-*: Updated many proto/libs to upstream releases

Most of these are repackaging and cleanup.  Internal headers have been renamed for better consistency and to avoid 
collission on case-insensitive file systems.  Additionally, Xlib headers have been moved from the proto package to the 
corresponding lib package (which means we can move the protos back to depends_build rather than depends_lib)

Fixes #20913

Modified Paths:
--------------
    trunk/dports/x11/xorg-applewmproto/Portfile
    trunk/dports/x11/xorg-bigreqsproto/Portfile
    trunk/dports/x11/xorg-damageproto/Portfile
    trunk/dports/x11/xorg-evieproto/Portfile
    trunk/dports/x11/xorg-fontsproto/Portfile
    trunk/dports/x11/xorg-libAppleWM/Portfile
    trunk/dports/x11/xorg-libXau/Portfile
    trunk/dports/x11/xorg-libXcursor/Portfile
    trunk/dports/x11/xorg-libXinerama/Portfile
    trunk/dports/x11/xorg-libfontenc/Portfile
    trunk/dports/x11/xorg-libice/Portfile
    trunk/dports/x11/xorg-server/Portfile
    trunk/dports/x11/xorg-server-devel/Portfile
    trunk/dports/x11/xorg-videoproto/Portfile
    trunk/dports/x11/xorg-xcmiscproto/Portfile
    trunk/dports/x11/xorg-xf86bigfontproto/Portfile
    trunk/dports/x11/xorg-xf86driproto/Portfile
    trunk/dports/x11/xorg-xineramaproto/Portfile

Added Paths:
-----------
    trunk/dports/x11/xorg-libAppleWM/files/
    trunk/dports/x11/xorg-libAppleWM/files/no-AM_CFLAGS.patch

Removed Paths:
-------------
    trunk/dports/x11/xorg-server/files/nuke-old-extensions.patch
    trunk/dports/x11/xorg-server/files/tiger.patch
    trunk/dports/x11/xorg-server/files/xextproto.patch
    trunk/dports/x11/xorg-server/files/xorg-tiger-ppc.patch
    trunk/dports/x11/xorg-server-devel/files/nuke-old-extensions.patch
    trunk/dports/x11/xorg-server-devel/files/tiger.patch
    trunk/dports/x11/xorg-server-devel/files/xextproto.patch

Modified: trunk/dports/x11/xorg-applewmproto/Portfile
===================================================================
--- trunk/dports/x11/xorg-applewmproto/Portfile	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-applewmproto/Portfile	2009-09-01 00:48:00 UTC (rev 56677)
@@ -2,7 +2,7 @@
 PortSystem 1.0
 
 name		xorg-applewmproto
-version		1.3.0
+version		1.4.1
 categories	x11 devel
 maintainers	jeremyhu openmaintainer
 description	X.org applewmproto
@@ -12,9 +12,9 @@
 master_sites 	${homepage}/pub/individual/proto/
 
 distname	applewmproto-${version}
-checksums           md5     f6b7b47a19536b9e803229ac39550245 \
-                    sha1    81e887ce7bc1969544868d7a79270fd21c9e9d4e \
-                    rmd160  ce9bcf0055c52134c3003cf8becd30e5f331ba88
+checksums           md5     76ca1c6e1d8904d2d885f81f7332eba6 \
+                    sha1    85a4a028482abf5186a74da2daf39f599b8c1305 \
+                    rmd160  b3819c9c65e1f0e6328363c3eaac8333ea475e72
 use_bzip2	yes
 universal_variant no
 

Modified: trunk/dports/x11/xorg-bigreqsproto/Portfile
===================================================================
--- trunk/dports/x11/xorg-bigreqsproto/Portfile	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-bigreqsproto/Portfile	2009-09-01 00:48:00 UTC (rev 56677)
@@ -2,7 +2,7 @@
 PortSystem 1.0
 
 name		xorg-bigreqsproto
-version		1.0.2
+version		1.1.0
 categories	x11 devel
 maintainers	jeremyhu openmaintainer
 description	X.org bigreqsproto
@@ -12,7 +12,9 @@
 master_sites 	${homepage}/pub/individual/proto/
 
 distname	bigreqsproto-${version}
-checksums	sha1 8f6c112f607a137dce5d8958753c770ac3f06c14
+checksums           md5     d30c5dbf19ca6dffcd9788227ecff8c5 \
+                    sha1    32ae0505ec963cc5c0e3ee9258b126e6865d1b1b \
+                    rmd160  445f8bde2c03561255c505860fdba9fedb029edc
 use_bzip2	yes
 universal_variant no
 

Modified: trunk/dports/x11/xorg-damageproto/Portfile
===================================================================
--- trunk/dports/x11/xorg-damageproto/Portfile	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-damageproto/Portfile	2009-09-01 00:48:00 UTC (rev 56677)
@@ -2,7 +2,7 @@
 PortSystem 1.0
 
 name		xorg-damageproto
-version		1.1.0
+version		1.2.0
 categories	x11 devel
 maintainers	jeremyhu openmaintainer
 description	X.org damageproto
@@ -12,7 +12,9 @@
 master_sites 	${homepage}/pub/individual/proto/
 
 distname	damageproto-${version}
-checksums	sha1 5c8b96af09ff053912650343bf150989ec6747e8
+checksums           md5     434b931b02bd83ed9fc44951df81cdac \
+                    sha1    ffe177a6ae2cf023d41e015aa6ece2b191cb8a8a \
+                    rmd160  d8010f3a6652e3e0d560af5b6911d85e88cac6fa
 use_bzip2	yes
 universal_variant no
 

Modified: trunk/dports/x11/xorg-evieproto/Portfile
===================================================================
--- trunk/dports/x11/xorg-evieproto/Portfile	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-evieproto/Portfile	2009-09-01 00:48:00 UTC (rev 56677)
@@ -2,7 +2,7 @@
 PortSystem 1.0
 
 name		xorg-evieproto
-version		1.0.2
+version		1.1.0
 categories	x11 devel
 maintainers	jeremyhu openmaintainer
 description	X.org evieproto
@@ -12,7 +12,9 @@
 master_sites 	${homepage}/pub/individual/proto/
 
 distname	evieext-${version}
-checksums	sha1 1ab4048ffbfb6b69e88d2f0f2cab7ca60e50cc99
+checksums           md5     5c74f61d6f77b2e6a083b2b31000be42 \
+                    sha1    d0b57a8fbbf0845588a690542a6c29d351c2b4e5 \
+                    rmd160  155f9a4693276623deb0ba7eacd512ebaccc0e20
 use_bzip2	yes
 universal_variant no
 

Modified: trunk/dports/x11/xorg-fontsproto/Portfile
===================================================================
--- trunk/dports/x11/xorg-fontsproto/Portfile	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-fontsproto/Portfile	2009-09-01 00:48:00 UTC (rev 56677)
@@ -2,7 +2,7 @@
 PortSystem 1.0
 
 name		xorg-fontsproto
-version		2.0.2
+version		2.1.0
 categories	x11 devel
 maintainers	jeremyhu openmaintainer
 description	X.org fontsproto
@@ -12,7 +12,9 @@
 master_sites	 ${homepage}/pub/individual/proto/
 
 distname	fontsproto-${version}
-checksums	sha1 1244f63bd90668c7ddc88febbf4a220fd83ea492
+checksums           md5     f3a857deadca3144fba041af1dbf7603 \
+                    sha1    395b300fd5120a7ff90cb8fea4e2356b9632dc3e \
+                    rmd160  1e9981b3a801794ccdf22d26a724a25135c1459b
 use_bzip2	yes
 universal_variant no
 

Modified: trunk/dports/x11/xorg-libAppleWM/Portfile
===================================================================
--- trunk/dports/x11/xorg-libAppleWM/Portfile	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-libAppleWM/Portfile	2009-09-01 00:48:00 UTC (rev 56677)
@@ -3,7 +3,7 @@
 PortSystem 1.0
 
 name            xorg-libAppleWM
-version         1.3.0
+version         1.4.0
 categories      x11 devel
 maintainers     jeremyhu openmaintainer
 description     X.org libAppleWM
@@ -13,9 +13,9 @@
 master_sites     ${homepage}/pub/individual/lib/
 
 distname    libAppleWM-${version}
-checksums           md5     e79128571bb64e4c1286b8a1a8c4b8ab \
-                    sha1    8fb77026babb9d96eba57e826bb92e8ff7fd767f \
-                    rmd160  176065b0bbc202b7d56ae6effa026bc417098845
+checksums           md5     75e27245bc15aed845fe0505f4f21ca6 \
+                    sha1    370e9f59e73cf22c3533eb833a4e8493713c18e9 \
+                    rmd160  07f67a7d651d6a1fd76c39e59c0de89985a08940
 
 use_bzip2   yes
 use_parallel_build      yes
@@ -24,15 +24,18 @@
                 port:libtool \
                 port:autoconf \
                 port:automake \
-		port:xorg-util-macros
+		port:xorg-util-macros \
+                port:xorg-applewmproto \
+                port:xorg-xextproto \
+                port:xorg-xproto
 
-depends_lib     port:xorg-libX11 \
-                port:xorg-libXext \
-                port:xorg-applewmproto
+depends_lib     port:xorg-libXext
  
 use_autoreconf yes
 autoreconf.args -fvi
 
+patchfiles no-AM_CFLAGS.patch
+
 livecheck.check regex
 livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
 livecheck.regex libAppleWM-(\\d+(?:\\.\\d+)*)

Added: trunk/dports/x11/xorg-libAppleWM/files/no-AM_CFLAGS.patch
===================================================================
--- trunk/dports/x11/xorg-libAppleWM/files/no-AM_CFLAGS.patch	                        (rev 0)
+++ trunk/dports/x11/xorg-libAppleWM/files/no-AM_CFLAGS.patch	2009-09-01 00:48:00 UTC (rev 56677)
@@ -0,0 +1,19 @@
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 382ec59..72408b8 100644
+--- src/Makefile.am
++++ src/Makefile.am
+@@ -3,11 +3,10 @@ lib_LTLIBRARIES = libAppleWM.la
+ libAppleWM_la_SOURCES = \
+          applewm.c
+ 
+-AM_CFLAGS = -I$(top_srcdir)/include \
+-            -I$(top_srcdir)/include/X11 \
+-            -I$(top_srcdir)/include/X11/extensions
++libAppleWM_la_CFLAGS = @APPLEWM_CFLAGS@ @MALLOC_ZERO_CFLAGS@ \
++	-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks \
++	-I$(top_srcdir)/include -I$(top_srcdir)/include/X11 -I$(top_srcdir)/include/X11/extensions
+ 
+-libAppleWM_la_CFLAGS = @APPLEWM_CFLAGS@ @MALLOC_ZERO_CFLAGS@ -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks
+ libAppleWM_la_LIBADD = @APPLEWM_LIBS@
+ 
+ libAppleWM_la_LDFLAGS = -version-info 7:0:0 -no-undefined -framework ApplicationServices

Modified: trunk/dports/x11/xorg-libXau/Portfile
===================================================================
--- trunk/dports/x11/xorg-libXau/Portfile	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-libXau/Portfile	2009-09-01 00:48:00 UTC (rev 56677)
@@ -3,8 +3,7 @@
 PortSystem 1.0
 
 name		xorg-libXau
-version		1.0.4
-revision	1
+version		1.0.5
 categories	x11 devel
 maintainers	jeremyhu openmaintainer
 description	X.org libXau
@@ -14,16 +13,15 @@
 master_sites	 ${homepage}/pub/individual/lib/
 
 distname	libXau-${version}
-checksums           md5     0f2b88d857e0a3f5898e4759c541af46 \
-                    sha1    d73880b97fc7ddb8d8f59e1cd968337427e20ec2 \
-                    rmd160  9ca0318c62b6bcf97b8460fd89b0788b07f459ca
+checksums           md5     993b3185c629e4b89401fca072dcb663 \
+                    sha1    b1c68843edf7e80ce952f7ee0541448f41bac202 \
+                    rmd160  2ab3b0b35c27a8012b9f6905487458cfe02e9b94
 use_bzip2	yes
 use_parallel_build      yes
 
-depends_build   port:pkgconfig
+depends_build   port:pkgconfig \
+                port:xorg-xproto
 
-depends_lib     port:xorg-xproto
-
 livecheck.check regex
 livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
 livecheck.regex libXau-(\\d+(?:\\.\\d+)*)

Modified: trunk/dports/x11/xorg-libXcursor/Portfile
===================================================================
--- trunk/dports/x11/xorg-libXcursor/Portfile	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-libXcursor/Portfile	2009-09-01 00:48:00 UTC (rev 56677)
@@ -3,8 +3,7 @@
 PortSystem 1.0
 
 name            xorg-libXcursor
-version         1.1.9
-revision		1
+version         1.1.10
 categories      x11 devel
 maintainers     jeremyhu openmaintainer
 description     X.org libXcursor
@@ -14,15 +13,17 @@
 master_sites     ${homepage}/pub/individual/lib/
 
 distname    libXcursor-${version}
-checksums           md5     99b7554037a92b260891091e81815a0a \
-                    sha1    61c5e8f34faee44ee50a3206f385aec720eb968c \
-                    rmd160  05101fb2a6c080f0b3cc24e46d1a07a2a358708f
+checksums           md5     7dcdad1c10daea872cb3355af414b2ca \
+                    sha1    096d0e538d37fd865705e5f45b0e96c7294c1f2f \
+                    rmd160  4d142c811d35175280f566abc918f289752877c7
 
 use_bzip2   yes
 use_parallel_build      yes
 
 depends_build \
-	port:pkgconfig
+	port:pkgconfig \
+	port:xorg-fixesproto \
+	port:xorg-renderproto
 
 depends_lib \
 	port:xorg-libXfixes \

Modified: trunk/dports/x11/xorg-libXinerama/Portfile
===================================================================
--- trunk/dports/x11/xorg-libXinerama/Portfile	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-libXinerama/Portfile	2009-09-01 00:48:00 UTC (rev 56677)
@@ -3,8 +3,7 @@
 PortSystem 1.0
 
 name		xorg-libXinerama
-version		1.0.3
-revision	1
+version		1.0.99.1
 categories	x11 devel
 maintainers	jeremyhu openmaintainer
 description	X.org libXinerama
@@ -14,17 +13,17 @@
 master_sites	 ${homepage}/pub/individual/lib/
 
 distname	libXinerama-${version}
-checksums           md5     cd9f7c46439ac40e0517a302d2434d2c \
-                    sha1    64e982c7503d7c1c11f5f71971caf1f2da61e736 \
-                    rmd160  99115fedb0930a6acb5450bfabfe7416159ee45b
+checksums           md5     473725c59bbb2f1dc1afb73ca8a3b5cb \
+                    sha1    e937667808307e2afcbb72c2f1154b0ecaac3344 \
+                    rmd160  84bc90500539c4d7edd3728306e8a631084d98f2
 use_bzip2	yes
 use_parallel_build      yes
 
-depends_build   port:pkgconfig
+depends_build   port:pkgconfig \
+                port:xorg-xineramaproto \
+                port:xorg-xextproto
 
-depends_lib     port:xorg-libX11 \
-                port:xorg-libXext \
-                port:xorg-xineramaproto
+depends_lib     port:xorg-libXext
 
 livecheck.check regex
 livecheck.url   [lindex ${master_sites} 0]?C=M&O=D

Modified: trunk/dports/x11/xorg-libfontenc/Portfile
===================================================================
--- trunk/dports/x11/xorg-libfontenc/Portfile	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-libfontenc/Portfile	2009-09-01 00:48:00 UTC (rev 56677)
@@ -3,8 +3,7 @@
 PortSystem 1.0
 
 name		xorg-libfontenc
-version		1.0.4
-revision	1
+version		1.0.5
 categories	x11 devel
 maintainers	jeremyhu openmaintainer
 description	X.org libfontenc
@@ -14,14 +13,16 @@
 master_sites	 ${homepage}/pub/individual/lib/
 
 distname	libfontenc-${version}
-checksums	sha1 69876a14b18c3c7c829cd79880c69db7b0732d9b
+checksums           md5     4f0d8191819be9f2bdf9dad49a65e43b \
+                    sha1    e71370c349e93ba70f91ad1148ca9e5cabfcca4f \
+                    rmd160  4a890690422cc1051cef6f167b0474ff4dd77ef1
 use_bzip2	yes
 
 depends_build \
-	port:pkgconfig
+	port:pkgconfig \
+	port:xorg-xproto
 
 depends_lib \
-	port:xorg-xproto \
 	port:zlib
 
 livecheck.check regex

Modified: trunk/dports/x11/xorg-libice/Portfile
===================================================================
--- trunk/dports/x11/xorg-libice/Portfile	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-libice/Portfile	2009-09-01 00:48:00 UTC (rev 56677)
@@ -3,10 +3,9 @@
 PortSystem        1.0
 
 name              xorg-libice
-version           1.0.5
-revision          1
+version           1.0.6
 categories        x11 devel
-maintainers       gmail.com:mvfranz
+maintainers       jeremyhu
 platforms         darwin macosx
 
 description       X.org libice
@@ -18,15 +17,14 @@
 use_bzip2         yes
 use_parallel_build      yes
 
-checksums           md5     ca1f9563a7cc5e8017de7221bdb2ade3 \
-                    sha1    be6fb2a00f34689c16dad63e1ad36896f5efd7d2 \
-                    rmd160  4c08c4ef542eedd315a9b097bcec6779be01b2b7
+checksums           md5     2d39bc924af24325dae589e9a849180c \
+                    sha1    ac1f702ea580bd496610266b13434858b62df9e1 \
+                    rmd160  6b9e6e649ac227210f3e3afdfa8376d659750321
 
 depends_build     port:pkgconfig \
-                  port:xorg-xtrans
+                  port:xorg-xtrans \
+                  port:xorg-xproto
 
-depends_lib       port:xorg-xproto
-
 livecheck.check regex
 livecheck.url   [lindex ${master_sites} 0]?C=M&O=D
 livecheck.regex libICE-(\\d+(?:\\.\\d+)*)

Modified: trunk/dports/x11/xorg-server/Portfile
===================================================================
--- trunk/dports/x11/xorg-server/Portfile	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-server/Portfile	2009-09-01 00:48:00 UTC (rev 56677)
@@ -3,7 +3,7 @@
 PortSystem 1.0
 
 name		xorg-server
-version		1.5.3-apple14
+version		1.5.3-apple15
 categories	x11 devel
 maintainers	jeremyhu openmaintainer
 description	The X.org / Xquartz X server.
@@ -15,9 +15,9 @@
 dist_subdir     ${name}
 distname        ${name}-${version}
 
-checksums           md5     4bba6a1d31d8cfaa7637f61134309b11 \
-                    sha1    742f3e8462af98b4f784a29d5b2a61b250a576c0 \
-                    rmd160  261c491b155fb74c48c93d3f02110d8203dd6024
+checksums           md5     d05043d0b13a339d595bc17c531f2e7c \
+                    sha1    32ab24421b31f0413dbe616f3337b5ed79b68503 \
+                    rmd160  3648efacc900cee4a4e69d2bf8bac20c03f6351b
 
 use_bzip2	yes
 use_parallel_build yes
@@ -63,12 +63,6 @@
 	port:xorg-libAppleWM \
 	port:xorg-libXfixes
 
-patchfiles nuke-old-extensions.patch xextproto.patch tiger.patch xorg-tiger-ppc.patch
-patch.args -p1
-
-use_autoreconf yes
-autoreconf.args -fvi
-
 configure.args	--with-apple-applications-dir=${applications_dir} --with-fontdir=${prefix}/share/fonts --with-apple-application-id=org.macports.X11
 
 # GL/internal/dri_interface.h is missing in prefix (provided by libdrm for the xorg DDX... not helpful for us)
@@ -83,10 +77,4 @@
 		# Xplugin.h is missing on Tiger
 		configure.cppflags-append -I${filespath}/include
 	}
-
-	if {${os.major} < 9} {
-		post-install {
-			ui_msg "This server has not been thoroughly tested on Tiger.  Your feedback would be welcomed on x11-users at macosforge.org."
-		}
-	}
 }

Deleted: trunk/dports/x11/xorg-server/files/nuke-old-extensions.patch
===================================================================
--- trunk/dports/x11/xorg-server/files/nuke-old-extensions.patch	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-server/files/nuke-old-extensions.patch	2009-09-01 00:48:00 UTC (rev 56677)
@@ -1,3759 +0,0 @@
-diff --git a/Xext/Makefile.am b/Xext/Makefile.am
-index af4bfc7..9ed51da 100644
---- a/Xext/Makefile.am
-+++ b/Xext/Makefile.am
-@@ -20,18 +20,17 @@ endif
- 
- # Sources always included in libXextbuiltin.la & libXext.la
- BUILTIN_SRCS =			\
-+	bigreq.c		\
- 	shape.c			\
- 	sleepuntil.c		\
- 	sleepuntil.h		\
-+	sync.c			\
-+	xcmisc.c		\
- 	xtest.c
- 
- # Sources always included in libXextmodule.la & libXext.la
- MODULE_SRCS =			\
--	bigreq.c		\
--	mitmisc.c		\
--	shape.c			\
--	sync.c			\
--	xcmisc.c
-+	shape.c
- 
- # Optional sources included if extension enabled by configure.ac rules
- 
-@@ -99,19 +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
--
--# 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
-@@ -119,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
-@@ -157,8 +137,6 @@ EXTRA_DIST = \
- 	$(XCALIBRATE_SRCS) \
- 	$(XINERAMA_SRCS) \
- 	$(XEVIE_SRCS) \
--	$(CUP_SRCS) \
--	$(EVI_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/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/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/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/configure.ac b/configure.ac
-index 7b49574..98e26b8 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])
-@@ -559,9 +558,7 @@ 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])
- 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])
-@@ -683,7 +680,6 @@ case $host_os in
- 			DGA=no
- 			DPMSExtension=no
- 			XF86BIGFONT=no
--			XF86MISC=no
- 			XF86VIDMODE=no
- 		fi
- 		;;
-@@ -966,24 +962,12 @@ 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])
- 	# 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])
-@@ -1123,7 +1107,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])
-@@ -1487,15 +1470,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
-@@ -1585,7 +1559,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
-@@ -1651,10 +1624,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
-@@ -1947,7 +1916,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 343fdab..5b7b605 100644
---- a/hw/dmx/dmx-config.h
-+++ b/hw/dmx/dmx-config.h
-@@ -73,23 +73,16 @@
- #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 XF86MISC
- #undef XFreeXDGA
- #undef XF86DRI
--#undef TOGCUP
--#undef MITMISC
- #undef SCREENSAVER
- #undef RANDR
- #undef XFIXES
- #undef DAMAGE
- #undef COMPOSITE
--#undef FONTCACHE
- 
- #endif /* DMX_CONFIG_H */
-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 8c8a4ce..8096fb0 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,
-@@ -83,24 +74,6 @@ static ExtensionModule extensionModules[] = {
- 	NULL
-     },
- #endif
--#ifdef BIGREQS
--     {
--	BigReqExtensionInit,
--	XBigReqExtensionName,
--	&noBigReqExtension,
--	NULL,
--	NULL
--     },
--#endif
--#ifdef XSYNC
--    {
--	SyncExtensionInit,
--	SYNC_NAME,
--	&noSyncExtension,
--	NULL,
--	NULL
--    },
--#endif
- #ifdef SCREENSAVER
-     {
- 	ScreenSaverExtensionInit,
-@@ -110,15 +83,6 @@ static ExtensionModule extensionModules[] = {
- 	NULL
-     },
- #endif
--#ifdef XCMISC
--    {
--	XCMiscExtensionInit,
--	XCMiscExtensionName,
--	&noXCMiscExtension,
--	NULL,
--	NULL
--    },
--#endif
- #ifdef XF86VIDMODE
-     {
- 	XFree86VidModeExtensionInit,
-@@ -128,15 +92,6 @@ static ExtensionModule extensionModules[] = {
- 	NULL
-     },
- #endif
--#ifdef XF86MISC
--    {
--	XFree86MiscExtensionInit,
--	XF86MISCNAME,
--	&noXFree86MiscExtension,
--	NULL,
--	NULL
--    },
--#endif
- #ifdef XFreeXDGA
-     {
- 	XFree86DGAExtensionInit,
-@@ -155,33 +110,6 @@ static ExtensionModule extensionModules[] = {
- 	NULL
-     },
- #endif
--#ifdef FONTCACHE
--    {
--	FontCacheExtensionInit,
--	FONTCACHENAME,
--	&noFontCacheExtension,
--	NULL,
--	NULL
--    },
--#endif
--#ifdef TOGCUP
--    {
--	XcupExtensionInit,
--	XCUPNAME,
--	&noXcupExtension,
--	NULL,
--	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..7bcefc9 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_
-@@ -35,41 +29,17 @@ 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
--#include <X11/extensions/sync.h>
--#include <X11/extensions/syncstr.h>
--#endif
--
- #ifdef SCREENSAVER
- 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_
- #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);
-@@ -82,25 +52,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 TOGCUP
--extern void XcupExtensionInit(INITARGS);
--#define _XCUP_SERVER_
--#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);
-@@ -130,6 +81,10 @@ extern void SELinuxExtensionInit(INITARGS);
- #include "xselinux.h"
- #endif
- 
-+#ifdef XEVIE
-+extern void XevieExtensionInit(INITARGS);
-+#endif
-+
- #if 1
- extern void SecurityExtensionInit(INITARGS);
- #endif
-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 38e3cdb..5566a20 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
-@@ -356,12 +351,6 @@ _X_HIDDEN void *dixLookupTab[] = {
- #ifdef DPMSExtension
-     SYMVAR(noDPMSExtension)
- #endif
--#ifdef EVI
--    SYMVAR(noEVIExtension)
--#endif
--#ifdef FONTCACHE
--    SYMVAR(noFontCacheExtension)
--#endif
- #ifdef GLXEXT
-     SYMVAR(noGlxExtension)
- #endif
-@@ -371,9 +360,6 @@ _X_HIDDEN void *dixLookupTab[] = {
- #ifdef MITSHM
-     SYMVAR(noMITShmExtension)
- #endif
--#ifdef MITMISC
--    SYMVAR(noMITMiscExtension)
--#endif
- #ifdef MULTIBUFFER
-     SYMVAR(noMultibufferExtension)
- #endif
-@@ -389,18 +375,9 @@ _X_HIDDEN void *dixLookupTab[] = {
- #ifdef XCSECURITY
-     SYMVAR(noSecurityExtension)
- #endif
--#ifdef XSYNC
--    SYMVAR(noSyncExtension)
--#endif
--#ifdef TOGCUP
--    SYMVAR(noXcupExtension)
--#endif
- #ifdef RES
-     SYMVAR(noResExtension)
- #endif
--#ifdef XCMISC
--    SYMVAR(noXCMiscExtension)
--#endif
- #ifdef XEVIE
-     SYMVAR(noXevieExtension)
- #endif
-@@ -413,9 +390,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 e71e9e6..d4e3050 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
- 
-@@ -371,9 +368,6 @@
- /* Build XFree86 BigFont extension */
- #undef XF86BIGFONT
- 
--/* Support XFree86 miscellaneous extensions */
--#undef XF86MISC
--
- /* Support XFree86 Video Mode extension */
- #undef XF86VIDMODE
- 
-@@ -428,12 +422,6 @@
- /* Support Xv extension */
- #undef XV
- 
--/* 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..7a4b708 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
-@@ -66,14 +62,6 @@ extern Bool noDbeExtension;
- extern Bool noDPMSExtension;
- #endif
- 
--#ifdef EVI
--extern Bool noEVIExtension;
--#endif
--
--#ifdef FONTCACHE
--extern Bool noFontCacheExtension;
--#endif
--
- #ifdef GLXEXT
- extern Bool noGlxExtension;
- #endif
-@@ -86,10 +74,6 @@ extern Bool noScreenSaverExtension;
- extern Bool noMITShmExtension;
- #endif
- 
--#ifdef MITMISC
--extern Bool noMITMiscExtension;
--#endif
--
- #ifdef MULTIBUFFER
- extern Bool noMultibufferExtension;
- #endif
-@@ -110,22 +94,10 @@ extern Bool noShapeExtension;
- extern Bool noSecurityExtension;
- #endif
- 
--#ifdef XSYNC
--extern Bool noSyncExtension;
--#endif
--
--#ifdef TOGCUP
--extern Bool noXcupExtension;
--#endif
--
- #ifdef RES
- extern Bool noResExtension;
- #endif
- 
--#ifdef XCMISC
--extern Bool noXCMiscExtension;
--#endif
--
- #ifdef XEVIE
- extern Bool noXevieExtension;
- #endif
-@@ -142,10 +114,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 4dd2f27..7aada2e 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
- 
-@@ -112,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 5e0c229..8e60d6b 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
-@@ -90,9 +88,6 @@ SOFTWARE.
- 
- extern Bool noTestExtensions;
- 
--#ifdef BIGREQS
--extern Bool noBigReqExtension;
--#endif
- #ifdef COMPOSITE
- extern Bool noCompositeExtension;
- #endif
-@@ -102,12 +97,6 @@ extern Bool noDbeExtension;
- #ifdef DPMSExtension
- extern Bool noDPMSExtension;
- #endif
--#ifdef EVI
--extern Bool noEVIExtension;
--#endif
--#ifdef FONTCACHE
--extern Bool noFontCacheExtension;
--#endif
- #ifdef GLXEXT
- extern Bool noGlxExtension;
- #endif
-@@ -117,9 +106,6 @@ extern Bool noScreenSaverExtension;
- #ifdef MITSHM
- extern Bool noMITShmExtension;
- #endif
--#ifdef MITMISC
--extern Bool noMITMiscExtension;
--#endif
- #ifdef MULTIBUFFER
- extern Bool noMultibufferExtension;
- #endif
-@@ -135,18 +121,9 @@ extern Bool noShapeExtension;
- #ifdef XCSECURITY
- extern Bool noSecurityExtension;
- #endif
--#ifdef XSYNC
--extern Bool noSyncExtension;
--#endif
--#ifdef TOGCUP
--extern Bool noXcupExtension;
--#endif
- #ifdef RES
- extern Bool noResExtension;
- #endif
--#ifdef XCMISC
--extern Bool noXCMiscExtension;
--#endif
- #ifdef XEVIE
- extern Bool noXevieExtension;
- #endif
-@@ -159,9 +136,6 @@ extern Bool noXFree86DGAExtension;
- #ifdef XF86DRI
- extern Bool noXFree86DRIExtension;
- #endif
--#ifdef XF86MISC
--extern Bool noXFree86MiscExtension;
--#endif
- #ifdef XF86VIDMODE
- extern Bool noXFree86VidModeExtension;
- #endif
-@@ -227,9 +201,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
-@@ -248,12 +219,7 @@ extern void XInputExtensionInit(INITARGS);
- #ifdef XTEST
- extern void XTestExtensionInit(INITARGS);
- #endif
--#ifdef BIGREQS
- extern void BigReqExtensionInit(INITARGS);
--#endif
--#ifdef MITMISC
--extern void MITMiscExtensionInit(INITARGS);
--#endif
- #ifdef XIDLE
- extern void XIdleExtensionInit(INITARGS);
- #endif
-@@ -267,15 +233,11 @@ 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
--#ifdef XCMISC
- extern void XCMiscExtensionInit(INITARGS);
--#endif
- #ifdef XRECORD
- extern void RecordExtensionInit(INITARGS);
- #endif
-@@ -294,9 +256,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
-@@ -309,15 +268,9 @@ 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
--#ifdef FONTCACHE
--extern void FontCacheExtensionInit(INITARGS);
--#endif
- #ifdef RENDER
- extern void RenderExtensionInit(INITARGS);
- #endif
-@@ -354,9 +307,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
-@@ -369,12 +319,6 @@ static ExtensionToggle ExtensionToggleList[] =
- #ifdef DPMSExtension
-     { "DPMS", &noDPMSExtension },
- #endif
--#ifdef EVI
--    { "Extended-Visual-Information", &noEVIExtension },
--#endif
--#ifdef FONTCACHE
--    { "FontCache", &noFontCacheExtension },
--#endif
- #ifdef GLXEXT
-     { "GLX", &noGlxExtension },
- #endif
-@@ -384,9 +328,6 @@ static ExtensionToggle ExtensionToggleList[] =
- #ifdef MITSHM
-     { SHMNAME, &noMITShmExtension },
- #endif
--#ifdef MITMISC
--    { "MIT-SUNDRY-NONSTANDARD", &noMITMiscExtension },
--#endif
- #ifdef MULTIBUFFER
-     { "Multi-Buffering", &noMultibufferExtension },
- #endif
-@@ -402,18 +343,9 @@ static ExtensionToggle ExtensionToggleList[] =
- #ifdef XCSECURITY
-     { "SECURITY", &noSecurityExtension },
- #endif
--#ifdef XSYNC
--    { "SYNC", &noSyncExtension },
--#endif
--#ifdef TOGCUP
--    { "TOG-CUP", &noXcupExtension },
--#endif
- #ifdef RES
-     { "X-Resource", &noResExtension },
- #endif
--#ifdef XCMISC
--    { "XC-MISC", &noXCMiscExtension },
--#endif
- #ifdef XEVIE
-     { "XEVIE", &noXevieExtension },
- #endif
-@@ -426,9 +358,6 @@ static ExtensionToggle ExtensionToggleList[] =
- #ifdef XF86DRI
-     { "XFree86-DRI", &noXFree86DRIExtension },
- #endif
--#ifdef XF86MISC
--    { "XFree86-Misc", &noXFree86MiscExtension },
--#endif
- #ifdef XF86VIDMODE
-     { "XFree86-VidModeExtension", &noXFree86VidModeExtension },
- #endif
-@@ -501,9 +430,6 @@ InitExtensions(argc, argv)
- #ifdef MITSHM
-     if (!noMITShmExtension) ShmExtensionInit();
- #endif
--#ifdef EVI
--    if (!noEVIExtension) EVIExtensionInit();
--#endif
- #ifdef MULTIBUFFER
-     if (!noMultibufferExtension) MultibufferExtensionInit();
- #endif
-@@ -513,12 +439,7 @@ InitExtensions(argc, argv)
- #ifdef XTEST
-     if (!noTestExtensions) XTestExtensionInit();
- #endif
--#ifdef BIGREQS
--    if (!noBigReqExtension) BigReqExtensionInit();
--#endif
--#ifdef MITMISC
--    if (!noMITMiscExtension) MITMiscExtensionInit();
--#endif
-+    BigReqExtensionInit();
- #ifdef XIDLE
-     if (!noXIdleExtension) XIdleExtensionInit();
- #endif
-@@ -534,15 +455,11 @@ InitExtensions(argc, argv)
-       XvMCExtensionInit();
-     }
- #endif
--#ifdef XSYNC
--    if (!noSyncExtension) SyncExtensionInit();
--#endif
-+    SyncExtensionInit();
- #if defined(XKB)
-     if (!noXkbExtension) XkbExtensionInit();
- #endif
--#ifdef XCMISC
--    if (!noXCMiscExtension) XCMiscExtensionInit();
--#endif
-+    XCMiscExtensionInit();
- #ifdef XRECORD
-     if (!noTestExtensions) RecordExtensionInit(); 
- #endif
-@@ -555,15 +472,9 @@ 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
--#ifdef FONTCACHE
--    if (!noFontCacheExtension) FontCacheExtensionInit();
--#endif
- #ifdef XF86BIGFONT
-     if (!noXFree86BigfontExtension) XFree86BigfontExtensionInit();
- #endif
-@@ -571,9 +482,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
-@@ -632,12 +540,15 @@ 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
-+    { SyncExtensionInit, "SYNC", NULL, NULL, NULL },
- #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/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/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 9da8fcd..a2d687f 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
-@@ -145,12 +142,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
- #ifdef GLXEXT
- _X_EXPORT Bool noGlxExtension = FALSE;
- _X_EXPORT Bool noGlxVisualInit = FALSE;
-@@ -161,9 +152,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
-@@ -179,18 +167,9 @@ _X_EXPORT Bool noShapeExtension = FALSE;
- #ifdef XCSECURITY
- _X_EXPORT Bool noSecurityExtension = FALSE;
- #endif
--#ifdef XSYNC
--_X_EXPORT Bool noSyncExtension = FALSE;
--#endif
--#ifdef TOGCUP
--_X_EXPORT Bool noXcupExtension = FALSE;
--#endif
- #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 */
-@@ -205,9 +184,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

Deleted: trunk/dports/x11/xorg-server/files/tiger.patch
===================================================================
--- trunk/dports/x11/xorg-server/files/tiger.patch	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-server/files/tiger.patch	2009-09-01 00:48:00 UTC (rev 56677)
@@ -1,49 +0,0 @@
-diff --git a/hw/xquartz/X11Controller.h b/hw/xquartz/X11Controller.h
-index 170bccc..a86b20f 100644
---- a/hw/xquartz/X11Controller.h
-+++ b/hw/xquartz/X11Controller.h
-@@ -45,6 +45,16 @@
- #undef BOOL
- #endif
- 
-+#ifndef NSINTEGER_DEFINED
-+#if __LP64__ || NS_BUILD_32_LIKE_64
-+typedef long NSInteger;
-+typedef unsigned long NSUInteger;
-+#else
-+typedef int NSInteger;
-+typedef unsigned int NSUInteger;
-+#endif
-+#endif
-+
- @interface X11Controller : NSObject
- {
-     IBOutlet NSPanel *prefs_panel;
-diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
-index 9900537..2a533de 100644
---- a/hw/xquartz/X11Controller.m
-+++ b/hw/xquartz/X11Controller.m
-@@ -164,11 +164,7 @@ BOOL xquartz_resetenv_display = NO;
- 
-       item = (NSMenuItem *) [menu addItemWithTitle:name action:@selector
- 				  (item_selected:) keyEquivalent:shortcut];
--#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
-       [item setKeyEquivalentModifierMask:(NSUInteger) windowItemModMask];
--#else
--      [item setKeyEquivalentModifierMask:windowItemModMask];
--#endif
-       [item setTarget:self];
-       [item setTag:i];
-       [item setEnabled:YES];
-@@ -177,11 +173,7 @@ BOOL xquartz_resetenv_display = NO;
- 				       action:@selector
- 				       (item_selected:) keyEquivalent:shortcut
- 				       atIndex:i];
--#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
-       [item setKeyEquivalentModifierMask:(NSUInteger) windowItemModMask];
--#else
--      [item setKeyEquivalentModifierMask:windowItemModMask];
--#endif
-       [item setTarget:self];
-       [item setTag:i];
-       [item setEnabled:YES];

Deleted: trunk/dports/x11/xorg-server/files/xextproto.patch
===================================================================
--- trunk/dports/x11/xorg-server/files/xextproto.patch	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-server/files/xextproto.patch	2009-09-01 00:48:00 UTC (rev 56677)
@@ -1,670 +0,0 @@
-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/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 10d4481..24a4b60 100644
---- a/Xext/sync.c
-+++ b/Xext/sync.c
-@@ -67,9 +67,8 @@ 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 <X11/extensions/syncproto.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_ */
-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/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 */
- 
-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/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"
-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 {

Deleted: trunk/dports/x11/xorg-server/files/xorg-tiger-ppc.patch
===================================================================
--- trunk/dports/x11/xorg-server/files/xorg-tiger-ppc.patch	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-server/files/xorg-tiger-ppc.patch	2009-09-01 00:48:00 UTC (rev 56677)
@@ -1,92 +0,0 @@
-diff --git a/hw/xquartz/GL/indirect.c b/hw/xquartz/GL/indirect.c
-index f080067..f9d69f7 100644
---- a/hw/xquartz/GL/indirect.c
-+++ b/hw/xquartz/GL/indirect.c
-@@ -44,6 +44,87 @@
- #include <OpenGL/OpenGL.h>
- #include <OpenGL/CGLContext.h>
- 
-+/* These next few GL_EXT pre-processing blocks are to explicitly define 
-+ * these symbols to 0 if they are not set by OpenGL.framework.  This
-+ * prevents the X11 glext.h from setting them to 1.
-+ */
-+
-+#ifndef GL_EXT_fragment_shader
-+#define GL_EXT_fragment_shader 0
-+#endif
-+
-+#ifndef GL_EXT_blend_equation_separate
-+#define GL_EXT_blend_equation_separate 0
-+#endif
-+
-+#ifndef GL_EXT_blend_func_separate
-+#define GL_EXT_blend_func_separate 0
-+#endif
-+
-+#ifndef GL_EXT_depth_bounds_test
-+#define GL_EXT_depth_bounds_test 0
-+#endif
-+
-+#ifndef GL_EXT_compiled_vertex_array
-+#define GL_EXT_compiled_vertex_array 0
-+#endif
-+
-+#ifndef GL_EXT_cull_vertex
-+#define GL_EXT_cull_vertex 0
-+#endif
-+
-+#ifndef GL_EXT_fog_coord
-+#define GL_EXT_fog_coord 0
-+#endif
-+
-+#ifndef GL_EXT_framebuffer_blit
-+#define GL_EXT_framebuffer_blit 0
-+#endif
-+
-+#ifndef GL_EXT_framebuffer_object
-+#define GL_EXT_framebuffer_object 0
-+#endif
-+
-+#ifndef GL_EXT_gpu_program_parameters
-+#define GL_EXT_gpu_program_parameters 0
-+#endif
-+
-+#ifndef GL_EXT_multi_draw_arrays
-+#define GL_EXT_multi_draw_arrays 0
-+#endif
-+
-+#ifndef GL_EXT_point_parameters
-+#define GL_EXT_point_parameters 0
-+#endif
-+
-+#ifndef GL_EXT_polygon_offset
-+#define GL_EXT_polygon_offset 0
-+#endif
-+
-+#ifndef GL_EXT_secondary_color
-+#define GL_EXT_secondary_color 0
-+#endif
-+
-+#ifndef GL_EXT_stencil_two_side
-+#define GL_EXT_stencil_two_side 0
-+#endif
-+
-+#ifndef GL_EXT_timer_query
-+#define GL_EXT_timer_query 0
-+#endif
-+
-+#ifndef GL_EXT_vertex_array
-+#define GL_EXT_vertex_array 0
-+#endif
-+
-+/* Tiger PPC doesn't have the associated symbols, but glext.h says it does.  Liars!
-+ * http://trac.macports.org/ticket/20638
-+ */
-+#if defined(__ppc__) && MAC_OS_X_VERSION_MIN_REQUIRED == 1040
-+#undef GL_EXT_gpu_program_parameters
-+#define GL_EXT_gpu_program_parameters 0
-+#endif
-+
- #include <GL/glxproto.h>
- #include <windowstr.h>
- #include <resource.h>

Modified: trunk/dports/x11/xorg-server-devel/Portfile
===================================================================
--- trunk/dports/x11/xorg-server-devel/Portfile	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-server-devel/Portfile	2009-09-01 00:48:00 UTC (rev 56677)
@@ -4,7 +4,7 @@
 
 name		xorg-server-devel
 set my_name	xorg-server
-version		1.5.3-apple14
+version		1.5.3-apple15
 categories	x11 devel
 maintainers	jeremyhu openmaintainer
 description	The X.org / Xquartz X server.
@@ -16,9 +16,9 @@
 dist_subdir     ${my_name}
 distname        ${my_name}-${version}
 
-checksums           md5     4bba6a1d31d8cfaa7637f61134309b11 \
-                    sha1    742f3e8462af98b4f784a29d5b2a61b250a576c0 \
-                    rmd160  261c491b155fb74c48c93d3f02110d8203dd6024
+checksums           md5     d05043d0b13a339d595bc17c531f2e7c \
+                    sha1    32ab24421b31f0413dbe616f3337b5ed79b68503 \
+                    rmd160  3648efacc900cee4a4e69d2bf8bac20c03f6351b
 
 use_bzip2	yes
 use_parallel_build yes
@@ -57,19 +57,13 @@
 	port:xorg-fonts
 
 depends_lib \
-	port:libpixman \
+	path:lib/pkgconfig/pixman-1.pc:libpixman \
 	port:xorg-libxkbfile \
 	port:xorg-libXfont \
 	port:xorg-libXt \
 	port:xorg-libAppleWM \
 	port:xorg-libXfixes
 
-patchfiles nuke-old-extensions.patch xextproto.patch tiger.patch
-patch.args -p1
-
-use_autoreconf yes
-autoreconf.args -fvi
-
 configure.args	--with-apple-applications-dir=${applications_dir} --with-fontdir=${prefix}/share/fonts --with-apple-application-id=org.macports.X11
 
 # GL/internal/dri_interface.h is missing in prefix (provided by libdrm for the xorg DDX... not helpful for us)
@@ -84,11 +78,4 @@
 		# Xplugin.h is missing on Tiger
 		configure.cppflags-append -I${filespath}/include
 	}
-
-	if {${os.major} < 9} {
-		post-install {
-			ui_msg "This server has not been thoroughly tested on Tiger.  Your feedback would be welcomed on x11-users at macosforge.org."
-		}
-	}
 }
-

Deleted: trunk/dports/x11/xorg-server-devel/files/nuke-old-extensions.patch
===================================================================
--- trunk/dports/x11/xorg-server-devel/files/nuke-old-extensions.patch	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-server-devel/files/nuke-old-extensions.patch	2009-09-01 00:48:00 UTC (rev 56677)
@@ -1,3759 +0,0 @@
-diff --git a/Xext/Makefile.am b/Xext/Makefile.am
-index af4bfc7..9ed51da 100644
---- a/Xext/Makefile.am
-+++ b/Xext/Makefile.am
-@@ -20,18 +20,17 @@ endif
- 
- # Sources always included in libXextbuiltin.la & libXext.la
- BUILTIN_SRCS =			\
-+	bigreq.c		\
- 	shape.c			\
- 	sleepuntil.c		\
- 	sleepuntil.h		\
-+	sync.c			\
-+	xcmisc.c		\
- 	xtest.c
- 
- # Sources always included in libXextmodule.la & libXext.la
- MODULE_SRCS =			\
--	bigreq.c		\
--	mitmisc.c		\
--	shape.c			\
--	sync.c			\
--	xcmisc.c
-+	shape.c
- 
- # Optional sources included if extension enabled by configure.ac rules
- 
-@@ -99,19 +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
--
--# 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
-@@ -119,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
-@@ -157,8 +137,6 @@ EXTRA_DIST = \
- 	$(XCALIBRATE_SRCS) \
- 	$(XINERAMA_SRCS) \
- 	$(XEVIE_SRCS) \
--	$(CUP_SRCS) \
--	$(EVI_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/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/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/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/configure.ac b/configure.ac
-index 7b49574..98e26b8 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])
-@@ -559,9 +558,7 @@ 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])
- 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])
-@@ -683,7 +680,6 @@ case $host_os in
- 			DGA=no
- 			DPMSExtension=no
- 			XF86BIGFONT=no
--			XF86MISC=no
- 			XF86VIDMODE=no
- 		fi
- 		;;
-@@ -966,24 +962,12 @@ 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])
- 	# 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])
-@@ -1123,7 +1107,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])
-@@ -1487,15 +1470,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
-@@ -1585,7 +1559,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
-@@ -1651,10 +1624,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
-@@ -1947,7 +1916,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 343fdab..5b7b605 100644
---- a/hw/dmx/dmx-config.h
-+++ b/hw/dmx/dmx-config.h
-@@ -73,23 +73,16 @@
- #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 XF86MISC
- #undef XFreeXDGA
- #undef XF86DRI
--#undef TOGCUP
--#undef MITMISC
- #undef SCREENSAVER
- #undef RANDR
- #undef XFIXES
- #undef DAMAGE
- #undef COMPOSITE
--#undef FONTCACHE
- 
- #endif /* DMX_CONFIG_H */
-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 8c8a4ce..8096fb0 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,
-@@ -83,24 +74,6 @@ static ExtensionModule extensionModules[] = {
- 	NULL
-     },
- #endif
--#ifdef BIGREQS
--     {
--	BigReqExtensionInit,
--	XBigReqExtensionName,
--	&noBigReqExtension,
--	NULL,
--	NULL
--     },
--#endif
--#ifdef XSYNC
--    {
--	SyncExtensionInit,
--	SYNC_NAME,
--	&noSyncExtension,
--	NULL,
--	NULL
--    },
--#endif
- #ifdef SCREENSAVER
-     {
- 	ScreenSaverExtensionInit,
-@@ -110,15 +83,6 @@ static ExtensionModule extensionModules[] = {
- 	NULL
-     },
- #endif
--#ifdef XCMISC
--    {
--	XCMiscExtensionInit,
--	XCMiscExtensionName,
--	&noXCMiscExtension,
--	NULL,
--	NULL
--    },
--#endif
- #ifdef XF86VIDMODE
-     {
- 	XFree86VidModeExtensionInit,
-@@ -128,15 +92,6 @@ static ExtensionModule extensionModules[] = {
- 	NULL
-     },
- #endif
--#ifdef XF86MISC
--    {
--	XFree86MiscExtensionInit,
--	XF86MISCNAME,
--	&noXFree86MiscExtension,
--	NULL,
--	NULL
--    },
--#endif
- #ifdef XFreeXDGA
-     {
- 	XFree86DGAExtensionInit,
-@@ -155,33 +110,6 @@ static ExtensionModule extensionModules[] = {
- 	NULL
-     },
- #endif
--#ifdef FONTCACHE
--    {
--	FontCacheExtensionInit,
--	FONTCACHENAME,
--	&noFontCacheExtension,
--	NULL,
--	NULL
--    },
--#endif
--#ifdef TOGCUP
--    {
--	XcupExtensionInit,
--	XCUPNAME,
--	&noXcupExtension,
--	NULL,
--	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..7bcefc9 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_
-@@ -35,41 +29,17 @@ 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
--#include <X11/extensions/sync.h>
--#include <X11/extensions/syncstr.h>
--#endif
--
- #ifdef SCREENSAVER
- 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_
- #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);
-@@ -82,25 +52,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 TOGCUP
--extern void XcupExtensionInit(INITARGS);
--#define _XCUP_SERVER_
--#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);
-@@ -130,6 +81,10 @@ extern void SELinuxExtensionInit(INITARGS);
- #include "xselinux.h"
- #endif
- 
-+#ifdef XEVIE
-+extern void XevieExtensionInit(INITARGS);
-+#endif
-+
- #if 1
- extern void SecurityExtensionInit(INITARGS);
- #endif
-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 38e3cdb..5566a20 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
-@@ -356,12 +351,6 @@ _X_HIDDEN void *dixLookupTab[] = {
- #ifdef DPMSExtension
-     SYMVAR(noDPMSExtension)
- #endif
--#ifdef EVI
--    SYMVAR(noEVIExtension)
--#endif
--#ifdef FONTCACHE
--    SYMVAR(noFontCacheExtension)
--#endif
- #ifdef GLXEXT
-     SYMVAR(noGlxExtension)
- #endif
-@@ -371,9 +360,6 @@ _X_HIDDEN void *dixLookupTab[] = {
- #ifdef MITSHM
-     SYMVAR(noMITShmExtension)
- #endif
--#ifdef MITMISC
--    SYMVAR(noMITMiscExtension)
--#endif
- #ifdef MULTIBUFFER
-     SYMVAR(noMultibufferExtension)
- #endif
-@@ -389,18 +375,9 @@ _X_HIDDEN void *dixLookupTab[] = {
- #ifdef XCSECURITY
-     SYMVAR(noSecurityExtension)
- #endif
--#ifdef XSYNC
--    SYMVAR(noSyncExtension)
--#endif
--#ifdef TOGCUP
--    SYMVAR(noXcupExtension)
--#endif
- #ifdef RES
-     SYMVAR(noResExtension)
- #endif
--#ifdef XCMISC
--    SYMVAR(noXCMiscExtension)
--#endif
- #ifdef XEVIE
-     SYMVAR(noXevieExtension)
- #endif
-@@ -413,9 +390,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 e71e9e6..d4e3050 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
- 
-@@ -371,9 +368,6 @@
- /* Build XFree86 BigFont extension */
- #undef XF86BIGFONT
- 
--/* Support XFree86 miscellaneous extensions */
--#undef XF86MISC
--
- /* Support XFree86 Video Mode extension */
- #undef XF86VIDMODE
- 
-@@ -428,12 +422,6 @@
- /* Support Xv extension */
- #undef XV
- 
--/* 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..7a4b708 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
-@@ -66,14 +62,6 @@ extern Bool noDbeExtension;
- extern Bool noDPMSExtension;
- #endif
- 
--#ifdef EVI
--extern Bool noEVIExtension;
--#endif
--
--#ifdef FONTCACHE
--extern Bool noFontCacheExtension;
--#endif
--
- #ifdef GLXEXT
- extern Bool noGlxExtension;
- #endif
-@@ -86,10 +74,6 @@ extern Bool noScreenSaverExtension;
- extern Bool noMITShmExtension;
- #endif
- 
--#ifdef MITMISC
--extern Bool noMITMiscExtension;
--#endif
--
- #ifdef MULTIBUFFER
- extern Bool noMultibufferExtension;
- #endif
-@@ -110,22 +94,10 @@ extern Bool noShapeExtension;
- extern Bool noSecurityExtension;
- #endif
- 
--#ifdef XSYNC
--extern Bool noSyncExtension;
--#endif
--
--#ifdef TOGCUP
--extern Bool noXcupExtension;
--#endif
--
- #ifdef RES
- extern Bool noResExtension;
- #endif
- 
--#ifdef XCMISC
--extern Bool noXCMiscExtension;
--#endif
--
- #ifdef XEVIE
- extern Bool noXevieExtension;
- #endif
-@@ -142,10 +114,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 4dd2f27..7aada2e 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
- 
-@@ -112,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 5e0c229..8e60d6b 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
-@@ -90,9 +88,6 @@ SOFTWARE.
- 
- extern Bool noTestExtensions;
- 
--#ifdef BIGREQS
--extern Bool noBigReqExtension;
--#endif
- #ifdef COMPOSITE
- extern Bool noCompositeExtension;
- #endif
-@@ -102,12 +97,6 @@ extern Bool noDbeExtension;
- #ifdef DPMSExtension
- extern Bool noDPMSExtension;
- #endif
--#ifdef EVI
--extern Bool noEVIExtension;
--#endif
--#ifdef FONTCACHE
--extern Bool noFontCacheExtension;
--#endif
- #ifdef GLXEXT
- extern Bool noGlxExtension;
- #endif
-@@ -117,9 +106,6 @@ extern Bool noScreenSaverExtension;
- #ifdef MITSHM
- extern Bool noMITShmExtension;
- #endif
--#ifdef MITMISC
--extern Bool noMITMiscExtension;
--#endif
- #ifdef MULTIBUFFER
- extern Bool noMultibufferExtension;
- #endif
-@@ -135,18 +121,9 @@ extern Bool noShapeExtension;
- #ifdef XCSECURITY
- extern Bool noSecurityExtension;
- #endif
--#ifdef XSYNC
--extern Bool noSyncExtension;
--#endif
--#ifdef TOGCUP
--extern Bool noXcupExtension;
--#endif
- #ifdef RES
- extern Bool noResExtension;
- #endif
--#ifdef XCMISC
--extern Bool noXCMiscExtension;
--#endif
- #ifdef XEVIE
- extern Bool noXevieExtension;
- #endif
-@@ -159,9 +136,6 @@ extern Bool noXFree86DGAExtension;
- #ifdef XF86DRI
- extern Bool noXFree86DRIExtension;
- #endif
--#ifdef XF86MISC
--extern Bool noXFree86MiscExtension;
--#endif
- #ifdef XF86VIDMODE
- extern Bool noXFree86VidModeExtension;
- #endif
-@@ -227,9 +201,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
-@@ -248,12 +219,7 @@ extern void XInputExtensionInit(INITARGS);
- #ifdef XTEST
- extern void XTestExtensionInit(INITARGS);
- #endif
--#ifdef BIGREQS
- extern void BigReqExtensionInit(INITARGS);
--#endif
--#ifdef MITMISC
--extern void MITMiscExtensionInit(INITARGS);
--#endif
- #ifdef XIDLE
- extern void XIdleExtensionInit(INITARGS);
- #endif
-@@ -267,15 +233,11 @@ 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
--#ifdef XCMISC
- extern void XCMiscExtensionInit(INITARGS);
--#endif
- #ifdef XRECORD
- extern void RecordExtensionInit(INITARGS);
- #endif
-@@ -294,9 +256,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
-@@ -309,15 +268,9 @@ 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
--#ifdef FONTCACHE
--extern void FontCacheExtensionInit(INITARGS);
--#endif
- #ifdef RENDER
- extern void RenderExtensionInit(INITARGS);
- #endif
-@@ -354,9 +307,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
-@@ -369,12 +319,6 @@ static ExtensionToggle ExtensionToggleList[] =
- #ifdef DPMSExtension
-     { "DPMS", &noDPMSExtension },
- #endif
--#ifdef EVI
--    { "Extended-Visual-Information", &noEVIExtension },
--#endif
--#ifdef FONTCACHE
--    { "FontCache", &noFontCacheExtension },
--#endif
- #ifdef GLXEXT
-     { "GLX", &noGlxExtension },
- #endif
-@@ -384,9 +328,6 @@ static ExtensionToggle ExtensionToggleList[] =
- #ifdef MITSHM
-     { SHMNAME, &noMITShmExtension },
- #endif
--#ifdef MITMISC
--    { "MIT-SUNDRY-NONSTANDARD", &noMITMiscExtension },
--#endif
- #ifdef MULTIBUFFER
-     { "Multi-Buffering", &noMultibufferExtension },
- #endif
-@@ -402,18 +343,9 @@ static ExtensionToggle ExtensionToggleList[] =
- #ifdef XCSECURITY
-     { "SECURITY", &noSecurityExtension },
- #endif
--#ifdef XSYNC
--    { "SYNC", &noSyncExtension },
--#endif
--#ifdef TOGCUP
--    { "TOG-CUP", &noXcupExtension },
--#endif
- #ifdef RES
-     { "X-Resource", &noResExtension },
- #endif
--#ifdef XCMISC
--    { "XC-MISC", &noXCMiscExtension },
--#endif
- #ifdef XEVIE
-     { "XEVIE", &noXevieExtension },
- #endif
-@@ -426,9 +358,6 @@ static ExtensionToggle ExtensionToggleList[] =
- #ifdef XF86DRI
-     { "XFree86-DRI", &noXFree86DRIExtension },
- #endif
--#ifdef XF86MISC
--    { "XFree86-Misc", &noXFree86MiscExtension },
--#endif
- #ifdef XF86VIDMODE
-     { "XFree86-VidModeExtension", &noXFree86VidModeExtension },
- #endif
-@@ -501,9 +430,6 @@ InitExtensions(argc, argv)
- #ifdef MITSHM
-     if (!noMITShmExtension) ShmExtensionInit();
- #endif
--#ifdef EVI
--    if (!noEVIExtension) EVIExtensionInit();
--#endif
- #ifdef MULTIBUFFER
-     if (!noMultibufferExtension) MultibufferExtensionInit();
- #endif
-@@ -513,12 +439,7 @@ InitExtensions(argc, argv)
- #ifdef XTEST
-     if (!noTestExtensions) XTestExtensionInit();
- #endif
--#ifdef BIGREQS
--    if (!noBigReqExtension) BigReqExtensionInit();
--#endif
--#ifdef MITMISC
--    if (!noMITMiscExtension) MITMiscExtensionInit();
--#endif
-+    BigReqExtensionInit();
- #ifdef XIDLE
-     if (!noXIdleExtension) XIdleExtensionInit();
- #endif
-@@ -534,15 +455,11 @@ InitExtensions(argc, argv)
-       XvMCExtensionInit();
-     }
- #endif
--#ifdef XSYNC
--    if (!noSyncExtension) SyncExtensionInit();
--#endif
-+    SyncExtensionInit();
- #if defined(XKB)
-     if (!noXkbExtension) XkbExtensionInit();
- #endif
--#ifdef XCMISC
--    if (!noXCMiscExtension) XCMiscExtensionInit();
--#endif
-+    XCMiscExtensionInit();
- #ifdef XRECORD
-     if (!noTestExtensions) RecordExtensionInit(); 
- #endif
-@@ -555,15 +472,9 @@ 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
--#ifdef FONTCACHE
--    if (!noFontCacheExtension) FontCacheExtensionInit();
--#endif
- #ifdef XF86BIGFONT
-     if (!noXFree86BigfontExtension) XFree86BigfontExtensionInit();
- #endif
-@@ -571,9 +482,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
-@@ -632,12 +540,15 @@ 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
-+    { SyncExtensionInit, "SYNC", NULL, NULL, NULL },
- #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/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/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 9da8fcd..a2d687f 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
-@@ -145,12 +142,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
- #ifdef GLXEXT
- _X_EXPORT Bool noGlxExtension = FALSE;
- _X_EXPORT Bool noGlxVisualInit = FALSE;
-@@ -161,9 +152,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
-@@ -179,18 +167,9 @@ _X_EXPORT Bool noShapeExtension = FALSE;
- #ifdef XCSECURITY
- _X_EXPORT Bool noSecurityExtension = FALSE;
- #endif
--#ifdef XSYNC
--_X_EXPORT Bool noSyncExtension = FALSE;
--#endif
--#ifdef TOGCUP
--_X_EXPORT Bool noXcupExtension = FALSE;
--#endif
- #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 */
-@@ -205,9 +184,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

Deleted: trunk/dports/x11/xorg-server-devel/files/tiger.patch
===================================================================
--- trunk/dports/x11/xorg-server-devel/files/tiger.patch	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-server-devel/files/tiger.patch	2009-09-01 00:48:00 UTC (rev 56677)
@@ -1,49 +0,0 @@
-diff --git a/hw/xquartz/X11Controller.h b/hw/xquartz/X11Controller.h
-index 170bccc..a86b20f 100644
---- a/hw/xquartz/X11Controller.h
-+++ b/hw/xquartz/X11Controller.h
-@@ -45,6 +45,16 @@
- #undef BOOL
- #endif
- 
-+#ifndef NSINTEGER_DEFINED
-+#if __LP64__ || NS_BUILD_32_LIKE_64
-+typedef long NSInteger;
-+typedef unsigned long NSUInteger;
-+#else
-+typedef int NSInteger;
-+typedef unsigned int NSUInteger;
-+#endif
-+#endif
-+
- @interface X11Controller : NSObject
- {
-     IBOutlet NSPanel *prefs_panel;
-diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
-index 9900537..2a533de 100644
---- a/hw/xquartz/X11Controller.m
-+++ b/hw/xquartz/X11Controller.m
-@@ -164,11 +164,7 @@ BOOL xquartz_resetenv_display = NO;
- 
-       item = (NSMenuItem *) [menu addItemWithTitle:name action:@selector
- 				  (item_selected:) keyEquivalent:shortcut];
--#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
-       [item setKeyEquivalentModifierMask:(NSUInteger) windowItemModMask];
--#else
--      [item setKeyEquivalentModifierMask:windowItemModMask];
--#endif
-       [item setTarget:self];
-       [item setTag:i];
-       [item setEnabled:YES];
-@@ -177,11 +173,7 @@ BOOL xquartz_resetenv_display = NO;
- 				       action:@selector
- 				       (item_selected:) keyEquivalent:shortcut
- 				       atIndex:i];
--#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
-       [item setKeyEquivalentModifierMask:(NSUInteger) windowItemModMask];
--#else
--      [item setKeyEquivalentModifierMask:windowItemModMask];
--#endif
-       [item setTarget:self];
-       [item setTag:i];
-       [item setEnabled:YES];

Deleted: trunk/dports/x11/xorg-server-devel/files/xextproto.patch
===================================================================
--- trunk/dports/x11/xorg-server-devel/files/xextproto.patch	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-server-devel/files/xextproto.patch	2009-09-01 00:48:00 UTC (rev 56677)
@@ -1,670 +0,0 @@
-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/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 10d4481..24a4b60 100644
---- a/Xext/sync.c
-+++ b/Xext/sync.c
-@@ -67,9 +67,8 @@ 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 <X11/extensions/syncproto.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_ */
-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/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 */
- 
-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/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"
-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 {

Modified: trunk/dports/x11/xorg-videoproto/Portfile
===================================================================
--- trunk/dports/x11/xorg-videoproto/Portfile	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-videoproto/Portfile	2009-09-01 00:48:00 UTC (rev 56677)
@@ -2,7 +2,7 @@
 PortSystem 1.0
 
 name		xorg-videoproto
-version		2.2.2
+version		2.3.0
 categories	x11 devel
 maintainers	jeremyhu openmaintainer
 description	X.org videoproto
@@ -12,7 +12,9 @@
 master_sites 	${homepage}/pub/individual/proto/
 
 distname	videoproto-${version}
-checksums	sha1 904eb59ae2451dea52370d927bf490b696f9033c
+checksums           md5     fb762146a18207a1e8bc9f299dfc7ac0 \
+                    sha1    4aef2b438d45b3ab75e640996ce1267d3468f48c \
+                    rmd160  ff1338f96e4ba95e302a3a95b39dfe2f864ceca9
 use_bzip2	yes
 universal_variant no
 

Modified: trunk/dports/x11/xorg-xcmiscproto/Portfile
===================================================================
--- trunk/dports/x11/xorg-xcmiscproto/Portfile	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-xcmiscproto/Portfile	2009-09-01 00:48:00 UTC (rev 56677)
@@ -2,7 +2,7 @@
 PortSystem 1.0
 
 name		xorg-xcmiscproto
-version		1.1.2
+version		1.2.0
 categories	x11 devel
 maintainers	jeremyhu openmaintainer
 description	X.org xcmiscproto
@@ -12,7 +12,9 @@
 master_sites 	${homepage}/pub/individual/proto/
 
 distname	xcmiscproto-${version}
-checksums	sha1 825ec15986cd1ab008b11f6379eb4c7f3c78bd76
+checksums           md5     7b83e4a7e9f4edc9c6cfb0500f4a7196 \
+                    sha1    1a55e042b33c0e0aaf2299942315a5208d644707 \
+                    rmd160  b66ac94e7eb966889136dcae61395b5917fa70f6
 use_bzip2	yes
 
 universal_variant no

Modified: trunk/dports/x11/xorg-xf86bigfontproto/Portfile
===================================================================
--- trunk/dports/x11/xorg-xf86bigfontproto/Portfile	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-xf86bigfontproto/Portfile	2009-09-01 00:48:00 UTC (rev 56677)
@@ -2,7 +2,7 @@
 PortSystem 1.0
 
 name        xorg-xf86bigfontproto
-version     1.1.2
+version     1.2.0
 categories  x11 devel
 maintainers gmail.com:myschizobuddy
 description X.org xf86bigfontproto
@@ -12,9 +12,9 @@
 master_sites    ${homepage}/pub/individual/proto/
 
 distname    xf86bigfontproto-${version}
-checksums   md5 a318c1e86123832d7b0c95fc7d47ef35 \
-            sha1 4a2e84b3f529e4747dbc07bf4496bfe01f40aa85 \
-            rmd160 48d7bbedfaf5061e76f8207570ca547ff53f44e0
+checksums           md5     120e226ede5a4687b25dd357cc9b8efe \
+                    sha1    312a2ea708b257520c1af4393b69d73a393a478f \
+                    rmd160  847c3ecfe705ede5e9292586835d0fe2bc7ccf45
             
 use_bzip2   yes
 

Modified: trunk/dports/x11/xorg-xf86driproto/Portfile
===================================================================
--- trunk/dports/x11/xorg-xf86driproto/Portfile	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-xf86driproto/Portfile	2009-09-01 00:48:00 UTC (rev 56677)
@@ -2,7 +2,7 @@
 PortSystem 1.0
 
 name		xorg-xf86driproto
-version		2.0.4
+version		2.1.0
 categories	x11 devel
 maintainers	jeremyhu openmaintainer
 description	X.org xf86driproto
@@ -14,9 +14,9 @@
 use_bzip2	yes
 universal_variant no
 
-checksums           md5     01470d088da3a8a3deefa8e1f45d69cb \
-                    sha1    bba018443dad831b328e7353cf034522401e2e6b \
-                    rmd160  d0ab74ca15d28b1b5f42852cfd24d960c481ec79
+checksums           md5     309d552732666c3333d7dc63e80d042f \
+                    sha1    0dfc6616ffc68ca3c3b5decb1e365aaa93be8548 \
+                    rmd160  2393b5e691dc806777f743e0f5e6a2cab53047f5
 
 livecheck.check regex
 livecheck.url   [lindex ${master_sites} 0]?C=M&O=D

Modified: trunk/dports/x11/xorg-xineramaproto/Portfile
===================================================================
--- trunk/dports/x11/xorg-xineramaproto/Portfile	2009-09-01 00:30:30 UTC (rev 56676)
+++ trunk/dports/x11/xorg-xineramaproto/Portfile	2009-09-01 00:48:00 UTC (rev 56677)
@@ -2,7 +2,7 @@
 PortSystem 1.0
 
 name		xorg-xineramaproto
-version		1.1.2
+version		1.1.99.1
 categories	x11 devel
 maintainers	jeremyhu openmaintainer
 description	X.org xineramaproto
@@ -12,7 +12,9 @@
 master_sites 	${homepage}/pub/individual/proto/
 
 distname	xineramaproto-${version}
-checksums	sha1 d09ef306ffc0d058120051d88dd64776fd0de0d5
+checksums           md5     ae9dde9a3a81880cb718b36d32198fcd \
+                    sha1    932e09bb97b666c2a49333a092c9ba34b3d31c81 \
+                    rmd160  c7a768ec3ded96e6376d1460b904786254cfe3db
 use_bzip2	yes
 universal_variant no
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090831/62e0e1be/attachment-0001.html>


More information about the macports-changes mailing list