summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* 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
* NETDB_INTERNAL is not fit, here. return NO_RECOVERY for h_errno.ume2005-04-294-4/+4
|
* our get{addr,name}info() is considered thread-safe.ume2005-04-292-8/+0
|
* we cannot use inet_ntoa(3), here. so, use inet_ntop(3), instead.ume2005-04-292-5/+11
|
* sync _map_v4v6_host*() with bind9's. it treats align better bit.ume2005-04-284-18/+15
| | | | Obtained from: BIND9
* we don't need mutex lock to call _gethostbynis*(), anymore.ume2005-04-282-19/+2
|
* make gethostby*() thread-safe.ume2005-04-286-285/+478
|
* _gethostbynis{addr,name}() can handle an IPv6, now.ume2005-04-281-16/+11
|
* make getnetby*() thread-safe.ume2005-04-288-175/+339
|
* hide implementation specific internal functions from netdb.h.ume2005-04-276-0/+17
| | | | it is needed to make get{host,net}by*() thread-safe.
* Provide stub functions for i386_set_ldt() and i386_get_ldt() even whenpeter2005-04-262-7/+4
| | | | | compiling as an amd64 support binary. They will return EINVAL on an amd64 kernel, but this simplifies other #ifdefs that were getting a bit nasty.
* No longer use _amd64_set_gsbase(). Use i386_set_gsbase() even whenpeter2005-04-266-166/+2
| | | | building for amd64.
* our get{proto,serv}by*() use a thread-specific data space.ume2005-04-262-2/+2
|
* add IPv6 awareness for NIS query of gethostby*().ume2005-04-262-25/+56
| | | | Inspired by: NetBSD
* ensure parsing numeric address before any host query.ume2005-04-252-100/+126
| | | | Inspired by: NetBSD
* remove unused variable.ume2005-04-251-3/+1
|
* Remove unused file.delphij2005-04-251-63/+0
| | | | | | | Confirmed by: tjr [1] [1] PERFORCE CHANGESET 57044: http://perforce.freebsd.org/changeView.cgi?CH=57044
* if last line didn't have trailing space, network address was alsoume2005-04-241-10/+11
| | | | treated as an alias.
OpenPOWER on IntegriCloud