Index: b/usr/src/head/termios.h =================================================================== --- a/usr/src/head/termios.h +++ b/usr/src/head/termios.h @@ -28,6 +28,16 @@ #pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */ +#include +#include #include +__BEGIN_DECLS + +#if defined(_BSD_SOURCE) || defined(__EXTENSIONS__) +void cfmakeraw (struct termios *); +#endif + +__END_DECLS + #endif /* _TERMIOS_H */ Index: b/usr/src/lib/libc/port/gen/cfmakeraw.c =================================================================== --- /dev/null +++ b/usr/src/lib/libc/port/gen/cfmakeraw.c @@ -0,0 +1,19 @@ +/* + * Public Domain. + */ + +#include "termios.h" + +void +cfmakeraw (struct termios *tio) +{ + tio->c_cflag &= ~(CSIZE | PARENB); + tio->c_cflag |= CS8; + tio->c_iflag &= + ~(IMAXBEL | IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | + IXON); + tio->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN); + tio->c_oflag &= ~OPOST; + tio->c_cc[VMIN] = 1; + tio->c_cc[VTIME] = 0; +} Index: b/usr/src/lib/libc/amd64/Makefile =================================================================== --- a/usr/src/lib/libc/amd64/Makefile +++ b/usr/src/lib/libc/amd64/Makefile @@ -359,6 +359,7 @@ PORTGEN= \ catopen.o \ cfgetispeed.o \ cfgetospeed.o \ + cfmakeraw.o \ cfree.o \ cfsetispeed.o \ cfsetospeed.o \ Index: b/usr/src/lib/libc/i386/Makefile.com =================================================================== --- a/usr/src/lib/libc/i386/Makefile.com +++ b/usr/src/lib/libc/i386/Makefile.com @@ -391,6 +391,7 @@ PORTGEN= \ catopen.o \ cfgetispeed.o \ cfgetospeed.o \ + cfmakeraw.o \ cfree.o \ cfsetispeed.o \ cfsetospeed.o \ Index: b/usr/src/lib/libc/port/mapfile-vers =================================================================== --- a/usr/src/lib/libc/port/mapfile-vers +++ b/usr/src/lib/libc/port/mapfile-vers @@ -269,6 +269,7 @@ $endif SYMBOL_VERSION DYSON_1 { global: + cfmakeraw; error; error_at_line; error_message_count;