|
|
@ -38,7 +38,7 @@
|
|
|
|
#endif /* LOCKING */
|
|
|
|
#endif /* LOCKING */
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __linux__
|
|
|
|
#ifdef __linux__
|
|
|
|
#if defined(arm) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) || defined(__powerpc__) || defined(__s390__) || defined(__s390x__) || defined(__mips__) || defined(__mc68000__)
|
|
|
|
#if defined(arm) || defined(__aarch64__) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) || defined(__powerpc__) || defined(__s390__) || defined(__s390x__) || defined(__mips__) || defined(__mc68000__)
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
#include <sys/io.h>
|
|
|
|
#include <sys/io.h>
|
|
|
@ -75,7 +75,7 @@ port_t::port_t(int iport) {
|
|
|
|
#endif /* LOCKING */
|
|
|
|
#endif /* LOCKING */
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef LINUX
|
|
|
|
#ifdef LINUX
|
|
|
|
#if defined(arm) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) || defined(__powerpc__) || defined(__s390__) || defined(__s390x__) || defined(__mips__) || defined(__mc68000__)
|
|
|
|
#if defined(arm) || defined(__aarch64__) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) || defined(__powerpc__) || defined(__s390__) || defined(__s390x__) || defined(__mips__) || defined(__mc68000__)
|
|
|
|
if ((devport = open("/dev/port", O_RDWR)) < 0) {
|
|
|
|
if ((devport = open("/dev/port", O_RDWR)) < 0) {
|
|
|
|
perror("open /dev/port");
|
|
|
|
perror("open /dev/port");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -119,7 +119,7 @@ port_t::~port_t(void) {
|
|
|
|
unlock(port);
|
|
|
|
unlock(port);
|
|
|
|
#endif /* LOCKING */
|
|
|
|
#endif /* LOCKING */
|
|
|
|
#ifdef LINUX
|
|
|
|
#ifdef LINUX
|
|
|
|
#if defined(arm) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) || defined(__powerpc__) || defined(__s390__) || defined(__s390x__) || defined(__mips__) || defined(__mc68000__)
|
|
|
|
#if defined(arm) || defined(__aarch64__) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) || defined(__powerpc__) || defined(__s390__) || defined(__s390x__) || defined(__mips__) || defined(__mc68000__)
|
|
|
|
if (devport >= 0)
|
|
|
|
if (devport >= 0)
|
|
|
|
close(devport);
|
|
|
|
close(devport);
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|