2001-02-20 15:49:38 +01:00
|
|
|
--- src/vc.c.orig Tue Feb 20 23:38:10 2001
|
|
|
|
+++ src/vc.c Tue Feb 20 23:41:25 2001
|
|
|
|
@@ -37,7 +37,13 @@
|
|
|
|
#include <termio.h>
|
|
|
|
#elif defined(__FreeBSD__)
|
|
|
|
#include <termios.h>
|
|
|
|
-#include <machine/console.h>
|
|
|
|
+#include <osreldate.h>
|
|
|
|
+#if __FreeBSD_version >= 410000
|
|
|
|
+# include <sys/consio.h>
|
|
|
|
+# include <sys/kbio.h>
|
|
|
|
+#else
|
|
|
|
+# include <machine/console.h>
|
2000-07-16 11:01:54 +02:00
|
|
|
+#endif
|
|
|
|
#endif
|
2001-02-20 15:49:38 +01:00
|
|
|
#include <sys/ioctl.h>
|
|
|
|
#if defined(linux)
|
|
|
|
@@ -94,28 +100,26 @@
|
|
|
|
inline void blatch(void *head, int n)
|
|
|
|
{
|
|
|
|
|
|
|
|
- __asm__("\t clc\n"
|
|
|
|
+ __asm__ volatile("\t clc\n"
|
|
|
|
"1:\n"
|
|
|
|
"\t andb %%bl, (%%eax)\n"
|
|
|
|
"\t incl %%eax\n"
|
|
|
|
"\t loop 1b\n"
|
|
|
|
- :
|
|
|
|
- : "eax" ((long)head), "bl" (0x7F), "c" (n)
|
|
|
|
- : "bl", "cx" );
|
|
|
|
+ : "=bl" (head), "=c" (n)
|
|
|
|
+ : "eax" ((long)head), "0" (0x7F), "1" (n));
|
2000-07-16 11:01:54 +02:00
|
|
|
}
|
|
|
|
|
2001-02-20 15:49:38 +01:00
|
|
|
static
|
|
|
|
inline void llatch(void *head, int n)
|
2000-07-16 11:01:54 +02:00
|
|
|
{
|
2001-02-20 15:49:38 +01:00
|
|
|
|
|
|
|
- __asm__("\t clc\n"
|
|
|
|
+ __asm__ volatile("\t clc\n"
|
|
|
|
"1:\n"
|
|
|
|
"\t andl %%ebx, (%%eax)\n"
|
|
|
|
"\t addl $4, %%eax\n"
|
|
|
|
"\t loop 1b\n"
|
|
|
|
- :
|
|
|
|
- : "eax" ((long)head), "ebx" (0x7F7F7F7F), "c" (n>>2)
|
|
|
|
- : "ebx", "cx" );
|
|
|
|
+ : "=ebx" (head), "=c" (n)
|
|
|
|
+ : "eax" ((long)head), "0" (0x7F7F7F7F), "1" (n>>2));
|
2000-07-16 11:01:54 +02:00
|
|
|
}
|
|
|
|
|
2001-02-20 15:49:38 +01:00
|
|
|
static inline u_int TextAddress(u_int x, u_int y)
|