Bug 124484 - [Patch] comms/conserver: don't use sgtty
Summary: [Patch] comms/conserver: don't use sgtty
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Cy Schubert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-11 13:40 UTC by Ed Schouten
Modified: 2008-07-24 21:30 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Schouten freebsd_committer freebsd_triage 2008-06-11 13:40:08 UTC
The comms/conserver port still uses the sgtty programming interface.
This interface is going away soon, which means we have to switch this
application to use termios. conserver already supports termios, but it
is disabled on FreeBSD.

Using sgtty is bad; it doesn't work when COMPAT_43TTY is disabled in the
kernel configuration file.

Fix: 

Store the following patch in the `files' directory. It enables termios
and makes it compile as well.

--- etc/autologin/autologin.c
+++ etc/autologin/autologin.c
@@ -41,7 +41,6 @@
 
 #if USE_TERMIOS
 #include <termios.h>
-#include <unistd.h>
 
 #else
 #if USE_TERMIO
@@ -443,11 +442,11 @@
 		/* NOTREACHED */
 	}
 #endif
-	n_tio.c_iflag &= ~(IGNCR|IUCLC);
+	n_tio.c_iflag &= ~(IGNCR);
 	n_tio.c_iflag |= ICRNL|IXON|IXANY;
-	n_tio.c_oflag &= ~(OLCUC|ONOCR|ONLRET|OFILL|NLDLY|CRDLY|TABDLY|BSDLY);
-	n_tio.c_oflag |= OPOST|ONLCR|TAB3;
-	n_tio.c_lflag &= ~(XCASE|NOFLSH|ECHOK|ECHONL);
+	n_tio.c_oflag &= ~(ONOCR|ONLRET);
+	n_tio.c_oflag |= OPOST|ONLCR|OXTABS;
+	n_tio.c_lflag &= ~(NOFLSH|ECHOK|ECHONL);
 	n_tio.c_lflag |= ISIG|ICANON|ECHO;
 	n_tio.c_cc[VEOF] = '\004';		/* ^D	*/
 	n_tio.c_cc[VEOL] = '\000';		/* EOL	*/
--- etc/autologin/machine.h
+++ etc/autologin/machine.h
@@ -38,7 +38,7 @@
 #define USE_TERMIO	(defined(ETA10)||defined(V386))
 #endif
 #if !defined(USE_TERMIOS)
-#define USE_TERMIOS	(defined(HPUX)||defined(SUN5)||defined(PTX)||defined(IRIX5)||defined(LINUX))
+#define USE_TERMIOS	(defined(HPUX)||defined(SUN5)||defined(PTX)||defined(IRIX5)||defined(LINUX)||defined(FREEBSD))
 #endif
 #if !defined(USE_TCBREAK)
 #define USE_TCBREAK	(defined(SUN4)||defined(PTX))
@@ -66,7 +66,7 @@
 #endif
 
 #if !defined(USE_TC)
-#define USE_TC		(defined(EPIX)||defined(IBMR2)||defined(V386)||defined(S81)||defined(PARAGON))
+#define USE_TC		(defined(EPIX)||defined(IBMR2)||defined(V386)||defined(S81)||defined(PARAGON)||defined(FREEBSD))
 #endif
 
 #if !defined(HAVE_GETUSERATTR)
@@ -74,7 +74,7 @@
 #endif
 
 #if !defined(USE_IOCTL)
-#define USE_IOCTL	(defined(V386)||defined(S81)||defined(NETBSD)||defined(FREEBSD))
+#define USE_IOCTL	(defined(V386)||defined(S81)||defined(NETBSD))
 #endif
 
 
@@ -127,7 +127,6 @@
 #if FREEBSD
 #include <sys/uio.h>
 #include <sys/proc.h>
-#include <sys/ioctl_compat.h>
 #define setsid()	getpid()
 #else
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-06-11 13:40:14 UTC
Responsible Changed
From-To: freebsd-ports-bugs->cy

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Pav Lucistnik freebsd_committer freebsd_triage 2008-07-24 21:19:31 UTC
State Changed
From-To: open->closed

Committed, thanks!
Comment 3 dfilter service freebsd_committer freebsd_triage 2008-07-24 21:21:03 UTC
pav         2008-07-24 20:20:53 UTC

  FreeBSD ports repository

  Modified files:
    comms/conserver      Makefile 
  Added files:
    comms/conserver/files patch-sgtty 
  Log:
  - Disable sgtty interface (removed from 8-CURRENT recently) and enable termios
    interface
  
  PR:             ports/124484
  Submitted by:   ed
  Approved by:    maintainer timeout (cy; 1 month)
  
  Revision  Changes    Path
  1.32      +1 -1      ports/comms/conserver/Makefile
  1.1       +63 -0     ports/comms/conserver/files/patch-sgtty (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"