Turning COMPAT_43TTY into a binary-only compatibility

From: Ed Schouten <ed_at_fxq.nl>
Date: Mon, 28 Jan 2008 23:53:08 +0100
Hello everyone,

Since march last year I've been bugging the fine people at Ports
(especially miwi_at_) with a decent amount of patches for various ports to
migrate them from sgtty to termios, which are both interfaces to set
various characteristics of a TTY device. There has been a lot of
progress since then. When I started, there were about a hundred ports
that used sgtty (a lot of them were slave-ports though) and at this
moment, I only know 3 ports that still need some patching to work
properly.*

The reason why I've been working on this, is because sgtty requires the
user to have COMPAT_43TTY in their kernel configuration. If you look in
some of the TTY header files (sgtty.h, sys/ttychars.h, sys/ttydev.h),
you can see that it was already deprecated back in 1994, so it would be
a very wise idea to just remove the interface in the far future. A
disadvantage of our current compatibility implementation is that it's
far from complete. There are a couple of problems with that:

- If we expose this interface to userspace, people will think it's okay
  to use this interface. Even though sgtty.h will print a big fat
  warning upon inclusion, I still discover new pieces of software that
  prefer sgtty over termios (GNU Octave being one of them, recently).

- Because the interface is incomplete, users of the interface will think
  FreeBSD's TTY implementation is `broken', just because it doesn't
  emulate all the switches. Now the other way around: when someone fixes
  a sgtty application on FreeBSD, it will have a great chance to break
  on other systems like Linux and such.

That's why I propose to switch the sgtty interface into a binary-only
compatibility interface. The amount of ports in the Ports tree that use
sgtty is historically low right now, so now would be the right moment to
disable it.

As of next week, I'm going to work on FreeBSD's TTY layer full-time, as
my assignment for my final internship at school, for about half a year.
My results will be stored in Perforce.  It would be quite good to know
that when refactoring some of the TTY code, I can perform some more
aggressive cleanups, because I can then assume those interfaces are
really unused by the time my work is finished.

Is there someone who wants to help me here?

-- 
 Ed Schouten <ed_at_fxq.nl>
 WWW: http://g-rave.nl/

* emulators/dlx, misc/fep, net-mgmt/annextools. There are about 10
  low-profile/unmaintained ports that still have a patch waiting in
  GNATS.

Received on Mon Jan 28 2008 - 21:53:10 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:26 UTC