Date: Fri, 28 Dec 2007 19:33:32 +0100 (CET) From: Ed Schouten <ed@fxq.nl> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/119113: [Patch] japanese/rogue_s: Don't use sgtty. Message-ID: <20071228183332.930281CCD9@palm.hoeg.nl> Resent-Message-ID: <200712281840.lBSIe2Qo082027@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 119113 >Category: ports >Synopsis: [Patch] japanese/rogue_s: Don't use sgtty. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Dec 28 18:40:02 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Ed Schouten >Release: FreeBSD 6.3-PRERELEASE i386 >Organization: >Environment: System: FreeBSD palm.hoeg.nl 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #0: Wed Dec 19 16:07:46 CET 2007 ed@palm.hoeg.nl:/usr/obj/usr/src/sys/PALM i386 >Description: The japanese/rogue_s port still uses sgtty, while there is some termio code in there that we can easily hack to termios. This makes rogue_s work with kernels that don't have COMPAT_43TTY. >How-To-Repeat: >Fix: Apply the following patch: --- japanese/rogue_s/files/patch-aa 2000-07-18 19:38:04.000000000 +0200 +++ japanese/rogue_s/files/patch-aa 2007-12-28 19:32:57.000000000 +0100 @@ -16,7 +16,7 @@ -#CFLAGS = -O -g -DUNIX -DUNIX_BSD4_2 -DUNIX_386BSD -DCURSES -DJAPAN -DEUC -DTOPSCO -#LIBS = +CC = cc -+CFLAGS += -DUNIX -DUNIX_BSD4_2 -DUNIX_386BSD -DCURSES -DJAPAN -DEUC -DTOPSCO -DCOLOR -DMESG_DIR=\"${PREFIX}/share/rogue\" -DLIST_MESSAGES ++CFLAGS += -DUNIX -DUNIX_SYSV -DUNIX_386BSD -DCURSES -DJAPAN -DEUC -DTOPSCO -DCOLOR -DMESG_DIR=\"${PREFIX}/share/rogue\" -DLIST_MESSAGES +LIBS = # for NeXT (Japanese, using jcurses of NeXT) by Yasha --- japanese/rogue_s/files/patch-ac 2000-07-18 19:38:04.000000000 +0200 +++ japanese/rogue_s/files/patch-ac 2007-12-28 19:32:57.000000000 +0100 @@ -1,5 +1,61 @@ --- machdep.c.orig Mon Sep 14 14:40:12 1992 +++ machdep.c Fri Dec 4 00:22:26 1998 +@@ -56,7 +56,7 @@ + # include <sys/stat.h> + # ifdef UNIX_SYSV + # include <time.h> +-# include <termio.h> ++# include <termios.h> + # endif /* UNIX_SYSV */ + # ifdef UNIX_BSD4_2 + # include <sys/time.h> +@@ -272,7 +272,7 @@ + ioctl(0, FIONREAD, &ln); + #endif /* UNIX_BSD4_2 */ + #ifdef UNIX_SYSV +- ioctl(0, TCFLSH, &ln); ++ ioctl(0, TIOCFLUSH, &ln); + ln = 0; + #endif /* UNIX_SYSV */ + #ifdef UNIX_386BSD +@@ -334,8 +334,8 @@ + struct tchars tc_temp; + #endif /* UNIX_BSD4_2 */ + #ifdef UNIX_SYSV +- static struct termio _oldtty; +- struct termio _tty; ++ static struct termios _oldtty; ++ struct termios _tty; + #endif /* UNIX_SYSV */ + + if (!called_before) { +@@ -345,7 +345,7 @@ + ioctl(0, TIOCGLTC, <c_orig); + #endif /* UNIX_BSD4_2 */ + #ifdef UNIX_SYSV +- ioctl(0, TCGETA, &_oldtty); ++ tcgetattr(0, &_oldtty); + #endif /* UNIX_SYSV */ + } + #ifdef UNIX_BSD4_2 +@@ -364,7 +364,7 @@ + tc_temp.t_startc = tc_temp.t_stopc = -1; + #endif /* UNIX_BSD4_2 */ + #ifdef UNIX_SYSV +- _tty.c_cc[VSWTCH] = CNSWTCH; ++ _tty.c_cc[VSUSP] = 0; + #endif /* UNIX_SYSV */ + } + #ifdef UNIX_BSD4_2 +@@ -372,7 +372,7 @@ + ioctl(0, TIOCSLTC, <c_temp); + #endif /* UNIX_BSD4_2 */ + #ifdef UNIX_SYSV +- ioctl(0, TCSETA, &_tty); ++ tcsetattr(0, TCSANOW, &_tty); + #endif /* UNIX_SYSV */ + #endif /* UNIX */ + } @@ -397,9 +397,9 @@ md_heed_signals() { @@ -13,3 +69,28 @@ #endif /* UNIX */ #ifdef HUMAN +@@ -907,19 +907,19 @@ + } + #endif /* UNIX_BSD4_2 */ + #ifdef UNIX_SYSV +- struct termio tty_buf; +- static struct termio tty_save; ++ struct termios tty_buf; ++ static struct termios tty_save; + + if (on) { +- ioctl(0, TCGETA, &tty_buf); ++ tcgetattr(0, &tty_buf); + tty_save = tty_buf; + tty_buf.c_lflag &= ~(ICANON | ECHO); + tty_buf.c_oflag &= ~ONLCR; + tty_buf.c_cc[4] = 1; /* MIN */ + tty_buf.c_cc[5] = 2; /* TIME */ +- ioctl(0, TCSETAF, &tty_buf); ++ tcsetattr(0, TCSANOW, &tty_buf); + } else { +- ioctl(0, TCSETAF, &tty_save); ++ tcsetattr(0, TCSANOW, &tty_save); + } + #endif /* UNIX_SYSV */ + #endif /* UNIX */ >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071228183332.930281CCD9>