[xserver-commit] xserver/hw/xizzle/common Makefile.am,3.3,3.4 compiler.h,3.107,3.108 xf86Config.c,3.283,3.284 xf86Configure.c,3.85,3.86 xf86Events.c,3.163,3.164 xf86Helper.c,1.139,1.140 xf86Init.c,3.218,3.219

Daniel Stone xserver-commit@pdx.freedesktop.org


Committed by: daniel

Update of /cvs/xserver/xserver/hw/xizzle/common
In directory pdx:/tmp/cvs-serv3345/common

Modified Files:
	Makefile.am compiler.h xf86Config.c xf86Configure.c 
	xf86Events.c xf86Helper.c xf86Init.c 
Log Message:
Down to 20 link errors now (count 'em!).

        * *.c:
        * *.h:
        Get rid of all references to SCO.

        * hw/xizzle/*/Makefile.am:
        Change SDK include dir to $(includedir)/xizzle.
        Add SDK libs where necessary.

        * hw/xizzle/Makefile.am:
        Reformat to be nicer and easier to shuffle around; also, fix lib
        ordering so we get so much closer to the elusive final link.
        Shuffle common/xf86Init.c into libxizzle.a.

        * hw/xizzle/common/Makefile.am:
        Fix a couple of early snafus - s/BUILDXI/XINPUT/, et al; make the SDK
        stuff conditional as needed; fix the SBus includes.

        * hw/xizzle/os-support/Makefile.am:
        Name library os-support/libxizzleos.a, not
        os-support/foo/libxizzlefoo.a.
        Clean up ARCH_SOURCES so it's always initialised to something.

        * hw/xizzle/os-support/linux/Makefile.am:
        Move linked libraries to _LIBADD, which somehow escaped my attention.
        Make inclusion of drm/libxizzlelinuxdrm.a dependent on DRI.

        * hw/xizzle/vbe/vbe.c:
        s/VERSION/VBE_VERSION/;

        * hw/xizzle/Xi:
        Axe this redundant dir.

        * configure.ac:
        All Xizzle-specific: axe hw/xizzle/Xi, shuffle link order, fix list of
        required modules to be vaguely sane, add some pertinent libs/incs.


Index: Makefile.am
===================================================================
RCS file: /cvs/xserver/xserver/hw/xizzle/common/Makefile.am,v
retrieving revision 3.3
retrieving revision 3.4
diff -u -d -r3.3 -r3.4
--- a/Makefile.am	7 Mar 2004 11:58:13 -0000	3.3
+++ b/Makefile.am	10 Mar 2004 11:50:31 -0000	3.4
@@ -1,8 +1,8 @@
-lib_LIBRARIES = libxizzlecommon.a
+lib_LIBRARIES = libxizzlecommon.a libxizzlehelper.a
 
-#if SPARC
-#SBUSSOURCES = xf86sbusBus.c
-#endif
+if XIZZLE_BUS_SBUS
+SBUS_SOURCES = xf86sbusBus.c
+endif
 
 #if DEBUG
 #DEBUGSOURCES = xf86Debug.c
@@ -10,21 +10,21 @@
 
 #if BUILDXV
 XVSOURCES = xf86xv.c xf86xvmc.c
+XVSDKINCS = xf86xv.h xf86xvmc.h
 #endif
 
 #if BUILDXKB
 XKBSOURCES = xf86XKB.c
 #endif
 
-#if BUILDXI
+if XINPUT
 XISOURCES = xf86Xinput.c xisb.c
-#endif
+XISDKINCS = xf86Xinput.h xisb.h
+endif
 
-#if BUILDRANDR
 RANDRSOURCES = xf86RandR.c
-#endif
 
-BUSSOURCES = xf86isaBus.c xf86pciBus.c xf86fbBus.c xf86noBus.c $(SBUSSOURCES)
+BUSSOURCES = xf86isaBus.c xf86pciBus.c xf86fbBus.c xf86noBus.c $(SBUS_SOURCES)
 
 #if LINUX
 KBDSOURCES = xf86KbdLnx.c
@@ -41,25 +41,24 @@
 # shouldn't isaBus and pciBus only be built on the relevant architectures? -ds
 # ditto DoScanPci
 libxizzlecommon_a_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \
-                          xf86Cursor.c xf86DGA.c xf86DPMS.c xf86DefModes.c \
-                          xf86DoProbe.c xf86DoScanPci.c xf86Events.c \
-                          xf86Globals.c xf86Helper.c xf86Init.c xf86Io.c \
-                          xf86MiscExt.c xf86Mode.c xf86Option.c xf86VidMode.c \
-                          xf86fbman.c xf86cmap.c xf86PM.c xf86Versions.c \
-                          $(XVSOURCES) $(BUSSOURCES) $(XKBSOURCES) \
-                          $(DEBUGSOURCES) $(XISOURCES) $(RANDRSOURCES) \
-                          $(KBDSOURCES)
+                            xf86Cursor.c xf86DGA.c xf86DPMS.c xf86DefModes.c \
+                            xf86DoProbe.c xf86DoScanPci.c xf86Events.c \
+                            xf86Globals.c xf86Init.c xf86Io.c \
+                            xf86MiscExt.c xf86Mode.c xf86Option.c \
+                            xf86VidMode.c xf86fbman.c xf86cmap.c xf86PM.c \
+                            xf86Versions.c $(XVSOURCES) $(BUSSOURCES) \
+                            $(XKBSOURCES) $(DEBUGSOURCES) $(XISOURCES) \
+                            $(RANDRSOURCES) $(KBDSOURCES)
+libxizzlehelper_a_SOURCES = xf86Helper.c
 
 AM_CFLAGS = $(XIZZLE_CFLAGS)
 
-INCLUDES = $(XIZZLE_INCS) -I$(top_srcdir)/mi \
-           -I$(srcdir)/../loader -I$(srcdir)/../ddc \
+INCLUDES = $(XIZZLE_INCS) -I$(srcdir)/../loader -I$(srcdir)/../ddc \
            -I$(srcdir)/../rac -I$(srcdir)/../vbe -I$(srcdir)/../int10 \
-           -I$(srcdir)/../i2c -I$(srcdir)/../parser -I$(srcdir)/../vgahw \
-           -I$(srcdir)/../Xi -I$(top_srcdir)/os
+           -I$(srcdir)/../i2c -I$(srcdir)/../parser -I$(srcdir)/../vgahw
 
-sdk_INCLUDEDIR = $(includedir)/X11/XIZZLESDK
+sdk_INCLUDEDIR = $(includedir)/xizzle
 sdk_INCLUDES = compiler.h fourcc.h xf86.h xf86Module.h xf8Opt.h xf86Pci.h \
                xf86PciInfo.h xf86Priv.h xf86Privstr.h xf86Resources.h \
-               xf86Version.h xf86Version.h xf86Xinput.h xf86cmap.h xf86fbman.h \
-               xf86str.h xf86xv.h xf86xvmc.h xisb.h
+               xf86Version.h xf86cmap.h xf86fbman.h xf86str.h $(XISDKINCS) \
+               $(XVSDKINCS)

Index: compiler.h
===================================================================
RCS file: /cvs/xserver/xserver/hw/xizzle/common/compiler.h,v
retrieving revision 3.107
retrieving revision 3.108
diff -u -d -r3.107 -r3.108
--- a/compiler.h	19 Feb 2004 03:51:36 -0000	3.107
+++ b/compiler.h	10 Mar 2004 11:50:31 -0000	3.108
@@ -1548,28 +1548,11 @@
 #      endif
 #     endif
 #    endif
-#    ifndef SCO325
-#     if defined(USL)
-#      if defined(IN_MODULE)
-#     /* avoid including <sys/types.h> for <sys/inline.h> on UnixWare */
-#       define ushort unsigned short
-#       define ushort_t unsigned short
-#       define ulong unsigned long
-#       define ulong_t unsigned long
-#       define uint_t unsigned int
-#       define uchar_t unsigned char
-#      else
-#       include <sys/types.h>
-#      endif /* IN_MODULE */
-#     endif /* USL */
-#     if !defined(sgi) && !defined(__SUNPRO_C)
-#      include <sys/inline.h>
-#     endif
-#    else
-#     include "scoasm.h"
+#    include <sys/types.h>
+#    if !defined(sgi) && !defined(__SUNPRO_C)
+#     include <sys/inline.h>
 #    endif
-#    if !defined(__HIGHC__) && !defined(SCO325) && !defined(sgi) && \
-	!defined(__SUNPRO_C)
+#    if !defined(__HIGHC__) !defined(sgi) && !defined(__SUNPRO_C)
 #     pragma asm partial_optimization outl
 #     pragma asm partial_optimization outw
 #     pragma asm partial_optimization outb

Index: xf86Config.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/xizzle/common/xf86Config.c,v
retrieving revision 3.283
retrieving revision 3.284
diff -u -d -r3.283 -r3.284
--- a/xf86Config.c	9 Mar 2004 13:25:12 -0000	3.283
+++ b/xf86Config.c	10 Mar 2004 11:50:31 -0000	3.284
@@ -113,6 +113,8 @@
 #define PROJECTROOT	"/usr/X11R6"
 #endif
 
+extern char *xf86DriverListNames[];
+
 static char *fontPath = NULL;
 
 /* Forward declarations */
@@ -544,7 +546,7 @@
     static Bool generated = FALSE;
 
     /* This string is modified in-place */
-    static char drivernames[] = xf86DriverListNames;
+    static char drivernames[] = { "ati" };
 
     if (!generated) {
         generated = TRUE;

Index: xf86Configure.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/xizzle/common/xf86Configure.c,v
retrieving revision 3.85
retrieving revision 3.86
diff -u -d -r3.85 -r3.86
--- a/xf86Configure.c	7 Mar 2004 23:31:09 -0000	3.85
+++ b/xf86Configure.c	10 Mar 2004 11:50:31 -0000	3.86
@@ -70,12 +70,7 @@
 Bool xf86DoConfigurePass1 = TRUE;
 Bool foundMouse = FALSE;
 
-#if defined(__UNIXOS2__)
-#define DFLT_MOUSE_DEV "mouse$"
-#define DFLT_MOUSE_PROTO "OS2Mouse"
-#elif defined(SCO)
-static char *DFLT_MOUSE_PROTO = "OSMouse";
-#elif defined(QNX4)
+#if defined(QNX4)
 static char *DFLT_MOUSE_PROTO = "OSMouse";
 static char *DFLT_MOUSE_DEV = "/dev/mouse";
 #elif defined(__QNXNTO__)
@@ -286,16 +281,7 @@
 	    ErrorF("cannot open /dev/wsmouse\n");
 	}
 #endif
-
-#ifndef SCO
-	fd = open(DFLT_MOUSE_DEV, 0);
-	if (fd != -1) {
-	    foundMouse = TRUE;
-	    close(fd);
-	}
-#else
 	foundMouse = TRUE;
-#endif
     }
 
     mouse = xf86confmalloc(sizeof(XF86ConfInputRec));
