Support for kFreeBSD-amd64
As it happens, /dev/io is not limited to -i386, so use it on -amd64 too. Bug-Debian: http://bugs.debian.org/413176 Gbp-Pq: Name kfreebsd-amd64.patch
This commit is contained in:
parent
1b61ea5487
commit
759337fc4b
|
@ -30,8 +30,8 @@ case "{$host}" in
|
|||
AC_DEFINE(HAVE_OBSD_I386,1,enable OpenBSD i386 ioperm access)
|
||||
LIBS="-li386"
|
||||
;;
|
||||
*86-*-freebsd* | *86-*-kfreebsd*)
|
||||
AC_DEFINE(HAVE_FBSD_I386,1,enable FreeBSD /dev/io access)
|
||||
*86-*-freebsd* | *86-*-kfreebsd* | *x86_64-*-freebsd* | *x86_64-*-kfreebsd* )
|
||||
AC_DEFINE(HAVE_FBSD,1,enable FreeBSD /dev/io access)
|
||||
;;
|
||||
*86-*-solaris*)
|
||||
AC_DEFINE(HAVE_SOLARIS,1,enable solaris iop access)
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* enable FreeBSD /dev/io access */
|
||||
#undef HAVE_FBSD_I386
|
||||
#undef HAVE_FBSD
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
|
|
@ -66,7 +66,7 @@ struct iopbuf {
|
|||
|
||||
#include "io.h"
|
||||
|
||||
#elif defined(HAVE_FBSD_I386)
|
||||
#elif defined(HAVE_FBSD)
|
||||
|
||||
/* don't use machine/cpufunc.h here because it redefines inb and outb as
|
||||
macros, which breaks our port->fn->inb calls */
|
||||
|
@ -127,7 +127,7 @@ static unsigned char
|
|||
raw_inb (struct parport_internal *port, unsigned long addr)
|
||||
{
|
||||
#if (defined(HAVE_LINUX) && defined(HAVE_SYS_IO_H)) || defined(HAVE_CYGWIN_9X) \
|
||||
|| defined(HAVE_OBSD_I386) || defined(HAVE_FBSD_I386)
|
||||
|| defined(HAVE_OBSD_I386) || defined(HAVE_FBSD)
|
||||
return inb ((unsigned short)addr);
|
||||
|
||||
#elif defined(HAVE_SOLARIS)
|
||||
|
@ -146,7 +146,7 @@ static void
|
|||
raw_outb (struct parport_internal *port, unsigned char val, unsigned long addr)
|
||||
{
|
||||
#if (defined(HAVE_LINUX) && defined(HAVE_SYS_IO_H)) || defined(HAVE_CYGWIN_9X) \
|
||||
|| defined(HAVE_OBSD_I386) || defined(HAVE_FBSD_I386)
|
||||
|| defined(HAVE_OBSD_I386) || defined(HAVE_FBSD)
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(_MSC_VER)
|
||||
outb_p (val, (unsigned short)addr);
|
||||
#else
|
||||
|
@ -208,7 +208,7 @@ init (struct parport *pport, int flags, int *capabilities)
|
|||
return E1284_SYS; /* might not be the best error code to use */
|
||||
#endif /* HAVE_SYS_IO_H */
|
||||
|
||||
#elif defined(HAVE_FBSD_I386)
|
||||
#elif defined(HAVE_FBSD)
|
||||
/* open the special io device which does the ioperm change for us */
|
||||
if ((port->fd = open("/dev/io", O_RDONLY)) < 0)
|
||||
{
|
||||
|
@ -278,7 +278,7 @@ cleanup (struct parport_internal *port)
|
|||
{
|
||||
if (port->type != IO_CAPABLE && port->fd >= 0)
|
||||
close (port->fd);
|
||||
#if defined(HAVE_FBSD_I386) || defined (HAVE_SOLARIS)
|
||||
#if defined(HAVE_FBSD) || defined (HAVE_SOLARIS)
|
||||
if (port->fd >= 0)
|
||||
close(port->fd);
|
||||
#endif
|
||||
|
|
|
@ -161,7 +161,7 @@ check_io (void)
|
|||
return 1;
|
||||
}
|
||||
free(iomap);
|
||||
#elif defined(HAVE_FBSD_I386)
|
||||
#elif defined(HAVE_FBSD)
|
||||
int fd;
|
||||
if ((fd = open("/dev/io", O_RDONLY)) >= 0) {
|
||||
capabilities |= IO_CAPABLE;
|
||||
|
|
|
@ -352,7 +352,7 @@ populate_by_guessing (struct parport_list *list, int flags)
|
|||
add_port (list, flags, "0x378", "/dev/port", NULL, 0x378, 0, -1);
|
||||
add_port (list, flags, "0x278", "/dev/port", NULL, 0x278, 0, -1);
|
||||
add_port (list, flags, "0x3bc", "/dev/port", NULL, 0x3bc, 0, -1);
|
||||
#elif defined(HAVE_FBSD_I386)
|
||||
#elif defined(HAVE_FBSD)
|
||||
add_port (list, flags, "0x378", "/dev/io", NULL, 0x378, 0, -1);
|
||||
add_port (list, flags, "0x278", "/dev/io", NULL, 0x278, 0, -1);
|
||||
add_port (list, flags, "0x3bc", "/dev/io", NULL, 0x3bc, 0, -1);
|
||||
|
|
Loading…
Reference in New Issue