summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/ttyname.c
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* reduce strlen() call.ume2005-05-201-4/+6
|
* use reentrant.h and simplify.ume2005-05-201-29/+20
|
* check return value of ttyname_r().ume2005-05-201-1/+2
|
* ttyname_r() didn't pass correct buffer size to devname_r().ume2005-05-201-1/+1
|
* Revert to old ttyname_r behavior that when _ioctl() returns 0 (SUCCEEDED),delphij2005-05-141-1/+1
| | | | | | | | | return the buffer immediately. This will permit ssh and/or PAM logins broken by previous commit. The (potential) underlying problem is still under investigation. Point hat to: me
* Provide more POSIX-complaint ttyname_r(3) interface[1], which is slightlydelphij2005-05-131-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | different from what has been offered in libc_r (the one spotted in the original PR which is found in libthr has already been removed by David's commit, which is rev. 1.44 of lib/libthr/thread/thr_private.h): - Use POSIX standard prototype for ttyname_r, which is, int ttyname_r(int, char *, size_t); Instead of: char *ttyname_r(int, char *, size_t); This is to conform IEEE Std 1003.1, 2004 Edition [1]. - Since we need to use standard errno for return code, include errno.h in ttyname.c - Update ttyname(3) implementation according to reflect the API change. - Document new ttyname_r(3) behavior - Since we already make use of a thread local storage for ttyname(3), remove the BUGS section. - Remove conflicting ttyname_r related declarations found in libc_r. Hopefully this change should not have changed the API/ABI, as the ttyname_r symbol was never introduced before the last unistd.h change which happens a couple of days before. [1] http://www.opengroup.org/onlinepubs/009695399/functions/ttyname.html Requested by: Tom McLaughlin <tmclaugh sdf lonestar org> Through PR: threads/76938 Patched by: Craig Rodrigues <rodrigc crodrigues org> (with minor changes) Prompted by: mezz@
* Have ttyname_r() try to ask DEVFS for the device name.phk2005-03-081-35/+14
| | | | | | Document ttyname_r(). Simplify threaded/unthreaded stuff a lot.
* Remove unused variables and function declarations. Add missing headers.nectar2004-01-061-3/+0
|
* Don't statically initialize buf to _PATH_DEV, _PATH_DEV always copied toache2003-06-241-1/+1
| | | | it in any case.
* ttyname(3) must return absolute pathnames.phk2003-06-211-2/+8
| | | | Noticed by: kris
* Use devname(3) to do the task.phk2003-06-201-66/+2
| | | | Reviewed by: imp
* * Remove __P and convert to ANSI prototypes.obrien2002-02-011-3/+3
| | | | | * Remove 'register'. (some functions had 7+ register functions...) * Fix SCM ID's.
* Remove _THREAD_SAFE and make libc thread-safe by default bydeischen2001-01-241-69/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Implement compile time debug mode for thread locks.jb1998-06-091-4/+4
|
* Change in name of the static initializer define.jb1998-04-041-1/+1
|
* Submitted by: Jeremy Allison (jallison@whistle.com)julian1998-02-181-3/+1
| | | | | | fix a slight confusion about which draft of threads we are supporting. this allows something as big and ugly as samba to be compiled with libc_r and still work! our user-level pthreads seems amazingly robust!
* Submitted by: John Birrelljulian1997-02-051-1/+1
| | | | uthreads update from the author.
* Parameters pthread_getspecific() changed.hsu1996-11-111-1/+1
|
* Submitted by: John Birrell <cimaxp1!jb@werple.net.au>julian1996-08-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here are the diffs for libc_r to get it one step closer to P1003.1c These make most of the thread/mutex/condvar structures opaque to the user. There are three functions which have been renamed with _np suffixes because they are extensions to P1003.1c (I did them for JAVA, which needs to suspend/resume threads and also start threads suspended). I've created a new header (pthread_np.h) for the non-POSIX stuff. The egrep tags stuff in /usr/src/lib/libc_r/Makefile that I uncommented doesn't work. I think its best to delete it. I don't think libc_r needs tags anyway, 'cause most of the source is in libc which does have tags. also: Here's the first batch of man pages for the thread functions. The diff to /usr/src/lib/libc_r/Makefile removes some stuff that was inherited from /usr/src/lib/libc/Makefile that should only be done with libc. also: I should have sent this diff with the pthread(3) man page. It allows people to type make -DWANT_LIBC_R world to get libc_r built with the rest of the world. I put this in the pthread(3) man page. The default is still not to build libc_r. also: The diff attached adds a pthread(3) man page to /usr/src/share/man/man3. The idea is that without libc_r installed, this man page will give people enough info to know that they have to build libc_r.
* General -Wall warning cleanup, part I.jkh1996-07-121-2/+2
| | | | Submitted-By: Kent Vander Velden <graphix@iastate.edu>
* Reviewed by: julian and (hsu?)julian1996-01-221-0/+111
| | | | | | Submitted by: John Birrel(L?) changes for threadsafe operations
* Make ttyname() use posix-style tcgetattr() to check to see that it'speter1995-09-221-3/+3
| | | | | | running on a tty. (Same as isatty()) The old-style TIOCGETP ioctl wouldn't fly if the kernel didn't have COMPAT_43. Submitted by: Carl Fongheiser <cmf@netins.net>
* BSD 4.4 Lite Lib Sourcesrgrimes1994-05-271-0/+112
OpenPOWER on IntegriCloud