[PATCH 27/37] Loader: Move ExtensionModule types to DIX

Daniel Stone daniel at fooishbar.org
Tue Jun 28 12:27:43 PDT 2011


In preparation for gutting loadext.c, move the ExtensionModule struct to
the DIX, and unexport ExtensionModuleList (why, why, why, why was this
ever exported in the first place, tbqh).

Signed-off-by: Daniel Stone <daniel at fooishbar.org>
---
 hw/xfree86/common/xf86Module.h |   13 +-----------
 include/extension.h            |   41 +++++++++++++++++++++++++++++++++++++++-
 mi/miinitext.c                 |    1 -
 3 files changed, 41 insertions(+), 14 deletions(-)

diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index 655a256..28ddc78 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -42,6 +42,7 @@
 #define _XF86MODULE_H
 
 #include "misc.h"
+#include "extension.h"
 #ifndef NULL
 #define NULL ((void *)0)
 #endif
@@ -168,18 +169,6 @@ typedef struct {
 
 #define INITARGS void
 
-typedef void (*InitExtension)(void);
-
-typedef struct {
-    InitExtension	initFunc;
-    const char *	name;
-    Bool		*disablePtr;
-    InitExtension	setupFunc;	
-    const char **	initDependencies;
-} ExtensionModule;
-
-extern _X_EXPORT ExtensionModule *ExtensionModuleList;
-
 /* Prototypes for Loader functions that are exported to modules */
 extern _X_EXPORT pointer LoadSubModule(pointer, const char *, const char **,
 		      const char **, pointer, const XF86ModReqInfo *,
diff --git a/include/extension.h b/include/extension.h
index d24301d..4bf5ad4 100644
--- a/include/extension.h
+++ b/include/extension.h
@@ -45,6 +45,33 @@ SOFTWARE.
 
 ******************************************************************/
 
+/*
+ * Copyright (c) 1997-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).
+ */
+
 #ifndef EXTENSION_H
 #define EXTENSION_H 
 
@@ -52,6 +79,18 @@ SOFTWARE.
 
 #include "dixstruct.h"
 
+typedef void (*InitExtension)(void);
+
+typedef struct {
+    InitExtension	initFunc;
+    const char *	name;
+    Bool		*disablePtr;
+    InitExtension	setupFunc;	
+    const char **	initDependencies;
+} ExtensionModule;
+
+extern ExtensionModule *ExtensionModuleList;
+
 extern _X_EXPORT unsigned short StandardMinorOpcode(ClientPtr /*client*/);
 
 extern _X_EXPORT unsigned short MinorOpcodeOfRequest(ClientPtr /*client*/);
@@ -64,4 +103,4 @@ extern _X_EXPORT void InitExtensions(int argc, char **argv);
 
 extern _X_EXPORT void CloseDownExtensions(void);
 
-#endif /* EXTENSION_H */
+#endif
diff --git a/mi/miinitext.c b/mi/miinitext.c
index dc84319..2542c79 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -155,7 +155,6 @@ extern Bool noXvExtension;
 extern Bool noGEExtension;
 
 #ifndef XFree86LOADER
-typedef void (*InitExtension)(void);
 #else /* XFree86Loader */
 #include "loaderProcs.h"
 #endif
-- 
1.7.5.4



More information about the xorg-devel mailing list