diff options
65 files changed, 264 insertions, 274 deletions
diff --git a/Xext/bigreq.c b/Xext/bigreq.c index 886b761af..c78a1e4b4 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 8cff8bdea..5f1a35d9c 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 fc16b8afd..ad7f963db 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 d2a15dcb9..f46897966 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 df67c009c..3398a8d83 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 eefb49765..ac4a633e7 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 c101b7d2f..6cc9aa044 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 68cbef2e2..d36867cc8 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 fd0c41f3e..3fa04b921 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 b203c5ec1..8a333dd3a 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 dbed476f2..c68229f46 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 cfde3b3a8..034bfb63b 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 d91ff9583..b4ef5e460 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 2c78dc4c9..eab528775 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 acc5b8cc2..445abcab8 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 220e876ea..3115f03ea 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 4938e3bb3..c593372e7 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 59fc1ffc8..fdf33d384 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 74872fc25..c2860b86a 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 d74302bd5..808691caf 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 5a4261bbd..d78171d24 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 eea1a5861..8641eff5e 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 30b724e3e..45b5824a9 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 35f7620fb..4d4cf4478 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 222643cc6..a942ffa68 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 b7e63e077..272337922 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" @@ -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 9ea9eb695..f9d938af1 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 e506aec0b..a1f9d42e9 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 61c45c51e..d9b106b82 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 9df94a4d7..0f7cb5c64 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 95328373c..812222195 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 881152d1c..47cec15cf 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 65d98e694..5fbb89095 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 aa43237d4..311d35c7b 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 61169857f..1e122cf6a 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 000000000..f86a421d6 --- /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@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 fea3d9ff7..fb3705383 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 d08e9ad15..cdbd82e8c 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 ca15ee0e7..6477127ff 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 4cae949a7..808aa69e8 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 3d6685265..7cd2eedb3 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 4482cbc4f..f263324b8 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 fe52fa8e5..4f8eb9776 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 46a9ae457..a3e78701e 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 eb42ef64a..6cb3bfb9b 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 310bb5e4e..ba74bb04f 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 f6c3f2244..81dbbe2df 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 c14668775..3e1050047 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 f41b5cbe4..f063919dd 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 002ec94a7..663d61d35 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 8717a5186..7d1c4f212 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 a048b7254..5e011283f 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 6d3f3d708..7786987a4 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 7842b4d58..f8fc2a5fe 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 e60cc3f71..ef20a116d 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 3050c54fe..da48c3f06 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 62b9050e9..212b0a9be 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 67569d90c..f3a26a732 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 1cda88a80..dc00f41ff 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 530181197..51f75ae7e 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 c6dd19eb3..52c57dfab 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 71f88a93d..334c71fbf 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); @@ -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" @@ -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 |