summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/termios.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix known issues which blow up the process after dlopen("libthr.so")kib2015-01-181-3/+15
| | | | | | | | | | | | | | | | | | | | | (or loading a dso linked to libthr.so into process which was not linked against threading library). MFC r276630: Remove interposing, fix malloc, reinstall signal handlers wrappers on libthr load. MFC r276681: Avoid calling internal libc function through PLT or accessing data though GOT. MFC r277032: Reduce the size of the interposing table and amount of cancellation-handling code in the libthr. MFC note: r276646 ("do not erronously export 'openat' symbol from rtld") is not applicable to stable/10 yet, since PATHFDS support was not merged.
* Add a new libc function: cfmakesane(3).ed2010-11-021-0/+19
| | | | | | | | | | | 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_*.
* Use ANSI C prototypes inside termios.ed2009-12-051-31/+13
| | | | While there, add a missing __unused to hide a warning in tcsetbreak().
* Add tcsetsid(3).ed2009-05-071-0/+12
| | | | | | | | | | | The entire world seems to use the non-standard TIOCSCTTY ioctl to make a TTY a controlling terminal of a session. Even though tcsetsid(3) is also non-standard, I think it's a lot better to use in our own source code, mainly because it's similar to tcsetpgrp(), tcgetpgrp() and tcgetsid(). I stole the idea from QNX. They do it the other way around; their TIOCSCTTY is just a wrapper around tcsetsid(). tcsetsid() then calls into an IPC framework.
* Implement POSIX function tcgetsid() which returns session id.davidxu2008-04-151-0/+11
| | | | PR: stand/107561
* Per Regents of the University of Calfornia letter, remove advertisingimp2007-01-091-4/+0
| | | | | | clause. # If I've done so improperly on a file, please let me know.
* Assume __STDC__, remove non-__STDC__ code.alfred2002-05-281-6/+0
| | | | Submitted by: keramida
* Fix SCM ID's.obrien2002-02-011-2/+2
|
* Remove _THREAD_SAFE and make libc thread-safe by default bydeischen2001-01-241-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adding (weak definitions to) stubs for some of the pthread functions. If the threads library is linked in, the real pthread functions will pulled in. Use the following convention for system calls wrapped by the threads library: __sys_foo - actual system call _foo - weak definition to __sys_foo foo - weak definition to __sys_foo Change all libc uses of system calls wrapped by the threads library from foo to _foo. In order to define the prototypes for _foo(), we introduce namespace.h and un-namespace.h (suggested by bde). All files that need to reference these system calls, should include namespace.h before any standard includes, then include un-namespace.h after the standard includes and before any local includes. <db.h> is an exception and shouldn't be included in between namespace.h and un-namespace.h namespace.h will define foo to _foo, and un-namespace.h will undefine foo. Try to eliminate some of the recursive calls to MT-safe functions in libc/stdio in preparation for adding a mutex to FILE. We have recursive mutexes, but would like to avoid using them if possible. Remove uneeded includes of <errno.h> from a few files. Add $FreeBSD$ to a few files in order to pass commitprep. Approved by: -arch
* Take care to avoid having "strong" and "weak" symbols of the same name injasone2000-03-161-0/+2
| | | | libc_r.
* Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),jasone2000-01-271-4/+2
| | | | | | | | | | | | | | | | | just use _foo() <-- foo(). In the case of a libpthread that doesn't do call conversion (such as linuxthreads and our upcoming libpthread), this is adequate. In the case of libc_r, we still need three names, which are now _thread_sys_foo() <-- _foo() <-- foo(). Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(), nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo(). Remove all internal libc usage of: creat(), pause(), sleep(), system(), tcdrain(), wait(), and waitpid(). Make thread cancellation fully POSIX-compliant. Suggested by: deischen
* Add three-tier symbol naming in support of POSIX thread cancellationjasone2000-01-121-3/+8
| | | | | | points. For library functions, the pattern is __sleep() <-- _libc_sleep() <-- sleep(). The arrows represent weak aliases. For system calls, the pattern is _read() <-- _libc_read() <-- read().
* Back out one of my previous changes: don't clear PARODD,ache1996-03-281-1/+1
| | | | so return to absolute minimum of changed flags now
* cfmakeraw:ache1996-03-271-2/+2
| | | | | | clear PARODD bit too, help user program to set its own parity via | Set CREAD bit, it is 99% case
* Fixed lint from cc -Wall.bde1995-10-221-5/+6
| | | | Cleaned up includes.
* Clear IGNPAR in cfmakeraw() instead of set it.ache1995-03-291-2/+2
|
* cfmakeraw(): set IGNBRK, clear IXOFF, INPCK per Bruce suggestionache1994-10-221-2/+3
| | | | Set IGNPAR, clear NOFLSH, PENDIN, TOSTOP, ECHOE, ECHOK
* makeraw(): forget to clear IMAXBEL, set VMIN/VTIMEache1994-10-221-2/+3
|
* BSD 4.4 Lite Lib Sourcesrgrimes1994-05-271-0/+242
OpenPOWER on IntegriCloud