@@ -304,10 +290,6 @@
     mouse->inp_driver = "mouse";
     mouse->inp_option_lst = 
 		xf86addNewOption(mouse->inp_option_lst, "Protocol", DFLT_MOUSE_PROTO);
-#ifndef SCO
-    mouse->inp_option_lst = 
-		xf86addNewOption(mouse->inp_option_lst, "Device", DFLT_MOUSE_DEV);
-#endif
     ptr = (XF86ConfInputPtr)xf86addListItem((glp)ptr, (glp)mouse);
     return ptr;
 }
@@ -836,9 +818,6 @@
 #ifdef __UNIXOS2__
 #define PATH_MAX 2048
 #endif
-#if defined(SCO) || defined(SCO325)
-#define PATH_MAX 1024
-#endif
         const char* configfile = XF86CONFIGFILE".new";
     	char homebuf[PATH_MAX];
     	/* getenv might return R/O memory, as with OS/2 */
@@ -960,23 +939,10 @@
 
     ErrorF("\n");
 
-#ifdef SCO
-    ErrorF("\nXFree86 is using the kernel event driver to access the mouse.\n"
-	    "If you wish to use the internal XFree86 mouse drivers, please\n"
-	    "edit the file and correct the Device.\n");
-#else /* !SCO */
     if (!foundMouse) {
 	ErrorF("\nXFree86 is not able to detect your mouse.\n"
 		"Edit the file and correct the Device.\n");
-    } else {
-#ifndef __UNIXOS2__  /* OS/2 definitely has a mouse */
-	ErrorF("\nXFree86 detected your mouse at device %s.\n"
-		"Please check your config if the mouse is still not\n"
-		"operational, as by default XFree86 tries to autodetect\n"
-		"the protocol.\n",DFLT_MOUSE_DEV);
-#endif
     }
