Commit Graph

5101 Commits

Author SHA1 Message Date
Robert Watson
f0dc021549 Add mkfifo(2) to the man page SEE ALSO list for umask(2) -- it's
mentioned in the description.

MFC after:	2 days
2005-09-10 20:47:02 +00:00
Stefan Farfeleder
35a4bf1ce0 Add an MLINK for devname_r(). 2005-09-10 14:09:37 +00:00
Stefan Farfeleder
442a7dde61 The header and the man page say that sethostid() returns void, so make the
definition match.  Include <unistd.h>.
2005-09-10 13:54:42 +00:00
Stefan Farfeleder
16ca32b39f Fix parameter types of close and get members in DB. 2005-09-10 12:40:51 +00:00
Tim J. Robbins
6595b51a7f Remove references to nonexistent "FreeBSD Security Architecture" document. 2005-09-05 09:49:33 +00:00
Gary W. Swearingen
669fe42db9 Added a sentence to explain what "span" means.
PR:             docs/84850
Submitted by:   garys
MFC after:      3 days
Approved by:    keramida
2005-08-29 20:41:58 +00:00
Gleb Smirnoff
83c83f3e46 - Document the fact that the real length of listen queue is 1.5 more
than the value of backlog argument.
- Document the fact that a subsequent listen(2) calls on the listening
  socket change the backlog argument.
- Note that current listen queue lengths can be queried using netstat(1).

Submitted by:	Igor Sysoev <is rambler-co.ru>
Wording by:	gnn
2005-08-29 10:23:46 +00:00
Andre Oppermann
6050c8fe05 Add the function memmem(3) as found in glibc and others.
It is the binary equivalent to strstr(3).

 void *memmem(const void *big, size_t big_len,
	const void *little, size_t little_len);

Submitted by:	Pascal Gloor <pascal.gloor at spale.com>
MFC after:	3 days
2005-08-25 18:26:58 +00:00
Stefan Farfeleder
d8f77b4529 Include <sys/types.h> and <limits.h> ourselves, don't assume they are included
through <pthread.h>.

gen/sem.c:		Prerequisite for <_semaphore.h>
net/getprotoent.c:	USHRT_MAX
net/getservent.c:	USHRT_MAX
stdio/ungetwc.c:	MB_LEN_MAX
stdio/vfwscanf.c:	MB_LEN_MAX
2005-08-20 07:59:13 +00:00
Tim J. Robbins
1ee0dbee57 Fix a boundary condition error in slow() and fast() in multibyte locales:
we must allow the character beginning at "p" to be converted to a wide
character for the purposes of EOL processing and word-boundary matching.
2005-08-17 11:37:38 +00:00
Tim J. Robbins
0eac054729 Document the fact that word-boundary matching does not work
properly in multibyte locales.
2005-08-17 11:21:15 +00:00
Tim J. Robbins
d62e8d4c7c Add an implementation of the semi-standard wcsdup() function, as found
on Microsoft and GNU systems.
2005-08-13 05:54:33 +00:00
Tim J. Robbins
0853006ff1 Change OUT from -2 to CHAR_MIN-1, making it impossible for it to
inadvertently match a negative char in the RE being compiled.

This fixes compilation of "\376" (as an ERE) and "\376\376" (as a BRE).

PR:		84740
MFC after:	1 week
2005-08-13 02:30:15 +00:00
Simon L. B. Nielsen
05fe2c1cb6 Add missing links from getgrent_r.3, getgrnam_r.3, and getgrgid_r.3 to
getgrent.3.

Submitted by:	Ulf Lilleengen <lulf@kerneled.org>
MFC after:	3 days
2005-08-12 22:46:15 +00:00
Poul-Henning Kamp
3d86554c20 Respect the YES_HESIOD build variable. 2005-08-06 16:53:55 +00:00
Daniel Eischen
ed0b0abcf7 Make syslog() use the internal (non-cancellation point) _usleep().
Prior to this it was calling the cancellable usleep() while holding
a lock.
2005-08-03 00:45:58 +00:00
Daniel Eischen
8450917472 Make usleep() overridable by the thread libraries so they can provide
cancellation points.

