freebsd-dev/lib/libc
Xin LI 8dcb56dc78 Provide more POSIX-complaint ttyname_r(3) interface[1], which is slightly
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@
2005-05-13 16:27:30 +00:00
..
alpha Remove fpsetsticky(). This was added for SysV compatibility, but due 2005-03-15 15:53:39 +00:00
amd64 Optimize the instruction alignment. 2005-04-23 18:45:36 +00:00
arm Use the correct values for softfloat, in both the little endian and the big 2005-03-20 00:53:52 +00:00
compat-43 Revert accidiental removal of string.h inclusion. 2005-02-27 18:39:02 +00:00
db Expand *n't contractions. 2005-02-13 22:25:33 +00:00
gdtoa Don't compile the gdtoa package's strtoIg.c into libc. 2005-01-27 05:44:16 +00:00
gen Provide more POSIX-complaint ttyname_r(3) interface[1], which is slightly 2005-05-13 16:27:30 +00:00
gmon Fix race by using atomic operation, with this change, both libpthread 2005-05-06 07:37:01 +00:00
i386 Provide stub functions for i386_set_ldt() and i386_get_ldt() even when 2005-04-26 20:51:15 +00:00
ia64 - Define LDBL_NBIT to be a mask indicating the position of the integer 2005-03-07 04:55:40 +00:00
include Update my email address. 2005-02-06 03:23:31 +00:00
locale Make the format of LC_COLLATE files architecture independent. 2005-02-27 20:31:13 +00:00
net fix signed/unsigned comparison warnings. 2005-05-03 16:13:31 +00:00
nls Add korean NLS message catalogs for libc 2005-03-07 13:57:24 +00:00
posix1e Minor white space tweak. 2005-01-23 15:28:02 +00:00
powerpc Remove fpsetsticky(). This was added for SysV compatibility, but due 2005-03-15 15:53:39 +00:00
quad libc_r wasn't so tied to libc for 22 months. 2002-11-18 09:50:57 +00:00
regex Remove unused file. 2005-04-25 02:29:03 +00:00
rpc Avoid pointer arithmetics on void *. 2005-03-10 08:25:49 +00:00
softfloat Remove fpsetsticky(). This was added for SysV compatibility, but due 2005-03-15 15:53:39 +00:00
sparc64 Remove fpsetsticky(). This was added for SysV compatibility, but due 2005-03-15 15:53:39 +00:00
stdio The correct description for mode "w" is 2005-05-04 08:12:44 +00:00
stdlib Do not require the pty(4) majors to be anything in particular. 2005-03-04 20:23:32 +00:00
stdtime Expand contractions. 2005-02-13 23:45:54 +00:00
string Replace the current strspn() and strcspn() with significantly faster 2005-04-02 18:52:44 +00:00
sys Document the fact that accept(2) may return EINVAL when addrlen is 2005-05-04 11:09:26 +00:00
uuid Avoid (unnecessarily) casting away const within uuid_is_nil. 2005-05-11 13:18:10 +00:00
xdr Enable building with LIBC_SCCS defined. 2004-10-16 06:32:43 +00:00
yp do mutex lock for each yp calls. with this, 2005-05-03 20:30:31 +00:00
Makefile Eliminate gdtoa.mk and move its contents to ${MACHINE_ARCH}/Makefile.inc. 2005-01-15 05:23:58 +00:00