-#endif /* !SCO */
 
     if (xf86NumScreens > 1) {
 	ErrorF("\nXFree86 has configured a multihead system, please check your config.\n");

Index: xf86Events.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/xizzle/common/xf86Events.c,v
retrieving revision 3.163
retrieving revision 3.164
diff -u -d -r3.163 -r3.164
--- a/xf86Events.c	7 Mar 2004 13:43:02 -0000	3.163
+++ b/xf86Events.c	10 Mar 2004 11:50:31 -0000	3.164
@@ -125,7 +125,7 @@
  * Solaris 2.1 for x86. The basic problem is that Solaris is supposed
  * to be SVR4. It is for the most part, except where the video interface
  * is concerned.  These hacks work around those problems.
- * See the comments for Linux, and SCO.
+ * See the comments for Linux.
  *
  * This is a toggling variable:
  *  FALSE = No VT switching keys have been pressed last time around
@@ -331,9 +331,6 @@
     case ACTION_SWITCHSCREEN:
 	if (VTSwitchEnabled && !xf86Info.dontVTSwitch && arg) {
 	    int vtno = *((int *) arg);
-#ifdef SCO
-	    vtno--;
-#endif
 #if defined(QNX4)
 	    xf86Info.vtRequestsPending = vtno;
 #else
@@ -344,12 +341,8 @@
 	break;
     case ACTION_SWITCHSCREEN_NEXT:
 	if (VTSwitchEnabled && !xf86Info.dontVTSwitch) {
-#if defined(SCO) /* Shouldn't this be true for (sun) && (i386) && (SVR4) ? */
-	    if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) < 0)
-#else
 	    if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno + 1) < 0)
