Commit Graph

4 Commits

Author SHA1 Message Date
Jilles Tjoelker
448f5f73dc include: Remove checks for __BSD_VISIBLE where redundant with __XSI_VISIBLE
or __POSIX_VISIBLE.

Whenever <sys/cdefs.h> sets __BSD_VISIBLE to non-zero, it also sets
__POSIX_VISIBLE and __XSI_VISIBLE to the newest version supported.

No functional change is intended.
2014-05-11 13:48:21 +00:00
Ed Schouten
736fc28680 Add a new libc function: cfmakesane(3).
I've noticed various terminal emulators that need to obtain a sane
default termios structure use very complex `hacks'. Even though POSIX
doesn't provide any functionality for this, extend our termios API with
cfmakesane(3), which is similar to the commonly supported cfmakeraw(3),
except that it fills the termios structure with sane defaults.

Change all code in our base system to use this function, instead of
depending on <sys/ttydefaults.h> to provide TTYDEF_*.
2010-11-02 17:00:56 +00:00
Warner Losh
f2556687c6 Remove the Berkeley clause 3's.
Add a few $FreeBSD$
2010-02-16 19:39:50 +00:00
Ed Schouten
f14ad5fa40 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.
2009-11-28 23:50:48 +00:00