xserver: Branch 'glucose-2'

Alan Hourihane alanh at kemper.freedesktop.org
Wed Mar 28 23:10:39 EEST 2007


 configure.ac                       |    1 
 glucose/Makefile.am                |    6 --
 glucose/glucose.c                  |   56 ----------------------
 glucose/glucose.h                  |   10 ---
 hw/xfree86/Makefile.am             |    4 -
 hw/xfree86/glucose/Makefile.am     |   18 +++++++
 hw/xfree86/glucose/glucosemodule.c |   94 +++++++++++++++++++++++++++++++++++++
 7 files changed, 116 insertions(+), 73 deletions(-)

New commits:
diff-tree b4c16beafc71f1b5dcad573f2af95ac67727de28 (from a8fbc90b64240892bd837b24b445a1c68e666ade)
Author: Alan Hourihane <alanh at fairlite.demon.co.uk>
Date:   Wed Mar 28 21:10:36 2007 +0100

    Move modular piece to hw/xfree86/glucose.

diff --git a/configure.ac b/configure.ac
index 2ec5e98..cd2fd39 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2022,6 +2022,7 @@ hw/xfree86/doc/sgml/Makefile
 hw/xfree86/dri/Makefile
 hw/xfree86/dummylib/Makefile
 hw/xfree86/exa/Makefile
+hw/xfree86/glucose/Makefile
 hw/xfree86/fbdevhw/Makefile
 hw/xfree86/i2c/Makefile
 hw/xfree86/int10/Makefile
diff --git a/glucose/Makefile.am b/glucose/Makefile.am
index 7af86ca..02336c3 100644
--- a/glucose/Makefile.am
+++ b/glucose/Makefile.am
@@ -1,6 +1,4 @@
-module_LTLIBRARIES = libglucose.la
-
-sdk_HEADERS = glucose.h
+noinst_LTLIBRARIES = libglucose.la
 
 INCLUDES = -I at MESA_SOURCE@/include \
            -I$(top_srcdir)/GL/mesa/glapi \
@@ -18,8 +16,6 @@ AM_CFLAGS = \
 	@GLX_DEFINES@ \
 	-DXFree86Server
 
-libglucose_la_LDFLAGS = -avoid-version
-
 libglucose_la_SOURCES = \
 	glucose.c \
 	glucose.h \
diff --git a/glucose/glucose.c b/glucose/glucose.c
index efecd7e..c0881a6 100644
--- a/glucose/glucose.c
+++ b/glucose/glucose.c
@@ -731,59 +731,3 @@ glucoseCloseScreen (int	  index,
 
     return (*pScreen->CloseScreen) (index, pScreen);
 }
-
-
-static MODULESETUPPROTO(glucoseSetup);
-
-static const OptionInfoRec GlucoseOptions[] = {
-    { -1,			NULL,
-      OPTV_NONE,	{0}, FALSE }
-};
-
-/*ARGSUSED*/
-static const OptionInfoRec *
-GlucoseAvailableOptions(void *unused)
-{
-    return (GlucoseOptions);
-}
-
-static XF86ModuleVersionInfo glucoseVersRec =
-{
-    "glucose",
-    MODULEVENDORSTRING,
-    MODINFOSTRING1,
-    MODINFOSTRING2,
-    XORG_VERSION_CURRENT,
-    GLUCOSE_VERSION_MAJOR, GLUCOSE_VERSION_MINOR, GLUCOSE_VERSION_RELEASE,
-    ABI_CLASS_VIDEODRV,		/* requires the video driver ABI */
-    ABI_VIDEODRV_VERSION,
-    MOD_CLASS_NONE,
-    {0,0,0,0}
-};
-
-XF86ModuleData glucoseModuleData = { &glucoseVersRec, glucoseSetup, NULL };
-
-ModuleInfoRec Glucose = {
-    1,
-    "Glucose",
-    NULL,
-    0,
-    GlucoseAvailableOptions,
-};
-
-/*ARGSUSED*/
-static pointer
-glucoseSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor)
-{
-    static Bool Initialised = FALSE;
-
-    if (!Initialised) {
-	Initialised = TRUE;
-#ifndef REMOVE_LOADER_CHECK_MODULE_INFO
-	if (xf86LoaderCheckSymbol("xf86AddModuleInfo"))
-#endif
-	xf86AddModuleInfo(&Glucose, Module);
-    }
-
-    return (pointer)TRUE;
-}
diff --git a/glucose/glucose.h b/glucose/glucose.h
index 7768ae3..fde01fd 100644
--- a/glucose/glucose.h
+++ b/glucose/glucose.h
@@ -30,16 +30,6 @@
 #ifndef GLUCOSE_H
 #define GLUCOSE_H
 