-#endif
-#if defined (SCO) || (defined(sun) && defined (i386) && defined (SVR4))
+#if defined(sun) && defined (i386) && defined (SVR4)
 		if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, 0) < 0)
 #else
 		if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, 1) < 0)
@@ -892,22 +885,6 @@
 
 #endif /* USE_VT_SYSREQ */
 
-#ifdef SCO
-    /*
-     *	With the console in raw mode, SCO will not switch consoles,
-     *	you get around this by activating the next console along, if
-     *	this fails then go back to console 0, if there is only one
-     *	then it doesn't matter, switching to yourself is a nop as far
-     *	as the console driver is concerned.
-     *	We could do something similar to linux here but SCO ODT uses
-     *	Ctrl-PrintScrn, so why change?
-     */
-    if (specialkey == KEY_Print && ModifierDown(ControlMask)) {
-      if (down)
-	xf86ProcessActionEvent(ACTION_SWITCHSCREEN_NEXT, NULL);
-      return;
-    }
-#endif /* SCO */
 #ifdef XKB
     }
 #endif

Index: xf86Helper.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/xizzle/common/xf86Helper.c,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -d -r1.139 -r1.140
--- a/xf86Helper.c	4 Mar 2004 02:33:00 -0000	1.139
+++ b/xf86Helper.c	10 Mar 2004 11:50:31 -0000	1.140
@@ -1407,7 +1407,7 @@
 	xf86LogFile = lf;
     }
 
-    LogInit(xf86LogFile, NULL);
+    /* LogInit(xf86LogFile, NULL); */
     xf86LogFileWasOpened = TRUE;
 
     xf86SetVerbosity(xf86Verbose);

Index: xf86Init.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/xizzle/common/xf86Init.c,v
retrieving revision 3.218
retrieving revision 3.219
diff -u -d -r3.218 -r3.219
--- a/xf86Init.c	7 Mar 2004 23:33:15 -0000	3.218
+++ b/xf86Init.c	10 Mar 2004 11:50:31 -0000	3.219
@@ -829,20 +829,6 @@
       xf86EnterServerState(SETUP);
     } 
   }
-#ifdef SCO
-  else {
-    /*
-     * Under SCO we must ack that we got the console at startup,
-     * I think this is the safest way to assure it.
-     */
-    static int once = 1;
-    if (once) {
-      once = 0;
-      if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0)
-        xf86Msg(X_WARNING, "VT_ACKACQ failed");
-    }
-  }
-#endif /* SCO */
 
   for (i = 0; i < xf86NumScreens; i++) {    
    	xf86EnableAccess(xf86Screens[i]);