summaryrefslogtreecommitdiff
path: root/chinese
diff options
context:
space:
mode:
Diffstat (limited to 'chinese')
-rw-r--r--chinese/zhcon/files/patch-ab28
1 files changed, 28 insertions, 0 deletions
diff --git a/chinese/zhcon/files/patch-ab b/chinese/zhcon/files/patch-ab
new file mode 100644
index 000000000000..58d1e54162de
--- /dev/null
+++ b/chinese/zhcon/files/patch-ab
@@ -0,0 +1,28 @@
+--- zhcon/bsdfactory.cpp.orig Sun Sep 9 13:19:32 2001
++++ zhcon/bsdfactory.cpp Sun Sep 9 13:54:13 2001
+@@ -102,11 +102,24 @@
+ }
+
+ printf ("len %d\n", buflen);
++#if (__FreeBSD__ <= 3)
+ if ((vga = open("/dev/vga", O_RDWR | O_NDELAY)) < 0) {
++#else
++ if ((vga = open("/dev/mem", O_RDWR | O_NDELAY)) < 0) {
++#endif
+ throw(runtime_error("Can not open vga device.\n"));
+ }
+
+- buf = static_cast<char *>(mmap(0, buflen, PROT_READ | PROT_WRITE, MAP_SHARED, vga, 0));
++ if ((buf = static_cast<char *>(valloc(buflen))) == NULL) {
++ throw(runtime_error("Can not open vga device.\n"));
++ }
++
++#if (__FreeBSD__ <= 3)
++#define GRAPH_BASE 0x0
++#else
++#define GRAPH_BASE 0xA0000
++#endif
++ buf = static_cast<char *>(mmap(buf, buflen, PROT_READ | PROT_WRITE, MAP_FILE|MAP_SHARED|MAP_FIXED, vga, GRAPH_BASE));
+ close(vga);
+
+ if (buf == MAP_FAILED)