-#define GLUCOSE_VERSION_MAJOR   1
-#define GLUCOSE_VERSION_MINOR   0
-#define GLUCOSE_VERSION_RELEASE 0
-
-
-#define GLUCOSE_MAKE_VERSION(a, b, c) (((a) << 16) | ((b) << 8) | (c))
-#define GLUCOSE_VERSION \
-    GLUCOSE_MAKE_VERSION(GLUCOSE_VERSION_MAJOR, GLUCOSE_VERSION_MINOR, GLUCOSE_VERSION_RELEASE)
-#define GLUCOSE_IS_VERSION(a,b,c) (GLUCOSE_VERSION >= GLUCOSE_MAKE_VERSION(a,b,c))
-
 Bool
 glucoseCloseScreen (int	  index,
 		ScreenPtr pScreen);
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 50aa673..0dff9d7 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -21,12 +21,12 @@ DOC_SUBDIR = doc
 SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support parser rac \
 	  ramdac shadowfb vbe vgahw xaa $(MFB_SUBDIR) $(CFB_SUBDIR) \
 	  loader scanpci dixmods exa modes \
-	  $(DRI_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR)
+	  $(DRI_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR) glucose
 
 DIST_SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support \
                parser rac ramdac shadowfb vbe vgahw xaa xf1bpp xf4bpp \
                xf8_16bpp xf8_32bpp loader scanpci dixmods dri exa modes \
-	       utils doc
+	       utils doc glucose
 
 bin_PROGRAMS = Xorg
 
diff --git a/hw/xfree86/glucose/Makefile.am b/hw/xfree86/glucose/Makefile.am
new file mode 100644
index 0000000..0b7cafa
--- /dev/null
+++ b/hw/xfree86/glucose/Makefile.am
@@ -0,0 +1,18 @@
+module_LTLIBRARIES = libglucose.la
+
+libglucose_la_LDFLAGS = -avoid-version
+
+INCLUDES = \
+	$(XORG_INCS) \
+	-I$(srcdir)/../../../glucose \
+	-I$(srcdir)/../../../miext/cw
+
+AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS)
+
+libglucose_la_SOURCES = \
+	glucosemodule.c
+
+libglucose_la_LIBADD = \
+	../../../glucose/libglucose.la
+
+include $(top_srcdir)/cpprules.in
diff --git a/hw/xfree86/glucose/glucosemodule.c b/hw/xfree86/glucose/glucosemodule.c
new file mode 100644
index 0000000..c255fdf
--- /dev/null
+++ b/hw/xfree86/glucose/glucosemodule.c
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2006 Zack Rusin
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ *
+ * 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 Reveman not be used in advertising or publicity pertaining to
+ * distribution of the software without specific, written prior permission.
+ * David Reveman makes no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ *
+ * ZACK RUSIN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL ZACK RUSIN 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.
+ *
+ * Authors: Alan Hourihane <alanh at tungstengraphics.com>
+ *
+ * Re-written from original code by Zack Rusin
+ * 
+ **************************************************************************/
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#endif
+
+#include "xf86str.h"
+#include "xf86.h"
+
+#define GLUCOSE_VERSION_MAJOR   1
+#define GLUCOSE_VERSION_MINOR   0
+#define GLUCOSE_VERSION_RELEASE 0
+
+static MODULESETUPPROTO(glucoseSetup);
+
+static const OptionInfoRec GlucoseOptions[] = {
+    { -1,			NULL,
+      OPTV_NONE,	{0}, FALSE }
+};
+
+/*ARGSUSED*/
+static const OptionInfoRec *
+GlucoseAvailableOptions(void *unused)
+{
+    return (GlucoseOptions);
+}
+
+static XF86ModuleVersionInfo glucoseVersRec =
+{
+    "glucose",
+    MODULEVENDORSTRING,
+    MODINFOSTRING1,
+    MODINFOSTRING2,
+    XORG_VERSION_CURRENT,
+    GLUCOSE_VERSION_MAJOR, GLUCOSE_VERSION_MINOR, GLUCOSE_VERSION_RELEASE,
+    ABI_CLASS_VIDEODRV,		/* requires the video driver ABI */
+    ABI_VIDEODRV_VERSION,
+    MOD_CLASS_NONE,
+    {0,0,0,0}
+};
+
+XF86ModuleData glucoseModuleData = { &glucoseVersRec, glucoseSetup, NULL };
+
+ModuleInfoRec Glucose = {
+    1,
+    "Glucose",
+    NULL,
+    0,
+    GlucoseAvailableOptions,
+};
+
+/*ARGSUSED*/
+static pointer
+glucoseSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor)
+{
+    static Bool Initialised = FALSE;
+
+    if (!Initialised) {
+	Initialised = TRUE;
+#ifndef REMOVE_LOADER_CHECK_MODULE_INFO
+	if (xf86LoaderCheckSymbol("xf86AddModuleInfo"))
+#endif
+	xf86AddModuleInfo(&Glucose, Module);
+    }
+
+    return (pointer)TRUE;
+}



More information about the xorg-commit mailing list