[PATCH 12/54] Move extension initialisation prototypes into extinit.h

Daniel Stone daniel at fooishbar.org
Mon Jul 9 18:02:56 PDT 2012


Create extinit.h (and xf86Extensions.h, for Xorg-specific extensions) to
hold all our extension initialisation prototypes, rather than
duplicating them everywhere.

Signed-off-by: Daniel Stone <daniel at fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 Xext/bigreq.c                         |    4 +-
 Xext/dpms.c                           |    2 +-
 Xext/geext.c                          |    1 +
 Xext/geext.h                          |    2 -
 Xext/panoramiX.c                      |    2 +-
 Xext/saver.c                          |    2 +-
 Xext/security.c                       |    2 +-
 Xext/shape.c                          |    2 +-
 Xext/shm.c                            |    2 +-
 Xext/sync.c                           |    2 +-
 Xext/syncsrv.h                        |    2 -
 Xext/xcmisc.c                         |    2 +-
 Xext/xf86bigfont.c                    |    1 +
 Xext/xf86bigfontsrv.h                 |    1 -
 Xext/xres.c                           |    2 +-
 Xext/xselinux_ext.c                   |    2 +-
 Xext/xtest.c                          |    2 +-
 Xext/xvdix.h                          |    1 -
 Xext/xvmain.c                         |    1 +
 Xext/xvmc.c                           |    1 +
 Xext/xvmcext.h                        |    2 -
 composite/compext.c                   |    1 +
 composite/compint.h                   |    7 --
 damageext/Makefile.am                 |    1 -
 damageext/damageext.c                 |    1 +
 damageext/damageextint.h              |    1 -
 dbe/dbe.c                             |    1 +
 dbe/dbestruct.h                       |    2 -
 glx/glxext.c                          |    4 +
 glx/glxserver.h                       |    2 -
 hw/dmx/dmx.c                          |    3 +-
 hw/dmx/glxProxy/glxext.c              |    1 +
 hw/dmx/glxProxy/glxext.h              |    2 -
 hw/xfree86/common/Makefile.am         |    2 +-
 hw/xfree86/common/vidmodeproc.h       |    2 +-
 hw/xfree86/common/xf86.h              |    5 -
 hw/xfree86/common/xf86Extensions.h    |   54 +++++++++++
 hw/xfree86/dixmods/dbemodule.c        |    3 +-
 hw/xfree86/dixmods/extmod/Makefile.am |    1 -
 hw/xfree86/dixmods/extmod/modinit.c   |    3 +-
 hw/xfree86/dixmods/extmod/xf86dga2.c  |    3 +-
 hw/xfree86/dixmods/extmod/xf86vmode.c |    1 +
 hw/xfree86/dixmods/glxmodule.c        |    1 +
 hw/xfree86/dixmods/recordmod.c        |    3 +-
 hw/xfree86/dri/dri.c                  |    2 +
 hw/xfree86/dri/drimodule.c            |    2 +-
 hw/xfree86/dri/xf86dri.c              |   11 ++-
 hw/xfree86/sdksyms.sh                 |    1 -
 hw/xquartz/pseudoramiX.c              |    1 +
 hw/xquartz/pseudoramiX.h              |    1 -
 hw/xquartz/xpr/dri.c                  |    1 +
 hw/xquartz/xpr/dri.h                  |    3 -
 include/extinit.h                     |  164 ++++++++++++++++++++++++++++++---
 include/globals.h                     |   81 +---------------
 include/window.h                      |    4 +-
 mi/miinitext.c                        |  105 +--------------------
 randr/randr.c                         |    1 +
 randr/randrstr.h                      |    4 -
 record/record.c                       |    3 +-
 render/picturestr.h                   |    2 -
 render/render.c                       |    1 +
 xfixes/xfixes.c                       |    1 +
 xfixes/xfixesint.h                    |    5 -
 xkb/xkb.c                             |    1 +
 xkb/xkb.h                             |    2 -
 65 files changed, 264 insertions(+), 274 deletions(-)
 create mode 100644 hw/xfree86/common/xf86Extensions.h

diff --git a/Xext/bigreq.c b/Xext/bigreq.c
index df1354e..2ee7d7d 100644
--- a/Xext/bigreq.c
+++ b/Xext/bigreq.c
@@ -38,9 +38,7 @@ from The Open Group.
 #include "extnsionst.h"
 #include <X11/extensions/bigreqsproto.h>
 #include "opaque.h"
-#include "modinit.h"
-
-void BigReqExtensionInit(void);
+#include "extinit.h"
 
 static int
 ProcBigReqDispatch(ClientPtr client)
diff --git a/Xext/dpms.c b/Xext/dpms.c
index 0639748..9fbe811 100644
--- a/Xext/dpms.c
+++ b/Xext/dpms.c
@@ -39,7 +39,7 @@ Equipment Corporation.
 #include "opaque.h"
 #include <X11/extensions/dpmsproto.h>
 #include "dpmsproc.h"
-#include "modinit.h"
+#include "extinit.h"
 
 static int
 ProcDPMSGetVersion(ClientPtr client)
diff --git a/Xext/geext.c b/Xext/geext.c
index 0702823..b350f10 100644
--- a/Xext/geext.c
+++ b/Xext/geext.c
@@ -32,6 +32,7 @@
 #include "geint.h"
 #include "geext.h"
 #include "protocol-versions.h"
+#include "extinit.h"
 
 DevPrivateKeyRec GEClientPrivateKeyRec;
 
