diff --git a/GL/glx/indirect_dispatch_swap.c b/GL/glx/indirect_dispatch_swap.c index 9c58ef1..1d45676 100644 --- a/GL/glx/indirect_dispatch_swap.c +++ b/GL/glx/indirect_dispatch_swap.c @@ -28,7 +28,7 @@ #include #include #include -#ifdef __linux__ +#if defined(__linux__) || defined(__GNU__) #include #elif defined(__OpenBSD__) #include diff --git a/GL/glx/indirect_reqsize.c b/GL/glx/indirect_reqsize.c index 3906bd1..1c332da 100644 --- a/GL/glx/indirect_reqsize.c +++ b/GL/glx/indirect_reqsize.c @@ -31,7 +31,7 @@ #include "glxserver.h" #include "indirect_size.h" #include "indirect_reqsize.h" -#if defined(linux) +#if defined(__linux__) || defined(__GNU__) # include # define SWAP_32(v) do { (v) = bswap_32(v); } while(0) #else diff --git a/GL/glx/indirect_util.c b/GL/glx/indirect_util.c index 93f1484..2d64f33 100644 --- a/GL/glx/indirect_util.c +++ b/GL/glx/indirect_util.c @@ -28,7 +28,7 @@ #include #include #include #include -#ifdef __linux__ +#if defined(__linux__) || defined(__GNU__) #include #elif defined(__OpenBSD__) #include diff --git a/configure.ac b/configure.ac index 473ff9b..b021740 100644 --- a/configure.ac +++ b/configure.ac @@ -1521,6 +1521,7 @@ XSDL_INCS= XSDL_DIRS= AM_CONDITIONAL(KDRIVE, [test x$KDRIVE = xyes]) +AM_CONDITIONAL(KDRIVELINUX, false) if test "$KDRIVE" = yes; then AC_DEFINE(KDRIVESERVER,1,[Build Kdrive X server]) AC_DEFINE(KDRIVEDDXACTIONS,,[Build kdrive ddx]) @@ -1600,7 +1601,12 @@ if test "$KDRIVE" = yes; then # $MIEXT_SHADOW_LIB $XPSTUBS_LIB" KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB" KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a' - KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.a' + case $host_os in + *linux*) + KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.a' + AM_CONDITIONAL(KDRIVELINUX, true) + ;; + esac KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a' KDRIVE_LIBS="$XSERVERLIBS_LIBS $DIX_LIB $CONFIG_LIB $KDRIVE_LIB $TSLIB_LIBS $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB" diff --git a/hw/kdrive/Makefile.am b/hw/kdrive/Makefile.am index fa1dba9..e078049 100644 --- a/hw/kdrive/Makefile.am +++ b/hw/kdrive/Makefile.am @@ -19,9 +19,13 @@ if XEPHYR XEPHYR_SUBDIRS = ephyr endif +if KDRIVELINUX +LINUX_SUBDIRS = linux +endif + SUBDIRS = \ src \ - linux \ + $(LINUX_SUBDIRS) \ $(XSDL_SUBDIRS) \ $(FBDEV_SUBDIRS) \ $(VESA_SUBDIRS) \ diff --git a/hw/xfree86/os-support/hurd/Makefile.am b/hw/xfree86/os-support/hurd/Makefile.am index a050876..b80fdde 100644 --- a/hw/xfree86/os-support/hurd/Makefile.am +++ b/hw/xfree86/os-support/hurd/Makefile.am @@ -1,6 +1,6 @@ noinst_LTLIBRARIES = libhurd.la -libhurd_la_SOURCES = hurd_init.c hurd_mmap.c \ +libhurd_la_SOURCES = hurd_bell.c hurd_init.c hurd_mmap.c \ hurd_mouse.c hurd_video.c \ $(srcdir)/../shared/VTsw_noop.c \ $(srcdir)/../shared/posix_tty.c \ @@ -12,6 +12,6 @@ libhurd_la_SOURCES = hurd_init.c hurd_mm $(srcdir)/../shared/kmod_noop.c \ $(srcdir)/../shared/agp_noop.c -AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@ +AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) INCLUDES = $(XORG_INCS) diff --git a/hw/xfree86/os-support/hurd/hurd_bell.c b/hw/xfree86/os-support/hurd/hurd_bell.c new file mode 100644 index 0000000..2726611 --- /dev/null +++ b/hw/xfree86/os-support/hurd/hurd_bell.c @@ -0,0 +1,35 @@ +/* + * Copyright © 2006 Daniel Stone + * + * 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 this copyright notice and this permission notice appear in + * supporting electronic documentation. + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR AUTHORS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Author: Daniel Stone + */ + +#ifdef HAVE_XORG_CONFIG_H +#include +#endif + +#include "xf86.h" +#include "xf86Priv.h" + +_X_EXPORT void +xf86OSRingBell(int loudness, int pitch, int duration) +{ + return; +} diff --git a/hw/xfree86/os-support/hurd/hurd_mouse.c b/hw/xfree86/os-support/hurd/hurd_mouse.c index e7a2da8..ccc08a2 100644 --- a/hw/xfree86/os-support/hurd/hurd_mouse.c +++ b/hw/xfree86/os-support/hurd/hurd_mouse.c @@ -77,85 +77,6 @@ #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. */ @@ -240,7 +161,6 @@ OsMousePreInit(InputInfoPtr pInfo, const pMse->CommonOptions(pInfo); /* Setup the local procs. */ - pInfo->device_control = OsMouseProc; pInfo->read_input = OsMouseReadInput; pInfo->flags |= XI86_CONFIGURED;