ports/120050: [Patch] net-mgmt/annextools: don't use sgtty (partially)
Ed Schouten
ed at fxq.nl
Sun Jan 27 16:30:06 UTC 2008
>Number: 120050
>Category: ports
>Synopsis: [Patch] net-mgmt/annextools: don't use sgtty (partially)
>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: Sun Jan 27 16:30:00 UTC 2008
>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 at palm.hoeg.nl:/usr/obj/usr/src/sys/PALM i386
>Description:
The net-mgmt/annextools port still uses sgtty in a lot of places. We can
port everything very easily to termios, except for one place. We'd
better fix up those places already until a proper port of rtelnet has
been made. I could do it, but the code is rubbish and we could break
stuff very easily.
>How-To-Repeat:
>Fix:
--- net-mgmt/annextools/files/patch-erpcd::erpcd.c 2003-09-25 21:49:31.000000000 +0200
+++ net-mgmt/annextools/files/patch-erpcd::erpcd.c 2008-01-27 16:50:47.000000000 +0100
@@ -1,5 +1,14 @@
--- erpcd/erpcd.c.orig Sat Jan 31 17:38:06 1998
+++ erpcd/erpcd.c Thu Sep 18 20:10:32 2003
+@@ -36,7 +36,7 @@
+ #include <sys/param.h>
+ #include <sys/wait.h>
+ #include <netinet/in.h>
+-#include <sgtty.h>
++#include <sys/ioctl.h>
+ #include <netdb.h>
+ #else
+ #include <time.h>
@@ -2108,11 +2108,7 @@
{
int savederrno = errno;
--- net-mgmt/annextools/files/patch-netadm::dialout.c 1970-01-01 01:00:00.000000000 +0100
+++ net-mgmt/annextools/files/patch-netadm::dialout.c 2008-01-27 16:50:47.000000000 +0100
@@ -0,0 +1,17 @@
+--- netadm/dialout.c 2008-01-27 16:29:09.000000000 +0100
++++ netadm/dialout.c 2008-01-27 16:36:23.000000000 +0100
+@@ -66,14 +66,6 @@
+
+ #include <stdio.h>
+
+-#ifdef SYS_V
+-#include <termio.h>
+-#else
+-#ifndef _WIN32
+-#include <sgtty.h>
+-#endif
+-#endif
+-
+ #include "../inc/courier/courier.h"
+ #include "../inc/erpc/netadmp.h"
+
--- net-mgmt/annextools/files/patch-netadm::rpc.c 1970-01-01 01:00:00.000000000 +0100
+++ net-mgmt/annextools/files/patch-netadm::rpc.c 2008-01-27 16:50:47.000000000 +0100
@@ -0,0 +1,61 @@
+--- netadm/rpc.c 2008-01-27 16:29:09.000000000 +0100
++++ netadm/rpc.c 2008-01-27 16:34:49.000000000 +0100
+@@ -35,7 +35,9 @@
+
+ #include <stdio.h>
+
+-#ifdef SYS_V
++#ifdef __FreeBSD__
++#include <termios.h>
++#elif defined(SYS_V)
+ #include <termio.h>
+ #else
+ #ifndef _WIN32
+@@ -749,7 +751,9 @@
+ {
+
+ #ifndef _WIN32
+-#ifdef SYS_V
++#ifdef __FreeBSD__
++ struct termios tio;
++#elif defined(SYS_V)
+ struct termio tio;
+ #else
+ struct sgttyb sg;
+@@ -762,7 +766,11 @@
+
+ fd = fileno(rfp);
+
+-#ifdef SYS_V
++#ifdef __FreeBSD__
++ tcgetattr(fd, &tio);
++ tio.c_lflag &= ~(ECHO);
++ tcsetattr(fd, TCSANOW, &tio);
++#elif defined(SYS_V)
+ (void)ioctl(fd, (int)TCGETA, &tio);
+ tio.c_lflag &= ~(ECHO);
+ (void)ioctl(fd, (int)TCSETA, &tio);
+@@ -779,7 +787,9 @@
+ void devttyecho() /* turn echo on */
+ {
+ #ifndef _WIN32
+-#ifdef SYS_V
++#ifdef __FreeBSD__
++ struct termios tio;
++#elif defined(SYS_V)
+ struct termio tio;
+ #else
+ struct sgttyb sg;
+@@ -792,7 +802,11 @@
+
+ fd = fileno(rfp);
+
+-#ifdef SYS_V
++#ifdef __FreeBSD__
++ tcgetattr(fd, &tio);
++ tio.c_lflag |= ECHO;
++ tcsetattr(fd, TCSANOW, &tio);
++#elif defined(SYS_V)
+ (void)ioctl(fd, (int)TCGETA, &tio);
+ tio.c_lflag |= ECHO;
+ (void)ioctl(fd, (int)TCSETA, &tio);
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list