diff --git a/Xext/geext.h b/Xext/geext.h
index d2a15dc..f468979 100644
--- a/Xext/geext.h
+++ b/Xext/geext.h
@@ -78,6 +78,4 @@ extern _X_EXPORT void GERegisterExtension(int extension,
 
 extern _X_EXPORT void GEInitEvent(xGenericEvent *ev, int extension);
 
-extern _X_EXPORT void GEExtensionInit(void);
-
 #endif                          /* _GEEXT_H_ */
diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index ff2a60e..682ef72 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -59,7 +59,7 @@ Equipment Corporation.
 #ifdef COMPOSITE
 #include "compint.h"
 #endif
-#include "modinit.h"
+#include "extinit.h"
 #include "protocol-versions.h"
 
 #ifdef GLXPROXY
diff --git a/Xext/saver.c b/Xext/saver.c
index dc3f119..f4528b4 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -58,7 +58,7 @@ in this Software without prior written authorization from the X Consortium.
 
 #include <stdio.h>
 
-#include "modinit.h"
+#include "extinit.h"
 
 static int ScreenSaverEventBase = 0;
 
diff --git a/Xext/security.c b/Xext/security.c
index 024405f..ae4422c 100644
--- a/Xext/security.c
+++ b/Xext/security.c
@@ -38,7 +38,7 @@ in this Software without prior written authorization from The Open Group.
 #include "xacestr.h"
 #include "securitysrv.h"
 #include <X11/extensions/securproto.h>
-#include "modinit.h"
+#include "extinit.h"
 #include "protocol-versions.h"
 
 /* Extension stuff */
diff --git a/Xext/shape.c b/Xext/shape.c
index cc5214a..1b012db 100644
--- a/Xext/shape.c
+++ b/Xext/shape.c
@@ -44,7 +44,7 @@ in this Software without prior written authorization from The Open Group.
 #include <X11/extensions/shapeproto.h>
 #include "regionstr.h"
 #include "gcstruct.h"
-#include "modinit.h"
+#include "extinit.h"
 #include "protocol-versions.h"
 
 typedef RegionPtr (*CreateDftPtr) (WindowPtr    /* pWin */
diff --git a/Xext/shm.c b/Xext/shm.c
index 966c450..bd40a94 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -87,7 +87,7 @@ in this Software without prior written authorization from The Open Group.
 #include "panoramiXsrv.h"
 #endif
 
-#include "modinit.h"
+#include "extinit.h"
 
 typedef struct _ShmDesc {
     struct _ShmDesc *next;
diff --git a/Xext/sync.c b/Xext/sync.c
index 8c3b1a3..31d73c5 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -76,7 +76,7 @@ PERFORMANCE OF THIS SOFTWARE.
 #include <sys/time.h>
 #endif
 
-#include "modinit.h"
+#include "extinit.h"
 
 /*
  * Local Global Variables
diff --git a/Xext/syncsrv.h b/Xext/syncsrv.h
index dbed476..c68229f 100644
--- a/Xext/syncsrv.h
+++ b/Xext/syncsrv.h
@@ -134,8 +134,6 @@ extern void SyncChangeCounter(SyncCounter *pCounter,
 
 extern void SyncDestroySystemCounter(pointer pCounter);
 
-extern void SyncExtensionInit(void);
-
 extern SyncCounter *SyncInitDeviceIdleTime(DeviceIntPtr dev);
 extern void SyncRemoveDeviceIdleTime(SyncCounter *counter);
 #endif                          /* _SYNCSRV_H_ */
diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c
index 3dc9977..c8bdfe0 100644
--- a/Xext/xcmisc.c
+++ b/Xext/xcmisc.c
@@ -38,7 +38,7 @@ from The Open Group.
 #include "extnsionst.h"
 #include "swaprep.h"
 #include <X11/extensions/xcmiscproto.h>
-#include "modinit.h"
+#include "extinit.h"
 
 #include <stdint.h>
 
diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index 9de7856..0344bed 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -71,6 +71,7 @@
 #include "gcstruct.h"
 #include "dixfontstr.h"
 #include "extnsionst.h"
+#include "extinit.h"
 #include "protocol-versions.h"
 
 #include <X11/extensions/xf86bigfproto.h>
diff --git a/Xext/xf86bigfontsrv.h b/Xext/xf86bigfontsrv.h
index 2c78dc4..eab5287 100644
--- a/Xext/xf86bigfontsrv.h
+++ b/Xext/xf86bigfontsrv.h
@@ -27,7 +27,6 @@
 
 #include <X11/fonts/font.h>
 
-extern void XFree86BigfontExtensionInit(void);
 extern void XF86BigfontFreeFontShm(FontPtr);
 extern void XF86BigfontCleanup(void);
 
diff --git a/Xext/xres.c b/Xext/xres.c
index 319164b..b40b37d 100644
--- a/Xext/xres.c
+++ b/Xext/xres.c
@@ -21,7 +21,7 @@
 #include "pixmapstr.h"
 #include "windowstr.h"
 #include "gcstruct.h"
-#include "modinit.h"
+#include "extinit.h"
 #include "protocol-versions.h"
 #include "client.h"
 #include "list.h"
diff --git a/Xext/xselinux_ext.c b/Xext/xselinux_ext.c
index d137c2d..20e5d71 100644
--- a/Xext/xselinux_ext.c
+++ b/Xext/xselinux_ext.c
@@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "windowstr.h"
 #include "propertyst.h"
 #include "extnsionst.h"
-#include "modinit.h"
+#include "extinit.h"
 #include "xselinuxint.h"
 
 #define CTX_DEV offsetof(SELinuxSubjectRec, dev_create_sid)
diff --git a/Xext/xtest.c b/Xext/xtest.c
index de9d8fd..9ce745a 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -55,7 +55,7 @@
 #include "eventstr.h"
 #include "inpututils.h"
 
-#include "modinit.h"
+#include "extinit.h"
 
 extern int DeviceValuator;
 
diff --git a/Xext/xvdix.h b/Xext/xvdix.h
index 59fc1ff..fdf33d3 100644
--- a/Xext/xvdix.h
+++ b/Xext/xvdix.h
@@ -235,7 +235,6 @@ typedef struct {
 extern _X_EXPORT int ProcXvDispatch(ClientPtr);
 extern _X_EXPORT int SProcXvDispatch(ClientPtr);
 
-extern _X_EXPORT void XvExtensionInit(void);
 extern _X_EXPORT int XvScreenInit(ScreenPtr);
 extern _X_EXPORT DevPrivateKey XvGetScreenKey(void);
 extern _X_EXPORT unsigned long XvGetRTPort(void);
diff --git a/Xext/xvmain.c b/Xext/xvmain.c
index 736114b..d54da1e 100644
--- a/Xext/xvmain.c
+++ b/Xext/xvmain.c
@@ -88,6 +88,7 @@ SOFTWARE.
 #include "pixmapstr.h"
 #include "gc.h"
 #include "extnsionst.h"
+#include "extinit.h"
 #include "dixstruct.h"
 #include "resource.h"
 #include "opaque.h"
diff --git a/Xext/xvmc.c b/Xext/xvmc.c
index 4aaff4d..b0fec80 100644
--- a/Xext/xvmc.c
+++ b/Xext/xvmc.c
@@ -13,6 +13,7 @@
 #include "resource.h"
 #include "scrnintstr.h"
 #include "extnsionst.h"
+#include "extinit.h"
 #include "servermd.h"
 #include <X11/Xfuncproto.h>
 #include "xvdix.h"
diff --git a/Xext/xvmcext.h b/Xext/xvmcext.h
index 5a4261b..d78171d 100644
--- a/Xext/xvmcext.h
+++ b/Xext/xvmcext.h
@@ -85,8 +85,6 @@ typedef struct {
 } XvMCAdaptorRec, *XvMCAdaptorPtr;
 
 #ifndef XorgLoader
-extern _X_EXPORT void XvMCExtensionInit(void);
-
 extern _X_EXPORT int XvMCScreenInit(ScreenPtr pScreen,
                                     int num, XvMCAdaptorPtr adapt);
 
diff --git a/composite/compext.c b/composite/compext.c
index 1d4d8bf..abcfbc5 100644
--- a/composite/compext.c
+++ b/composite/compext.c
@@ -48,6 +48,7 @@
 #include "compint.h"
 #include "xace.h"
 #include "protocol-versions.h"
+#include "extinit.h"
 
 static CARD8 CompositeReqCode;
 static DevPrivateKeyRec CompositeClientPrivateKeyRec;
diff --git a/composite/compint.h b/composite/compint.h
index 30b724e..45b5824 100644
--- a/composite/compint.h
+++ b/composite/compint.h
@@ -229,13 +229,6 @@ compReallocPixmap(WindowPtr pWin, int x, int y,
                   unsigned int w, unsigned int h, int bw);
 
 /*
- * compext.c
- */
-
-void
- CompositeExtensionInit(void);
-
-/*
  * compinit.c
  */
 
diff --git a/damageext/Makefile.am b/damageext/Makefile.am
index 35f7620..4d4cf44 100644
--- a/damageext/Makefile.am
+++ b/damageext/Makefile.am
@@ -4,5 +4,4 @@ AM_CFLAGS = $(DIX_CFLAGS)
 
 libdamageext_la_SOURCES = 	\
 	damageext.c		\
-	damageext.h		\
 	damageextint.h
diff --git a/damageext/damageext.c b/damageext/damageext.c
index f21f71c..fd58a94 100644
--- a/damageext/damageext.c
+++ b/damageext/damageext.c
@@ -26,6 +26,7 @@
 
 #include "damageextint.h"
 #include "protocol-versions.h"
+#include "extinit.h"
 
 static unsigned char DamageReqCode;
 static int DamageEventBase;
diff --git a/damageext/damageextint.h b/damageext/damageextint.h
index b7e63e0..2723379 100644
--- a/damageext/damageextint.h
+++ b/damageext/damageextint.h
@@ -37,7 +37,6 @@
 #include "windowstr.h"
 #include "selection.h"
 #include "scrnintstr.h"
-#include "damageext.h"
 #include "damage.h"
 #include "xfixes.h"
 
diff --git a/dbe/dbe.c b/dbe/dbe.c
index ca7f3e2..f2449cf 100644
--- a/dbe/dbe.c
+++ b/dbe/dbe.c
@@ -42,6 +42,7 @@
 #include <X11/Xproto.h>
 #include "scrnintstr.h"
 #include "extnsionst.h"
+#include "extinit.h"
 #include "gcstruct.h"
 #include "dixstruct.h"
 #define NEED_DBE_PROTOCOL
diff --git a/dbe/dbestruct.h b/dbe/dbestruct.h
index 9ea9eb6..f9d938a 100644
--- a/dbe/dbestruct.h
+++ b/dbe/dbestruct.h
@@ -83,8 +83,6 @@ typedef struct {
 /* Marker for free elements in the buffer ID array. */
 #define DBE_FREE_ID_ELEMENT	0
 
-extern _X_EXPORT void DbeExtensionInit(void);
-
 /* TYPEDEFS */
 
 /* Record used to pass swap information between DIX and DDX swapping
diff --git a/glx/glxext.c b/glx/glxext.c
index e506aec..a1f9d42 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -39,6 +39,7 @@
 #include <registry.h>
 #include "privates.h"
 #include <os.h>
+#include "extinit.h"
 #include "unpack.h"
 #include "glxutil.h"
 #include "glxext.h"
@@ -338,6 +339,9 @@ GlxExtensionInit(void)
     if (!__glXContextRes || !__glXDrawableRes)
         return;
 
+    if (serverGeneration == 1)
+        GlxPushProvider(&__glXDRISWRastProvider);
+
     if (!dixRegisterPrivateKey
         (&glxClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(__GLXclientState)))
         return;
diff --git a/glx/glxserver.h b/glx/glxserver.h
index 61c45c5..d9b106b 100644
--- a/glx/glxserver.h
+++ b/glx/glxserver.h
@@ -76,8 +76,6 @@ extern __GLXclientState *glxGetClient(ClientPtr pClient);
 
 /************************************************************************/
 
-void GlxExtensionInit(void);
-
 void GlxSetVisualConfigs(int nconfigs, void *configs, void **privates);
 
 void __glXScreenInitVisuals(__GLXscreen * screen);
diff --git a/hw/dmx/dmx.c b/hw/dmx/dmx.c
index a226c5d..c63fe46 100644
--- a/hw/dmx/dmx.c
+++ b/hw/dmx/dmx.c
@@ -52,6 +52,7 @@
 #include "os.h"
 #include "dixstruct.h"
 #include "extnsionst.h"
+#include "extinit.h"
 #include "opaque.h"
 
 #include "dmxextension.h"
@@ -65,8 +66,6 @@ extern unsigned long XRT_WINDOW;
 extern int PanoramiXNumScreens;
 #endif
 
-extern void DMXExtensionInit(void);
-
 static unsigned char DMXCode;
 
 static int
diff --git a/hw/dmx/glxProxy/glxext.c b/hw/dmx/glxProxy/glxext.c
index 9532837..8122221 100644
--- a/hw/dmx/glxProxy/glxext.c
+++ b/hw/dmx/glxProxy/glxext.c
@@ -44,6 +44,7 @@
 #include "glxvisuals.h"
 #include "micmap.h"
 #include "glxswap.h"
+#include "extinit.h"
 
 /*
 ** Forward declarations.
diff --git a/hw/dmx/glxProxy/glxext.h b/hw/dmx/glxProxy/glxext.h
index 881152d..47cec15 100644
--- a/hw/dmx/glxProxy/glxext.h
+++ b/hw/dmx/glxProxy/glxext.h
@@ -64,8 +64,6 @@ extern void __glXResetLargeCommandStatus(__GLXclientState *);
 extern int __glXQueryContextInfoEXT(__GLXclientState * cl, GLbyte * pc);
 extern int __glXSwapQueryContextInfoEXT(__GLXclientState * cl, char *pc);
 
-extern void GlxExtensionInit(void);
-
 extern Bool __glXCoreType(void);
 
 #endif                          /* _glxext_h_ */
diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am
index 65d98e6..5fbb890 100644
--- a/hw/xfree86/common/Makefile.am
+++ b/hw/xfree86/common/Makefile.am
@@ -45,7 +45,7 @@ libcommon_la_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \
                       xf86Option.c xf86Init.c \
                       xf86VidMode.c xf86fbman.c xf86cmap.c \
                       xf86Helper.c xf86PM.c xf86Xinput.c xisb.c \
-                      xf86Mode.c xorgHelper.c \
+                      xf86Mode.c xorgHelper.c xf86Extensions.h \
                       $(XVSOURCES) $(BUSSOURCES) $(RANDRSOURCES)
 nodist_libcommon_la_SOURCES = xf86DefModeSet.c xf86Build.h
 libcommon_la_LIBADD = $(top_builddir)/config/libconfig.la
diff --git a/hw/xfree86/common/vidmodeproc.h b/hw/xfree86/common/vidmodeproc.h
index aa43237..311d35c 100644
--- a/hw/xfree86/common/vidmodeproc.h
+++ b/hw/xfree86/common/vidmodeproc.h
@@ -39,7 +39,7 @@ typedef union {
     float f;
 } vidMonitorValue;
 
-extern _X_EXPORT void XFree86VidModeExtensionInit(void);
+extern Bool VidModeExtensionInit(ScreenPtr pScreen);
 
 extern _X_EXPORT Bool VidModeAvailable(int scrnIndex);
 extern _X_EXPORT Bool VidModeGetCurrentModeline(int scrnIndex, pointer *mode,
diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index 6116985..1e122cf 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -449,11 +449,6 @@ xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen,
                                     Bool resetMode);
 #endif
 
-/* xf86VidModeExtentionInit.c */
-
-extern _X_EXPORT Bool
-VidModeExtensionInit(ScreenPtr pScreen);
-
 /* convert ScreenPtr to ScrnInfoPtr */
 extern _X_EXPORT ScrnInfoPtr xf86ScreenToScrn(ScreenPtr pScreen);
 /* convert ScrnInfoPtr to ScreenPtr */
diff --git a/hw/xfree86/common/xf86Extensions.h b/hw/xfree86/common/xf86Extensions.h
new file mode 100644
index 0000000..f86a421
--- /dev/null
+++ b/hw/xfree86/common/xf86Extensions.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright © 2011 Daniel Stone
+ *
+ * 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 (including the next
+ * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
+ *
+ * Author: Daniel Stone <daniel at fooishbar.org>
+ */
+
+#ifndef XF86EXTENSIONS_H
+#define XF86EXTENSIONS_H
+
+#include "extnsionst.h"
+
+#ifdef XF86DRI
+extern Bool noXFree86DRIExtension;
+extern void XFree86DRIExtensionInit(void);
+#endif
+
+#ifdef DRI2
+#include <X11/extensions/dri2proto.h>
+extern void DRI2ExtensionInit(void);
+#endif
+
+#ifdef XF86VIDMODE
+#include <X11/extensions/xf86vmproto.h>
+extern Bool noXFree86VidModeExtension;
+extern void XFree86VidModeExtensionInit(void);
+#endif
+
+#ifdef XFreeXDGA
+#include <X11/extensions/xf86dgaproto.h>
+extern Bool noXFree86DGAExtension;
+extern void XFree86DGAExtensionInit(void);
+extern void XFree86DGARegister(void);
+#endif
+
+#endif
diff --git a/hw/xfree86/dixmods/dbemodule.c b/hw/xfree86/dixmods/dbemodule.c
index fea3d9f..fb37053 100644
--- a/hw/xfree86/dixmods/dbemodule.c
+++ b/hw/xfree86/dixmods/dbemodule.c
@@ -4,11 +4,10 @@
 
 #include "xf86Module.h"
 #include "globals.h"
+#include "extinit.h"
 
 static MODULESETUPPROTO(dbeSetup);
 
-extern void DbeExtensionInit(void);
-
 static ExtensionModule dbeExt = {
     DbeExtensionInit,
     "DOUBLE-BUFFER",
diff --git a/hw/xfree86/dixmods/extmod/Makefile.am b/hw/xfree86/dixmods/extmod/Makefile.am
index d08e9ad..cdbd82e 100644
--- a/hw/xfree86/dixmods/extmod/Makefile.am
+++ b/hw/xfree86/dixmods/extmod/Makefile.am
@@ -23,7 +23,6 @@ INCLUDES = @XORG_INCS@ \
 
 libextmod_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
 libextmod_la_SOURCES = modinit.c \
-                       modinit.h \
                        $(DGA_SRCS) \
                        $(XF86VMODE_SRCS) \
                        $(XV_SRCS)
diff --git a/hw/xfree86/dixmods/extmod/modinit.c b/hw/xfree86/dixmods/extmod/modinit.c
index ca15ee0..6477127 100644
--- a/hw/xfree86/dixmods/extmod/modinit.c
+++ b/hw/xfree86/dixmods/extmod/modinit.c
@@ -29,7 +29,8 @@
 
 #include <X11/Xproto.h>
 
-#include "modinit.h"
+#include "extinit.h"
+#include "xf86Extensions.h"
 #include "globals.h"
 
 static MODULESETUPPROTO(extmodSetup);
diff --git a/hw/xfree86/dixmods/extmod/xf86dga2.c b/hw/xfree86/dixmods/extmod/xf86dga2.c
index debaae2..d47ef6e 100644
--- a/hw/xfree86/dixmods/extmod/xf86dga2.c
+++ b/hw/xfree86/dixmods/extmod/xf86dga2.c
@@ -17,6 +17,7 @@
 #include "dixevents.h"
 #include "pixmapstr.h"
 #include "extnsionst.h"
+#include "xf86Extensions.h"
 #include "colormapst.h"
 #include "cursorstr.h"
 #include "scrnintstr.h"
@@ -28,7 +29,7 @@
 
 #include <string.h>
 
-#include "modinit.h"
+#include "extinit.h"
 
 #define DGA_PROTOCOL_OLD_SUPPORT 1
 
diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c
index 68c4b58..fa1867e 100644
--- a/hw/xfree86/dixmods/extmod/xf86vmode.c
+++ b/hw/xfree86/dixmods/extmod/xf86vmode.c
@@ -39,6 +39,7 @@ from Kaleb S. KEITHLEY
 #include "misc.h"
 #include "dixstruct.h"
 #include "extnsionst.h"
+#include "xf86Extensions.h"
 #include "scrnintstr.h"
 #include "servermd.h"
 #include <X11/extensions/xf86vmproto.h>
diff --git a/hw/xfree86/dixmods/glxmodule.c b/hw/xfree86/dixmods/glxmodule.c
index 4482cbc..f263324 100644
--- a/hw/xfree86/dixmods/glxmodule.c
+++ b/hw/xfree86/dixmods/glxmodule.c
@@ -42,6 +42,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "micmap.h"
 #include "globals.h"
 #include "glxserver.h"
+#include "extinit.h"
 
 static MODULESETUPPROTO(glxSetup);
 
diff --git a/hw/xfree86/dixmods/recordmod.c b/hw/xfree86/dixmods/recordmod.c
index fe52fa8..4f8eb97 100644
--- a/hw/xfree86/dixmods/recordmod.c
+++ b/hw/xfree86/dixmods/recordmod.c
@@ -3,13 +3,12 @@
 #endif
 
 #include "xf86Module.h"
+#include "extinit.h"
 
 extern Bool noTestExtensions;
 
 static MODULESETUPPROTO(recordSetup);
 
-extern void RecordExtensionInit(void);
-
 static ExtensionModule recordExt = {
     RecordExtensionInit,
     "RECORD",
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index 46a9ae4..a3e7870 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -51,6 +51,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "misc.h"
 #include "dixstruct.h"
 #include "extnsionst.h"
+#include "extinit.h"
 #include "colormapst.h"
 #include "cursorstr.h"
 #include "scrnintstr.h"
@@ -68,6 +69,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "xf86_OSproc.h"
 #include "inputstr.h"
 #include "xf86VGAarbiter.h"
+#include "xf86Extensions.h"
 
 static int DRIEntPrivIndex = -1;
 static DevPrivateKeyRec DRIScreenPrivKeyRec;
diff --git a/hw/xfree86/dri/drimodule.c b/hw/xfree86/dri/drimodule.c
index eb42ef6..6cb3bfb 100644
--- a/hw/xfree86/dri/drimodule.c
+++ b/hw/xfree86/dri/drimodule.c
@@ -37,6 +37,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #endif
 
 #include "xf86Module.h"
+#include "xf86Extensions.h"
 #include "globals.h"
 
 #include "xf86drm.h"
@@ -57,7 +58,6 @@ static XF86ModuleVersionInfo VersRec = {
     {0, 0, 0, 0}
 };
 
-extern void XFree86DRIExtensionInit(void);
 #define _XF86DRI_SERVER_
 #include <X11/dri/xf86driproto.h>
 
diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c
index 72ce869..0eb2014 100644
--- a/hw/xfree86/dri/xf86dri.c
+++ b/hw/xfree86/dri/xf86dri.c
@@ -47,6 +47,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "misc.h"
 #include "dixstruct.h"
 #include "extnsionst.h"
+#include "extinit.h"
 #include "colormapst.h"
 #include "cursorstr.h"
 #include "scrnintstr.h"
@@ -60,17 +61,17 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "dristruct.h"
 #include "xf86drm.h"
 #include "protocol-versions.h"
+#include "xf86Extensions.h"
 
 static int DRIErrorBase;
 
-static void XF86DRIResetProc(ExtensionEntry * extEntry);
+static void XF86DRIResetProc(ExtensionEntry *extEntry);
 
 static unsigned char DRIReqCode = 0;
 
-extern void XFree86DRIExtensionInit(void);
-
- /*ARGSUSED*/ static void
-XF86DRIResetProc(ExtensionEntry * extEntry)
+/*ARGSUSED*/
+static void
+XF86DRIResetProc(ExtensionEntry *extEntry)
 {
     DRIReset();
 }
diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
index f6c3f22..81dbbe2 100755
--- a/hw/xfree86/sdksyms.sh
+++ b/hw/xfree86/sdksyms.sh
@@ -279,7 +279,6 @@ cat > sdksyms.c << EOF
 #include "dixstruct.h"
 #include "exevents.h"
 #include "extension.h"
-#include "extinit.h"
 #include "extnsionst.h"
 #include "gc.h"
 #include "gcstruct.h"
diff --git a/hw/xquartz/pseudoramiX.c b/hw/xquartz/pseudoramiX.c
index 8bb7f2d..8336678 100644
--- a/hw/xquartz/pseudoramiX.c
+++ b/hw/xquartz/pseudoramiX.c
@@ -40,6 +40,7 @@
 #include "darwin.h"
 #include "pseudoramiX.h"
 #include "extnsionst.h"
+#include "extinit.h"
 #include "dixstruct.h"
 #include "window.h"
 #include <X11/extensions/panoramiXproto.h>
diff --git a/hw/xquartz/pseudoramiX.h b/hw/xquartz/pseudoramiX.h
index f41b5cb..f063919 100644
--- a/hw/xquartz/pseudoramiX.h
+++ b/hw/xquartz/pseudoramiX.h
@@ -6,6 +6,5 @@ extern int noPseudoramiXExtension;
 
 void
 PseudoramiXAddScreen(int x, int y, int w, int h);
-void PseudoramiXExtensionInit(int argc, char *argv[]);
 void
 PseudoramiXResetScreens(void);
diff --git a/hw/xquartz/xpr/dri.c b/hw/xquartz/xpr/dri.c
index 002ec94..663d61d 100644
--- a/hw/xquartz/xpr/dri.c
+++ b/hw/xquartz/xpr/dri.c
@@ -55,6 +55,7 @@
 #include "misc.h"
 #include "dixstruct.h"
 #include "extnsionst.h"
+#include "extinit.h"
 #include "colormapst.h"
 #include "cursorstr.h"
 #include "scrnintstr.h"
diff --git a/hw/xquartz/xpr/dri.h b/hw/xquartz/xpr/dri.h
index 8717a51..7d1c4f2 100644
--- a/hw/xquartz/xpr/dri.h
+++ b/hw/xquartz/xpr/dri.h
@@ -72,9 +72,6 @@ DRIFinishScreenInit(ScreenPtr pScreen);
 extern void
 DRICloseScreen(ScreenPtr pScreen);
 
-extern Bool
-DRIExtensionInit(void);
-
 extern void
 DRIReset(void);
 
diff --git a/include/extinit.h b/include/extinit.h
index a048b72..5e01128 100644
--- a/include/extinit.h
+++ b/include/extinit.h
@@ -23,8 +23,29 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 ********************************************************/
 
-/********************************************************************
- * Interface of extinit.c
+/*
+ * Copyright (C) 1994-2003 The XFree86 Project, Inc.  All Rights Reserved.
+ *
+ * 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, FIT-
+ * NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+ * XFREE86 PROJECT 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 XFree86 Project 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 XFree86 Project.
  */
 
 #ifndef EXTINIT_H
@@ -32,14 +53,135 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 #include "extnsionst.h"
 
-extern void
- XInputExtensionInit(void
-    );
+#ifdef COMPOSITE
+extern Bool noCompositeExtension;
+extern void CompositeExtensionInit(void);
+#endif
 
-extern _X_EXPORT void
- AssignTypeAndName(DeviceIntPtr /* dev */ ,
-                   Atom /* type */ ,
-                   const char * /* name */
-    );
+#ifdef DAMAGE
+extern Bool noDamageExtension;
+extern void DamageExtensionInit(void);
+#endif
 
-#endif                          /* EXTINIT_H */
+#if defined(DBE) && !defined(XorgLoader)
+extern Bool noDbeExtension;
+extern void DbeExtensionInit(void);
+#endif
+
+#ifdef DMXEXT
+extern void DMXExtensionInit(void);
+#endif
+
+#if defined(DPMSExtension) && !defined(XorgLoader)
+#include <X11/extensions/dpmsconst.h>
+extern Bool noDPMSExtension;
+extern void DPMSExtensionInit(void);
+#endif
+
+extern Bool noGEExtension;
+extern void GEExtensionInit(void);
+
+#ifdef GLXEXT
+extern _X_EXPORT Bool noGlxExtension;
+extern void GlxExtensionInit(void);
+#endif
+
+#ifdef PANORAMIX
+#include <X11/extensions/panoramiXproto.h>
+extern Bool noPanoramiXExtension;
+extern void PanoramiXExtensionInit(void);
+#endif
+
+#ifdef RANDR
+extern Bool noRRExtension;
+extern void RRExtensionInit(void);
+#endif
+
+#if defined(XRECORD) && !defined(XorgLoader)
+extern void RecordExtensionInit(void);
+#endif
+
+extern Bool noRenderExtension;
+extern void RenderExtensionInit(void);
+
+#if defined(RES) && !defined(XorgLoader)
+#include <X11/extensions/XResproto.h>
+extern Bool noResExtension;
+extern void ResExtensionInit(void);
+#endif
+
+#if defined(SCREENSAVER) && !defined(XorgLoader)
+#include <X11/extensions/saver.h>
+extern Bool noScreenSaverExtension;
+extern void ScreenSaverExtensionInit(void);
+#endif
+
+#include <X11/extensions/shapeproto.h>
+extern void ShapeExtensionInit(void);
+
+#ifdef MITSHM
+#include <X11/extensions/shm.h>
+#include <X11/extensions/shmproto.h>
+extern Bool noMITShmExtension;
+extern void ShmExtensionInit(void);
+#endif
+
+extern void SyncExtensionInit(void);
+
+extern void XCMiscExtensionInit(void);
+
+#ifdef XCSECURITY
+#include <X11/extensions/secur.h>
+#include "securitysrv.h"
+extern Bool noSecurityExtension;
+extern void SecurityExtensionInit(void);
+#endif
+
+#ifdef XF86BIGFONT
+#include <X11/extensions/xf86bigfproto.h>
+extern Bool noXFree86BigfontExtension;
+extern void XFree86BigfontExtensionInit(void);
+#endif
+
+extern void BigReqExtensionInit(void);
+
+#ifdef XFIXES
+extern Bool noXFixesExtension;
+extern void XFixesExtensionInit(void);
+#endif
+
+extern void XInputExtensionInit(void);
+extern _X_EXPORT void AssignTypeAndName(DeviceIntPtr dev,
+                                        Atom type,
+                                        const char *name);
+
+#include <X11/extensions/XKB.h>
+extern void XkbExtensionInit(void);
+
+#if defined(XSELINUX) && !defined(XorgLoader)
+#include "xselinux.h"
+extern Bool noSELinuxExtension;
+extern void SELinuxExtensionInit(void);
+#endif
+
+#ifdef XTEST
+#include <X11/extensions/xtestconst.h>
+#include <X11/extensions/xtestproto.h>
+extern void XTestExtensionInit(void);
+#endif
+
+#ifdef INXQUARTZ
+extern Bool noPseudoramiXExtension;
+extern void PseudoramiXExtensionInit(void);
+#endif
+
+#if defined(XV) && !defined(XorgLoader)
+#include <X11/extensions/Xv.h>
+#include <X11/extensions/XvMC.h>
+extern Bool noXvExtension;
+extern void XvExtensionInit(void);
+extern void XvMCExtensionInit(void);
+extern void XvRegister(void);
+#endif
+
+#endif
diff --git a/include/globals.h b/include/globals.h
index 6d3f3d7..7786987 100644
--- a/include/globals.h
+++ b/include/globals.h
@@ -5,6 +5,7 @@
 #include <signal.h>
 
 #include "window.h"             /* for WindowPtr */
+#include "extinit.h"
 
 /* Global X server variables that are visible to mi, dix, os, and ddx */
 
@@ -41,79 +42,7 @@ extern _X_EXPORT Bool DPMSCapableFlag;
 extern _X_EXPORT Bool PanoramiXExtensionDisabledHack;
 #endif
 
-#ifdef COMPOSITE
-extern _X_EXPORT Bool noCompositeExtension;
-#endif
-
-#ifdef DAMAGE
-extern _X_EXPORT Bool noDamageExtension;
-#endif
-
-#ifdef DBE
-extern _X_EXPORT Bool noDbeExtension;
-#endif
-
-#ifdef DPMSExtension
-extern _X_EXPORT Bool noDPMSExtension;
-#endif
-
-#ifdef GLXEXT
-extern _X_EXPORT Bool noGlxExtension;
-#endif
-
-#ifdef SCREENSAVER
-extern _X_EXPORT Bool noScreenSaverExtension;
-#endif
-
-#ifdef MITSHM
-extern _X_EXPORT Bool noMITShmExtension;
-#endif
-
-#ifdef RANDR
-extern _X_EXPORT Bool noRRExtension;
-#endif
-
-extern _X_EXPORT Bool noRenderExtension;
-
-#ifdef XCSECURITY
-extern _X_EXPORT Bool noSecurityExtension;
-#endif
-
-#ifdef RES
-extern _X_EXPORT Bool noResExtension;
-#endif
-
-#ifdef XF86BIGFONT
-extern _X_EXPORT Bool noXFree86BigfontExtension;
-#endif
-
-#ifdef XFreeXDGA
-extern _X_EXPORT Bool noXFree86DGAExtension;
-#endif
-
-#ifdef XF86DRI
-extern _X_EXPORT Bool noXFree86DRIExtension;
-#endif
-
-#ifdef XF86VIDMODE
-extern _X_EXPORT Bool noXFree86VidModeExtension;
-#endif
-
-#ifdef XFIXES
-extern _X_EXPORT Bool noXFixesExtension;
-#endif
-
-#ifdef PANORAMIX
-extern _X_EXPORT Bool noPanoramiXExtension;
-#endif
-
-#ifdef INXQUARTZ
-extern _X_EXPORT Bool noPseudoramiXExtension;
-#endif
-
 #ifdef XSELINUX
-extern _X_EXPORT Bool noSELinuxExtension;
-
 #define SELINUX_MODE_DEFAULT    0
 #define SELINUX_MODE_DISABLED   1
 #define SELINUX_MODE_PERMISSIVE 2
@@ -121,12 +50,4 @@ extern _X_EXPORT Bool noSELinuxExtension;
 extern _X_EXPORT int selinuxEnforcingState;
 #endif
 
-#ifdef XV
-extern _X_EXPORT Bool noXvExtension;
-#endif
-
-#ifdef DRI2
-extern _X_EXPORT Bool noDRI2Extension;
-#endif
-
 #endif                          /* !_XSERV_GLOBAL_H_ */
diff --git a/include/window.h b/include/window.h
index 7842b4d..f8fc2a5 100644
--- a/include/window.h
+++ b/include/window.h
@@ -214,10 +214,8 @@ extern _X_EXPORT void ResizeChildrenWinSize(WindowPtr /*pWin */ ,
                                             int /*dw */ ,
                                             int /*dh */ );
 
-extern _X_EXPORT void ShapeExtensionInit(void);
-
 extern _X_EXPORT void SendShapeNotify(WindowPtr /* pWin */ ,
-                                      int /* which */ );
+                                      int /* which */);
 
 extern _X_EXPORT RegionPtr CreateBoundingShape(WindowPtr /* pWin */ );
 
diff --git a/mi/miinitext.c b/mi/miinitext.c
index e60cc3f..ef20a11 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -90,114 +90,15 @@ SOFTWARE.
 
 #include "misc.h"
 #include "extension.h"
+#include "extinit.h"
 #include "micmap.h"
 #include "globals.h"
 
-extern Bool noGEExtension;
-
 #ifndef XFree86LOADER
 typedef void (*InitExtension) (void);
 #else                           /* XFree86Loader */
 #include "loaderProcs.h"
-#endif
-
-#ifdef MITSHM
-#include <X11/extensions/shm.h>
-#endif
-#ifdef XTEST
-#include <X11/extensions/xtestconst.h>
-#endif
-#include <X11/extensions/XKB.h>
-#ifdef XCSECURITY
-#include "securitysrv.h"
-#include <X11/extensions/secur.h>
-#endif
-#ifdef XSELINUX
-#include "xselinux.h"
-#endif
-#ifdef PANORAMIX
-#include <X11/extensions/panoramiXproto.h>
-#endif
-#ifdef XF86BIGFONT
-#include <X11/extensions/xf86bigfproto.h>
-#endif
-#ifdef RES
-#include <X11/extensions/XResproto.h>
-#endif
-
-/* FIXME: this whole block of externs should be from the appropriate headers */
-#ifdef MITSHM
-extern void ShmExtensionInit(void);
-#endif
-#ifdef PANORAMIX
-extern void PanoramiXExtensionInit(void);
-#endif
-#ifdef INXQUARTZ
-extern void PseudoramiXExtensionInit(void);
-#endif
-extern void XInputExtensionInit(void);
-#ifdef XTEST
-extern void XTestExtensionInit(void);
-#endif
-extern void BigReqExtensionInit(void);
-#ifdef SCREENSAVER
-extern void ScreenSaverExtensionInit(void);
-#endif
-#ifdef XV
-extern void XvExtensionInit(void);
-extern void XvMCExtensionInit(void);
-#endif
-extern void SyncExtensionInit(void);
-extern void XkbExtensionInit(void);
-extern void XCMiscExtensionInit(void);
-#ifdef XRECORD
-extern void RecordExtensionInit(void);
-#endif
-#ifdef DBE
-extern void DbeExtensionInit(void);
-#endif
-#ifdef XCSECURITY
-extern void SecurityExtensionInit(void);
-#endif
-#ifdef XSELINUX
-extern void SELinuxExtensionInit(void);
-#endif
-#ifdef XF86BIGFONT
-extern void XFree86BigfontExtensionInit(void);
-#endif
-#ifdef XF86VIDMODE
-extern void XFree86VidModeExtensionInit(void);
-#endif
-#ifdef XFreeXDGA
-extern void XFree86DGAExtensionInit(void);
-#endif
-#ifdef GLXEXT
-extern void GlxExtensionInit(void);
-#endif
-#ifdef XF86DRI
-extern void XFree86DRIExtensionInit(void);
-#endif
-#ifdef DPMSExtension
-extern void DPMSExtensionInit(void);
-#endif
-extern void RenderExtensionInit(void);
-#ifdef RANDR
-extern void RRExtensionInit(void);
-#endif
-#ifdef RES
-extern void ResExtensionInit(void);
-#endif
-#ifdef DMXEXT
-extern void DMXExtensionInit(void);
-#endif
-#ifdef XFIXES
-extern void XFixesExtensionInit(void);
-#endif
-#ifdef DAMAGE
-extern void DamageExtensionInit(void);
-#endif
-#ifdef COMPOSITE
-extern void CompositeExtensionInit(void);
+#include "xf86Extensions.h"
 #endif
 
 /* The following is only a small first step towards run-time
@@ -245,6 +146,7 @@ static ExtensionToggle ExtensionToggleList[] = {
 #ifdef XF86BIGFONT
     {"XFree86-Bigfont", &noXFree86BigfontExtension},
 #endif
+#ifndef NO_HW_ONLY_EXTS
 #ifdef XFreeXDGA
     {"XFree86-DGA", &noXFree86DGAExtension},
 #endif
@@ -254,6 +156,7 @@ static ExtensionToggle ExtensionToggleList[] = {
 #ifdef XF86VIDMODE
     {"XFree86-VidModeExtension", &noXFree86VidModeExtension},
 #endif
+#endif
 #ifdef XFIXES
     {"XFIXES", &noXFixesExtension},
 #endif
diff --git a/randr/randr.c b/randr/randr.c
index 3050c54..da48c3f 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -30,6 +30,7 @@
 #endif
 
 #include "randrstr.h"
+#include "extinit.h"
 
 /* From render.h */
 #ifndef SubPixelUnknown
diff --git a/randr/randrstr.h b/randr/randrstr.h
index 62b9050..212b0a9 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -418,10 +418,6 @@ extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType, RRProviderType;
 #define GetRRClient(pClient)    ((RRClientPtr)dixLookupPrivate(&(pClient)->devPrivates, RRClientPrivateKey))
 #define rrClientPriv(pClient)	RRClientPtr pRRClient = GetRRClient(pClient)
 
-/* Initialize the extension */
-extern _X_EXPORT void
- RRExtensionInit(void);
-
 #ifdef RANDR_12_INTERFACE
 /*
  * Set the range of sizes for the screen
diff --git a/record/record.c b/record/record.c
index 8a38118..6f3ad8b 100644
--- a/record/record.c
+++ b/record/record.c
@@ -38,6 +38,7 @@ and Jim Haggerty of Metheus.
 
 #include "dixstruct.h"
 #include "extnsionst.h"
+#include "extinit.h"
 #include <X11/extensions/recordproto.h>
 #include "set.h"
 #include "swaprep.h"
@@ -139,8 +140,6 @@ static int RecordDeleteContext(pointer /*value */ ,
                                XID      /*id */
     );
 
-void RecordExtensionInit(void);
-
 /***************************************************************************/
 
 /* client private stuff */
diff --git a/render/picturestr.h b/render/picturestr.h
index 1cda88a..dc00f41 100644
--- a/render/picturestr.h
+++ b/render/picturestr.h
@@ -547,8 +547,6 @@ CompositeTriFan(CARD8 op,
                 PictFormatPtr maskFormat,
                 INT16 xSrc, INT16 ySrc, int npoints, xPointFixed * points);
 
-extern _X_EXPORT void RenderExtensionInit(void);
-
 Bool
  AnimCurInit(ScreenPtr pScreen);
 
diff --git a/render/render.c b/render/render.c
index fe7666d..5437de2 100644
--- a/render/render.c
+++ b/render/render.c
@@ -37,6 +37,7 @@
 #include "pixmapstr.h"
 #include "colormapst.h"
 #include "extnsionst.h"
+#include "extinit.h"
 #include "servermd.h"
 #include <X11/extensions/render.h>
 #include <X11/extensions/renderproto.h>
diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c
index f80230f..a57be3c 100644
--- a/xfixes/xfixes.c
+++ b/xfixes/xfixes.c
@@ -48,6 +48,7 @@
 
 #include "xfixesint.h"
 #include "protocol-versions.h"
+#include "extinit.h"
 
 static unsigned char XFixesReqCode;
 int XFixesEventBase;
diff --git a/xfixes/xfixesint.h b/xfixes/xfixesint.h
index 71f88a9..334c71f 100644
--- a/xfixes/xfixesint.h
+++ b/xfixes/xfixesint.h
@@ -71,11 +71,6 @@ typedef struct _XFixesClient {
 
 extern int (*ProcXFixesVector[XFixesNumberRequests]) (ClientPtr);
 
-/* Initialize extension at server startup time */
-
-void
- XFixesExtensionInit(void);
-
 /* Save set */
 int
  ProcXFixesChangeSaveSet(ClientPtr client);
diff --git a/xkb/xkb.c b/xkb/xkb.c
index 0bec24f..3af6f0f 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -36,6 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #define	XKBSRV_NEED_FILE_FUNCS
 #include <xkbsrv.h>
 #include "extnsionst.h"
+#include "extinit.h"
 #include "xace.h"
 #include "xkb.h"
 #include "protocol-versions.h"
diff --git a/xkb/xkb.h b/xkb/xkb.h
index a526356..f3a60af 100644
--- a/xkb/xkb.h
+++ b/xkb/xkb.h
@@ -27,6 +27,4 @@ extern int ProcXkbGetKbdByName(ClientPtr client);
 extern int ProcXkbGetDeviceInfo(ClientPtr client);
 extern int ProcXkbSetDeviceInfo(ClientPtr client);
 extern int ProcXkbSetDebuggingFlags(ClientPtr client);
-
-extern void XkbExtensionInit(void);
 #endif
-- 
1.7.10.4



More information about the xorg-devel mailing list