Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / sysutils / isapnptools / patches / patch-aa
blobfba24c4ad6b6ce3bed3bcb7220e86b8f09d01bd1
1 $NetBSD$
2 --- src/iopl.c  Tue May  8 15:14:21 2001
3 +++ src/iopl.c  Mon Jul 22 07:46:37 2002
4 @@ -61,10 +61,17 @@
5     */
6    ret = iopl(3);
7  #else
8 +#if defined(__NetBSD__) && defined(HAVE_LIBI386)
9 +  /*
10 +   * Have to get unrestricted access to io ports, as WRITE_DATA port > 0x3ff
11 +   */
12 +  ret = i386_iopl(3);
13 +#else
14  #ifdef HAVE_IOPERM
15    /* ALPHA only has ioperm, apparently, so cover all with one permission */
16    ret = ioperm(MIN_READ_ADDR, WRITEDATA_ADDR - MIN_READ_ADDR + 1, 1);
17  #endif /* HAVE_IOPERM */
18 +#endif /* !(__NetBSD__ && HAVE_LIBI386) */
19  #endif /* !HAVE_IOPL */
21    if (ret < 0) {
22 @@ -85,9 +92,13 @@
23  #ifdef HAVE_IOPL
24    ret = iopl(0);
25  #else
26 +#if defined(__NetBSD__) && defined(HAVE_LIBI386)
27 +  ret = i386_iopl(0);
28 +#else
29  #ifdef HAVE_IOPERM
30    ret = ioperm(MIN_READ_ADDR, WRITEDATA_ADDR - MIN_READ_ADDR + 1, 0);
31  #endif /* HAVE_IOPERM */
32 +#endif /* !(__NetBSD__ && HAVE_LIBI386) */
33  #endif /* !HAVE_IOPL */
35    if (ret < 0) {