- restrict direct parallel port access to x86 platforms (thanks to Vincent Palatin)

git-svn-id: svn://svn.berlios.de/openocd/trunk@183 b42882b7-edfa-0310-969c-e2dbd0fdcd60
__archive__
drath 2007-07-26 09:36:17 +00:00
parent df4b030df7
commit 712be40f8d
4 changed files with 25 additions and 12 deletions

View File

@ -24,9 +24,16 @@ AC_ARG_ENABLE(parport,
AS_HELP_STRING([--enable-parport], [Enable building the pc parallel port driver]), AS_HELP_STRING([--enable-parport], [Enable building the pc parallel port driver]),
[build_parport=$enableval], [build_parport=no]) [build_parport=$enableval], [build_parport=no])
AC_ARG_ENABLE(parport_ppdev, case "${host_cpu}" in
AS_HELP_STRING([--enable-parport_ppdev], [Enable use of ppdev (/dev/parportN) for parport]), i?86|x86*)
[parport_use_ppdev=$enableval], [parport_use_ppdev=no]) AC_ARG_ENABLE(parport_ppdev,
AS_HELP_STRING([--enable-parport_ppdev], [Enable use of ppdev (/dev/parportN) for parport]),
[parport_use_ppdev=$enableval], [parport_use_ppdev=no])
;;
*)
parport_use_ppdev=yes
;;
esac
AC_ARG_ENABLE(ft2232_libftdi, AC_ARG_ENABLE(ft2232_libftdi,
AS_HELP_STRING([--enable-ft2232_libftdi], [Enable building support for FT2232 based devices using the libftdi driver]), AS_HELP_STRING([--enable-ft2232_libftdi], [Enable building support for FT2232 based devices using the libftdi driver]),

View File

@ -27,9 +27,7 @@
/* system includes */ /* system includes */
#ifndef _WIN32 #ifdef _WIN32
#include <sys/io.h>
#else
#include "errno.h" #include "errno.h"
#endif /* _WIN32 */ #endif /* _WIN32 */
@ -45,6 +43,10 @@
#include <fcntl.h> #include <fcntl.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <unistd.h> #include <unistd.h>
#else /* not PARPORT_USE_PPDEV */
#ifndef _WIN32
#include <sys/io.h>
#endif
#endif #endif
#if PARPORT_USE_GIVEIO == 1 #if PARPORT_USE_GIVEIO == 1

View File

@ -43,9 +43,7 @@
#else #else
#ifndef _WIN32 #ifdef _WIN32
#include <sys/io.h>
#else
#include "errno.h" #include "errno.h"
#endif /* _WIN32 */ #endif /* _WIN32 */
@ -69,6 +67,10 @@
#endif #endif
#include <fcntl.h> #include <fcntl.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#else /* not PARPORT_USE_PPDEV */
#ifndef _WIN32
#include <sys/io.h>
#endif
#endif #endif
#if PARPORT_USE_GIVEIO == 1 #if PARPORT_USE_GIVEIO == 1

View File

@ -38,9 +38,7 @@
#else #else
#ifndef _WIN32 #ifdef _WIN32
#include <sys/io.h>
#else
#include "errno.h" #include "errno.h"
#endif /* _WIN32 */ #endif /* _WIN32 */
@ -62,6 +60,10 @@
#endif #endif
#include <fcntl.h> #include <fcntl.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#else /* not PARPORT_USE_PPDEV */
#ifndef _WIN32
#include <sys/io.h>
#endif
#endif #endif
#if PARPORT_USE_GIVEIO == 1 #if PARPORT_USE_GIVEIO == 1