xserver: Branch 'input-hotplug' - 7 commits

Daniel Stone daniels at kemper.freedesktop.org
Sat Aug 12 21:50:58 EEST 2006


 configure.ac                              |    6 
 dix/devices.c                             |   20 -
 hw/xfree86/common/xf86Bus.c               |    2 
 hw/xfree86/common/xf86Configure.c         |    2 
 hw/xfree86/common/xf86Events.c            |    3 
 hw/xfree86/common/xf86Helper.c            |    2 
 hw/xfree86/common/xf86MiscExt.c           |    8 
 hw/xfree86/os-support/Makefile.am         |    2 
 hw/xfree86/os-support/bsd/Makefile.am     |    1 
 hw/xfree86/os-support/bsd/bsd_io.c        |  293 ----------------
 hw/xfree86/os-support/hurd/Makefile.am    |   17 
 hw/xfree86/os-support/hurd/hurd_init.c    |   90 +++++
 hw/xfree86/os-support/hurd/hurd_mmap.c    |   96 +++++
 hw/xfree86/os-support/hurd/hurd_mouse.c   |  301 ++++++++++++++++
 hw/xfree86/os-support/hurd/hurd_video.c   |  191 ++++++++++
 hw/xfree86/os-support/linux/lnx_kbd.h     |    4 
 hw/xfree86/os-support/linux/lnx_video.c   |   16 
 hw/xfree86/os-support/sco/Makefile.am     |    2 
 hw/xfree86/os-support/sco/sco_io.c        |  268 ---------------
 hw/xfree86/os-support/solaris/Makefile.am |    4 
 hw/xfree86/os-support/solaris/sun_io.c    |  159 --------
 hw/xfree86/os-support/sysv/Makefile.am    |    2 
 hw/xfree86/os-support/sysv/sysv_mouse.c   |    3 
 hw/xfree86/os-support/sysv/xqueue.c       |  536 ------------------------------
 hw/xfree86/os-support/sysv/xqueue.h       |   12 
 hw/xfree86/os-support/usl/Makefile.am     |    5 
 hw/xfree86/os-support/usl/usl_io.c        |  171 ---------
 hw/xfree86/os-support/usl/usl_mouse.c     |    7 
 hw/xfree86/os-support/usl/usl_xqueue.c    |  359 --------------------
 hw/xfree86/os-support/usl/usl_xqueue.h    |    9 
 hw/xfree86/os-support/xf86_OSlib.h        |    9 
 hw/xfree86/os-support/xf86_OSproc.h       |   18 -
 hw/xfree86/utils/xorgcfg/mouse-cfg.c      |    3 
 hw/xfree86/utils/xorgcfg/text-mode.c      |    3 
 hw/xfree86/utils/xorgconfig/xorgconfig.c  |   17 
 hw/xfree86/vgahw/vgaHW.h                  |    2 
 hw/xfree86/xorgconf.cpp                   |   12 
 include/xorg-config.h.in                  |    3 
 os/utils.c                                |    7 
 xkb/xkbPrKeyEv.c                          |    4 
 40 files changed, 738 insertions(+), 1931 deletions(-)

New commits:
diff-tree d6433be3cca807dd78fbb1f45d9ba0212283083d (from parents)
Merge: 2bf9e3dc1ec5fd7bf84a4a96899e5663a721d4a4 984babe86bf82002b4d6589b2750c7b5a5489bd5
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Sat Aug 12 21:50:52 2006 +0300

    Merge branch 'master' into input-hotplug

diff --cc hw/xfree86/os-support/Makefile.am
index a886de8,e64703a..131c495
@@@ -3,10 -3,10 +3,10 @@@
  endif
  
  SUBDIRS = bus @XORG_OS_SUBDIR@ misc $(DRI_SUBDIRS)
- DIST_SUBDIRS = bsd bus drm misc linux lynxos solaris sysv sco usl
+ DIST_SUBDIRS = bsd bus drm misc linux lynxos solaris sysv sco usl hurd
  
  sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h xf86_ansic.h xf86_libc.h \
 -              assyntax.h xf86OSKbd.h xf86OSmouse.h
 +              assyntax.h xf86OSmouse.h
  
  EXTRA_DIST = int10Defines.h xf86OSpriv.h README.OS-lib xf86drm.h
  
