From ed@hoeg.nl  Sun Jan 27 16:20:24 2008
Return-Path: <ed@hoeg.nl>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3CB7116A419
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 27 Jan 2008 16:20:24 +0000 (UTC)
	(envelope-from ed@hoeg.nl)
Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211])
	by mx1.freebsd.org (Postfix) with ESMTP id 04AC013C4EC
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 27 Jan 2008 16:20:24 +0000 (UTC)
	(envelope-from ed@hoeg.nl)
Received: by palm.hoeg.nl (Postfix, from userid 1000)
	id 60F0D1CD89; Sun, 27 Jan 2008 17:20:23 +0100 (CET)
Message-Id: <20080127162023.60F0D1CD89@palm.hoeg.nl>
Date: Sun, 27 Jan 2008 17:20:23 +0100 (CET)
From: Ed Schouten <ed@fxq.nl>
Reply-To: Ed Schouten <ed@fxq.nl>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [Patch] net-mgmt/annextools: don't use sgtty (partially)
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         120050
>Category:       ports
>Synopsis:       [Patch] net-mgmt/annextools: don't use sgtty (partially)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 27 16:30:00 UTC 2008
>Closed-Date:    Tue Feb 05 13:35:51 UTC 2008
>Last-Modified:  Tue Feb  5 13:40:01 UTC 2008
>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 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:
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: miwi 
Responsible-Changed-When: Sun Jan 27 21:29:00 UTC 2008 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120050 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/120050: commit references a PR
Date: Sun, 27 Jan 2008 23:46:22 +0000 (UTC)

 miwi        2008-01-27 23:46:13 UTC
 
   FreeBSD ports repository
 
   Modified files:
     chinese/hztty        Makefile 
     chinese/hztty/files  patch-aa patch-ab 
   Log:
   - Use termios.h instead of sgtty.h
   - Reset maintainer (mail bounce) [1]
   
   [1]
   <ada@bsd.org>: host bsd.org.s6a1.psmtp.com[64.18.5.10] said: 550 No such user -
   psmtp (in reply to RCPT TO command)
   
   PR:             120050
   Submitted by:   Ed Schouten <ed@fxq.nl>
   
   Revision  Changes    Path
   1.10      +1 -1      ports/chinese/hztty/Makefile
   1.3       +4 -2      ports/chinese/hztty/files/patch-aa
   1.2       +22 -0     ports/chinese/hztty/files/patch-ab
 _______________________________________________
 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"
 
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Tue Feb 5 13:35:49 UTC 2008 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120050 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/120050: commit references a PR
Date: Tue,  5 Feb 2008 13:35:36 +0000 (UTC)

 miwi        2008-02-05 13:35:26 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net-mgmt/annextools/files patch-erpcd::erpcd.c 
   Added files:
     net-mgmt/annextools/files patch-netadm::dialout.c 
                               patch-netadm::rpc.c 
   Log:
   - Use termios.h instead of sgtty.h
   
   PR:             120050
   Submitted by:   Ed Schouten <ed@fxq.nl>
   
   Revision  Changes    Path
   1.2       +9 -0      ports/net-mgmt/annextools/files/patch-erpcd::erpcd.c
   1.1       +17 -0     ports/net-mgmt/annextools/files/patch-netadm::dialout.c (new)
   1.1       +61 -0     ports/net-mgmt/annextools/files/patch-netadm::rpc.c (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"
 
>Unformatted:
