blob: 040505f7e267df63527434be810c41e15e992dc8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
diff -ur rio107.orig/app.cpp rio107/app.cpp
--- rio107.orig/app.cpp 1999-06-11 19:26:46.000000000 +0300
+++ rio107/app.cpp 2007-12-25 16:34:39.000000000 +0200
@@ -43,7 +43,7 @@
#endif
#define DELETEARRAY delete[]
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
// FreeBSD g++
#include <unistd.h>
#include <sys/syslimits.h>
diff -ur rio107.orig/rio.cpp rio107/rio.cpp
--- rio107.orig/rio.cpp 1999-06-11 19:26:46.000000000 +0300
+++ rio107/rio.cpp 2007-12-25 16:34:39.000000000 +0200
@@ -63,18 +63,36 @@
#elif defined(__linux__)
// linux g++
#include <unistd.h>
- #if defined(__alpha)
- #include <sys/io.h>
+
+ // Changed per Debian bug 50938
+ //#if defined(__alpha)
+ // #include <sys/io.h>
+ //#else
+ // #include <sys/perm.h>
+ //#endif
+
+ // Changes per Debian bug 50938
+ #if !defined(__i386__)
+ #include <sys/io.h>
#else
- #include <sys/perm.h>
+ #include <sys/perm.h>
#endif
+
+ // Changed per bug Debian bug 88779
+ #if !defined(__alpha__)
+ #if __GLIBC__
+ #include <sys/io.h>
+ #else
#include <asm/io.h>
+ #endif
+ #endif
+
#define OUTPORT(p,v) outb( v, p )
#define INPORT(p) inb( p )
#define CLOCK_SECOND CLOCKS_PER_SEC
#define DELETEARRAY delete[]
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
// FreeBSD g++
#include <fcntl.h>
#include <unistd.h>
@@ -236,7 +254,7 @@
#endif
// if FreeBSD
- #if defined(__FreeBSD__)
+ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
// request direct access to memory addresses
if ( open("/dev/io", O_RDONLY) == -1 )
{
|