diff-tree 2bf9e3dc1ec5fd7bf84a4a96899e5663a721d4a4 (from 59dcc62906d8ee597cd43aa307f414cb47995cea)
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Sat Aug 12 21:50:39 2006 +0300

    make DIX more tolerant of devices without a CtrlProc (Debian #269860)
    Return BadDevice on client requests for devices without a CtrlProc, instead
    of tanking horribly.

diff --git a/dix/devices.c b/dix/devices.c
index 63b206a..9b72fa4 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -1454,6 +1454,10 @@ ProcChangeKeyboardControl (ClientPtr cli
     REQUEST(xChangeKeyboardControlReq);
 
     REQUEST_AT_LEAST_SIZE(xChangeKeyboardControlReq);
+
+    if (!keybd->kbdfeed->CtrlProc)
+        return BadDevice;
+    
     vmask = stuff->mask;
     if (client->req_len != (sizeof(xChangeKeyboardControlReq)>>2)+Ones(vmask))
 	return BadLength;
@@ -1660,6 +1664,10 @@ ProcBell(ClientPtr client)
     int newpercent;
     REQUEST(xBellReq);
     REQUEST_SIZE_MATCH(xBellReq);
+
+    if (!keybd->kbdfeed->BellProc)
+        return BadDevice;
+    
     if (stuff->percent < -100 || stuff->percent > 100)
     {
 	client->errorValue = stuff->percent;
@@ -1677,7 +1685,7 @@ ProcBell(ClientPtr client)
 	else
 #endif
     (*keybd->kbdfeed->BellProc)(newpercent, keybd,
-				(pointer) &keybd->kbdfeed->ctrl, 0);
+                                (pointer) &keybd->kbdfeed->ctrl, 0);
     return Success;
 } 
 
@@ -1689,6 +1697,10 @@ ProcChangePointerControl(ClientPtr clien
     REQUEST(xChangePointerControlReq);
 
     REQUEST_SIZE_MATCH(xChangePointerControlReq);
+    
+    if (!mouse->ptrfeed->CtrlProc)
+        return BadDevice;
+    
     ctrl = mouse->ptrfeed->ctrl;
     if ((stuff->doAccel != xTrue) && (stuff->doAccel != xFalse))
     {
diff-tree 984babe86bf82002b4d6589b2750c7b5a5489bd5 (from f7919c287936f55569c2301ebb1b5f52358e70fa)
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Sat Aug 12 21:43:38 2006 +0300

    remove obsolete vendor defines
    Remove random behaviour changes for SGI and MetroLink.

diff --git a/dix/devices.c b/dix/devices.c
index 15b32c6..bcf8f4f 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -667,13 +667,7 @@ InitPtrFeedbackClassDeviceStruct(DeviceI
     if (!feedc)
 	return FALSE;
     feedc->CtrlProc = controlProc;
-#ifdef sgi
-    feedc->ctrl.num = 1;
-    feedc->ctrl.den = 1;
-    feedc->ctrl.threshold = 1;
-#else
     feedc->ctrl = defaultPointerControl;
-#endif
     feedc->ctrl.id = 0;
     if ( (feedc->next = dev->ptrfeed) )
         feedc->ctrl.id = dev->ptrfeed->ctrl.id + 1;
diff --git a/os/utils.c b/os/utils.c
index b15700f..6bf8624 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -271,10 +271,6 @@ long Memory_fail = 0;
 #include <stdlib.h>  /* for random() */
 #endif
 
-#ifdef sgi
-int userdefinedfontpath = 0;
-#endif /* sgi */
-
 char *dev_tty_from_init = NULL;		/* since we need to parse it anyway */
 
 OsSigHandlerPtr
@@ -843,9 +839,6 @@ ProcessCommandLine(int argc, char *argv[
 	{
 	    if(++i < argc)
 	    {
-#ifdef sgi
-		userdefinedfontpath = 1;
-#endif /* sgi */
 	        defaultFontPath = argv[i];
 	    }
 	    else
diff --git a/xkb/xkbPrKeyEv.c b/xkb/xkbPrKeyEv.c
index b2a7ab2..9944c88 100644
--- a/xkb/xkbPrKeyEv.c
+++ b/xkb/xkbPrKeyEv.c
@@ -150,11 +150,7 @@ unsigned        ndx;
 		break;
 	    default:
 		ErrorF("unknown key behavior 0x%04x\n",behavior.type);
-#if defined(MetroLink)
-		return;
-#else
 		break;
-#endif
 	}
     }
     XkbHandleActions(keybd,keybd,xE,count);
diff-tree f7919c287936f55569c2301ebb1b5f52358e70fa (from e641000b98e7c2e92e3c801eaa42aa15d5c16ad0)
Author: Bastian Blank <waldi at debian.org>
Date:   Sat Aug 12 20:43:25 2006 +0300

    xfree86: don't do legacy IO on ARM or S/390 (Debian #362641)
    Don't attempt to poke legacy IO ranges on ARM or S/390.

diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index e5c9615..e208378 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -3018,7 +3018,7 @@ static void
 CheckGenericGA()
 {
 /* This needs to be changed for multiple domains */
-#if !defined(__sparc__) && !defined(__powerpc__) && !defined(__mips__) && !defined(__ia64__)
+#if !defined(__sparc__) && !defined(__powerpc__) && !defined(__mips__) && !defined(__ia64__) && !defined(__arm__) && !defined(__s390__)
     IOADDRESS GenericIOBase = VGAHW_GET_IOBASE();
     CARD8 CurrentValue, TestValue;
 
diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
index 051970b..4b58046 100644
--- a/hw/xfree86/os-support/linux/lnx_video.c
+++ b/hw/xfree86/os-support/linux/lnx_video.c
@@ -464,7 +464,7 @@ mapVidMem(int ScreenNum, unsigned long B
 	   Base,realBase,alignOff);
 #endif
     
-#if defined(__ia64__)
+#if defined(__ia64__) || defined(__arm__) || defined(__s390__)
 #ifndef MAP_WRITECOMBINED
 #define MAP_WRITECOMBINED 0x00010000
 #endif
@@ -594,7 +594,7 @@ xf86DisableIO(void)
 #if defined(__powerpc__)
 	munmap(ioBase, 0x20000);
 	ioBase = NULL;
-#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__)
+#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__)
 	iopl(0);
 	ioperm(0, 1024, 0);
 #endif
@@ -613,12 +613,12 @@ xf86DisableIO(void)
 _X_EXPORT Bool
 xf86DisableInterrupts()
 {
-#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__) && !defined(__mips__) && !defined(__ia64__) && !defined(__sh__) && !defined(__hppa__)
+#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__) && !defined(__mips__) && !defined(__ia64__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__)
 	if (!ExtendedEnabled)
 	    if (iopl(3) || ioperm(0, 1024, 1))
 			return (FALSE);
 #endif
-#if defined(__alpha__) || defined(__mc68000__) || defined(__powerpc__) || defined(__sparc__) || defined(__mips__) || defined(__arm__) || defined(__sh__) || defined(__ia64__) || defined(__hppa__)
+#if defined(__alpha__) || defined(__mc68000__) || defined(__powerpc__) || defined(__sparc__) || defined(__mips__) || defined(__arm__) || defined(__sh__) || defined(__ia64__) || defined(__hppa__) || defined(__s390__)
 #else
 # ifdef __GNUC__
 #  if defined(__ia64__)
@@ -632,7 +632,7 @@ xf86DisableInterrupts()
 	asm("cli");
 # endif
 #endif
-#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__ia64__) && !defined(__hppa__)
+#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__ia64__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__)
 	if (!ExtendedEnabled) {
 	    iopl(0);
 	    ioperm(0, 1024, 0);
@@ -645,12 +645,12 @@ xf86DisableInterrupts()
 _X_EXPORT void
 xf86EnableInterrupts()
 {
-#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__) && !defined(__mips__) && !defined(__ia64__) && !defined(__sh__) && !defined(__hppa__)
+#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__) && !defined(__mips__) && !defined(__ia64__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__)
 	if (!ExtendedEnabled)
 	    if (iopl(3) || ioperm(0, 1024, 1))
 			return;
 #endif
-#if defined(__alpha__) || defined(__mc68000__) || defined(__powerpc__) || defined(__sparc__) || defined(__mips__) || defined(__arm__) || defined(__sh__) || defined(__ia64__) || defined(__hppa__)
+#if defined(__alpha__) || defined(__mc68000__) || defined(__powerpc__) || defined(__sparc__) || defined(__mips__) || defined(__arm__) || defined(__sh__) || defined(__ia64__) || defined(__hppa__) || defined(__s390__)
 #else
 # ifdef __GNUC__
 #  if defined(__ia64__)
@@ -664,7 +664,7 @@ xf86EnableInterrupts()
 	asm("sti");
 # endif
 #endif
-#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__ia64__) && !defined(__hppa__)
+#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__ia64__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__)
 	if (!ExtendedEnabled) {
 	    iopl(0);
 	    ioperm(0, 1024, 0);
diff --git a/hw/xfree86/vgahw/vgaHW.h b/hw/xfree86/vgahw/vgaHW.h
index 0879f96..ff7d1e5 100644
--- a/hw/xfree86/vgahw/vgaHW.h
+++ b/hw/xfree86/vgahw/vgaHW.h
@@ -175,7 +175,7 @@ typedef struct _vgaHWRec {
 #define BITS_PER_GUN 6
 #define COLORMAP_SIZE 256
 
-#if defined(__powerpc__)
+#if defined(__powerpc__) || defined(__arm__) || defined(__s390__)
 #define DACDelay(hw) /* No legacy VGA support */
 #else
 #define DACDelay(hw)							      \
diff-tree 59dcc62906d8ee597cd43aa307f414cb47995cea (from 26c3cd1c9e3f52548389817a6d89a377e20c4269)
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Sat Aug 12 20:39:08 2006 +0300

    xfree86: remove Xqueue support completely

diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index 3729679..ca81969 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -76,7 +76,7 @@ Bool foundMouse = FALSE;
 #elif defined(__SCO__)
 static char *DFLT_MOUSE_PROTO = "OSMouse";
 #elif defined(__UNIXWARE__)
-static char *DFLT_MOUSE_PROTO = "Xqueue";
+static char *DFLT_MOUSE_PROTO = "OSMouse";
 static char *DFLT_MOUSE_DEV = "/dev/mouse";
 #elif defined(QNX4)
 static char *DFLT_MOUSE_PROTO = "OSMouse";
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 21389f2..45a50d8 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -142,9 +142,6 @@ Bool VTSwitchEnabled = TRUE;		/* Allows 
 
 extern fd_set EnabledDevices;
 
-#if defined(XQUEUE)
-extern void xf86XqueRequest(void);
-#endif
 #ifdef XF86PM
 extern void (*xf86OSPMClose)(void);
 #endif
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 64841ad..d7fc437 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -2576,7 +2576,7 @@ xf86SetSilkenMouse (ScreenPtr pScreen)
     /*
      * XXX quick hack to report correctly for OSs that can't do SilkenMouse
      * yet.  Should handle this differently so that alternate async methods
-     * like Xqueue work correctly with this too.
+     * work correctly with this too.
      */
     pScrn->silkenMouse = useSM && xf86SIGIOSupported();
     if (serverGeneration == 1)
diff --git a/hw/xfree86/common/xf86MiscExt.c b/hw/xfree86/common/xf86MiscExt.c
index b6f3874..375226a 100644
--- a/hw/xfree86/common/xf86MiscExt.c
+++ b/hw/xfree86/common/xf86MiscExt.c
@@ -433,15 +433,13 @@ MiscExtApply(pointer structure, MiscExtS
 	if (!xf86MouseProtocolIDToName)
 	    return MISC_RET_NOMODULE;
 	if (mse->type < MTYPE_MICROSOFT
-		|| ( mse->type > MTYPE_EXPPS2
-		    && (mse->type!=MTYPE_OSMOUSE && mse->type!=MTYPE_XQUEUE)))
+		|| (mse->type > MTYPE_EXPPS2
+		    && (mse->type != MTYPE_OSMOUSE)))
 	    return MISC_RET_BADMSEPROTO;
 #ifdef OSMOUSE_ONLY
 	if (mse->type != MTYPE_OSMOUSE)
 	    return MISC_RET_BADMSEPROTO;
 #else
-	if (mse->type == MTYPE_XQUEUE)
-	    return MISC_RET_BADMSEPROTO;
 	if (mse->type == MTYPE_OSMOUSE)
 	    return MISC_RET_BADMSEPROTO;
 #endif /* OSMOUSE_ONLY */
@@ -462,7 +460,6 @@ MiscExtApply(pointer structure, MiscExtS
 	    mse->flags &= ~MF_REOPEN;
 	}
 	if (mse->type != MTYPE_OSMOUSE
-		&& mse->type != MTYPE_XQUEUE
 		&& mse->type != MTYPE_PS_2
 		&& mse->type != MTYPE_BUSMOUSE
 		&& mse->type != MTYPE_IMPS2
@@ -483,7 +480,6 @@ MiscExtApply(pointer structure, MiscExtS
 	    return MISC_RET_BADFLAGS;
 
 	if (mse->type != MTYPE_OSMOUSE
-		&& mse->type != MTYPE_XQUEUE
 		&& mse->type != MTYPE_BUSMOUSE)
 	{
 	    if (mse->samplerate < 0)
diff --git a/hw/xfree86/os-support/bsd/Makefile.am b/hw/xfree86/os-support/bsd/Makefile.am
index edef4d4..0a0bcab 100644
--- a/hw/xfree86/os-support/bsd/Makefile.am
+++ b/hw/xfree86/os-support/bsd/Makefile.am
@@ -62,7 +62,6 @@ libbsd_la_SOURCES = \
 	$(srcdir)/../shared/vidmem.c \
 	bsd_VTsw.c \
 	bsd_init.c \
-	bsd_io.c \
 	bsd_mouse.c \
 	$(ARCH_SOURCES) \
 	$(AGP_SOURCES) \
diff --git a/hw/xfree86/os-support/bsd/bsd_io.c b/hw/xfree86/os-support/bsd/bsd_io.c
deleted file mode 100644
index b433d7b..0000000
--- a/hw/xfree86/os-support/bsd/bsd_io.c
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
- * Copyright 1992 by Rich Murphey <Rich at Rice.edu>
- * Copyright 1993 by David Dawes <dawes at xfree86.org>
- *
- * 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 names of Rich Murphey and David Dawes 
- * not be used in advertising or publicity pertaining to distribution of 
- * the software without specific, written prior permission.  Rich Murphey and
- * David Dawes make no representations about the suitability of this 
- * software for any purpose.  It is provided "as is" without express or 
- * implied warranty.
- *
- * RICH MURPHEY AND DAVID DAWES DISCLAIM ALL WARRANTIES WITH REGARD TO 
- * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 
- * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID DAWES 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.
- *
- */
-/* $XConsortium: bsd_io.c /main/11 1996/10/19 18:06:07 kaleb $ */
-
-#define NEED_EVENTS
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include <termios.h>
-
-#include "compiler.h"
-
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-
-#ifdef WSCONS_SUPPORT
-#define KBD_FD(i) ((i).kbdFd != -1 ? (i).kbdFd : (i).consoleFd)
-#endif
-
-_X_EXPORT void
-xf86SoundKbdBell(int loudness, int pitch, int duration)
-{
-#ifdef WSCONS_SUPPORT
-	struct wskbd_bell_data wsb;
-#endif
-
-    	if (loudness && pitch)
-	{
-#ifdef PCCONS_SUPPORT
-		int data[2];
-#endif
-
-	    	switch (xf86Info.consType) {
-
-#ifdef PCCONS_SUPPORT
-	    	case PCCONS:
-		    	data[0] = pitch;
-		    	data[1] = (duration * loudness) / 50;
-		    	ioctl(xf86Info.consoleFd, CONSOLE_X_BELL, data);
-			break;
-#endif
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
-	    	case SYSCONS:
-		case PCVT:
-			ioctl(xf86Info.consoleFd, KDMKTONE,
-			      ((1193190 / pitch) & 0xffff) |
-			      (((unsigned long)duration*loudness/50)<<16));
-			break;
-#endif
-#if defined (WSCONS_SUPPORT)
-		case WSCONS:
-			wsb.which = WSKBD_BELL_DOALL;
-			wsb.pitch = pitch;
-			wsb.period = duration;
-			wsb.volume = loudness;
-			ioctl(KBD_FD(xf86Info), WSKBDIO_COMPLEXBELL, 
-				      &wsb);
-			break;
-#endif
-	    	}
-	}
-}
-
-void
-xf86SetKbdLeds(int leds)
-{
-	switch (xf86Info.consType) {
-
-	case PCCONS:
-		break;
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
-	case SYSCONS:
-	case PCVT:
-		ioctl(xf86Info.consoleFd, KDSETLED, leds);
-		break;
-#endif
-#if defined(WSCONS_SUPPORT)
-	case WSCONS:
-		ioctl(KBD_FD(xf86Info), WSKBDIO_SETLEDS, &leds);
-		break;
-#endif
-	}
-}
-
-int
-xf86GetKbdLeds()
-{
-	int leds = 0;
-
-	switch (xf86Info.consType) {
-
-	case PCCONS:
-		break;
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
-	case SYSCONS:
-	case PCVT:
-		ioctl(xf86Info.consoleFd, KDGETLED, &leds);
-		break;
-#endif
-#if defined(WSCONS_SUPPORT)
-	  case WSCONS:
-		  ioctl(KBD_FD(xf86Info), WSKBDIO_GETLEDS, &leds);
-		  break;
-#endif
-	}
-	return(leds);
-}
-
-void
-xf86SetKbdRepeat(char rad)
-{
-	switch (xf86Info.consType) {
-
-	case PCCONS:
-		break;
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
-	case SYSCONS:
-	case PCVT:
-		ioctl(xf86Info.consoleFd, KDSETRAD, rad);
-		break;
-#endif
-	}
-}
-
-#if defined(SYSCONS_SUPPORT) || defined(PCCONS_SUPPORT) || defined(PCVT_SUPPORT) || defined(WSCONS_SUPPORT)
-static struct termios kbdtty;
-#endif
-
-void
-xf86KbdInit()
-{
-	switch (xf86Info.consType) {
-
-#if defined(PCCONS_SUPPORT) || defined(SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
-	case PCCONS:
-	case SYSCONS:
-	case PCVT:
-		tcgetattr(xf86Info.consoleFd, &kbdtty);
-		break;
-#endif
-#if defined WSCONS_SUPPORT
-	case WSCONS:
-		if (xf86Info.kbdFd != -1) 
-			xf86FlushInput(xf86Info.kbdFd);
-		else
-			tcgetattr(xf86Info.consoleFd, &kbdtty);
-		break;
-#endif
-	}
-}
-
-int
-xf86KbdOn()
-{
-	struct termios nTty;
-#ifdef WSCONS_SUPPORT
-	int option;
-#endif
-
-
-	switch (xf86Info.consType) {
-
-#if defined(SYSCONS_SUPPORT) || defined(PCCONS_SUPPORT) || defined(PCVT_SUPPORT)
-	case SYSCONS:
-	case PCCONS:
-	case PCVT:
-		nTty = kbdtty;
-		nTty.c_iflag = IGNPAR | IGNBRK;
-		nTty.c_oflag = 0;
-		nTty.c_cflag = CREAD | CS8;
-		nTty.c_lflag = 0;
-		nTty.c_cc[VTIME] = 0;
-		nTty.c_cc[VMIN] = 1;
-		cfsetispeed(&nTty, 9600);
-		cfsetospeed(&nTty, 9600);
-		tcsetattr(xf86Info.consoleFd, TCSANOW, &nTty);
-
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
-		ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW);
-#endif
-		break;
-#endif
-#ifdef WSCONS_SUPPORT
-	case WSCONS:
-		if (xf86Info.kbdFd == -1) {
-			nTty = kbdtty;
-			nTty.c_iflag = IGNPAR | IGNBRK;
-			nTty.c_oflag = 0;
-			nTty.c_cflag = CREAD | CS8;
-			nTty.c_lflag = 0;
-			nTty.c_cc[VTIME] = 0;
-			nTty.c_cc[VMIN] = 1;
-			cfsetispeed(&nTty, 9600);
-			cfsetospeed(&nTty, 9600);
-			tcsetattr(xf86Info.consoleFd, TCSANOW, &nTty);
-			option = WSKBD_RAW;
-			if (ioctl(xf86Info.consoleFd, WSKBDIO_SETMODE,
-					&option) == -1)
-				FatalError("can't switch keyboard to raw mode. "
-					"Enable support for it in the kernel\n"
-					"or use for example:\n\n"
-					"Option \"Protocol\" \"wskbd\"\n"
-					"Option \"Device\" \"/dev/wskbd0\"\n"
-					"\nin your XF86Config(5) file\n");
-		} else {
-			return xf86Info.kbdFd;
-		}
-#endif
-	}
-	return(xf86Info.consoleFd);
-}
-
-int
-xf86KbdOff()
-{
-#ifdef WSCONS_SUPPORT
-	int option;
-#endif
-
-	switch (xf86Info.consType) {
-
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
-	case SYSCONS:
-	case PCVT:
-		ioctl(xf86Info.consoleFd, KDSKBMODE, K_XLATE);
-		/* FALL THROUGH */
-#endif
-#if defined(SYSCONS_SUPPORT) || defined(PCCONS_SUPPORT) || defined(PCVT_SUPPORT)
-	case PCCONS:
-		tcsetattr(xf86Info.consoleFd, TCSANOW, &kbdtty);
-		break;
-#endif
-#ifdef WSCONS_SUPPORT
-	case WSCONS:
-		if (xf86Info.kbdFd != -1) {
-			return xf86Info.kbdFd;
-		} else {
-			option = WSKBD_TRANSLATED;
-			ioctl(xf86Info.consoleFd, WSKBDIO_SETMODE, &option);
-			tcsetattr(xf86Info.consoleFd, TCSANOW, &kbdtty);
-		}
-		break;
-#endif
-	}	
-	return(xf86Info.consoleFd);
-}
-
-#ifdef WSCONS_SUPPORT
-
-#define NUMEVENTS 64
-
-void
-xf86WSKbdEvents(void)
-{
-    static struct wscons_event events[NUMEVENTS];
-    int n, i;
-
-    n = read(xf86Info.kbdFd, events, sizeof events);
-    if (n <= 0)
-	return;
-    n /= sizeof(struct wscons_event);
-    for (i = 0; i < n; i++)
-	xf86PostWSKbdEvent(&events[i]);
-}
-
-#endif /* WSCONS_SUPPORT */
-
-
diff --git a/hw/xfree86/os-support/linux/lnx_kbd.h b/hw/xfree86/os-support/linux/lnx_kbd.h
deleted file mode 100644
index b2ae179..0000000
--- a/hw/xfree86/os-support/linux/lnx_kbd.h
+++ /dev/null
@@ -1,4 +0,0 @@
-
-extern void KbdGetMapping(InputInfoPtr pInfo, KeySymsPtr pKeySyms,
-				CARD8 *pModMap);
-
diff --git a/hw/xfree86/os-support/sco/Makefile.am b/hw/xfree86/os-support/sco/Makefile.am
index 820d183..9cb5011 100644
--- a/hw/xfree86/os-support/sco/Makefile.am
+++ b/hw/xfree86/os-support/sco/Makefile.am
@@ -1,8 +1,6 @@
 EXTRA_DIST = \
 	VTsw_sco.c \
-	sco_KbdMap.c \
 	sco_init.c \
-	sco_io.c \
 	sco_iop.c \
 	sco_mouse.c \
 	sco_video.c
diff --git a/hw/xfree86/os-support/sco/sco_io.c b/hw/xfree86/os-support/sco/sco_io.c
deleted file mode 100644
index eafc14c..0000000
--- a/hw/xfree86/os-support/sco/sco_io.c
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * Copyright 2001 by J. Kean Johnston <jkj at sco.com>
- *
- * 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 J. Kean Johnston not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  J. Kean Johnston makes no
- * representations about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- * J. KEAN JOHNSTON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL J. KEAN JOHNSTON 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.
- */
-/* $XConsortium$ */
-
-/* Re-written May 2001 to represent the current state of reality */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-
-#include "compiler.h"
-
-#define _NEED_SYSI86
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86OSpriv.h"
-#include "xf86_OSlib.h"
-
-#include <sys/param.h>
-#include <sys/emap.h>
-#include <sys/nmap.h>
-
-_X_EXPORT void
-xf86SoundKbdBell(int loudness, int pitch, int duration)
-{
-  if (loudness && pitch) {
-    ioctl(xf86Info.consoleFd, KIOCSOUND, 1193180 / pitch);
-    usleep(duration * loudness * 20);
-    ioctl(xf86Info.consoleFd, KIOCSOUND, 0);
-  }
-}
-
-void
-xf86SetKbdLeds(int leds)
-{
-  /*
-   * sleep the first time through under SCO.  There appears to be a
-   * timing problem in the driver which causes the keyboard to be lost.
-   * This usleep stops it from occurring. NOTE: this was in the old code.
-   * I am not convinced it is true any longer, but it doesn't hurt to
-   * leave this in here.
-   */
-  static int once = 1;
-
-  if (once) {
-    usleep(100);
-    once = 0;
-  }
-
-  ioctl(xf86Info.consoleFd, KDSETLED, leds );
-}
-
-int
-xf86GetKbdLeds(void)
-{
-  int leds;
-
-  ioctl (xf86Info.consoleFd, KDGETLED, &leds);
-  return leds;
-}
-
-/*
- * Much of the code in this function is duplicated from the Linux code
- * by Orest Zborowski <obz at Kodak.com> and David Dawes <dawes at xfree86.org>.
- * Please see the file ../linux/lnx_io.c for full copyright information.
- *
- * NOTE: Only OpenServer Release 5.0.6 with Release Supplement 5.0.6A
- * and later have the required ioctl. 5.0.6A or higher is HIGHLY
- * recommended. The console driver is quite a different beast on that OS.
- */
-void
-xf86SetKbdRepeat(char rad)
-{
-#if defined(KBIO_SETRATE)
-  int i;
-  int value = 0x7f;     /* Maximum delay with slowest rate */
-  int delay = 250;      /* Default delay */
-  int rate = 300;       /* Default repeat rate */
-
-  static int valid_rates[] = { 300, 267, 240, 218, 200, 185, 171, 160, 150,
-                               133, 120, 109, 100, 92, 86, 80, 75, 67,
-                               60, 55, 50, 46, 43, 40, 37, 33, 30, 27,
-                               25, 23, 21, 20 };
-#define RATE_COUNT (sizeof( valid_rates ) / sizeof( int ))
-
-  static int valid_delays[] = { 250, 500, 750, 1000 };
-#define DELAY_COUNT (sizeof( valid_delays ) / sizeof( int ))
-
-  if (xf86Info.kbdRate >= 0) 
-    rate = xf86Info.kbdRate * 10;
-  if (xf86Info.kbdDelay >= 0)
-    delay = xf86Info.kbdDelay;
-
-  for (i = 0; i < RATE_COUNT; i++)
-    if (rate >= valid_rates[i]) {
-      value &= 0x60;
-      value |= i;
-      break;
-    }
-
-  for (i = 0; i < DELAY_COUNT; i++)
-    if (delay <= valid_delays[i]) {
-      value &= 0x1f;
-      value |= i << 5;
-      break;
-    }
-
-  ioctl (xf86Info.consoleFd, KBIO_SETRATE, value);
-#endif /* defined(KBIO_SETRATE) */
-}
-
-static Bool use_tcs = TRUE, use_kd = TRUE;
-static Bool no_nmap = TRUE, no_emap = TRUE;
-static int orig_getsc, orig_kbm;
-static struct termios orig_termios;
-static keymap_t keymap, noledmap;
-static uchar_t *sc_mapbuf;
-static uchar_t *sc_mapbuf2;
-
-void
-xf86KbdInit(void)
-{
-  orig_getsc = 0;
-  if (ioctl (xf86Info.consoleFd, TCGETSC, &orig_getsc) < 0)
-    use_tcs = FALSE;
-  if (ioctl (xf86Info.consoleFd, KDGKBMODE, &orig_kbm) < 0)
-    use_kd = FALSE;
-
-  if (!use_tcs && !use_kd)
-    FatalError ("xf86KbdInit: Could not determine keyboard mode\n");
-
-  /*
-   * One day this should be fixed to translate normal ASCII characters
-   * back into scancodes or into events that XFree86 wants, but not
-   * now. For the time being, we only support scancode mode screens.
-  */
-  if (use_tcs && !(orig_getsc & KB_ISSCANCODE))
-    FatalError ("xf86KbdInit: Keyboard can not send scancodes\n");
-
-  /*
-   * We need to get the original keyboard map and NUL out the lock
-   * modifiers. This prevents the scancode API from messing with
-   * the keyboard LED's. We restore the original map when we exit.
-   */
-  if (ioctl (xf86Info.consoleFd, GIO_KEYMAP, &keymap) < 0) {
-    FatalError ("xf86KbdInit: Failed to get keyboard map (%s)\n",
-        strerror(errno));
-  }
-  if (ioctl (xf86Info.consoleFd, GIO_KEYMAP, &noledmap) < 0) {
-    FatalError ("xf86KbdInit: Failed to get keyboard map (%s)\n",
-        strerror(errno));
-  } else {
-    int i, j;
-
-    for (i = 0; i < noledmap.n_keys; i++) {
-      for (j = 0; j < NUM_STATES; j++) {
-        if (IS_SPECIAL(noledmap, i, j) &&
-            ((noledmap.key[i].map[j] == K_CLK) ||
-             (noledmap.key[i].map[j] == K_NLK) ||
-             (noledmap.key[i].map[j] == K_SLK))) {
-          noledmap.key[i].map[j] = K_NOP;
-        }
-      }
-    }
-  }
-
-  if (ioctl (xf86Info.consoleFd, XCGETA, &orig_termios) < 0) {
-    FatalError ("xf86KbdInit: Failed to get terminal modes (%s)\n",
-        strerror(errno));
-  }
-
-  sc_mapbuf = xalloc (10*BSIZE);
-  sc_mapbuf2 = xalloc(10*BSIZE);
-
-  /* Get the emap */
-  if (ioctl (xf86Info.consoleFd, LDGMAP, sc_mapbuf) < 0) {
-    if (errno != ENAVAIL) {
-      FatalError ("xf86KbdInit: Failed to retrieve e-map (%s)\n",
-          strerror (errno));
-    }
-    no_emap = FALSE;
-  }
-
-  /* Get the nmap */
-  if (ioctl (xf86Info.consoleFd, NMGMAP, sc_mapbuf2) < 0) {
-    if (errno != ENAVAIL) {
-      FatalError ("xf86KbdInit: Failed to retrieve n-map (%s)\n",
-          strerror (errno));
-    }
-    no_nmap = FALSE;
-  }
-}
-
-int
-xf86KbdOn(void)
-{
-  struct termios newtio;
-
-  ioctl (xf86Info.consoleFd, LDNMAP); /* Turn e-mapping off */
-  ioctl (xf86Info.consoleFd, NMNMAP); /* Turn n-mapping off */
-
-  newtio = orig_termios;        /* structure copy */
-  newtio.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP);
-  newtio.c_oflag = 0;
-  newtio.c_cflag = CREAD | CS8 | B9600;
-  newtio.c_lflag = 0;
-  newtio.c_cc[VTIME]=0;
-  newtio.c_cc[VMIN]=1;
-  cfsetispeed(&newtio, 9600);
-  cfsetospeed(&newtio, 9600);
-  ioctl(xf86Info.consoleFd, XCSETA, &newtio);
-
-  /* Now tell the keyboard driver to send us raw scancodes */
-  if (use_tcs) {
-    int nm = orig_getsc;
-    nm &= ~KB_XSCANCODE;
-    ioctl (xf86Info.consoleFd, TCSETSC, &nm);
-  }
-
-  if (use_kd)
-    ioctl (xf86Info.consoleFd, KDSKBMODE, K_RAW);
-
-  ioctl (xf86Info.consoleFd, PIO_KEYMAP, &noledmap);
-
-  return(xf86Info.consoleFd);
-}
-
-int
-xf86KbdOff(void)
-{
-  /* Revert back to original translate scancode mode */
-  if (use_tcs)
-    ioctl (xf86Info.consoleFd, TCSETSC, &orig_getsc);
-  if (use_kd)
-    ioctl (xf86Info.consoleFd, KDSKBMODE, orig_kbm);
-
-  ioctl (xf86Info.consoleFd, PIO_KEYMAP, &keymap);
-
-  if (no_emap)
-    ioctl (xf86Info.consoleFd, LDSMAP, sc_mapbuf);
-  if (no_nmap)
-    ioctl (xf86Info.consoleFd, NMSMAP, sc_mapbuf2);
-
-  ioctl(xf86Info.consoleFd, XCSETA, &orig_termios);
-
-  return(xf86Info.consoleFd);
-}
diff --git a/hw/xfree86/os-support/solaris/Makefile.am b/hw/xfree86/os-support/solaris/Makefile.am
index 504e1a1..9c86079 100644
--- a/hw/xfree86/os-support/solaris/Makefile.am
+++ b/hw/xfree86/os-support/solaris/Makefile.am
@@ -1,8 +1,6 @@
 if SOLARIS_USL_CONSOLE
-IO_SRC   = $(srcdir)/../sysv/sysv_io.c
 VTSW_SRC = $(srcdir)/../shared/VTsw_usl.c
 else
-IO_SRC   = sun_io.c
 VTSW_SRC = $(srcdir)/../shared/VTsw_noop.c
 endif
 
@@ -20,7 +18,7 @@ solaris-$(SOLARIS_INOUT_ARCH).il: solari
 	$(CPP) -P -DINLINE_ASM solaris-${SOLARIS_INOUT_ARCH}.S > $@
 
 noinst_LTLIBRARIES = libsolaris.la
-libsolaris_la_SOURCES = sun_bios.c sun_init.c $(IO_SRC) \
+libsolaris_la_SOURCES = sun_bios.c sun_init.c \
 	sun_mouse.c sun_vid.c $(AGP_SRC) \
 	$(srcdir)/../shared/libc_wrapper.c \
 	$(srcdir)/../shared/kmod_noop.c $(srcdir)/../shared/pm_noop.c \
diff --git a/hw/xfree86/os-support/solaris/sun_io.c b/hw/xfree86/os-support/solaris/sun_io.c
deleted file mode 100644
index 3d8292e..0000000
--- a/hw/xfree86/os-support/solaris/sun_io.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/* $XdotOrg: $ */
-/*
- * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
- * Copyright 1993 by David Dawes <dawes at xfree86.org>
- *
- * 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 names of Thomas Roell and David Dawes
- * not be used in advertising or publicity pertaining to distribution of
- * the software without specific, written prior permission.  Thomas Roell and
- * David Dawes makes no representations about the suitability of this
- * software for any purpose.  It is provided "as is" without express or
- * implied warranty.
- *
- * THOMAS ROELL AND DAVID DAWES DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
- * IN NO EVENT SHALL THOMAS ROELL OR DAVID DAWES 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.
- *
- */
-/* Copyright 2005 Sun Microsystems, 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, and/or sell copies of the Software, and to permit persons
- * to whom the Software is furnished to do so, provided that the above
- * copyright notice(s) and this permission notice appear in all copies of
- * the Software and that both the above copyright notice(s) and this
- * permission notice appear in supporting documentation.
- * 
- * 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
- * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
- * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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.
- * 
- * Except as contained in this notice, the name of a copyright holder
- * shall not be used in advertising or otherwise to promote the sale, use
- * or other dealings in this Software without prior written authorization
- * of the copyright holder.
- */
-
-/* Solaris support routines for builtin "keyboard" driver */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-#include "sun_kbd.h"
-
-static sunKbdPrivRec sunKeyboardPriv;
-
-_X_HIDDEN void
-xf86KbdInit(void)
-{
-    const char *kbdName = "keyboard";
-    pointer *kbdOptions = NULL;
-    IDevPtr pDev;
-
-    /* There should be a better way to find the keyboard device name, but
-       this seems to work for now. */
-    for (pDev = xf86ConfigLayout.inputs; pDev && pDev->identifier; pDev++) {
-	if (!xf86NameCmp(pDev->driver, "keyboard")) {
-	    kbdName = pDev->identifier;
-	    kbdOptions = pDev->commonOptions;
-	    break;
-	}
-    }
-
-    if (xf86Info.kbdFd < 0) {
-	xf86Info.kbdFd = sunKbdOpen(kbdName, kbdOptions);
-	if (xf86Info.kbdFd < 0) {
-	    FatalError("Unable to open keyboard: /dev/kbd\n");
-	}
-    }
-
-    memset(&sunKeyboardPriv, 0, sizeof(sunKbdPrivRec));    
-    if (sunKbdInit(&sunKeyboardPriv, xf86Info.kbdFd,
-		   kbdName, kbdOptions)	!= Success) {
-    	FatalError("Unable to initialize keyboard driver\n");
-    }
-}
-
-_X_HIDDEN int
-xf86KbdOn(void)
-{
-    if (sunKbdOn(&sunKeyboardPriv) != Success) {
-	FatalError("Enabling keyboard");
-    }
-
-    return xf86Info.kbdFd;
-}
-
-_X_HIDDEN int
-xf86KbdOff(void)
-{
-    if (sunKbdOff(&sunKeyboardPriv) != Success) {
-	FatalError("Disabling keyboard");
-    }
-
-    return xf86Info.kbdFd;
-}
-
-_X_EXPORT void
-xf86SoundKbdBell(int loudness, int pitch, int duration)
-{
-    sunKbdSoundBell(&sunKeyboardPriv, loudness, pitch, duration);
-}
-
-_X_HIDDEN void
-xf86SetKbdLeds(int leds)
-{
-    sunKbdSetLeds(&sunKeyboardPriv, leds);
-}
-
-_X_HIDDEN int
-xf86GetKbdLeds(void)
-{
-    return sunKbdGetLeds(&sunKeyboardPriv);
-}
-
-_X_HIDDEN void
-xf86SetKbdRepeat(char rad)
-{
-    sunKbdSetRepeat(&sunKeyboardPriv, rad);
-}
-
-/*
- * Lets try reading more than one keyboard event at a time in the hopes that
- * this will be slightly more efficient.  Or we could just try the MicroSoft
- * method, and forget about efficiency. :-)
- */
-_X_HIDDEN void
-xf86KbdEvents(void)
-{
-    Firm_event event[64];
-    int        nBytes, i;
-
-    /* I certainly hope its not possible to read partial events */
-
-    if ((nBytes = read(xf86Info.kbdFd, (char *)event, sizeof(event))) > 0)
-    {
-	for (i = 0; i < (nBytes / sizeof(Firm_event)); i++)
-	    sunPostKbdEvent(sunKeyboardPriv.ktype, &event[i]);
-    }
-}
diff --git a/hw/xfree86/os-support/sysv/Makefile.am b/hw/xfree86/os-support/sysv/Makefile.am
index b67cf99..85aa764 100644
--- a/hw/xfree86/os-support/sysv/Makefile.am
+++ b/hw/xfree86/os-support/sysv/Makefile.am
@@ -1 +1 @@
-EXTRA_DIST = sysv_init.c sysv_io.c sysv_mouse.c sysv_video.c xqueue.c xqueue.h
+EXTRA_DIST = sysv_init.c sysv_io.c sysv_mouse.c sysv_video.c
diff --git a/hw/xfree86/os-support/sysv/sysv_mouse.c b/hw/xfree86/os-support/sysv/sysv_mouse.c
index 581ed58..e620105 100644
--- a/hw/xfree86/os-support/sysv/sysv_mouse.c
+++ b/hw/xfree86/os-support/sysv/sysv_mouse.c
@@ -11,7 +11,6 @@
 #include "xf86.h"
 #include "xf86Xinput.h"
 #include "xf86OSmouse.h"
-#include "xqueue.h"
 
 static int
 SupportedInterfaces(void)
@@ -22,7 +21,6 @@ SupportedInterfaces(void)
 
 #ifndef ISC
 static const char *internalNames[] = {
-	"Xqueue",
 	NULL
 };
 
@@ -56,7 +54,6 @@ xf86OSMouseInit(int flags)
 #ifndef ISC
     p->BuiltinNames = BuiltinNames;
     p->CheckProtocol = CheckProtocol;
-    p->PreInit = XqueueMousePreInit;
 #endif
     return p;
 }
diff --git a/hw/xfree86/os-support/sysv/xqueue.c b/hw/xfree86/os-support/sysv/xqueue.c
deleted file mode 100644
index f003211..0000000
--- a/hw/xfree86/os-support/sysv/xqueue.c
+++ /dev/null
@@ -1,536 +0,0 @@
-/*
- * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
- * Copyright 1993-1999 by The XFree86 Project, Inc.
- *
- * 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 the copyright holders not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  The copyright holders make no
- * representations about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THE COPYRIGHT HOLDERS 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.
- *
- */
-/* $XConsortium: xqueue.c /main/8 1996/10/19 18:08:11 kaleb $ */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "compiler.h"
-
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-#include "xf86Xinput.h"
-#include "xf86OSmouse.h"
-#include "xqueue.h"
-
-#ifdef XQUEUE
-
-static xqEventQueue      *XqueQaddr;
-static int xqueFd = -1;
-#ifndef XQUEUE_ASYNC
-static int xquePipe[2];
-#endif
-
-#ifdef XKB
-#include "inputstr.h"
-#include <X11/extensions/XKB.h>
-#include <X11/extensions/XKBstr.h>
-#include <X11/extensions/XKBsrv.h>
-extern Bool noXkbExtension;
-#endif
-
-#include "xf86Xinput.h"
-#include "mipointer.h"
-
-typedef struct {
-	int		xquePending;
-	int		xqueSema;
-} XqInfoRec, *XqInfoPtr;
-
-InputInfoPtr XqMouse = NULL;
-InputInfoPtr XqKeyboard = NULL;
-
-#ifndef XQUEUE_ASYNC
-/*
- * xf86XqueSignal --
- *	Trap the signal from xqueue and let it be known that events are
- *	ready for collection
- */
-
-static void
-xf86XqueSignal(int signum)
-{
-  ((XqInfoPtr)(((MouseDevPtr)(XqMouse->private))->mousePriv))->xquePending = 1;
-  /*
-   * This is a hack, but it is the only reliable way I can find of letting
-   * the main select() loop know that there is more input waiting.  Receiving
-   * a signal will interrupt select(), but there is no way I can find of
-   * dealing with events that come in between the end of processing the
-   * last set and when select() gets called.
-   *
-   * Suggestions for better ways of dealing with this without going back to
-   * asynchronous event processing are welcome.
-   */
-#ifdef DEBUG
-  ErrorF("xf86XqueSignal\n");
-#endif
-  write(xquePipe[1], "X", 1);
-  signal(SIGUSR2, xf86XqueSignal);
-}
-#endif
-  
-
-/*
- * xf86XqueKbdProc --
- *	Handle the initialization, etc. of a keyboard.
- */
-
-int
-xf86XqueKbdProc(DeviceIntPtr pKeyboard, int what)
-{
-  KeySymsRec  keySyms;
-  CARD8       modMap[MAP_LENGTH];
-
-  switch (what) {
-      
-  case DEVICE_INIT:
-    
-    xf86KbdGetMapping(&keySyms, modMap);
-    
-    /*
-     * Get also the initial led settings
-     */
-    ioctl(xf86Info.consoleFd, KDGETLED, &xf86Info.leds);
-
-    /*
-     * Perform final initialization of the system private keyboard
-     * structure and fill in various slots in the device record
-     * itself which couldn't be filled in before.
-     */
-    pKeyboard->public.on = FALSE;
-
-#ifdef XKB
-    if (noXkbExtension) {
-#endif
-    InitKeyboardDeviceStruct((DevicePtr)xf86Info.pKeyboard,
-			     &keySyms,
-			     modMap,
-			     xf86KbdBell,
-			     (KbdCtrlProcPtr)xf86KbdCtrl);
-#ifdef XKB
-    } else {
-	XkbComponentNamesRec names;
-	if (xf86Info.xkbkeymap) {
-	    names.keymap = xf86Info.xkbkeymap;
-	    names.keycodes = NULL;
-	    names.types = NULL;
-	    names.compat = NULL;
-	    names.symbols = NULL;
-	    names.geometry = NULL;
-	} else {
-	    names.keymap = NULL;
-	    names.keycodes = xf86Info.xkbkeycodes;
-	    names.types = xf86Info.xkbtypes;
-	    names.compat = xf86Info.xkbcompat;
-	    names.symbols = xf86Info.xkbsymbols;
-	    names.geometry = xf86Info.xkbgeometry;
-	}
-	if ((xf86Info.xkbkeymap || xf86Info.xkbcomponents_specified)
-	   && (xf86Info.xkbmodel == NULL || xf86Info.xkblayout == NULL)) {
-		xf86Info.xkbrules = NULL;
-	}
-	XkbSetRulesDflts(xf86Info.xkbrules, xf86Info.xkbmodel,
-			 xf86Info.xkblayout, xf86Info.xkbvariant,
-			 xf86Info.xkboptions);
-	XkbInitKeyboardDeviceStruct(pKeyboard, 
-				    &names,
-				    &keySyms, 
-				    modMap, 
-				    xf86KbdBell,
-				    (KbdCtrlProcPtr)xf86KbdCtrl);
-    }
-#endif
-
-    xf86InitKBD(TRUE);
-    break;
-    
-  case DEVICE_ON:
-    pKeyboard->public.on = TRUE;
-    xf86InitKBD(FALSE);
-    break;
-    
-  case DEVICE_CLOSE:
-  case DEVICE_OFF:
-    pKeyboard->public.on = FALSE;
-    break;
-  }
-  
-  return (Success);
-}
-
-
-/*
- * xf86XqueEvents --
- *      Get some events from our queue. Nothing to do here ...
- */
-
-void
-xf86XqueEvents()
-{
-}
-
-
-#ifdef XQUEUE_ASYNC
-static void XqDoInput(int signum);
-#endif
-
-void
-XqReadInput(InputInfoPtr pInfo)
-{
-    MouseDevPtr pMse;
-    XqInfoPtr pXq;
-    xqEvent *XqueEvents;
-    int XqueHead;
-    char buf[100];
-    signed char dx, dy;
-
-    if (xqueFd < 0)
-	return;
-
-    pMse = pInfo->private;
-    pXq = pMse->mousePriv;
-
-    XqueEvents = XqueQaddr->xq_events;
-    XqueHead = XqueQaddr->xq_head;
-
-    while (XqueHead != XqueQaddr->xq_tail) {
-	switch (XqueEvents[XqueHead].xq_type) {
-	case XQ_BUTTON:
-	    pMse->PostEvent(pInfo, ~(XqueEvents[XqueHead].xq_code) & 0x07,
-			    0, 0, 0, 0);
-#ifdef DEBUG
-	    ErrorF("xqueue: buttons: %d\n", ~(XqueEvents[XqueHead].xq_code) & 0x07);
-#endif
-	    break;
-
-	case XQ_MOTION:
-	    dx = (signed char)XqueEvents[XqueHead].xq_x;
-	    dy = (signed char)XqueEvents[XqueHead].xq_y;
-	    pMse->PostEvent(pInfo, ~(XqueEvents[XqueHead].xq_code) & 0x07,
-			    (int)dx, (int)dy, 0, 0);
-#ifdef DEBUG
-	    ErrorF("xqueue: Motion: (%d, %d) (buttons: %d)\n", dx, dy, ~(XqueEvents[XqueHead].xq_code) & 0x07);
-#endif
-	    break;
-
-	case XQ_KEY:
-	    /* XXX Need to deal with the keyboard part nicely. */
-#ifdef DEBUG
-	    ErrorF("xqueue: key: %d\n", XqueEvents[XqueHead].xq_code);
-#endif
-	    xf86PostKbdEvent(XqueEvents[XqueHead].xq_code);
-	    break;
-	default:
-	    xf86Msg(X_WARNING, "Unknown Xque Event: 0x%02x\n",
-		    XqueEvents[XqueHead].xq_type);
-	}
-      
-	if ((++XqueHead) == XqueQaddr->xq_size) XqueHead = 0;
-	xf86Info.inputPending = TRUE;
-    }
-
-    /* reenable the signal-processing */
-#ifdef XQUEUE_ASYNC
-    signal(SIGUSR2, XqDoInput);
-#endif
-
-#ifndef XQUEUE_ASYNC
-    {
-	int rval;
-
-	while ((rval = read(xquePipe[0], buf, sizeof(buf))) > 0)
-#ifdef DEBUG
-	    ErrorF("Read %d bytes from xquePipe[0]\n", rval);
-#else
-	    ;
-#endif
-    }
-#endif
-
-#ifdef DEBUG
-    ErrorF("Leaving XqReadInput()\n");
-#endif
-    pXq->xquePending = 0;
-    XqueQaddr->xq_head = XqueQaddr->xq_tail;
-    XqueQaddr->xq_sigenable = 1; /* UNLOCK */
-}
-
-#ifdef XQUEUE_ASYNC
-static void
-XqDoInput(int signum)
-{
-    if (XqMouse)
-	XqReadInput(XqMouse);
-}
-#endif
-
-static void
-XqBlock(pointer blockData, OSTimePtr pTimeout, pointer pReadmask)
-{
-    InputInfoPtr pInfo;
-    MouseDevPtr pMse;
-    XqInfoPtr pXq;
-    /*
-     * On MP SVR4 boxes, a race condition exists because the XQUEUE does
-     * not have anyway to lock it for exclusive access. This results in one
-     * processor putting something on the queue at the same time the other
-     * processor is taking it something off. The count of items in the queue
-     * can get off by 1. This just goes and checks to see if an extra event
-     * was put in the queue a during this period. The signal for this event
-     * was ignored while processing the previous event.
-     */
-
-    pInfo = blockData;
-    pMse = pInfo->private;
-    pXq = pMse-> mousePriv;
-    if (!pXq->xquePending) {
-#ifdef DEBUG
-	ErrorF("XqBlock: calling XqReadInput()\n");
-#endif
-	XqReadInput((InputInfoPtr)blockData);
-    } else {
-#ifdef DEBUG
-	ErrorF("XqBlock: not calling XqReadInput()\n");
-#endif
-	;
-    }
-    /*
-     * Make sure that any events that come in here are passed on without.
-     * waiting for the next wakeup.
-     */
-    if (xf86Info.inputPending) {
-#ifdef DEBUG
-	ErrorF("XqBlock: calling ProcessInputEvents()\n");
-#endif
-	ProcessInputEvents();
-    } else {
-#ifdef DEBUG
-	ErrorF("XqBlock: not calling ProcessInputEvents()\n");
-#endif
-	;
-    }
-}
-
-/*
- * XqEnable --
- *      Enable the handling of the Xque
- */
-
-static int
-XqEnable(InputInfoPtr pInfo)
-{
-    MouseDevPtr pMse;
-    XqInfoPtr pXq;
-    static struct kd_quemode xqueMode;
-    static Bool was_here = FALSE;
-
-    pMse = pInfo->private;
-    pXq = pMse->mousePriv;
-
-    if (xqueFd < 0) {
-	if ((xqueFd = open("/dev/mouse", O_RDONLY | O_NDELAY)) < 0) {
-	    if (xf86GetAllowMouseOpenFail()) {
-		xf86Msg(X_WARNING,
-		    "%s: Cannot open /dev/mouse (%s) - Continuing...\n",
-		    pInfo->name, strerror(errno));
-		return Success;
-	    } else {
-		xf86Msg(X_ERROR, "%s: Cannot open /dev/mouse (%s)\n",
-			pInfo->name, strerror(errno));
-		return !Success;
-	    }
-	}
-    }
-#ifndef XQUEUE_ASYNC
-    if (!was_here) {
-	pipe(xquePipe);
-	fcntl(xquePipe[0], F_SETFL, fcntl(xquePipe[0], F_GETFL, 0) | O_NDELAY);
-	fcntl(xquePipe[1], F_SETFL, fcntl(xquePipe[1], F_GETFL, 0) | O_NDELAY);
-	was_here = TRUE;
-    }
-#endif
-
-    if (pXq->xqueSema++ == 0) {
-#ifdef XQUEUE_ASYNC
-	(void) signal(SIGUSR2, XqDoInput);
-#else
-	(void) signal(SIGUSR2, xf86XqueSignal);
-#endif
-	xqueMode.qsize = 64;    /* max events */
-	xqueMode.signo = SIGUSR2;
-	ioctl(xf86Info.consoleFd, KDQUEMODE, NULL);
-
-	if (ioctl(xf86Info.consoleFd, KDQUEMODE, &xqueMode) < 0) {
-	    xf86Msg(X_ERROR, "%s: Cannot set KDQUEMODE", pInfo->name);
-	    return !Success;
-	}
-	XqueQaddr = (xqEventQueue *)xqueMode.qaddr;
-	XqueQaddr->xq_sigenable = 1; /* UNLOCK */
-    }
-
-    return Success;
-}
-
-
-
-/*
- * xf86XqueDisable --
- *      disable the handling of the Xque
- */
-
-static int
-XqDisable(InputInfoPtr pInfo)
-{
-    MouseDevPtr pMse;
-    XqInfoPtr pXq;
-
-    pMse = pInfo->private;
-    pXq = pMse->mousePriv;
-
-    if (pXq->xqueSema-- == 1)
-    {
-	XqueQaddr->xq_sigenable = 0; /* LOCK */
-      
-	if (ioctl(xf86Info.consoleFd, KDQUEMODE, NULL) < 0) {
-	    xf86Msg(X_ERROR, "%s: Cannot unset KDQUEMODE", pInfo->name);
-	    return !Success;
-	}
-    }
-
-    if (xqueFd >= 0) {
-	close(xqueFd);
-	xqueFd = -1;
-    }
-
-    return Success;
-}
-
-/*
- * XqMouseProc --
- *      Handle the initialization, etc. of a mouse
- */
-
-static int
-XqMouseProc(DeviceIntPtr pPointer, int what)
-{
-    InputInfoPtr pInfo;
-    MouseDevPtr pMse;
-    unchar        map[4];
-    int ret;
- 
-    pInfo = pPointer->public.devicePrivate;
-    pMse = pInfo->private;
-    pMse->device = pPointer;
-
-    switch (what) {
-    case DEVICE_INIT: 
-	pPointer->public.on = FALSE;
-
-	map[1] = 1;
-	map[2] = 2;
-	map[3] = 3;
-
-	InitPointerDeviceStruct((DevicePtr)pPointer, 
-				map, 
-				3, 
-				miPointerGetMotionEvents, 
-				pMse->Ctrl,
-				miPointerGetMotionBufferSize());
-	/* X valuator */
-	xf86InitValuatorAxisStruct(pPointer, 0, 0, -1, 1, 0, 1);
-	xf86InitValuatorDefaults(pPointer, 0);
-	/* Y valuator */
-	xf86InitValuatorAxisStruct(pPointer, 1, 0, -1, 1, 0, 1);
-	xf86InitValuatorDefaults(pPointer, 1);
-	xf86MotionHistoryAllocate(pInfo);
-	RegisterBlockAndWakeupHandlers(XqBlock, (WakeupHandlerProcPtr)NoopDDA,
-					pInfo);
-	break;
-      
-    case DEVICE_ON:
-	pMse->lastButtons = 0;
-	pMse->lastMappedButtons = 0;
-	pMse->emulateState = 0;
-	pPointer->public.on = TRUE;
-	ret = XqEnable(pInfo);
-#ifndef XQUEUE_ASYNC
-	if (xquePipe[0] != -1) {
-	    pInfo->fd = xquePipe[0];
-	    AddEnabledDevice(xquePipe[0]);
-	}
-#endif
-	return ret;
-      
-    case DEVICE_CLOSE:
-    case DEVICE_OFF:
-	pPointer->public.on = FALSE;
-	ret = XqDisable(pInfo);
-#ifndef XQUEUE_ASYNC
-	if (xquePipe[0] != -1) {
-	    RemoveEnabledDevice(xquePipe[0]);
-	    pInfo->fd = -1;
-	}
-#endif
-	return ret;
-    }
-    return Success;
-}
-
-Bool
-XqueueMousePreInit(InputInfoPtr pInfo, const char *protocol, int flags)
-{
-    MouseDevPtr pMse;
-    XqInfoPtr pXq;
-
-    pMse = pInfo->private;
-    pMse->protocol = protocol;
-    xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, protocol);
-    pXq = pMse->mousePriv = xnfcalloc(sizeof(XqInfoRec), 1);
-
-    /* Collect the options, and process the common options. */
-    xf86CollectInputOptions(pInfo, NULL, NULL);
-    xf86ProcessCommonOptions(pInfo, pInfo->options);
-
-    /* Process common mouse options (like Emulate3Buttons, etc). */
-    pMse->CommonOptions(pInfo);
-
-    /* Setup the local procs. */
-    pInfo->device_control = XqMouseProc;
-#ifdef XQUEUE_ASYNC
-    pInfo->read_input = NULL;
-#else
-    pInfo->read_input = XqReadInput;
-#endif
-    pInfo->fd = -1;
-
-    XqMouse = pInfo;
-
-    pInfo->flags |= XI86_CONFIGURED;
-    return TRUE;
-}
-
-#endif /* XQUEUE */
diff --git a/hw/xfree86/os-support/sysv/xqueue.h b/hw/xfree86/os-support/sysv/xqueue.h
deleted file mode 100644
index d693d2b..0000000
--- a/hw/xfree86/os-support/sysv/xqueue.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* $XFree86$ */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#ifndef _XF86_XQUEUE_H_
-#define _XF86_XQUEUE_H_
-
-Bool XqueueMousePreInit(InputInfoPtr pInfo, const char *protocol, int flags);
-
-#endif
diff --git a/hw/xfree86/os-support/usl/Makefile.am b/hw/xfree86/os-support/usl/Makefile.am
index 58f9760..db08f5d 100644
--- a/hw/xfree86/os-support/usl/Makefile.am
+++ b/hw/xfree86/os-support/usl/Makefile.am
@@ -1,9 +1,6 @@
 EXTRA_DIST = \
 	usl_init.c \
-	usl_io.c \
 	usl_iop.c \
 	usl_mouse.c \
 	usl_video.c \
-	usl_vtsw.c \
-	usl_xqueue.c \
-	usl_xqueue.h
+	usl_vtsw.c
diff --git a/hw/xfree86/os-support/usl/usl_io.c b/hw/xfree86/os-support/usl/usl_io.c
deleted file mode 100644
index 4cb23d4..0000000
--- a/hw/xfree86/os-support/usl/usl_io.c
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright 2001-2005 by Kean Johnston <jkj at sco.com>
- * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
- * Copyright 1993 by David Dawes <dawes at xfree86.org>
- *
- * 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 names of Thomas Roell, David Dawes 
- * and Kean Johnston not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior permission.
- * Thomas Roell, David Dawes and Kean Johnston make no representations
- * about the suitability of this software for any purpose.  It is provided
- * "as is" without express or implied warranty.
- *
- * THOMAS ROELL, DAVID DAWES AND KEAN JOHNSTON DISCLAIM ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THOMAS ROELLm DAVID WEXELBLAT
- * OR KEAN JOHNSTON 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.
- *
- */
-/* $XConsortium$ */
-
-#include "X.h"
-
-#include "compiler.h"
-
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-
-_X_EXPORT void
-xf86SoundKbdBell(int loudness, int pitch, int duration)
-{
-  if (loudness && pitch) {
-    ioctl(xf86Info.consoleFd, KIOCSOUND, 1193180 / pitch);
-    usleep(xf86Info.bell_duration * loudness * 20);
-    ioctl(xf86Info.consoleFd, KIOCSOUND, 0);
-  }
-}
-
-void
-xf86SetKbdLeds(int leds)
-{
-  ioctl(xf86Info.consoleFd, KDSETLED, leds);
-}
-
-int
-xf86GetKbdLeds(void)
-{
-  int leds;
-
-  ioctl(xf86Info.consoleFd, KDGETLED, &leds);
-  return(leds);
-}
-
-/*
- * Much of the code in this function is duplicated from the Linux code
- * by Orest Zborowski <obz at Kodak.com> and David Dawes <dawes at xfree86.org>.
- * Please see the file ../linux/lnx_io.c for full copyright information.
- */
-void
-xf86SetKbdRepeat(char rad)
-{
-  int i;
-  int value = 0x7f;     /* Maximum delay with slowest rate */
-  int delay = 250;      /* Default delay */
-  int rate = 300;       /* Default repeat rate */
-
-  static int valid_rates[] = { 300, 267, 240, 218, 200, 185, 171, 160, 150,
-                               133, 120, 109, 100, 92, 86, 80, 75, 67,
-                               60, 55, 50, 46, 43, 40, 37, 33, 30, 27,
-                               25, 23, 21, 20 };
-#define RATE_COUNT (sizeof( valid_rates ) / sizeof( int ))
-
-  static int valid_delays[] = { 250, 500, 750, 1000 };
-#define DELAY_COUNT (sizeof( valid_delays ) / sizeof( int ))
-
-  if (xf86Info.kbdRate >= 0) 
-    rate = xf86Info.kbdRate * 10;
-  if (xf86Info.kbdDelay >= 0)
-    delay = xf86Info.kbdDelay;
-
-  for (i = 0; i < RATE_COUNT; i++)
-    if (rate >= valid_rates[i]) {
-      value &= 0x60;
-      value |= i;
-      break;
-    }
-
-  for (i = 0; i < DELAY_COUNT; i++)
-    if (delay <= valid_delays[i]) {
-      value &= 0x1f;
-      value |= i << 5;
-      break;
-    }
-
-  ioctl (xf86Info.consoleFd, KDSETTYPEMATICS, value);
-}
-
-static int orig_kbm;
-static struct termio orig_termio;
-static keymap_t keymap, noledmap;
-
-void
-xf86KbdInit(void)
-{
-  ioctl (xf86Info.consoleFd, KDGKBMODE, &orig_kbm);
-  ioctl (xf86Info.consoleFd, TCGETA, &orig_termio);
-  /*
-   * We need to get the original keyboard map and NUL out the lock
-   * modifiers. This prevents the scancode API from messing with
-   * the keyboard LED's. We restore the original map when we exit.
-   */
-  if (ioctl (xf86Info.consoleFd, GIO_KEYMAP, &keymap) < 0) {
-    FatalError ("xf86KbdInit: Failed to get keyboard map (%s)\n",
-        strerror(errno));
-  }
-  if (ioctl (xf86Info.consoleFd, GIO_KEYMAP, &noledmap) < 0) {
-    FatalError ("xf86KbdInit: Failed to get keyboard map (%s)\n",
-        strerror(errno));
-  } else {
-    int i, j;
-
-    for (i = 0; i < noledmap.n_keys; i++) {
-      for (j = 0; j < NUM_STATES; j++) {
-        if (IS_SPECKEY(&noledmap, i, j) &&
-            ((noledmap.key[i].map[j] == K_CLK) ||
-             (noledmap.key[i].map[j] == K_NLK) ||
-             (noledmap.key[i].map[j] == K_SLK))) {
-          noledmap.key[i].map[j] = K_NOP;
-        }
-      }
-    }
-  }
-}
-
-int
-xf86KbdOn(void)
-{
-  struct termio newtio;
-
-  newtio = orig_termio;        /* structure copy */
-  newtio.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP);
-  newtio.c_oflag = 0;
-  newtio.c_cflag = CREAD | CS8 | B9600;
-  newtio.c_lflag = 0;
-  newtio.c_cc[VTIME]=0;
-  newtio.c_cc[VMIN]=1;
-  ioctl(xf86Info.consoleFd, TCSETA, &newtio);
-
-  ioctl (xf86Info.consoleFd, KDSKBMODE, K_RAW);
-  ioctl (xf86Info.consoleFd, PIO_KEYMAP, &noledmap);
-
-  return(xf86Info.consoleFd);
-}
-
-int
-xf86KbdOff(void)
-{
-  ioctl (xf86Info.consoleFd, KDSKBMODE, orig_kbm);
-  ioctl (xf86Info.consoleFd, PIO_KEYMAP, &keymap);
-  ioctl(xf86Info.consoleFd, TCSETA, &orig_termio);
-
-  return(xf86Info.consoleFd);
-}
diff --git a/hw/xfree86/os-support/usl/usl_mouse.c b/hw/xfree86/os-support/usl/usl_mouse.c
index 15a0ac5..aa4600f 100644
--- a/hw/xfree86/os-support/usl/usl_mouse.c
+++ b/hw/xfree86/os-support/usl/usl_mouse.c
@@ -33,7 +33,6 @@
 #include "xf86Priv.h"
 #include "xf86_OSlib.h"
 #include "mipointer.h"
-#include "usl_xqueue.h"
 
 static int
 SupportedInterfaces(void)
@@ -42,7 +41,6 @@ SupportedInterfaces(void)
 }
 
 static const char *internalNames[] = {
-  "Xqueue",
   NULL
 };
 
@@ -55,7 +53,7 @@ BuiltinNames(void)
 static const char *
 DefaultProtocol (void)
 {
-  return "Xqueue";
+  return "OSMouse";
 }
 
 static Bool
@@ -121,7 +119,6 @@ OsMouseProc(DeviceIntPtr pPointer, int w
 static Bool
 OsMousePreInit(InputInfoPtr pInfo, const char *protocol, int flags)
 {
-  /* This is called when the protocol is "Xqueue" */
   MouseDevPtr pMse;
 
   pMse = pInfo->private;
@@ -155,7 +152,7 @@ OsMousePreInit(InputInfoPtr pInfo, const
 
   /* Setup the local procs. */
   pInfo->device_control = OsMouseProc;
-  pInfo->read_input     = NULL;	/* Handled by the XQUEUE signal handler */
+  pInfo->read_input     = NULL;
 
   pInfo->flags |= XI86_CONFIGURED;
   return TRUE;
diff --git a/hw/xfree86/os-support/usl/usl_xqueue.c b/hw/xfree86/os-support/usl/usl_xqueue.c
deleted file mode 100644
index 1615353..0000000
--- a/hw/xfree86/os-support/usl/usl_xqueue.c
+++ /dev/null
@@ -1,359 +0,0 @@
-/* $XdotOrg$ */
-/*
- * Copyright 2005 by Kean Johnston <jkj at sco.com>
- * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
- * Copyright 1993-1999 by The XFree86 Project, Inc.
- *
- * 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 the copyright holders not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  The copyright holders make no
- * representations about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL THE COPYRIGHT HOLDERS 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.
- *
- */
-/* $XConsortium$ */
-
-#include "X.h"
-#include "compiler.h"
-
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-#include "xf86Xinput.h"
-#include "xf86OSmouse.h"
-#include "usl_xqueue.h"
-
-#ifdef XKB
-#include "inputstr.h"
-#include <X11/extensions/XKB.h>
-#include <X11/extensions/XKBstr.h>
-#include <X11/extensions/XKBsrv.h>
-extern Bool noXkbExtension;
-#endif
-
-#include "xf86Xinput.h"
-#include "mipointer.h"
-
-#if !defined(XQ_WHEEL)
-# define XQ_WHEEL	4
-#endif
-
-/*
- * Implementation notes
- *
- * This code is based on a mixture of the original XFree86 sysv/xqueue.c
- * and information gathered from the SCO X server code (no actual code
- * was used, just the principles).
- *
- * The XFree86 XQUEUE code went to some considerable lengths to implement
- * what it calls "asynchronous XQUEUE". This involved creating a pipe,
- * and writing to that pipe each time an XQUEUE signal is received. The
- * one end of that pipe was then added to the list of selectable file
- * descriptors with AddEnabledDevice(). I completely fail to see the need
- * for this, and this code does not implement that mechanism. The server
- * will be interrupted anyway by the XQUEUE driver, so whether we pull the
- * events off the queue at the time we receive the signal or whether we
- * write to a pipe and then have the main select() loop stop and call us,
- * it makes no difference I can fathom.
- *
- * The code also differs from the original XFree86 code in that it maintains
- * local variables for the number of devices initialized. The original code
- * stored that information in the private data pointer of the mouse structure,
- * but this same code is used for both the keyboard and the mouse, so that
- * was changed.
- *
- * Part of the difficulty in dealing with XQUEUE is that it is a single
- * interface to two devices. The recent changes in XFree86/Xorg try to
- * treat the mouse and keyboard as discrete devices, and the code is
- * structured in such a way that they should be able to be independently
- * opened and closed. But we can't do that with XQUEUE, so we have to
- * centralize XQUEUE access here in this module.
- */
-
-static xqEventQueue *xqQaddr = NULL;
-static int xqSigEnable = 1;
-static int xqEnableCount = 0;
-static struct kd_quemode xqMode;
-
-/*
- * These two pointers are set when the keyboard/mouse handler procs
- * are called to turn them on or off. This is so that we can call the
- * correct PostEvent for the device.
- */
-static InputInfoPtr xqMouse = NULL;
-static InputInfoPtr xqKeyboard = NULL;
-
-static void XqSignalHandler (int signo);
-
-/*
- * Private functions
- */
-static void
-XqReset (void)
-{
-  if (xqEnableCount > 0) {
-    xqQaddr->xq_head = xqQaddr->xq_tail;
-    xqQaddr->xq_sigenable = xqSigEnable;
-  }
-}
-
-#ifdef NOTNEEDED
-static void
-XqLock (void)
-{
-  xqSigEnable = 0;
-  if (xqEnableCount > 0) {
-    xqQaddr->xq_sigenable = xqSigEnable;
-  }
-}
-
-static void
-XqUnlock (void)
-{
-  xqSigEnable = 1;
-  if (xqEnableCount > 0) {
-    xqQaddr->xq_sigenable = xqSigEnable;
-  }
-}
-#endif /* NOTNEEDED */
-
-/*
- * Since this code is shared between two devices, we need to keep track
- * of how many times we've been enabled or disabled. For example, if the
- * keyboard has been turned off, but the mouse hasn't, then we do not
- * want the whole queue off. Only when both devices are turned off do we
- * actually disable Xqueue mode. When either device is turned on, we
- * enable it.
- */
-static int
-XqEnable (InputInfoPtr pInfo)
-{
-  struct sigaction xqsig;
-  static int msefd = -1;
-
-  if (msefd == -1) {
-    msefd = open ("/dev/mouse", O_RDONLY | O_NONBLOCK);
-#if 0
-    msefd = open ("/dev/mouse", O_RDONLY | O_NONBLOCK | O_NOCTTY);
-    if (msefd < 0) {
-      /*
-       * Try giving it a controlling tty 
-       */
-      msefd = open (ttyname(xf86Info.consoleFd), O_RDWR | O_NONBLOCK);
-      if (msefd >= 0)
-	close (msefd);
-      msefd = open ("/dev/mouse", O_RDONLY | O_NONBLOCK | O_NOCTTY);
-      if (msefd < 0)
-	sleep(2);
-    }
-#endif
-  }
-
-  if (msefd < 0) {
-    if (xf86GetAllowMouseOpenFail()) {
-      ErrorF("%s: cannot open /dev/mouse (%s)\n",
-	ttyname(xf86Info.consoleFd), strerror(errno));
-    } else {
-      sleep(5);
-      FatalError ("%s: cannot open /dev/mouse (%s)\n",
-	ttyname(xf86Info.consoleFd), strerror(errno));
-    }
-  }
- 
-  if (xqEnableCount++ == 0) {
-    xqMode.qaddr = 0;
-    ioctl (xf86Info.consoleFd, KDQUEMODE, NULL);
-
-    /*
-     * Note: We need to make sure the signal is armed before we enable
-     * XQUEUE mode, so that if we get events immediately after the ioctl
-     * we dont have an unhandled signal coming to the Xserver.
-     * Also note that we use sigaction, so that we do not have to re-arm
-     * the signal every time it is delivered, which just slows things
-     * down (setting a signal is a fairly expensive operation).
-     */
-
-    xqsig.sa_handler = XqSignalHandler;
-    sigfillset (&xqsig.sa_mask);
-    xqsig.sa_flags = 0;
-    sigaction (SIGUSR2, &xqsig, NULL);
-
-    /*
-     * This is a fairly large queue size. Since we are reacting to events
-     * asynchronously, its best for performance if we deal with as many
-     * events as possible, and high resolution mice generate a lot of
-     * events.
-     */
-    xqMode.qsize = 64;
-    xqMode.signo = SIGUSR2;
-    xqMode.qaddr = 0;
-    if (ioctl (xf86Info.consoleFd, KDQUEMODE, &xqMode) < 0) {
-      xf86Msg (X_ERROR, "%s: could not set XQUEUE mode (%s)", pInfo->name,
-	strerror(errno));
-      xqEnableCount--;
-
-      xqsig.sa_handler = SIG_DFL;
-      sigfillset (&xqsig.sa_mask);
-      xqsig.sa_flags = 0;
-      sigaction (SIGUSR2, &xqsig, NULL);
-
-      return !Success;
-    }
-
-    /*
-     * We're in business. The workstation is now in XQUEUE mode.
-     */
-    xqQaddr = (xqEventQueue *)xqMode.qaddr;
-    xqQaddr->xq_sigenable = 0; /* LOCK */
-    nap(500);
-    XqReset();
-  }
-  return Success;
-}
-
-static int
-XqDisable (InputInfoPtr pInfo)
-{
-  struct sigaction xqsig;
-
-  if (xqEnableCount-- == 1) {
-    xqQaddr->xq_sigenable = 0; /* LOCK */
-
-    if (ioctl (xf86Info.consoleFd, KDQUEMODE, NULL) < 0) {
-      xf86Msg (X_ERROR, "%s: could not unset XQUEUE mode (%s)", pInfo->name,
-	strerror(errno));
-      xqEnableCount++;
-      return !Success;
-    }
-
-    xqsig.sa_handler = SIG_DFL;
-    sigfillset (&xqsig.sa_mask);
-    xqsig.sa_flags = 0;
-    sigaction (SIGUSR2, &xqsig, NULL);
-  }
-
-  return Success;
-}
-
-/*
- * XQUEUE signal handler. This is what goes through the list of events
- * we've already received and dispatches them to either the keyboard or
- * mouse event poster.
- */
-static void
-XqSignalHandler (int signo)
-{
-  xqEvent	*xqEvents = xqQaddr->xq_events;
-  int		xqHead = xqQaddr->xq_head;
-  xEvent	xE;
-  MouseDevPtr	pMse = NULL;
-  KbdDevPtr	pKbd = NULL;
-  signed char	dx, dy;
-
-  if (xqMouse)
-    pMse = (MouseDevPtr)xqMouse->private;
-  if (xqKeyboard)
-    pKbd = (KbdDevPtr)xqKeyboard->private;
-
-  while (xqHead != xqQaddr->xq_tail) {
-
-    switch (xqEvents[xqHead].xq_type) {
-      case XQ_MOTION:
-	dx = (signed char)xqEvents[xqHead].xq_x;
-	dy = (signed char)xqEvents[xqHead].xq_y;
-	if (pMse)
-	  pMse->PostEvent(xqMouse, ~(xqEvents[xqHead].xq_code) & 0x07,
-			  (int)dx, (int)dy, 0, 0);
-	break;
-
-      case XQ_BUTTON:
-	if (pMse)
-	  pMse->PostEvent(xqMouse, ~(xqEvents[xqHead].xq_code) & 0x07,
-			  0, 0, 0, 0);
-	break;
-
-      case XQ_WHEEL:
-	if (pMse) {
-	  int wbut = pMse->lastButtons, dz;
-	  if (xqEvents[xqHead].xq_code == 1)
-	    dz = 1;
-	  else
-	    dz = -1;
-	  pMse->PostEvent(xqMouse, wbut, 0, 0, dz, 0);
-	}
-	break;
-
-      case XQ_KEY:
-	if (pKbd)
-	  pKbd->PostEvent(xqKeyboard, xqEvents[xqHead].xq_code & 0x7f,
-	    xqEvents[xqHead].xq_code & 0x80 ? FALSE : TRUE);
-	break;
-
-      default:
-	xf86Msg(X_WARNING, "XQUEUE: unknown event type %d\n",
-	  xqEvents[xqHead].xq_type);
-	break;
-    }
-
-    xqHead++;
-    if (xqHead == xqQaddr->xq_size)
-      xqHead = 0;
-    xf86Info.inputPending = TRUE;
-  }
-
-  XqReset();
-}
-
-/*
- * Public functions
- */
-int
-XqMseOnOff (InputInfoPtr pInfo, int on)
-{
-  if (on) {
-    if (xqMouse) {
-      if (xqMouse != pInfo)
-	xf86Msg(X_WARNING, "XqMseOnOff: mouse pointer structure changed!\n");
-      xqMouse = pInfo;
-    } else {
-      xqMouse = pInfo;
-      return XqEnable(pInfo);
-    }
-  } else {
-    xqMouse = NULL;
-    return XqDisable(pInfo);
-  }
-  return Success;
-}
-
-int
-XqKbdOnOff (InputInfoPtr pInfo, int on)
-{
-  if (on) {
-    if (xqKeyboard) {
-      if (xqKeyboard != pInfo)
-	xf86Msg(X_WARNING, "XqKbdOnOff: keyboard pointer structure changed!\n");
-      xqKeyboard = pInfo;
-    } else {
-      xqKeyboard = pInfo;
-      return XqEnable(pInfo);
-    }
-  } else {
-    xqKeyboard = NULL;
-    return XqDisable(pInfo);
-  }
-  return Success;
-}
-
diff --git a/hw/xfree86/os-support/usl/usl_xqueue.h b/hw/xfree86/os-support/usl/usl_xqueue.h
deleted file mode 100644
index bad86a9..0000000
--- a/hw/xfree86/os-support/usl/usl_xqueue.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* $XdotOrg$ */
-
-#ifndef _XF86_USL_XQUEUE_H_
-#define _XF86_USL_XQUEUE_H_
-
-extern int XqMseOnOff (InputInfoPtr pInfo, int on);
-extern int XqKbdOnOff (InputInfoPtr pInfo, int on);
-
-#endif
diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h
index e048547..97f8723 100644
--- a/hw/xfree86/os-support/xf86_OSlib.h
+++ b/hw/xfree86/os-support/xf86_OSlib.h
@@ -235,15 +235,6 @@ typedef signed long xf86ssize_t;
 #  define i386 /* not defined in ANSI C mode */
 # endif /* ATT && !i386 */
 
-# if (defined(ATT) || defined(SVR4)) && !defined(sun)
-#  ifndef __UNIXWARE__
-#   ifndef XQUEUE
-#    define XQUEUE
-#   endif
-#  endif
-#  include <sys/xque.h>
-# endif /* ATT || SVR4 */
-
 # ifdef SYSV
 #  if !defined(ISC) || defined(ISC202) || defined(ISC22)
 #   define NEED_STRERROR
diff --git a/hw/xfree86/os-support/xf86_OSproc.h b/hw/xfree86/os-support/xf86_OSproc.h
index 89a3301..c987d75 100644
--- a/hw/xfree86/os-support/xf86_OSproc.h
+++ b/hw/xfree86/os-support/xf86_OSproc.h
@@ -135,10 +135,6 @@ extern void xf86WrapperInit(void);
 #include <X11/Xfuncproto.h>
 #include "opaque.h"
 
-#if defined(XQUEUE)
-#include "input.h"	/* for DeviceIntPtr */
-#endif
-
 _XFUNCPROTOBEGIN
 
 /* public functions */
@@ -224,21 +220,7 @@ extern Bool xf86VTSwitchTo(void);
 extern void xf86VTRequest(int sig);
 extern int xf86ProcessArgument(int, char **, int);
 extern void xf86UseMsg(void);
-extern void xf86SetKbdLeds(int);
-extern int xf86GetKbdLeds(void);
-extern void xf86SetKbdRepeat(char);
-extern void xf86KbdInit(void);
-extern int xf86KbdOn(void);
-extern int xf86KbdOff(void);
-extern void xf86KbdEvents(void);
-#ifdef XQUEUE
-extern int  xf86XqueKbdProc(DeviceIntPtr, int);
-extern void xf86XqueEvents(void);
-#endif
 extern void xf86ReloadInputDevs(int sig);
-#ifdef WSCONS_SUPPORT
-extern void xf86WSKbdEvents(void);
-#endif
 extern PMClose xf86OSPMOpen(void);
 
 #ifdef NEED_OS_RAC_PROTOS
diff --git a/hw/xfree86/utils/xorgcfg/mouse-cfg.c b/hw/xfree86/utils/xorgcfg/mouse-cfg.c
index 6c29c1f..5bae6d3 100644
--- a/hw/xfree86/utils/xorgcfg/mouse-cfg.c
+++ b/hw/xfree86/utils/xorgcfg/mouse-cfg.c
@@ -60,9 +60,6 @@ static struct MouseProtocol {
 #ifdef __SCO__
     {"OsMouse",			MTYPE_AUTOMOUSE},
 #endif
-#if defined(__UNIXWARE__)
-    {"Xqueue",			MTYPE_XQUEUE},
-#endif
 #ifdef WSCONS_SUPPORT
     {"wsmouse",			MTYPE_AUTOMOUSE},
 #endif
diff --git a/hw/xfree86/utils/xorgcfg/text-mode.c b/hw/xfree86/utils/xorgcfg/text-mode.c
index 5bb5648..74647fd 100644
--- a/hw/xfree86/utils/xorgcfg/text-mode.c
+++ b/hw/xfree86/utils/xorgcfg/text-mode.c
@@ -361,9 +361,6 @@ static char *protocols[] = {
 #ifdef __SCO__
     "OsMouse",
 #endif
-#ifdef __UNIXWARE__
-    "Xqueue",
-#endif
 #ifdef WSCONS_SUPPORT
     "wsmouse",
 #endif
diff --git a/hw/xfree86/utils/xorgconfig/xorgconfig.c b/hw/xfree86/utils/xorgconfig/xorgconfig.c
index e00830a..f717483 100644
--- a/hw/xfree86/utils/xorgconfig/xorgconfig.c
+++ b/hw/xfree86/utils/xorgconfig/xorgconfig.c
@@ -2068,12 +2068,6 @@ static char *XF86Config_fontpathchunk_te
 "    Identifier	\"Keyboard1\"\n"
 "    Driver	\"kbd\"\n"
 "\n"
-"# For most OSs the protocol can be omitted (it defaults to \"Standard\").\n"
-"# When using XQUEUE (only for SVR3 and SVR4, but not Solaris),\n"
-"# uncomment the following line.\n"
-"\n"
-"#    Option     \"Protocol\"      \"Xqueue\"\n"
-"\n"
 "    Option \"AutoRepeat\" \"500 30\"\n"
 "\n"
 "# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))\n"
@@ -2125,7 +2119,7 @@ static char *pointersection_text1 = 
 "\n"
 "# Identifier and driver\n"
 "\n"
-#if defined(__UNIXWARE__) || defined(XQUEUE)
+#if defined(__UNIXWARE__)
 "#    Identifier	\"Mouse1\"\n"
 "#    Driver	\"mouse\"\n"
 #else
@@ -2136,15 +2130,6 @@ static char *pointersection_text1 = 
 
 static char *pointersection_text2 =
 "\n"
-"# When using XQUEUE, comment out the above two lines, and uncomment\n"
-"# the following line.\n"
-"\n"
-#if defined(__UNIXWARE__) || defined(XQUEUE)
-"    Option \"Protocol\"	\"Xqueue\"\n"
-#else
-"#    Option \"Protocol\"	\"Xqueue\"\n"
-#endif
-"\n"
 "# Mouse-speed setting for PS/2 mouse.\n"
 "\n"
 "#    Option \"Resolution\"	\"256\"\n"
diff --git a/hw/xfree86/xorgconf.cpp b/hw/xfree86/xorgconf.cpp
index c94c1e5..9de7e2b 100644
--- a/hw/xfree86/xorgconf.cpp
+++ b/hw/xfree86/xorgconf.cpp
@@ -181,12 +181,6 @@ Section "InputDevice"
     Identifier	"Keyboard1"
     Driver	"keyboard"
 
-XCOMM For most OSs the protocol can be omitted (it defaults to "Standard").
-XCOMM When using XQUEUE (only for SVR3 and SVR4, but not Solaris), comment
-XCOMM out the above line, and uncomment the following line.
-
-XCOMM    Option	"Protocol"	"Xqueue"
-
 XCOMM Set the keyboard auto repeat parameters.  Not all platforms implement
 XCOMM this.
 
@@ -270,12 +264,6 @@ XCOMM be available.
 
 XCOMM    Option "Protocol"	"PS/2"
 
-XCOMM When using XQUEUE (only for SVR3 and SVR4, but not Solaris), use
-XCOMM the following instead of any of the lines above.  The Device line
-XCOMM is not required in this case.
-
-XCOMM    Option	"Protocol"	"Xqueue"
-
 XCOMM Baudrate and SampleRate are only for some older Logitech mice.  In
 XCOMM almost every case these lines should be omitted.
 
diff-tree e641000b98e7c2e92e3c801eaa42aa15d5c16ad0 (from 5a3488ccac8e5dabd9fc98bc41ef178ead1b2faf)
Author: Samuel Thibault <samuel.thibault at ens-lyon.org>
Date:   Sat Aug 12 19:41:59 2006 +0300

    xfree86: add Hurd support (#5613)
    Add support for GNU/Hurd.

diff --git a/configure.ac b/configure.ac
index dce4f32..da3e55d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1162,6 +1162,10 @@ int main () { 
 		fi
 		AC_SUBST([SOLARIS_ASM_CFLAGS])
 		;;
+	  gnu*)
+	  	XORG_OS="gnu"
+		XORG_OS_SUBDIR="hurd"
+		;;
 	  *)
 	  	XORG_OS="unknown"
 		XORG_OS_SUBDIR="unknown"
@@ -1667,6 +1671,7 @@ hw/xfree86/os-support/Makefile
 hw/xfree86/os-support/bsd/Makefile
 hw/xfree86/os-support/bus/Makefile
 hw/xfree86/os-support/drm/Makefile
+hw/xfree86/os-support/hurd/Makefile
 hw/xfree86/os-support/misc/Makefile
 hw/xfree86/os-support/linux/Makefile
 hw/xfree86/os-support/lynxos/Makefile
diff --git a/hw/xfree86/os-support/Makefile.am b/hw/xfree86/os-support/Makefile.am
index 7897674..e64703a 100644
--- a/hw/xfree86/os-support/Makefile.am
+++ b/hw/xfree86/os-support/Makefile.am
@@ -3,7 +3,7 @@ DRI_SUBDIRS=drm
 endif
 
 SUBDIRS = bus @XORG_OS_SUBDIR@ misc $(DRI_SUBDIRS)
-DIST_SUBDIRS = bsd bus drm misc linux lynxos solaris sysv sco usl
+DIST_SUBDIRS = bsd bus drm misc linux lynxos solaris sysv sco usl hurd
 
 sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h xf86_ansic.h xf86_libc.h \
               assyntax.h xf86OSKbd.h xf86OSmouse.h
diff --git a/hw/xfree86/os-support/hurd/Makefile.am b/hw/xfree86/os-support/hurd/Makefile.am
new file mode 100644
index 0000000..a050876
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/Makefile.am
@@ -0,0 +1,17 @@
+noinst_LTLIBRARIES = libhurd.la
+
+libhurd_la_SOURCES = hurd_init.c hurd_mmap.c \
+		hurd_mouse.c hurd_video.c \
+		$(srcdir)/../shared/VTsw_noop.c \
+		$(srcdir)/../shared/posix_tty.c \
+		$(srcdir)/../shared/libc_wrapper.c \
+		$(srcdir)/../shared/stdResource.c \
+		$(srcdir)/../shared/stdPci.c \
+		$(srcdir)/../shared/sigiostubs.c \
+		$(srcdir)/../shared/pm_noop.c \
+		$(srcdir)/../shared/kmod_noop.c \
+		$(srcdir)/../shared/agp_noop.c
+
+AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
+
+INCLUDES = $(XORG_INCS)
diff --git a/hw/xfree86/os-support/hurd/hurd_init.c b/hw/xfree86/os-support/hurd/hurd_init.c
new file mode 100644
index 0000000..aec5b3d
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/hurd_init.c
@@ -0,0 +1,90 @@
+/*
+ * Copyright 1997,1998 by UCHIYAMA Yasushi
+ *
+ * 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 UCHIYAMA Yasushi not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  UCHIYAMA Yasushi makes no representations
+ * about the suitability of this software for any purpose.  It is provided
+ * "as is" without express or implied warranty.
+ *
+ * UCHIYAMA YASUSHI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL UCHIYAMA YASUSHI 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.
+ *
+ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/hurd/hurd_init.c,v 1.1 1998/08/16 10:25:48 dawes Exp $ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <X11/X.h>
+
+#include "input.h"
+#include "scrnintstr.h"
+
+#include "compiler.h"
+
+#include "xf86.h"
+#include "xf86Priv.h"
+#include "xf86_OSlib.h"
+
+#include <stdio.h>
+#include <errno.h>
+#include <sys/time.h>
+#include <sys/file.h>
+#include <assert.h>
+#include <mach.h>
+
+int 
+xf86ProcessArgument( int argc,char **argv, int i )
+{
+    return 0;
+}
+void 
+xf86UseMsg()
+{
+    return;
+}
+
+
+void 
+xf86OpenConsole()
+{
+    if( serverGeneration == 1 )
+    {
+	kern_return_t err;
+	mach_port_t device;
+	int fd;
+	err = get_privileged_ports( NULL, &device );
+	if( err )
+	{
+	    errno = err;
+	    FatalError( "xf86KbdInit can't get_privileged_ports. (%s)\n" , strerror(errno) );
+	}
+	mach_port_deallocate (mach_task_self (), device);
+	
+	if( ( fd = open( "/dev/kbd" , O_RDONLY|O_NONBLOCK ) ) < 0 )
+	{
+	    fprintf( stderr , "Cannot open keyboard (%s)\n",strerror(errno) );
+	    exit(1);
+	}
+	xf86Info.consoleFd = fd;
+    }
+    return;
+}
+
+void 
+xf86CloseConsole()
+{
+    close( xf86Info.consoleFd );
+    return;
+}
diff --git a/hw/xfree86/os-support/hurd/hurd_mmap.c b/hw/xfree86/os-support/hurd/hurd_mmap.c
new file mode 100644
index 0000000..5e800d2
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/hurd_mmap.c
@@ -0,0 +1,96 @@
+/*
+ * Copyright 1997 by UCHIYAMA Yasushi
+ *
+ * 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 UCHIYAMA Yasushi not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  UCHIYAMA Yasushi makes no representations
+ * about the suitability of this software for any purpose.  It is provided
+ * "as is" without express or implied warranty.
+ *
+ * UCHIYAMA YASUSHI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL UCHIYAMA YASUSHI 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.
+ *
+ */
+/* $XFree86$ */
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include<mach.h>
+#include<device/device.h>
+#include<mach/machine/mach_i386.h>
+
+#include <X11/X.h>
+
+#include "xf86.h"
+#include "xf86Priv.h"
+#include "xf86_OSlib.h"
+
+#define BIOS_SIZE 0x20000
+
+int 
+xf86ReadBIOS(unsigned long Base,unsigned long Offset,unsigned char *Buf,int Len)
+{
+    mach_port_t device,iopl_dev;
+    memory_object_t iopl_mem;
+    vm_address_t addr = (vm_address_t)0; /* serach starting address */
+    kern_return_t err;
+
+
+    err = get_privileged_ports (NULL, &device);
+    if( err )
+    {
+	errno = err;
+	FatalError("xf86ReadBIOS() can't get_privileged_ports. (%s)\n",strerror(errno));
+    }
+    err = device_open(device,D_READ|D_WRITE,"iopl",&iopl_dev);
+    mach_port_deallocate (mach_task_self (), device);
+    if( err )
+    {
+	errno = err;
+	FatalError("xf86ReadBIOS() can't device_open. (%s)\n",strerror(errno));
+    }
+    err = device_map(iopl_dev,VM_PROT_READ|VM_PROT_WRITE, Base , BIOS_SIZE ,&iopl_mem,0);
+    if( err )
+    {
+	errno = err;
+	FatalError("xf86ReadBIOS() can't device_map. (%s)\n",strerror(errno));
+    }
+    err = vm_map(mach_task_self(),
+		 &addr,
+		 BIOS_SIZE,
+		 0,
+		 TRUE,
+		 iopl_mem,
+		 Base,
+		 FALSE,
+		 VM_PROT_READ|VM_PROT_WRITE,
+		 VM_PROT_READ|VM_PROT_WRITE,
+		 VM_INHERIT_SHARE);
+    mach_port_deallocate(mach_task_self(),iopl_mem);
+    if( err )
+    {
+	errno = err;
+	FatalError("xf86ReadBIOS() can't vm_map. (%s)\n",strerror(errno));
+    }
+
+    memcpy(Buf,(void*)((int)addr + Offset), Len);
+    
+    err = vm_deallocate(mach_task_self(), addr, BIOS_SIZE);
+    if( err )
+    {
+	errno = err;
+	FatalError("xf86ReadBIOS() can't vm_deallocate. (%s)\n",strerror(errno));
+    }
+    
+    return Len;
+}
diff --git a/hw/xfree86/os-support/hurd/hurd_mouse.c b/hw/xfree86/os-support/hurd/hurd_mouse.c
new file mode 100644
index 0000000..e7a2da8
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/hurd_mouse.c
@@ -0,0 +1,301 @@
+/*
+ * Copyright 1997,1998 by UCHIYAMA Yasushi
+ *
+ * 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 UCHIYAMA Yasushi not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  UCHIYAMA Yasushi makes no representations
+ * about the suitability of this software for any purpose.  It is provided
+ * "as is" without express or implied warranty.
+ *
+ * UCHIYAMA YASUSHI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL UCHIYAMA YASUSHI 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.
+ *
+ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/hurd/hurd_mouse.c,v 1.7 2000/02/10 22:33:44 dawes Exp $ */
+
+#define NEED_EVENTS
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include "inputstr.h"
+#include "scrnintstr.h"
+#include "mipointer.h"
+
+#include "xf86.h"
+#include "xf86Xinput.h"
+#include "xf86OSmouse.h"
+#include "xf86_OSlib.h"
+#include "xisb.h"
+
+#include <stdio.h>
+#include <errno.h>
+#include <sys/time.h>
+#include <sys/file.h>
+#include <assert.h>
+#include <mach.h>
+#include <sys/ioctl.h>
+
+typedef unsigned short kev_type;		/* kd event type */
+typedef unsigned char Scancode;
+
+struct mouse_motion {		
+    short mm_deltaX;		/* units? */
+    short mm_deltaY;
+};
+
+typedef struct {
+    kev_type type;			/* see below */
+    struct timeval time;		/* timestamp */
+    union {				/* value associated with event */
+	boolean_t up;		/* MOUSE_LEFT .. MOUSE_RIGHT */
+	Scancode sc;		/* KEYBD_EVENT */
+	struct mouse_motion mmotion;	/* MOUSE_MOTION */
+    } value;
+} kd_event;
+
+/* 
+ * kd_event ID's.
+ */
+#define MOUSE_LEFT	1		/* mouse left button up/down */
+#define MOUSE_MIDDLE	2
+#define MOUSE_RIGHT	3
+#define MOUSE_MOTION	4		/* mouse motion */
+#define KEYBD_EVENT	5		/* key up/down */
+
+#define NUMEVENTS	64
+
+/*
+ * OsMouseProc --
+ *      Handle the initialization, etc. of a mouse
+ */
+static int
+OsMouseProc(DeviceIntPtr pPointer, int what)
+{
+    InputInfoPtr pInfo;
+    MouseDevPtr pMse;
+    unsigned char map[MSE_MAXBUTTONS + 1];
+    int nbuttons;
+
+    pInfo = pPointer->public.devicePrivate;
+    pMse = pInfo->private;
+    pMse->device = pPointer;
+
+    switch (what) {
+    case DEVICE_INIT: 
+	pPointer->public.on = FALSE;
+
+	for (nbuttons = 0; nbuttons < MSE_MAXBUTTONS; ++nbuttons)
+	    map[nbuttons + 1] = nbuttons + 1;
+
+	InitPointerDeviceStruct((DevicePtr)pPointer, 
+				map, 
+				min(pMse->buttons, MSE_MAXBUTTONS),
+				miPointerGetMotionEvents, 
+				pMse->Ctrl,
+				miPointerGetMotionBufferSize());
+
+	/* X valuator */
+	xf86InitValuatorAxisStruct(pPointer, 0, 0, -1, 1, 0, 1);
+	xf86InitValuatorDefaults(pPointer, 0);
+	/* Y valuator */
+	xf86InitValuatorAxisStruct(pPointer, 1, 0, -1, 1, 0, 1);
+	xf86InitValuatorDefaults(pPointer, 1);
+	xf86MotionHistoryAllocate(pInfo);
+	break;
+
+    case DEVICE_ON:
+	pInfo->fd = xf86OpenSerial(pInfo->options);
+	if (pInfo->fd == -1)
+	    xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name);
+	else {
+	    pMse->buffer = XisbNew(pInfo->fd,
+				   NUMEVENTS * sizeof(kd_event));
+	    if (!pMse->buffer) {
+		xfree(pMse);
+		xf86CloseSerial(pInfo->fd);
+		pInfo->fd = -1;
+	    } else {
+		xf86FlushInput(pInfo->fd);
+		AddEnabledDevice(pInfo->fd);
+	    }
+	}
+	pMse->lastButtons = 0;
+	pMse->lastMappedButtons = 0;
+	pMse->emulateState = 0;
+	pPointer->public.on = TRUE;
+	break;
+
+    case DEVICE_OFF:
+    case DEVICE_CLOSE:
+	if (pInfo->fd != -1) {
+	    RemoveEnabledDevice(pInfo->fd);
+	    if (pMse->buffer) {
+		XisbFree(pMse->buffer);
+		pMse->buffer = NULL;
+	    }
+	    xf86CloseSerial(pInfo->fd);
+	    pInfo->fd = -1;
+	}
+	pPointer->public.on = FALSE;
+	usleep(300000);
+	break;
+    }
+    return Success;
+}
+
+/*
+ * OsMouseReadInput --
+ *      Get some events from our queue.  Process all outstanding events now.
+ */
+static void
+OsMouseReadInput(InputInfoPtr pInfo)
+{
+    MouseDevPtr pMse;
+    static kd_event eventList[NUMEVENTS];
+    int n, c; 
+    kd_event *event = eventList;
+    unsigned char *pBuf;
+
+    pMse = pInfo->private;
+
+    XisbBlockDuration(pMse->buffer, -1);
+    pBuf = (unsigned char *)eventList;
+    n = 0;
+    while ((c = XisbRead(pMse->buffer)) >= 0 && n < sizeof(eventList))
+	pBuf[n++] = (unsigned char)c;
+
+    if (n == 0)
+	return;
+
+    n /= sizeof(kd_event);
+    while( n-- ) {
+	int buttons = pMse->lastButtons;
+	int dx = 0, dy = 0;
+	switch (event->type) {
+	case MOUSE_RIGHT:
+	    buttons  = buttons & 6 |(event->value.up ? 0 : 1);
+	    break;
+	case MOUSE_MIDDLE:
+	    buttons  = buttons & 5 |(event->value.up ? 0 : 2);
+	    break;
+	case MOUSE_LEFT:
+	    buttons  = buttons & 3 |(event->value.up ? 0 : 4) ;
+	    break;
+	case MOUSE_MOTION:
+	    dx = event->value.mmotion.mm_deltaX;
+	    dy = - event->value.mmotion.mm_deltaY;
+	    break;
+	default:
+	    ErrorF("Bad mouse event (%d)\n",event->type);
+	    continue;
+	}
+	pMse->PostEvent(pInfo, buttons, dx, dy, 0, 0);
+	++event;
+    }
+    return;
+}
+
+static Bool
+OsMousePreInit(InputInfoPtr pInfo, const char *protocol, int flags)
+{
+    MouseDevPtr pMse;
+
+    /* This is called when the protocol is "OSMouse". */
+
+    pMse = pInfo->private;
+    pMse->protocol = protocol;
+    xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, protocol);
+
+    /* Collect the options, and process the common options. */
+    xf86CollectInputOptions(pInfo, NULL, NULL);
+    xf86ProcessCommonOptions(pInfo, pInfo->options);
+
+    /* Check if the device can be opened. */
+    pInfo->fd = xf86OpenSerial(pInfo->options); 
+    if (pInfo->fd == -1) {
+	if (xf86GetAllowMouseOpenFail())
+	    xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name);
+	else {
+	    xf86Msg(X_ERROR, "%s: cannot open input device\n", pInfo->name);
+	    xfree(pMse);
+	    return FALSE;
+	}
+    }
+    xf86CloseSerial(pInfo->fd);
+    pInfo->fd = -1;
+
+    /* Process common mouse options (like Emulate3Buttons, etc). */
+    pMse->CommonOptions(pInfo);
+
+    /* Setup the local procs. */
+    pInfo->device_control = OsMouseProc;
+    pInfo->read_input = OsMouseReadInput;
+    
+    pInfo->flags |= XI86_CONFIGURED;
+    return TRUE;
+}
+
+static int
+SupportedInterfaces(void)
+{
+    /* XXX Need to check this. */
+    return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_XPS2 | MSE_AUTO;
+}
+
+static const char *internalNames[] = {
+	"OSMouse",
+	NULL
+};
+
+static const char **
+BuiltinNames(void)
+{
+    return internalNames;
+}
+
+static Bool
+CheckProtocol(const char *protocol)
+{
+    int i;
+
+    for (i = 0; internalNames[i]; i++)
+	if (xf86NameCmp(protocol, internalNames[i]) == 0)
+	    return TRUE;
+    return FALSE;
+}
+
+/* XXX Is this appropriate?  If not, this function should be removed. */
+static const char *
+DefaultProtocol(void)
+{
+    return "OSMouse";
+}
+
+OSMouseInfoPtr
+xf86OSMouseInit(int flags)
+{
+    OSMouseInfoPtr p;
+
+    p = xcalloc(sizeof(OSMouseInfoRec), 1);
+    if (!p)
+	return NULL;
+    p->SupportedInterfaces = SupportedInterfaces;
+    p->BuiltinNames = BuiltinNames;
+    p->DefaultProtocol = DefaultProtocol;
+    p->CheckProtocol = CheckProtocol;
+    p->PreInit = OsMousePreInit;
+    return p;
+}
+
diff --git a/hw/xfree86/os-support/hurd/hurd_video.c b/hw/xfree86/os-support/hurd/hurd_video.c
new file mode 100644
index 0000000..45e9a09
--- /dev/null
+++ b/hw/xfree86/os-support/hurd/hurd_video.c
@@ -0,0 +1,191 @@
+/*
+ * Copyright 1997, 1998 by UCHIYAMA Yasushi
+ *
+ * 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 UCHIYAMA Yasushi not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission.  UCHIYAMA Yasushi makes no representations
+ * about the suitability of this software for any purpose.  It is provided
+ * "as is" without express or implied warranty.
+ *
+ * UCHIYAMA YASUSHI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL UCHIYAMA YASUSHI 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.
+ *
+ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/hurd/hurd_video.c,v 1.3 1999/04/29 12:24:52 dawes Exp $ */
+
+#ifdef HAVE_XORG_CONFIG_H
+#include <xorg-config.h>
+#endif
+
+#include <mach.h>
+#include <device/device.h>
+#include <mach/machine/mach_i386.h>
+
+#include <X11/X.h>
+#include "input.h"
+#include "scrnintstr.h"
+
+#include "xf86.h"
+#include "xf86Priv.h"
+#include "xf86_OSlib.h"
+#include "xf86OSpriv.h"
+
+/**************************************************************************
+ * Video Memory Mapping section                                            
+ ***************************************************************************/
+pointer 
+xf86MapVidMem(int ScreenNum,int Flags, unsigned long Base, unsigned long Size)
+{
+    mach_port_t device,iopl_dev;
+    memory_object_t iopl_mem;
+    kern_return_t err;
+    vm_address_t addr=(vm_address_t)0;
+
+    err = get_privileged_ports (NULL, &device);
+    if( err )
+    {
+	errno = err;
+	FatalError("xf86MapVidMem() can't get_privileged_ports. (%s)\n",strerror(errno));
+    }
+    err = device_open(device,D_READ|D_WRITE,"iopl",&iopl_dev);
+    mach_port_deallocate (mach_task_self(), device);
+    if( err )
+    {
+	errno = err;
+	FatalError("xf86MapVidMem() can't device_open. (%s)\n",strerror(errno));
+    }
+
+    err = device_map(iopl_dev,VM_PROT_READ|VM_PROT_WRITE, Base , Size ,&iopl_mem,0);
+    if( err )
+    {
+	errno = err;
+	FatalError("xf86MapVidMem() can't device_map. (%s)\n",strerror(errno));
+    }
+    err = vm_map(mach_task_self(),
+		 &addr,
+		 Size,
+		 0,     /* mask */
+		 TRUE,  /* anywhere */
+		 iopl_mem,
+		 (vm_offset_t)Base,
+		 FALSE, /* copy on write */
+		 VM_PROT_READ|VM_PROT_WRITE,
+		 VM_PROT_READ|VM_PROT_WRITE,
+		 VM_INHERIT_SHARE);
+    mach_port_deallocate(mach_task_self(),iopl_mem);
+    if( err )
+    {
+	errno = err;
+	FatalError("xf86MapVidMem() can't vm_map.(iopl_mem) (%s)\n",strerror(errno));
+    }
+    mach_port_deallocate(mach_task_self(),iopl_dev);
+    if( err )
+    {
+	errno = err;
+	FatalError("xf86MapVidMem() can't mach_port_deallocate.(iopl_dev) (%s)\n",strerror(errno));
+    }
+    return (pointer)addr;
+}
+
+void 
+xf86UnMapVidMem(int ScreenNum,pointer Base,unsigned long Size)
+{
+    kern_return_t err = vm_deallocate(mach_task_self(), (int)Base, Size);
+    if( err )
+    {
+	errno = err;
+	ErrorF("xf86UnMapVidMem: can't dealloc framebuffer space (%s)\n",strerror(errno));
+    }
+    return;
+}
+
+Bool 
+xf86LinearVidMem()
+{
+    return(TRUE);
+}
+
+/**************************************************************************
+ * I/O Permissions section                                                 
+ ***************************************************************************/
+mach_port_t io_port;
+
+Bool
+xf86EnableIO()
+{
+    mach_port_t device;
+    kern_return_t err;
+
+    err = get_privileged_ports(NULL, &device);
+    if( err )
+    {
+	errno = err;
+	FatalError("xf86EnableIO() can't get_privileged_ports. (%s)\n",strerror(errno));
+    }
+    err = device_open(device,D_READ|D_WRITE,"io",&io_port);
+    mach_port_deallocate(mach_task_self(), device);
+    if( err )
+    {
+	errno = err;
+	FatalError("xf86EnableIO() can't device_open. (%s)\n",strerror(errno));
+    }
+
+    err = i386_io_port_add(mach_thread_self (), io_port);
+    if( err )
+    {
+	errno = err;
+	FatalError("xf86EnableIO() can't i386_io_port_add.(io_port) (%s)\n",strerror(errno));
+    }
+    return TRUE;
+}
+	
+void
+xf86DisableIO()
+{
+    kern_return_t err;
+
+    err = i386_io_port_remove(mach_thread_self (), io_port);
+    if( err )
+    {
+	errno = err;
+	FatalError("xf86DisableIO() can't i386_io_port_remove.(io_port) (%s)\n",strerror(errno));
+    }
+    mach_port_deallocate(mach_task_self(), io_port);
+    return;
+}
+
+/**************************************************************************
+ * Interrupt Handling section                                              
+ **************************************************************************/
+Bool 
+xf86DisableInterrupts()
+{
+    return TRUE;
+}
+void 
+xf86EnableInterrupts()
+{
+    return;
+}
+
+void
+xf86MapReadSideEffects(int ScreenNum, int Flags, pointer Base,
+	unsigned long Size)
+{
+}
+
+Bool
+xf86CheckMTRR(int s)
+{
+	return FALSE;
+}
+
diff-tree 5a3488ccac8e5dabd9fc98bc41ef178ead1b2faf (from c4951e0a6b6cf3eeee710cc5cda1d9bc929ee3d7)
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Sat Aug 12 19:25:06 2006 +0300

    configure.ac: fix execinfo.h test (Debian #363218)
    Define HAVE_EXECINFO_H as well as HAVE_BACKTRACE, when we find execinfo.h.

diff --git a/configure.ac b/configure.ac
index 46b1280..dce4f32 100644
--- a/configure.ac
+++ b/configure.ac
@@ -174,6 +174,7 @@ dnl glibc backtrace support check (hw/xf
 AC_CHECK_HEADER([execinfo.h],[
     AC_CHECK_LIB(c, backtrace, [
         AC_DEFINE(HAVE_BACKTRACE, 1, [Has backtrace support])
+        AC_DEFINE(HAVE_EXECINFO_H, 1, [Have execinfo.h])
     ])]
 )
 
diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in
index e43d1d1..4a64522 100644
--- a/include/xorg-config.h.in
+++ b/include/xorg-config.h.in
@@ -109,4 +109,7 @@
 /* Name of the period field in struct kbd_repeat */
 #undef LNX_KBD_PERIOD_NAME
 
+/* Have execinfo.h */
+#undef HAVE_EXECINFO_H
+
 #endif /* _XORG_CONFIG_H_ */



More information about the xorg-commit mailing list