--- etc/console/console.m.orig	Sat Nov 22 23:19:33 1997
+++ etc/console/console.m	Wed Nov 17 18:29:04 1999
@@ -566,17 +566,17 @@
 		return;
 
 #if USE_TERMIOS
-	if (0 != ioctl(0, TCGETS, & o_tios)) {
+	if (0 != tcgetattr(0, & o_tios)) {
 		fprintf(stderr, "%s: iotcl: getsw: %s\n", progname, strerror(errno));
 		exit(10);
 	}
 	n_tios = o_tios;
-	n_tios.c_iflag &= ~(INLCR|IGNCR|ICRNL|IUCLC|IXON);
+	n_tios.c_iflag &= ~(INLCR|IGNCR|ICRNL|IXON);
 	n_tios.c_oflag &= ~OPOST;
 	n_tios.c_lflag &= ~(ICANON|ISIG|ECHO);
 	n_tios.c_cc[VMIN] = 1;
 	n_tios.c_cc[VTIME] = 0;
-	if (0 != ioctl(0, TCSETS, & n_tios)) {
+	if (0 != tcsetattr(0, TCSANOW, & n_tios)) {
 		fprintf(stderr, "%s: getarrt: %s\n", progname, strerror(errno));
 		exit(10);
 	}
@@ -652,7 +652,7 @@
 	if (!screwy)
 		return;
 #if USE_TERMIOS
-	(void)ioctl(0, TCSETS, (char *)&o_tios);
+	(void)tcsetattr(0, TCSANOW, &o_tios);
 #else
 #if USE_TERMIO
 	(void)ioctl(0, TCSETA, (char *)&o_tio);
@@ -677,7 +677,7 @@
 	register int nr;
 
 	while (0 != iLen) {
-		if (-1 == (nr = write(fd, pcBuf, iLen))) {
+		if (0 >= (nr = write(fd, pcBuf, iLen))) {
 			c2cooked();
 			fprintf(stderr, "%s: lost connection\n", progname);
 			exit(3);
