misc/110667: [sgtty.h] Place warning in header file

Ed Schouten ed at fxq.nl
Thu Mar 22 09:10:14 UTC 2007


>Number:         110667
>Category:       misc
>Synopsis:       [sgtty.h] Place warning in header file
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 22 09:10:13 GMT 2007
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:


More information about the freebsd-bugs mailing list