mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
build fix for 5-current. patches from japanese/kon2-16dot.
Obtained from: bento
This commit is contained in:
parent
44d2b34d4a
commit
849136aaf7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=38513
@ -1,71 +1,52 @@
|
||||
--- src/vc.c.orig Sat Mar 29 04:35:50 1997
|
||||
+++ src/vc.c Sun Jul 16 12:44:05 2000
|
||||
@@ -310,12 +310,23 @@
|
||||
{
|
||||
struct vt_mode vtm;
|
||||
|
||||
+#if defined(__FreeBSD__)
|
||||
+ signal(SIGUSR1, SIG_IGN);
|
||||
+ signal(SIGUSR2, SIG_IGN);
|
||||
+#else /* linux */
|
||||
signal(SIGUSR1, SIG_DFL);
|
||||
signal(SIGUSR2, SIG_DFL);
|
||||
--- 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>
|
||||
+#endif
|
||||
vtm.mode = VT_AUTO;
|
||||
vtm.waitv = 0;
|
||||
+#if defined(__FreeBSD__)
|
||||
+ vtm.relsig = SIGUSR1;
|
||||
+ vtm.acqsig = SIGUSR2;
|
||||
+ vtm.frsig = SIGUSR1;
|
||||
+#else /* linux */
|
||||
vtm.relsig = 0;
|
||||
vtm.acqsig = 0;
|
||||
+#endif
|
||||
ioctl(0, VT_SETMODE, &vtm);
|
||||
#if defined(__FreeBSD__)
|
||||
ioctl(0, VT_RELDISP, 1);
|
||||
@@ -341,6 +352,9 @@
|
||||
vtm.waitv = 0;
|
||||
vtm.relsig = SIGUSR1;
|
||||
vtm.acqsig = SIGUSR2;
|
||||
+#if defined(__FreeBSD__)
|
||||
+ vtm.frsig = SIGUSR1;
|
||||
+#endif
|
||||
ioctl(0, VT_SETMODE, &vtm);
|
||||
vInfo.graph_mode();
|
||||
if (useHardScroll)
|
||||
@@ -859,20 +873,31 @@
|
||||
|
||||
static int ConfigBeep(const char *confstr)
|
||||
{
|
||||
- beepCount = atoi(confstr) * 10000;
|
||||
#endif
|
||||
#include <sys/ioctl.h>
|
||||
#if defined(linux)
|
||||
- ioperm(COUNTER_ADDR, 1, TRUE);
|
||||
+ beepCount = atoi(confstr) * 10000;
|
||||
+ if (beepCount > 0)
|
||||
+ ioperm(COUNTER_ADDR, 1, TRUE);
|
||||
+#endif
|
||||
+#if defined(__FreeBSD__)
|
||||
+ beepCount = atoi(confstr) * 10;
|
||||
#endif
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
+#define BELL_PITCH 800
|
||||
+
|
||||
void Beep(void)
|
||||
@@ -94,28 +100,26 @@
|
||||
inline void blatch(void *head, int n)
|
||||
{
|
||||
- if (!con.active) return;
|
||||
#ifdef linux
|
||||
+ if (!con.active) return;
|
||||
PortOutb(PortInb(COUNTER_ADDR)|3, COUNTER_ADDR);
|
||||
usleep(beepCount);
|
||||
PortOutb(PortInb(COUNTER_ADDR)&0xFC, COUNTER_ADDR);
|
||||
+#endif
|
||||
+#if defined(__FreeBSD__)
|
||||
+ if(beepCount <= 0) return;
|
||||
+ ioctl(fileno(stdout), KDMKTONE, (BELL_PITCH & 0xffff) |
|
||||
+ ((beepCount & 0xffff) << 16));
|
||||
#endif
|
||||
|
||||
- __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));
|
||||
}
|
||||
|
||||
static
|
||||
inline void llatch(void *head, int n)
|
||||
{
|
||||
|
||||
- __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));
|
||||
}
|
||||
|
||||
static inline u_int TextAddress(u_int x, u_int y)
|
||||
|
@ -1,6 +1,21 @@
|
||||
--- src/term.c.orig Sat Mar 29 04:36:54 1997
|
||||
+++ src/term.c Sun Jul 16 12:50:34 2000
|
||||
@@ -209,6 +209,9 @@
|
||||
+++ src/term.c Tue Feb 20 23:43:44 2001
|
||||
@@ -30,7 +30,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>
|
||||
+#endif
|
||||
#define termio termios
|
||||
#endif
|
||||
#include <signal.h>
|
||||
@@ -209,6 +215,9 @@
|
||||
}
|
||||
if (FD_ISSET(0, &readFds)) {
|
||||
i = read(0, buff, BUFSIZ);
|
||||
@ -10,7 +25,7 @@
|
||||
#if 1
|
||||
{
|
||||
int k, l;
|
||||
@@ -239,7 +242,7 @@
|
||||
@@ -239,7 +248,7 @@
|
||||
PollCursor(TRUE);
|
||||
}
|
||||
if (FD_ISSET(sockFd, &readFds)) SocketInterface(sockFd);
|
||||
|
@ -1,6 +1,21 @@
|
||||
--- src/display/vga.c.orig Wed Apr 9 21:34:02 1997
|
||||
+++ src/display/vga.c Sun Jul 16 12:52:41 2000
|
||||
@@ -379,7 +379,7 @@
|
||||
+++ src/display/vga.c Tue Feb 20 23:39:29 2001
|
||||
@@ -42,7 +42,13 @@
|
||||
#elif defined(__FreeBSD__)
|
||||
#include <vm/vm_param.h>
|
||||
#include <sys/ioctl.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>
|
||||
+#endif
|
||||
vm_size_t page_size;
|
||||
#endif
|
||||
#undef free
|
||||
@@ -379,7 +385,7 @@
|
||||
/* if (!code) return;*/
|
||||
VgaSetColor(fc);
|
||||
if (bc & 0x8) *(vcls - dInfo.glineByte) = 0;
|
||||
@ -9,7 +24,7 @@
|
||||
if (*code) {
|
||||
VgaOutByte(*code);
|
||||
*gram = *gram;
|
||||
@@ -617,7 +617,11 @@
|
||||
@@ -617,7 +623,11 @@
|
||||
Perror("ioctl CONSOLE_IO_ENABLE/KDSETMODE");
|
||||
return FAILURE;
|
||||
}
|
||||
|
@ -1,37 +0,0 @@
|
||||
--- src/vc.c.orig Fri Jun 9 04:14:43 2000
|
||||
+++ src/vc.c Fri Jun 9 04:27:53 2000
|
||||
@@ -95,28 +95,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));
|
||||
}
|
||||
|
||||
static
|
||||
inline void llatch(void *head, int n)
|
||||
{
|
||||
|
||||
- __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));
|
||||
}
|
||||
|
||||
static inline u_int TextAddress(u_int x, u_int y)
|
Loading…
Reference in New Issue
Block a user