diff -ur -x CVS cvs-ro/xc/programs/Xserver/hw/dmx/dmxinit.c cvs-rw/xc/programs/Xserver/hw/dmx/dmxinit.c --- cvs-ro/xc/programs/Xserver/hw/dmx/dmxinit.c 2004-06-30 13:06:53.000000000 -0700 +++ cvs-rw/xc/programs/Xserver/hw/dmx/dmxinit.c 2004-07-02 17:04:47.552642000 -0700 @@ -1046,6 +1046,7 @@ ErrorF(" Ctrl-Alt-F* Switch to VC (local only)\n"); } +#ifdef DDXTIME /** Return wall-clock time in milliseconds. */ CARD32 GetTimeInMillis(void) { @@ -1054,3 +1055,4 @@ gettimeofday(&tp, 0); return tp.tv_sec * 1000 + tp.tv_usec / 1000; } +#endif /* DDXTIME */ diff -ur -x CVS cvs-ro/xc/programs/Xserver/hw/dmx/glxProxy/glxsingle.c cvs-rw/xc/programs/Xserver/hw/dmx/glxProxy/glxsingle.c --- cvs-ro/xc/programs/Xserver/hw/dmx/glxProxy/glxsingle.c 2004-06-30 13:06:55.000000000 -0700 +++ cvs-rw/xc/programs/Xserver/hw/dmx/glxProxy/glxsingle.c 2004-07-02 16:36:33.592131000 -0700 @@ -60,7 +60,7 @@ * this is because the GL single opcodes has different naming convension * the other X opcodes (ie. X_GLsop_GetFloatv). */ -#if (__STDC__ && !defined(UNIXCPP)) || defined(ANSICPP) +#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) #define GetReqSingle(name, req) \ WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(x##name##Req)) > dpy->bufmax)\ diff -ur -x CVS cvs-ro/xc/programs/Xserver/hw/dmx/glxProxy/glxvendor.c cvs-rw/xc/programs/Xserver/hw/dmx/glxProxy/glxvendor.c --- cvs-ro/xc/programs/Xserver/hw/dmx/glxProxy/glxvendor.c 2004-06-30 13:06:55.000000000 -0700 +++ cvs-rw/xc/programs/Xserver/hw/dmx/glxProxy/glxvendor.c 2004-07-02 16:36:52.917181000 -0700 @@ -59,7 +59,7 @@ * this is because the GL single opcodes has different naming convension * the other X opcodes (ie. X_GLsop_GetFloatv). */ -#if (__STDC__ && !defined(UNIXCPP)) || defined(ANSICPP) +#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP) #define GetReqVendorPrivate(name, req) \ WORD64ALIGN\ if ((dpy->bufptr + SIZEOF(x##name##Req)) > dpy->bufmax)\ diff -ur -x CVS cvs-ro/xc/programs/Xserver/hw/dmx/input/Imakefile cvs-rw/xc/programs/Xserver/hw/dmx/input/Imakefile --- cvs-ro/xc/programs/Xserver/hw/dmx/input/Imakefile 2004-06-30 13:06:55.000000000 -0700 +++ cvs-rw/xc/programs/Xserver/hw/dmx/input/Imakefile 2004-07-02 18:40:56.321073000 -0700 @@ -8,7 +8,8 @@ RAWOBJS = lnx-keyboard.o lnx-ms.o lnx-ps2.o #endif -#ifndef __sgi +#ifdef __linux__ +USBDEFS = -DDMX_USB USBSRCS = usb-keyboard.c usb-mouse.c usb-other.c usb-common.c USBOBJS = usb-keyboard.o usb-mouse.o usb-other.o usb-common.o #endif @@ -33,7 +34,7 @@ -I../../../include -I../../../render -I$(EXTINCSRC) \ -I$(SERVERSRC)/Xext -I$(SERVERSRC)/Xi -DEFINES = $(OS_DEFINES) $(EXT_DEFINES) $(DMX_DEFINES) +DEFINES = $(OS_DEFINES) $(EXT_DEFINES) $(DMX_DEFINES) $(USBDEFS) all:: $(OBJS) diff -ur -x CVS cvs-ro/xc/programs/Xserver/hw/dmx/input/dmxinputinit.c cvs-rw/xc/programs/Xserver/hw/dmx/input/dmxinputinit.c --- cvs-ro/xc/programs/Xserver/hw/dmx/input/dmxinputinit.c 2004-06-30 13:06:55.000000000 -0700 +++ cvs-rw/xc/programs/Xserver/hw/dmx/input/dmxinputinit.c 2004-07-02 18:41:12.958363000 -0700 @@ -177,7 +177,7 @@ ps2LinuxRead }, #endif -#ifndef __sgi +#ifdef DMX_USB /* USB drivers, currently only for Linux, but relatively easy to port to other OSs */ diff -ur -x CVS cvs-ro/xc/programs/Xserver/hw/dmx/input/dmxsigio.c cvs-rw/xc/programs/Xserver/hw/dmx/input/dmxsigio.c --- cvs-ro/xc/programs/Xserver/hw/dmx/input/dmxsigio.c 2004-06-30 13:06:55.000000000 -0700 +++ cvs-rw/xc/programs/Xserver/hw/dmx/input/dmxsigio.c 2004-07-02 16:04:53.486813000 -0700 @@ -42,14 +42,18 @@ #include "dmxevents.h" #include #include -#include +#include static int dmxFdCount = 0; static Bool dmxInputEnabled = TRUE; /* Define equivalents for non-POSIX systems (e.g., SGI IRIX) */ #ifndef O_ASYNC -#define O_ASYNC FASYNC +# ifdef FASYNC +# define O_ASYNC FASYNC +# else +# define O_ASYNC 0 +# endif #endif #ifndef O_NONBLOCK #define O_NONBLOCK FNONBLK