Revision 8065,
1.3 KB
checked in by Takemikaduchi, 11 years ago
(diff) |
libdrm, libwacom, tar: new upstream release
xorg-x11-drivers: new upstream release or rebuild
|
Line | |
---|
1 | #ifdef __NetBSD__ |
---|
2 | # include <sys/types.h> |
---|
3 | # include <machine/pio.h> |
---|
4 | # include <machine/sysarch.h> |
---|
5 | #else |
---|
6 | # if defined(__linux__) |
---|
7 | /* Can't because <sys/iopl.h> provides conflicting inb, outb, etc |
---|
8 | * # include <sys/io.h> |
---|
9 | */ |
---|
10 | int iopl(int level); |
---|
11 | # endif |
---|
12 | # if defined(SVR4) && defined(i386) |
---|
13 | # include <sys/types.h> |
---|
14 | # ifdef NCR |
---|
15 | /* broken NCR <sys/sysi86.h> */ |
---|
16 | # define __STDC |
---|
17 | # include <sys/sysi86.h> |
---|
18 | # undef __STDC |
---|
19 | # else |
---|
20 | # include <sys/sysi86.h> |
---|
21 | # endif |
---|
22 | # ifdef SVR4 |
---|
23 | # if !defined(sun) |
---|
24 | # include <sys/seg.h> |
---|
25 | # endif |
---|
26 | # endif |
---|
27 | # include <sys/v86.h> |
---|
28 | # if defined(sun) |
---|
29 | # include <sys/psw.h> |
---|
30 | # endif |
---|
31 | # endif |
---|
32 | # include "AsmMacros.h" |
---|
33 | #endif /* NetBSD */ |
---|
34 | |
---|
35 | #include <unistd.h> |
---|
36 | #include <stdio.h> |
---|
37 | #include <stdlib.h> |
---|
38 | |
---|
39 | #ifdef __NetBSD__ |
---|
40 | # define SET_IOPL() i386_iopl(3) |
---|
41 | # define RESET_IOPL() i386_iopl(0) |
---|
42 | #else |
---|
43 | # if defined(SVR4) && defined(i386) |
---|
44 | # ifndef SI86IOPL |
---|
45 | # define SET_IOPL() sysi86(SI86V86,V86SC_IOPL,PS_IOPL) |
---|
46 | # define RESET_IOPL() sysi86(SI86V86,V86SC_IOPL,0) |
---|
47 | # else |
---|
48 | # define SET_IOPL() sysi86(SI86IOPL,3) |
---|
49 | # define RESET_IOPL() sysi86(SI86IOPL,0) |
---|
50 | # endif |
---|
51 | # else |
---|
52 | # ifdef linux |
---|
53 | # define SET_IOPL() iopl(3) |
---|
54 | # define RESET_IOPL() iopl(0) |
---|
55 | # else |
---|
56 | # define SET_IOPL() (void)0 |
---|
57 | # define RESET_IOPL() (void)0 |
---|
58 | # endif |
---|
59 | # endif |
---|
60 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.