Noticed by:	phk
2005-08-03 00:44:25 +00:00
Daniel Eischen
78956f2474 Add namespace #defines for usleep. 2005-08-03 00:43:14 +00:00
Giorgos Keramidas
6fb9b618f5 Fix all the spelling mistakes I could find in the man pages for words
that have at least 3 characters.

MFC after:	1 week
Thanks to:	Music band ``Chingon''
		for keeping me company while searching for these.
2005-07-31 03:30:48 +00:00
Diomidis Spinellis
87a236caf5 Document the ECONNRESET errno value. 2005-07-29 07:42:10 +00:00
Hajimu UMEMOTO
5495564735 don't accept invalid form of an address like 1:2:3:4:5:6:7::8.
PR:		bin/84106
Obtained from:	BIND9
MFC after:	2 days
2005-07-27 14:33:36 +00:00
Matthew N. Dodd
50007d443b Move initialization above point of first possible reference to
avoid overwriting ty_status values set from the 'type' field.

Previously TTY_DIALUP and TTY_NETWORK flags did not match
specified type.
2005-07-25 17:57:15 +00:00
Tim J. Robbins
d48c77b534 Speed up __wcsconv() (and hence the printf() %ls format):
- use wcsrtombs() instead of a wcrtomb() loop where possible.
- avoid wcrtomb() loop when output precision is small.
2005-07-24 12:12:44 +00:00
Pawel Jakub Dawidek
9975a9a287 Better translation. 2005-07-23 21:30:35 +00:00
Jonathan Chen
c5a096e0e0 fix innetgr() returning false positives and negatives when reverse netgroup
matching is used.

PR: 35506
MFC after: 3 days
2005-07-22 22:20:26 +00:00
Hajimu UMEMOTO
85a71a15c8 Remove padding for ABI compatibility of ai_addrlen member
from struct addrinfo.  This change break ABI compatibility
on 64 bit arch.
2005-07-22 18:21:28 +00:00
Tim J. Robbins
d2a57b3026 Add HISTORY section. 2005-07-21 10:53:27 +00:00
Tim J. Robbins
9376b9d71a Add cross-reference to nextwctype(3). 2005-07-21 10:32:17 +00:00
Tim J. Robbins
5a94ee1180 Add COMPATIBILITY and HISTORY sections. Fix typo. 2005-07-21 10:27:45 +00:00
Hajimu UMEMOTO
d84e21303c refer RFC 3542 rather than RFC 2292bis.
Submitted by:	Keiichi SHIMA <keiichi__at__iijlab.net>
Obtained from:	KAME
2005-07-19 18:13:58 +00:00
Hajimu UMEMOTO
d5cbe1abb0 fixed the validation code of routing header length in inet6_rth_getaddr().
reported by Delia Kecskemeti <delia.kecskemeti__at__windriver.com>

Submitted by:	Keiichi SHIMA <keiichi__at__iijlab.net>
Obtained from:	KAME
2005-07-19 18:09:44 +00:00
John-Mark Gurney
5ba593de9e remove the supposed max of 2^31, it hasn't been this small in a very
long time... i.e. since this file was imported...  (ufs1 supports much
larger files then this)...

