Commit 81711086 authored by Daniel Stone's avatar Daniel Stone Committed by Keith Packard

Loader: Remove extension initialisation sorting

Extensions could previously declare initialisation dependencies on other
extensions, which would then get nicely sorted by the loader.  We only
had one user for this, GLX, which had one pointless (Composite) and one
possibly useful dependency (DBE).  As DBE is now a built-in, it will
always be sorted by GLX, so we no longer have any users for it.
Signed-off-by: Daniel Stone's avatarDaniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
parent d52ab85c
......@@ -1788,7 +1788,7 @@ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
Copyright (c) 1989, 1990, 1993, 1994
Copyright (c) 1987, 1990, 1993
The Regents of the University of California. All rights reserved.
This code is derived from software contributed to Berkeley by
......
......@@ -59,7 +59,6 @@ static ExtensionModule extensionModules[] = {
XFree86VidModeExtensionInit,
XF86VIDMODENAME,
&noXFree86VidModeExtension,
NULL,
NULL
},
#endif
......@@ -68,7 +67,6 @@ static ExtensionModule extensionModules[] = {
XFree86DGAExtensionInit,
XF86DGANAME,
&noXFree86DGAExtension,
NULL,
NULL
},
#endif
......@@ -77,7 +75,6 @@ static ExtensionModule extensionModules[] = {
XFree86DRIExtensionInit,
"XFree86-DRI",
&noXFree86DRIExtension,
NULL,
NULL
},
#endif
......@@ -86,7 +83,6 @@ static ExtensionModule extensionModules[] = {
DRI2ExtensionInit,
DRI2_NAME,
&noDRI2Extension,
NULL,
NULL
}
#endif
......
......@@ -175,7 +175,6 @@ typedef struct {
const char *name;
Bool *disablePtr;
InitExtension setupFunc;
const char **initDependencies;
} ExtensionModule;
extern _X_EXPORT ExtensionModule *ExtensionModuleList;
......
......@@ -50,7 +50,6 @@ static ExtensionModule GLXExt = {
GlxExtensionInit,
"GLX",
&noGlxExtension,
NULL,
NULL
};
......
......@@ -80,7 +80,6 @@ ModuleDescPtr LoadModule(const char *, const char *, const char **,
ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent);
void UnloadDriver(ModuleDescPtr);
void LoaderSetPath(const char *path);
void LoaderSortExtensions(void);
void LoaderUnload(const char *, void *);
unsigned long LoaderGetModuleVersion(ModuleDescPtr mod);
......
This diff is collapsed.
......@@ -358,38 +358,37 @@ InitExtensions(int argc, char *argv[])
#else /* XFree86LOADER */
/* List of built-in (statically linked) extensions */
static ExtensionModule staticExtensions[] = {
{GEExtensionInit, "Generic Event Extension", &noGEExtension, NULL, NULL},
{ShapeExtensionInit, "SHAPE", NULL, NULL, NULL},
{GEExtensionInit, "Generic Event Extension", &noGEExtension, NULL},
{ShapeExtensionInit, "SHAPE", NULL, NULL},
#ifdef MITSHM
{ShmExtensionInit, SHMNAME, &noMITShmExtension, NULL, NULL},
{ShmExtensionInit, SHMNAME, &noMITShmExtension, NULL},
#endif
{XInputExtensionInit, "XInputExtension", NULL, NULL, NULL},
{XInputExtensionInit, "XInputExtension", NULL, NULL},
#ifdef XTEST
{XTestExtensionInit, XTestExtensionName, &noTestExtensions, NULL, NULL},
{XTestExtensionInit, XTestExtensionName, &noTestExtensions, NULL},
#endif
{BigReqExtensionInit, "BIG-REQUESTS", NULL, NULL, NULL},
{SyncExtensionInit, "SYNC", NULL, NULL, NULL},
{XkbExtensionInit, XkbName, NULL, NULL, NULL},
{XCMiscExtensionInit, "XC-MISC", NULL, NULL, NULL},
{BigReqExtensionInit, "BIG-REQUESTS", NULL, NULL},
{SyncExtensionInit, "SYNC", NULL, NULL},
{XkbExtensionInit, XkbName, NULL, NULL},
{XCMiscExtensionInit, "XC-MISC", NULL, NULL},
#ifdef XCSECURITY
{SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, NULL,
NULL},
{SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, NULL},
#endif
#ifdef PANORAMIX
{PanoramiXExtensionInit, PANORAMIX_PROTOCOL_NAME, &noPanoramiXExtension,
NULL, NULL},
NULL},
#endif
#ifdef XFIXES
/* must be before Render to layer DisplayCursor correctly */
{XFixesExtensionInit, "XFIXES", &noXFixesExtension, NULL, NULL},
{XFixesExtensionInit, "XFIXES", &noXFixesExtension, NULL},
#endif
#ifdef XF86BIGFONT
{XFree86BigfontExtensionInit, XF86BIGFONTNAME, &noXFree86BigfontExtension,
NULL, NULL},
NULL},
#endif
{RenderExtensionInit, "RENDER", &noRenderExtension, NULL, NULL},
{RenderExtensionInit, "RENDER", &noRenderExtension, NULL},
#ifdef RANDR
{RRExtensionInit, "RANDR", &noRRExtension, NULL, NULL},
{RRExtensionInit, "RANDR", &noRRExtension, NULL},
#endif
#ifdef COMPOSITE
{CompositeExtensionInit, "COMPOSITE", &noCompositeExtension, NULL},
......@@ -442,10 +441,7 @@ InitExtensions(int argc, char *argv[])
int i;
ExtensionModule *ext;
/* Make sure all static extensions have been added, then sort the
* extensions according to their init dependencies. */
AddStaticExtensions();
LoaderSortExtensions();
for (i = 0; ExtensionModuleList[i].name != NULL; i++) {
ext = &ExtensionModuleList[i];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment