diff options
author | Roland Mainz <roland.mainz@nrubsig.org> | 2005-02-02 00:55:21 +0000 |
---|---|---|
committer | Roland Mainz <roland.mainz@nrubsig.org> | 2005-02-02 00:55:21 +0000 |
commit | 44e2d9167943182fea530dfd7ec16aa53db20f4c (patch) | |
tree | d0b6d07f7e137c8d3db9a5be03a6394c237f21f5 /hw/xfree86/os-support/linux/lnx_io.c | |
parent | 15c555a25df76e0e95bc8eaa2ca7ec80a7695a6c (diff) |
xc/programs/Xserver/hw/xfree86/os-support/bus/xf86Sbus.h
xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c
//bugs.freedesktop.org/show_bug.cgi?id=825) attachment #956
(https://bugs.freedesktop.org/attachment.cgi?id=956): Fix build
problems on Linux/SPARC. Patch by Jeremy Huddleston
<eradicator@gentoo.org>. Approved in the 2005-01-31 Xorg
release-wranglers phone call.
Diffstat (limited to 'hw/xfree86/os-support/linux/lnx_io.c')
-rw-r--r-- | hw/xfree86/os-support/linux/lnx_io.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/hw/xfree86/os-support/linux/lnx_io.c b/hw/xfree86/os-support/linux/lnx_io.c index 303c6e3d3..1eebc757a 100644 --- a/hw/xfree86/os-support/linux/lnx_io.c +++ b/hw/xfree86/os-support/linux/lnx_io.c @@ -90,10 +90,9 @@ KDKBDREP_ioctl_ok(int rate, int delay) { /* don't change, just test */ kbdrep_s.rate = -1; kbdrep_s.delay = -1; - if (ioctl( 0, KDKBDREP, &kbdrep_s )) { + if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) { return 0; } - /* do the change */ if (rate == 0) /* switch repeat off */ kbdrep_s.rate = 0; @@ -105,7 +104,7 @@ KDKBDREP_ioctl_ok(int rate, int delay) { if (kbdrep_s.delay < 1) kbdrep_s.delay = 1; - if (ioctl( 0, KDKBDREP, &kbdrep_s )) { + if (ioctl( xf86Info.consoleFd, KDKBDREP, &kbdrep_s )) { return 0; } @@ -115,6 +114,8 @@ KDKBDREP_ioctl_ok(int rate, int delay) { #endif /* KDKBDREP */ } +#undef rate + static int KIOCSRATE_ioctl_ok(int rate, int delay) { #ifdef KIOCSRATE @@ -130,8 +131,9 @@ KIOCSRATE_ioctl_ok(int rate, int delay) { if (kbdrate_s.rate > 50) kbdrate_s.rate = 50; - if (ioctl( fd, KIOCSRATE, &kbdrate_s )) - return 0; + if (ioctl( fd, KIOCSRATE, &kbdrate_s )) { + return 0; + } close( fd ); @@ -141,14 +143,7 @@ KIOCSRATE_ioctl_ok(int rate, int delay) { #endif /* KIOCSRATE */ } -#undef rate - -#if NeedFunctionPrototypes void xf86SetKbdRepeat(char rad) -#else -void xf86SetKbdRepeat(rad) -char rad; -#endif { #ifdef __sparc__ int rate = 500; /* Default rate */ @@ -178,7 +173,6 @@ char rad; if (xf86Info.kbdDelay >= 0) delay = xf86Info.kbdDelay; - if(KDKBDREP_ioctl_ok(rate, delay)) /* m68k? */ return; |