Submitted by:	Ivan Voras
MFC after:	1 week
2005-07-18 22:27:41 +00:00
Tim J. Robbins
a385e04b47 Remove confusing "single C char locales" phrase; arguments to these
functions and must now be either an unsigned char or EOF, regardless of
locale.
2005-07-17 04:11:06 +00:00
Tim J. Robbins
5b86168f54 Remove confusing "single C char locales" phrase; arguments to tolower()
and toupper() must now be either an unsigned char or EOF, regardless of
locale.
2005-07-17 03:37:00 +00:00
Jung-uk Kim
a0f887f4f3 Use better Korean translation for `trap'
Requested by:	many Korean users from bsdforum.or.kr
Submitted by:	perky
Approved by:	anholt (mentor)
2005-07-16 05:40:14 +00:00
Maxim Sobolev
9c007cf29e Document the fact that if MAP_FIXED request has been successful it
replaces any previous mapping to the same address.

Obtained from:	IEEE Std 1003.1, 2004 Edition
2005-07-15 11:37:25 +00:00
Robert Watson
7a6d1e6f69 Cross-reference sem_getvalue(3) from several other semaphore-related
functions.

MFC after:	3 days
2005-07-13 13:15:22 +00:00
John Baldwin
bcd9e0dd20 - Add two new system calls: preadv() and pwritev() which are like readv()
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
2005-07-07 18:17:55 +00:00
Joe Marcus Clarke
a617a18a23 Fix ptsname(3) by converting it to use devname(3) to obtain the name of
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)
2005-07-07 17:48:40 +00:00
Xin LI
1c70a91b10 Minor grammar fix
Submitted by:	Wojciech A. Koszek [dunstan at freebsd czest pl]
Approved by:	re (hrs)
2005-07-03 12:35:11 +00:00
Hiten Pandya
a1601503f5 Use 'manual page' instead of 'man page' for consistency.
Approved by:	re (hrs)
2005-06-30 13:18:15 +00:00
Peter Wemm
3b4399f6a7 Clean out the leftovers from the i386_set_gsbase() TLS conversion.
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
2005-06-29 23:15:36 +00:00
Stefan Farfeleder
882cf65dd6 Add the functions _Qp_cmp() and _Qp_cmpe() as described in the Sparc
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
2005-06-21 21:13:07 +00:00
Ruslan Ermilov
48856b0042 Markup fixes.
Approved by:	re
2005-06-16 19:01:07 +00:00
Ruslan Ermilov
f789cb8293 Assorted markup fixes.
Approved by:	re
2005-06-15 19:04:04 +00:00
Ruslan Ermilov
d3b3ec17a8 When IPC_NOWAIT is set and there is no message, msgrcv() fails
with errno set to ENOMSG.

PR:		docs/82217
Submitted by:	delphij
Approved by:	re (blanket)
2005-06-14 10:56:02 +00:00
Jacques Vidrine
a8e0b2e8ab Remove rexecd(8), a server that implements a particularly insecure
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.
2005-06-10 20:52:36 +00:00
Craig Rodrigues
e5d54f7733 Fix the wording in this man page so that it
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)
2005-06-10 16:54:17 +00:00
Alan Cox
2ca32bcc02 Update .Dd value. 2005-06-04 19:44:09 +00:00
Alan Cox
bbe7bbdfee Eliminate the original method of requesting notification of aio_read(2) and
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
2005-06-04 19:16:33 +00:00
Warner Losh
46813f9674 Missed rwatson's redundancy 2005-06-03 15:50:55 +00:00
Hajimu UMEMOTO
360a23ab31 reflect type change of n_net and getnetbyaddr(3). 2005-06-03 04:44:54 +00:00
Hajimu UMEMOTO
ad0fab44e2 - Remove padding for ABI compatibility of n_net member from struct
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
2005-06-03 03:32:06 +00:00
Hajimu UMEMOTO
d6fd3ed8ab reduce cast.
MFC after:	1 week
2005-05-27 20:44:57 +00:00
Stefan Farfeleder
1470d46611 Fix long (and long long) to long double, unsigned to long double and unsigned
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
2005-05-27 10:00:22 +00:00
Hajimu UMEMOTO
77cf61aeb0 reduce strlen() call. 2005-05-20 15:39:20 +00:00
Hajimu UMEMOTO
8a4d3d8400 use reentrant.h and simplify. 2005-05-20 15:17:08 +00:00
Hajimu UMEMOTO
532e65b886 check return value of ttyname_r(). 2005-05-20 14:59:20 +00:00
Hajimu UMEMOTO
db297254fe ttyname_r() didn't pass correct buffer size to devname_r(). 2005-05-20 14:56:55 +00:00
Ruslan Ermilov
228f8c4f8b Make <runefile.h> internal to libc.
Suggested by:	phantom
2005-05-16 09:32:41 +00:00
Hajimu UMEMOTO
036ae3dd79 - The ai_addrlen of a struct addrinfo used to be a size_t, per
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
2005-05-15 20:15:15 +00:00
George V. Neville-Neil
fd57e549e0 Submitted by: Jinmei Tatuya, Hajimu Umemoto
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.
2005-05-14 19:43:10 +00:00
Xin LI
68b749ff2f Revert to old ttyname_r behavior that when _ioctl() returns 0 (SUCCEEDED),
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
2005-05-14 14:03:21 +00:00
Stefan Farfeleder
c29f424e01 The header glue.h should provide just a declaration for the variable
__sglue, not a definition.

PR:		80378
Submitted by:	John Engelhart <johne@zang.com>
MFC after:	1 week
2005-05-13 21:12:34 +00:00
Hajimu UMEMOTO
946e41f142 raise readability bit. 2005-05-13 17:56:53 +00:00
Hajimu UMEMOTO
f8997ca2f4 free ypbuf only when yp_match() succeed. 2005-05-13 17:30:03 +00:00
Hajimu UMEMOTO
4f10131848 NI_WITHSCOPEID cleanup. Neither RFC 2553 nor RFC 3493 defines
NI_WITHSCOPEID, and our getaddrinfo(3) does nothing special
for it, now.
2005-05-13 16:31:11 +00:00
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
Xin LI
f73fd5bd75 Connect MLINKS for ttyname_r(3), and add prototype into unistd.h. 2005-05-11 14:07:25 +00:00
Xin LI
f57a875fa0 Avoid (unnecessarily) casting away const within uuid_is_nil. 2005-05-11 13:18:10 +00:00
David Xu
0fa2f94316 Fix race by using atomic operation, with this change, both libpthread
and libthr now can run profiling on SMP.
2005-05-06 07:37:01 +00:00
Giorgos Keramidas
e3446e1f8e Document the fact that accept(2) may return EINVAL when addrlen is
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
2005-05-04 11:09:26 +00:00
Dag-Erling Smørgrav
bc8695dc6c The correct description for mode "w" is
(((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
2005-05-04 08:12:44 +00:00
Hajimu UMEMOTO
d21de89a71 do mutex lock for each yp calls. with this,
http://cvsweb.netbsd.org/bsdweb.cgi/src/regress/lib/libpthread/resolv/
is working.
2005-05-03 20:30:31 +00:00
Xin LI
603c9c1dc5 Cleanup for getgrouplist(3):
- 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
2005-05-03 16:20:03 +00:00
Hajimu UMEMOTO
1ccfa322aa fix signed/unsigned comparison warnings.
Obtained from:	NetBSD
2005-05-03 16:13:31 +00:00
Xin LI
2f22da5d97 Include paths.h for prototype of getbootfile(3). 2005-05-03 15:28:07 +00:00
Hajimu UMEMOTO
943db5a2ab the 3rd argument of getsockname() should be socklen_t*.
Submitted by:	stefanf
2005-05-02 04:43:32 +00:00
Hajimu UMEMOTO
f468e837a1 oops, we don't need previous change. 2005-05-01 12:37:12 +00:00
Hajimu UMEMOTO
6bd1d1a192 make it compilable without YP definition. 2005-05-01 12:08:57 +00:00
Hajimu UMEMOTO
8592d23a9f don't see RES_USE_INET6 when called from getipnodeby*(). 2005-05-01 07:39:45 +00:00
Hajimu UMEMOTO
e84892eb74 oops, gethostbyaddr(3) must return h_addr as an IPv4-mapped
IPv6 address when RES_USE_INET6 was set, according to RFC 2133
section 6.2.
2005-04-30 20:07:01 +00:00
Hajimu UMEMOTO
6964622dd0 handling RES_USE_INET6 better. 2005-04-30 19:28:31 +00:00
Hajimu UMEMOTO
e4f846efec _ht_gethostbyaddr didn't handle RES_USE_INET6 correctly. 2005-04-30 18:46:27 +00:00
Hajimu UMEMOTO
e692b6186a _gethostbynisname() didn't support RES_USE_INET6. 2005-04-30 18:37:35 +00:00
Hajimu UMEMOTO
40ca152d15 _ht_gethostbyname didn't handle RES_USE_INET6 correctly. 2005-04-30 17:01:18 +00:00
Hajimu UMEMOTO
2c08ac2b38 - do validation check and IPv4-mapped IPv6 address handling before
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
2005-04-29 19:55:23 +00:00
Hajimu UMEMOTO
86726f325b NETDB_INTERNAL is not fit, here. return NO_RECOVERY for h_errno. 2005-04-29 17:36:54 +00:00
Hajimu UMEMOTO
49e0283df8 our get{addr,name}info() is considered thread-safe. 2005-04-29 14:37:51 +00:00
Hajimu UMEMOTO
0d389e7212 we cannot use inet_ntoa(3), here. so, use inet_ntop(3), instead. 2005-04-29 12:01:36 +00:00
Hajimu UMEMOTO
850bc9af6b sync _map_v4v6_host*() with bind9's. it treats align better bit.
Obtained from:	BIND9
2005-04-28 18:52:40 +00:00
Hajimu UMEMOTO
b8ab0f4506 we don't need mutex lock to call _gethostbynis*(), anymore. 2005-04-28 18:21:11 +00:00
Hajimu UMEMOTO
aa2f4ec72a make gethostby*() thread-safe. 2005-04-28 18:03:43 +00:00
Hajimu UMEMOTO
7b671d902b _gethostbynis{addr,name}() can handle an IPv6, now. 2005-04-28 17:44:44 +00:00
Hajimu UMEMOTO
a2a775011c make getnetby*() thread-safe. 2005-04-28 15:32:55 +00:00
Hajimu UMEMOTO
bcb131aa3c hide implementation specific internal functions from netdb.h.
it is needed to make get{host,net}by*() thread-safe.
2005-04-27 19:12:57 +00:00
Peter Wemm
3bbf3512ad Provide stub functions for i386_set_ldt() and i386_get_ldt() even when
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.
2005-04-26 20:51:15 +00:00
Peter Wemm
8fa4081fe3 No longer use _amd64_set_gsbase(). Use i386_set_gsbase() even when
building for amd64.
2005-04-26 20:46:11 +00:00
Hajimu UMEMOTO
b190ee6140 our get{proto,serv}by*() use a thread-specific data space. 2005-04-26 18:04:09 +00:00
Hajimu UMEMOTO
72572cc6ea add IPv6 awareness for NIS query of gethostby*().
Inspired by:	NetBSD
2005-04-26 14:55:47 +00:00
Hajimu UMEMOTO
a72b0131c9 ensure parsing numeric address before any host query.
Inspired by:	NetBSD
2005-04-25 17:36:28 +00:00
Hajimu UMEMOTO
4801b1f131 remove unused variable. 2005-04-25 14:52:13 +00:00
Xin LI
b49627d7a7 Remove unused file.
Confirmed by:	tjr [1]

[1] PERFORCE CHANGESET 57044:
	http://perforce.freebsd.org/changeView.cgi?CH=57044
2005-04-25 02:29:03 +00:00
Hajimu UMEMOTO
71d0cbb671 if last line didn't have trailing space, network address was also
treated as an alias.
2005-04-24 18:22:39 +00:00
Alan Cox
97cd6892ba Optimize the instruction alignment. 2005-04-23 18:45:36 +00:00
Alan Cox
c0862430d5 Eliminate an unpredictable branch from bcmp().
Reviewed by: bde
2005-04-21 23:07:20 +00:00
Alexander Kabaev
f2da7e0e49 Do not try to store 64 bits into 32 bit errno variable. With the changed libc
data layout, this was corrupting _PathLocale variable leading to programs
dumping core in non-default locales.
2005-04-21 12:47:08 +00:00
Hajimu UMEMOTO
92b6f7be5a - add getproto{byname,bynumber,ent}_r for internal use within libc.
- make getproto{byname,bynumber,ent} thread-safe.
2005-04-19 14:41:13 +00:00
Hajimu UMEMOTO
d7d66e8c85 - nuke deprecated and unused getnodeby(3).
- remove unused variable.

Obtained from:	KAME
2005-04-19 12:28:17 +00:00
Hajimu UMEMOTO
a87b3988c9 rename the NIS related fields to have yp_ prefix.
Suggested by:	delphij
2005-04-18 18:34:58 +00:00
Xin LI
ffe49790ef Do not check whether a pointer is NULL, since free(3) already takes care of
this case.

Reviewed by:	ume
2005-04-18 03:45:23 +00:00
David Schultz
fe769cdd95 Add a sysctl that returns the full path of a process' text file.
This information is needed by things like `gdb -p' and Sun's javac,
and previously it could only be obtained via procfs
2005-04-18 02:10:37 +00:00
Xin LI
6d44c5c74b Fix build for !YP case.
BTW.  Shall we change these fields to have yp_ prefix?  That will make the
code easier to read.
2005-04-17 15:10:30 +00:00
Hajimu UMEMOTO
109e5709c0 libc-internal interfaces should have two underscores in front
of their names.

