From ed@hoeg.nl  Thu Mar 22 09:03:43 2007
Return-Path: <ed@hoeg.nl>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 1A1CC16A40B
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 22 Mar 2007 09:03:43 +0000 (UTC)
	(envelope-from ed@hoeg.nl)
Received: from palm.hoeg.nl (palm.hoeg.nl [83.98.131.212])
	by mx1.freebsd.org (Postfix) with ESMTP id DAFA013C483
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 22 Mar 2007 09:03:42 +0000 (UTC)
	(envelope-from ed@hoeg.nl)
Received: by palm.hoeg.nl (Postfix, from userid 1000)
	id 05FBF1CE53; Thu, 22 Mar 2007 10:03:40 +0100 (CET)
Message-Id: <20070322090341.05FBF1CE53@palm.hoeg.nl>
Date: Thu, 22 Mar 2007 10:03:40 +0100 (CET)
From: Ed Schouten <ed@fxq.nl>
Reply-To: Ed Schouten <ed@fxq.nl>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [sgtty.h] Place warning in header file
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         110667
>Category:       kern
>Synopsis:       [sgtty.h] [patch] Place warning in header file
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    benjsc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 22 09:10:13 GMT 2007
>Closed-Date:    Fri Apr 27 11:25:55 GMT 2007
>Last-Modified:  Fri Apr 27 11:25:55 GMT 2007
>Originator:     Ed Schouten
>Release:        FreeBSD 6.2-STABLE i386
>Organization:
>Environment:
System: FreeBSD palm.hoeg.nl 6.2-STABLE FreeBSD 6.2-STABLE #0: Sun Feb 11 22:32:09 CET 2007 root@palm.hoeg.nl:/usr/obj/usr/src/sys/PALM i386
>Description:
I'm currently working on FreeBSD ports that still make use of the sgtty
interface, trying to make them use termios. sgtty only works with
COMPAT_43TTY in the kernel. Users of this interface should be informed
of that.

I'd like to have this patch in the source tree, because I can then grep
public tinderbox logs for inclusions of this header file.
>How-To-Repeat:
>Fix:
The following patch will cause sgtty.h to show a warning when included.

--- src/include/sgtty.h	Tue May 24 11:57:10 1994
+++ src/include/sgtty.h	Thu Mar 22 09:52:20 2007
@@ -31,9 +31,21 @@
  * SUCH DAMAGE.
  *
  *	@(#)sgtty.h	8.1 (Berkeley) 6/2/93
+ * $FreeBSD$
  */
 
+#ifndef _SGTTY_H_
+#define _SGTTY_H_
+
+#include <sys/cdefs.h>
+
+#ifdef __CC_SUPPORTS_WARNING
+#warning "sgtty.h is deprecated and depends on COMPAT_43TTY.  Use termios.h instead."
+#endif
+
 #ifndef USE_OLD_TTY
 #define	USE_OLD_TTY
 #endif
 #include <sys/ioctl.h>
+
+#endif /* !_SGTTY_H_ */
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->benjsc 
Responsible-Changed-By: benjsc 
Responsible-Changed-When: Mon Apr 16 11:08:31 UTC 2007 
Responsible-Changed-Why:  
Investigating the proposed patch as a valid solution 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/110667: commit references a PR
Date: Fri, 27 Apr 2007 11:19:11 +0000 (UTC)

 benjsc      2007-04-27 11:19:05 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/sys              ioctl_compat.h 
   Log:
   Increase the verbosity of the warning given when this file is used as
   part of the old tty system - helping the user to know how to transition to
   the new tty api.
   
   Approved by: mlaier (Mentor)
   
   PR: kern/110667
   
   Revision  Changes    Path
   1.10      +1 -1      src/sys/sys/ioctl_compat.h
 _______________________________________________
 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"


As a follow up, -current had a warning in ioctl_compat.h regarding the 
old tty being used. Whilst sgtty.h is part of this old api, there is at
least one other place where USE_OLD_TTY is defined. Hence the decision to
modify the one file used by all places. 
State-Changed-From-To: open->closed 
State-Changed-By: benjsc 
State-Changed-When: Fri Apr 27 11:24:56 UTC 2007 
State-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=110667 
>Unformatted:
