]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Decompose <sys/termios.h>.
authorEd Schouten <ed@FreeBSD.org>
Sat, 28 Nov 2009 23:50:48 +0000 (23:50 +0000)
committerEd Schouten <ed@FreeBSD.org>
Sat, 28 Nov 2009 23:50:48 +0000 (23:50 +0000)
commitf14ad5fa40b8eae47a983976c9cfab3b9a15ab4f
treed856828170b85339259ef4784087758b44ac3d98
parent3d34d241be0048aafb15ccb0b13b7636e6034ae2
Decompose <sys/termios.h>.

The <sys/termios.h> header file is hardlinked to <termios.h>. It
contains both the structures and the flag definitions, but also the C
library interface that's implemented by the C library.

This header file has the typical problem of including too many random
things and being badly ordered. Instead of trying to fix this, decompose
it into two header files:

- <sys/_termios.h>, which contains struct termios and the flags.
- <termios.h>, which includes <sys/_termios.h> and contains the C
  library interface.

This means userspace has to include <termios.h> for struct termios,
while kernelspace code has to include <sys/tty.h>. Also add a
<sys/termios.h>, which prints a warning message before including
<termios.h>. I am aware that there are some applications that use this
header file as well.
include/Makefile
include/termios.h [new file with mode: 0644]
sys/sys/_termios.h [new file with mode: 0644]
sys/sys/termios.h
sys/sys/tty.h