Pointed out by:	das
2005-04-17 14:42:52 +00:00
Xin LI
5c83bb4912 Wrong working directory, sorry. The previous patch was what I have
seen in NetBSD's tree, and this one is what I have submitted for review.

Pointy hat to:	me
2005-04-17 04:00:55 +00:00
Xin LI
f5d25e4900 Remove a check about whether sa->sa_len is equal to salen from
getnameinfo(3).  POSIX standard does not require a sa_len field
in sockaddr struct, hence such requirement will cause problem
for portability.

PR:		standards/80008
Requested by:	Xin Liu <lx@knight.6test.edu.cn>
Reviewed by:	freebsd-standards (das)
MFC After:	2 weeks
2005-04-17 03:56:07 +00:00
David Schultz
1be5319a76 Be bug-for-bug compatible with the C standard with respect to
printf("%#.0o", 0).  Cite an amusing passage from a defect report.
2005-04-16 22:36:51 +00:00
Hajimu UMEMOTO
62e8b17d72 Now, our getservbyname(3) is thread-safe. So, we don't need
to protect it with mutex lock.
2005-04-15 18:15:12 +00:00
Hajimu UMEMOTO
96f79dca76 - add getserv{byname,byport,ent}_r for internal use within libc.
- make getserv{byname,byport,ent} thread-safe.

