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.
This commit is contained in:
parent
15c555a25d
commit
44e2d91679
|
@ -20,13 +20,14 @@
|
|||
* 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.
|
||||
*/
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/xf86Sbus.h,v 1.5 2002/05/22 21:38:30 herrb Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/xf86Sbus.h,v 1.3 2001/04/20 17:02:43 tsi Exp $ */
|
||||
|
||||
#ifndef _XF86_SBUS_H
|
||||
#define _XF86_SBUS_H
|
||||
|
||||
#if defined(linux)
|
||||
#include <asm/types.h>
|
||||
#include <linux/fb.h>
|
||||
#include <asm/fbio.h>
|
||||
#include <asm/openpromio.h>
|
||||
#elif defined(SVR4)
|
||||
|
@ -35,7 +36,13 @@
|
|||
#elif defined(__OpenBSD__) && defined(__sparc64__)
|
||||
/* XXX */
|
||||
#elif defined(CSRG_BASED)
|
||||
#if defined(__FreeBSD__)
|
||||
#include <sys/types.h>
|
||||
#include <sys/fbio.h>
|
||||
#include <dev/ofw/openpromio.h>
|
||||
#else
|
||||
#include <machine/fbio.h>
|
||||
#endif
|
||||
#else
|
||||
#include <sun/fbio.h>
|
||||
#endif
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -145,6 +145,8 @@ KDKBDREP_ioctl_ok(int rate, int delay) {
|
|||
#endif /* KDKBDREP */
|
||||
}
|
||||
|
||||
#undef rate
|
||||
|
||||
static int
|
||||
KIOCSRATE_ioctl_ok(int rate, int delay) {
|
||||
#ifdef KIOCSRATE
|
||||
|
@ -172,8 +174,6 @@ KIOCSRATE_ioctl_ok(int rate, int delay) {
|
|||
#endif /* KIOCSRATE */
|
||||
}
|
||||
|
||||
#undef rate
|
||||
|
||||
static void
|
||||
SetKbdRepeat(InputInfoPtr pInfo, char rad)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user