summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* - Add two new system calls: preadv() and pwritev() which are like readv()jhb2005-07-073-16/+48
| | | | | | | | | | | | | | | | | and writev() except that they take an additional offset argument and do not change the current file position. In SAT speak: preadv:readv::pread:read and pwritev:writev::pwrite:write. - Try to reduce code duplication some by merging most of the old kern_foov() and dofilefoo() functions into new dofilefoo() functions that are called by kern_foov() and kern_pfoov(). The non-v functions now all generate a simple uio on the stack from the passed in arguments and then call kern_foov(). For example, read() now just builds a uio and calls kern_readv() and pwrite() just builds a uio and calls kern_pwritev(). PR: kern/80362 Submitted by: Marc Olzheim marcolz at stack dot nl (1) Approved by: re (scottl) MFC after: 1 week
* Fix ptsname(3) by converting it to use devname(3) to obtain the name ofmarcus2005-07-071-3/+4
| | | | | | | | | | | | a tty device instead of the legacy minor number approach. This is known to fix gnome-vfs' sftp module as well as kio_sftp and kdesu on -CURRENT. Thanks to scottl for the snprintf() approach idea. Reviewed by: phk Tested by: pav mich Approved by: re (scottl)
* Minor grammar fixdelphij2005-07-031-1/+1
| | | | | Submitted by: Wojciech A. Koszek [dunstan at freebsd czest pl] Approved by: re (hrs)
* Use 'manual page' instead of 'man page' for consistency.hmp2005-06-302-2/+2
| | | | Approved by: re (hrs)
* Clean out the leftovers from the i386_set_gsbase() TLS conversion.peter2005-06-291-18/+1
| | | | | | | | Like on libthr, there is an i386_set_gsbase() stub implementation here to avoid libc.so.5 issues. This should likely be a weak symbol and I expect this will be fixed soon. Approved by: re
* Add the functions _Qp_cmp() and _Qp_cmpe() as described in the Sparcstefanf2005-06-211-8/+11
| | | | | | | | Compliance Definition. On sparc64, GCC emits _Qp_cmp() calls for its __builtin_isfoo() functions which are used for C99's isfoo() macros. Approved by: re(dwhite) PR: 73782
* Markup fixes.ru2005-06-161-7/+10
| | | | Approved by: re
* Assorted markup fixes.ru2005-06-158-34/+59
| | | | Approved by: re
* When IPC_NOWAIT is set and there is no message, msgrcv() failsru2005-06-141-3/+3
| | | | | | | | with errno set to ENOMSG. PR: docs/82217 Submitted by: delphij Approved by: re (blanket)
* Remove rexecd(8), a server that implements a particularly insecurenectar2005-06-101-2/+0
| | | | | | | method of executing commands remotely. There are no rexec clients in the FreeBSD tree, and the client function rexec(3) is present only in libcompat. It has been documented as "obsolete" since 4.3BSD, and its use has been discouraged in the man page for over 10 years.
* Fix the wording in this man page so that itrodrigc2005-06-101-2/+4
| | | | | | | | | | reflects the actual behavior of the API for listing extended attributes. PR: docs/79261 Submitted by: rodrigc Reviewed by: rwatson, kan Approved by: das (mentor)
* Update .Dd value.alc2005-06-041-1/+1
|
* Eliminate the original method of requesting notification of aio_read(2) andalc2005-06-041-9/+0
| | | | | | | | | | | | | | | | | aio_write(2) completion through kevent(2). This method does not work on 64-bit architectures. It was deprecated in FreeBSD 4.4. See revisions 1.87 and 1.70.2.7. Change aio_physwakeup() to call psignal(9) directly rather than indirectly through a timeout(9). Discussed with: bde Correct a bug introduced in revision 1.65 that could result in premature delivery of a signal if an lio_listio(2) consisted of a mixture of direct/raw and queued I/O operations. Observed by: tegge Eliminate a field from struct kaioinfo that is now unused. Reviewed by: tegge
* Missed rwatson's redundancyimp2005-06-031-2/+0
|
* reflect type change of n_net and getnetbyaddr(3).ume2005-06-031-2/+2
|
* - Remove padding for ABI compatibility of n_net member from structume2005-06-034-17/+1
| | | | | | | | | | | | | netent. - Change 1st argument of getnetbyaddr() to an uint32_t on 64 bit arch as well to confirm to POSIX-2001. These changes break ABI compatibility on 64 bit arch. There is similar padding issue for ai_addrlen of struct addrinfo. However, it is leaved as is for now. Discussed on: arch@, standards@ and current@ X-MFC after: never
* reduce cast.ume2005-05-271-3/+3
| | | | MFC after: 1 week
* Fix long (and long long) to long double, unsigned to long double and unsignedstefanf2005-05-272-10/+24
| | | | | | | | | | | | | | | long (and unsigned long long) to long double conversions. - Add a parameter that specifies the position of the sign bit to the _QP_TTOQ macro, previously it always looked at bit 31. Pass a negative number to disable sign inspection for unsigned types. This fixes _Qp_xtoq(), _Qp_uitoq() and _Qp_uxtoq(). - In the functions __fpu_itof() and __fpu_xtof(), look at the sign bit to decide whether we're doing a conversion from an unsigned type. If so, don't negate the mantissa if the integer exceeds the biggest signed number. PR: 55773 Patch by: Stephen Paskaluk (based upon) MFC after: 2 weeks
* 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
|
* Make <runefile.h> internal to libc.ru2005-05-162-1/+63
| | | | Suggested by: phantom
* - The ai_addrlen of a struct addrinfo used to be a size_t, perume2005-05-156-25/+37
| | | | | | | | | | | | | | | | RFC 2553. In XNS5.2, and subsequently in POSIX-2001 and RFC 3493, it was changed to a socklen_t. And, the n_net of a struct netent used to be an unsigned long integer. In XNS5, and subsequently in POSIX-2001, it was changed to an uint32_t. To accomodate for this while preserving ABI compatibility with the old interface, we need to prepend or append 32 bits of padding, depending on the (LP64) architecture's endianness. - Correct 1st argument of getnetbyaddr() to uint32_t on 32 bit arch. Stay as is on 64 bit arch for ABI backward compatibility for now. Reviewed by: das, peter MFC after: 2 weeks
* Submitted by: Jinmei Tatuya, Hajimu Umemotognn2005-05-142-4/+4
| | | | | | | | | | Reviewed by: rwatson at freebsd dot org Approved by: rwatson at freebsd dot org MFC after: 1 week Fix the matchlen() function so that it handles the IPv4 (AF_INET) case correctly. Until now it has been treating IPv4 addresses as if they were IPv6 which could lead to corruption errors.
* 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
* The header glue.h should provide just a declaration for the variablestefanf2005-05-131-1/+2
| | | | | | | | __sglue, not a definition. PR: 80378 Submitted by: John Engelhart <johne@zang.com> MFC after: 1 week
* raise readability bit.ume2005-05-131-7/+7
|
* free ypbuf only when yp_match() succeed.ume2005-05-131-1/+1
|
* NI_WITHSCOPEID cleanup. Neither RFC 2553 nor RFC 3493 definesume2005-05-132-21/+8
| | | | | NI_WITHSCOPEID, and our getaddrinfo(3) does nothing special for it, now.
* Provide more POSIX-complaint ttyname_r(3) interface[1], which is slightlydelphij2005-05-132-22/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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@
* Connect MLINKS for ttyname_r(3), and add prototype into unistd.h.delphij2005-05-111-1/+1
|
* Avoid (unnecessarily) casting away const within uuid_is_nil.delphij2005-05-111-2/+2
|
* Fix race by using atomic operation, with this change, both libpthreaddavidxu2005-05-061-3/+5
| | | | and libthr now can run profiling on SMP.
* Document the fact that accept(2) may return EINVAL when addrlen iskeramida2005-05-041-0/+4
| | | | | | | | negative (in addition to returning EINVAL when called on a descriptor that is not a socket). Submitted by: Arne H Juul <arnej@europe.yahoo-inc.com> PR: docs/80587
* The correct description for mode "w" isdes2005-05-041-1/+1
| | | | | | | | (((truncate to zero length) or (create)) (text file)) (for writing) and not ((truncate file to zero length) or (create text file)) (for writing) MFC after: 1 week
* do mutex lock for each yp calls. with this,ume2005-05-031-13/+65
| | | | | http://cvsweb.netbsd.org/bsdweb.cgi/src/regress/lib/libpthread/resolv/ is working.
* Cleanup for getgrouplist(3):delphij2005-05-031-8/+6
| | | | | | | | - Use /*- instead of /* for copyright section - Include unistd.h for prototype of it - Sort and separate includes as described in style(9) - ANSIfy the function defination - Use const for the traversing iterator
* fix signed/unsigned comparison warnings.ume2005-05-031-5/+5
| | | | Obtained from: NetBSD
* Include paths.h for prototype of getbootfile(3).delphij2005-05-031-0/+2
|
* the 3rd argument of getsockname() should be socklen_t*.ume2005-05-022-2/+4
| | | | Submitted by: stefanf
* oops, we don't need previous change.ume2005-05-011-8/+4
|
* make it compilable without YP definition.ume2005-05-011-5/+9
|
* don't see RES_USE_INET6 when called from getipnodeby*().ume2005-05-011-6/+14
|
* oops, gethostbyaddr(3) must return h_addr as an IPv4-mappedume2005-04-303-6/+17
| | | | | IPv6 address when RES_USE_INET6 was set, according to RFC 2133 section 6.2.
* handling RES_USE_INET6 better.ume2005-04-301-4/+5
|
* _ht_gethostbyaddr didn't handle RES_USE_INET6 correctly.ume2005-04-301-1/+1
|
* _gethostbynisname() didn't support RES_USE_INET6.ume2005-04-301-0/+9
|
* _ht_gethostbyname didn't handle RES_USE_INET6 correctly.ume2005-04-301-6/+18
|
* - do validation check and IPv4-mapped IPv6 address handling beforeume2005-04-292-36/+41
| | | | | | | | | any query. - don't query against IPv6 link-local address. - use IN6_IS_ADDR_V4{MAPPED,COMPAT} macros. - use memcpy() instead of bcopy(). Inspired by: NetBSD
OpenPOWER on IntegriCloud