Reviewed by:	gnn
2005-04-15 18:09:39 +00:00
Hajimu UMEMOTO
159d2a98c5 hostalias() is not thread-safe. So, introduce _res_hostalias()
and use it.

Obtained from:	BIND9
2005-04-15 14:42:29 +00:00
Hajimu UMEMOTO
f35528f852 remove needless res_init() call.
Inspired by:	NetBSD
2005-04-14 11:44:43 +00:00
Peter Wemm
4453c6dc67 Attempt i386_set_gsbase() before using the user_ldt code. Unimplemented
sysarch() calls return EINVAL, not SIGSYS.. so we can trivially adapt.
2005-04-14 00:02:37 +00:00
Peter Wemm
53193c146a Add stubs for the %fs/%gs base management calls. 2005-04-14 00:01:35 +00:00
Alan Cox
7e266fcd1f Add a machine-specific, optimized implementation of strcat.
PR: 73111
Submitted by: Ville-Pertti Keinonen <will@iki.fi> (taken from NetBSD)
MFC after: 3 weeks
2005-04-10 18:58:49 +00:00
Alan Cox
fb41e04787 Eliminate a conditional branch and as a side-effect eliminate a branch to
a return instruction.  (The latter is discouraged by the Opteron
optimization manual because it disables branch prediction for the return
instruction.)

Reviewed by: bde
2005-04-10 18:12:07 +00:00
Alan Cox
6524eb94a1 Add a machine-specific, optimized implementation of strcpy.
PR: 73111
Submitted by: Ville-Pertti Keinonen <will@iki.fi> (taken from NetBSD)
MFC after: 3 weeks
2005-04-10 05:11:06 +00:00
Alan Cox
e5dd4df84c Add a machine-specific, optimized implementation of strcmp.
PR: 73111
Submitted by: Ville-Pertti Keinonen <will@iki.fi> (taken from NetBSD)
MFC after: 3 weeks
2005-04-09 20:47:08 +00:00
Hajimu UMEMOTO
e8ffd81605 unbreak build without YP defined.
Submitted by:	Andrea Campi <andrea+freebsd_cvs_at_webcom.it>
2005-04-09 14:20:18 +00:00
Stefan Farfeleder
cf00abe993 Remove unused variables and assignments. 2005-04-08 21:24:23 +00:00
Stefan Farfeleder
fd42c4d829 Use prototypes in the function definitions. 2005-04-08 21:15:38 +00:00
Stefan Farfeleder
e413b7d2f8 Remove unused variable. 2005-04-08 20:58:47 +00:00
Alan Cox
26f6218be9 Add machine-specific, optimized implementations of bcmp and memcmp.
PR: 73111
Submitted by: Ville-Pertti Keinonen <will@iki.fi> (taken from NetBSD)
MFC after: 3 weeks
2005-04-08 05:15:55 +00:00
Alan Cox
b5c9ad687a Eliminate unneeded instructions that are a vestige of mechanical
translation from i386.
2005-04-08 05:10:18 +00:00
Alan Cox
0417d4e3e9 Eliminate an unneeded instruction that is a vestige of mechanical
translation from i386.
2005-04-07 05:46:46 +00:00
Peter Wemm
8d6f45f534 Fix strict-alias warnings by removing excessive (and wrong) casts. 2005-04-07 04:33:15 +00:00
Alan Cox
91c09a383a Add machine-specific, optimized implementations of bcopy, bzero, memcpy,
memmove, and memset.

PR: 73111
Submitted by: Ville-Pertti Keinonen <will@iki.fi> (taken from NetBSD)
MFC after: 3 weeks
2005-04-07 03:56:03 +00:00
Hajimu UMEMOTO
2424b11851 - we are no longer shareing any resources to be locked between
getaddrinfo(3) and getipnodeby*(3).
- use definitions in reentrant.h.
- remove obsolete comment.
2005-04-06 15:36:34 +00:00
Hajimu UMEMOTO
1b482912d1 MUTEX_INITIALIZER should be used instead of
PTHREAD_MUTEX_INITIALIZER, here.
2005-04-06 15:16:04 +00:00
Hajimu UMEMOTO
148b7ece93 separate gai_strerror(3) from getaddrinfo.c.
Requested by:	phantom
2005-04-06 12:45:51 +00:00
Hajimu UMEMOTO
d7057edb15 make yp stuff re-entrant.
Obtained from:	NetBSD
2005-04-05 18:25:23 +00:00
Hajimu UMEMOTO
069eb2cafb protect _yp_domain with mutex lock.
Inspired by:	NetBSD
2005-04-05 18:07:59 +00:00
Hajimu UMEMOTO
78ebcde839 add missing mutex unlock. 2005-04-05 17:13:28 +00:00
Hajimu UMEMOTO
9def31dcd7 make _files_getaddrinfo() re-entrant.
Obtained from:	NetBSD
2005-04-04 19:45:27 +00:00
David Schultz
f0ceb98f93 Replace the current strspn() and strcspn() with significantly faster
implementations inspired by the ones in DragonFly.  Unlike the
DragonFly versions, these have a small data cache footprint, and my
tests show that they're never slower than the old code except when the
charset or the span is 0 or 1 characters.  This implementation is
generally faster than DragonFly until either the charset or the span
gets in the ballpark of 32 to 64 characters.
2005-04-02 18:52:44 +00:00
David Schultz
5e9b87a863 Add some missing errnos from POSIX. Nothing in FreeBSD generates
these at the moment, but applications that test for them will now
have a better chance of compiling.

I have intentionally omitted errnos that are only good for STREAMS,
since apps that use STREAMS won't compile anyway.  The exception is
EPROTO, which was apparently intended for STREAMS, but worth having
anyway because Linux (mis)uses it for other things.
2005-04-02 12:33:28 +00:00
Hajimu UMEMOTO
0fbf0979c8 nuke the logic for AF_UNSPEC and simplify. once, it was introduced
to improve getaddrinfo(3).  but, it is not needed for a long time
since getaddrinfo(3) became providing its own res_*N() functions.
2005-04-02 08:18:33 +00:00
David Xu
26896bda48 Use __weak_reference macro to define weak symbols. 2005-03-21 13:17:16 +00:00
David Schultz
3edb8f412f Teach fmtcheck() about the ' (thousands separator) flag. 2005-03-21 08:00:55 +00:00
Simon L. B. Nielsen
4bced63f6d Add byteorder(9) to SEE ALSO.
MFC after:	3 days
2005-03-20 17:27:57 +00:00
Olivier Houchard
2b2714935b Use the correct values for softfloat, in both the little endian and the big
endian cases.
2005-03-20 00:53:52 +00:00