Commit Graph

9686 Commits

Author SHA1 Message Date
obrien
7a67f8d833 Temporarily disable support for bzip2'ed compressed filesystems, until a
maintainable why of handling them is created.
2005-05-17 01:44:37 +00:00
ru
86758e8895 Make <runefile.h> internal to libc.
Suggested by:	phantom
2005-05-16 09:32:41 +00:00
ume
7a6cd620d0 - 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
gnn
c138dacf0c 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
delphij
ca2590f422 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
stefanf
1dcdbc6b45 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
ume
a3047efe51 NI_WITHSCOPEID cleanup
Reviewed by:	des
2005-05-13 20:51:09 +00:00
ume
f96b51e1fa raise readability bit. 2005-05-13 17:56:53 +00:00
ume
ae7adfdc3c free ypbuf only when yp_match() succeed. 2005-05-13 17:30:03 +00:00
ume
e33ba03345 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
delphij
4c5083a81c 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
delphij
41460d5099 Connect MLINKS for ttyname_r(3), and add prototype into unistd.h. 2005-05-11 14:07:25 +00:00
delphij
710ce8b5de Avoid (unnecessarily) casting away const within uuid_is_nil. 2005-05-11 13:18:10 +00:00
kientzle
bc7e5eb067 Document zlib update procedure and provide future maintainers a
snapshot of the current state of the import.

MFC after:	2 weeks
2005-05-11 03:50:50 +00:00
kientzle
2f1311730e Since the FreeBSD local modifications are mostly trivial (consisting
primarily of pointless $FreeBSD$ tags), sync most files in HEAD with
those in the ZLIB branch.  This minimizes the differences between
HEAD and ZLIB and should simplify future imports.

After this, there are only three files with local modifications
(gzio.c, minigzip.c, and zconf.h) and two non-vendor files
(Makefile, zopen.c).  The rest exactly match the vendor distribution.

PR:		i386/76294
MFC after:	2 weeks
2005-05-11 03:47:48 +00:00
kientzle
942b7e7d55 archive_entry_set_link is supposed to update whichever link field
(symlink or hardlink) is already set.  Instead, it was always setting
the hardlink field.  In particular, this caused GNU tar format long
symlinks to be interpreted as hardlinks.

Thanks to: Brooks Davis
MFC after: 7 days
2005-05-08 19:10:41 +00:00
deischen
5d3cf26519 Prevent these functions from using stack outside of their frame.
Reported by:	Marc Olzheim <marcolz at stack dot nl>
OK'd by:	das
2005-05-06 15:44:20 +00:00
davidxu
42ce29d66b 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
glebius
c9c0d4d0d6 Build userland libalias using src/sys/netinet/libalias.
Reviewed by:	ru
Repocopy by:	peter
2005-05-04 12:49:44 +00:00
keramida
1345acc565 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
des
8a19b2b671 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
ume
86dfcedb7e 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
delphij
3f28784d70 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
ume
b29f166ec1 fix signed/unsigned comparison warnings.
Obtained from:	NetBSD
2005-05-03 16:13:31 +00:00
delphij
8c908fd79c Include paths.h for prototype of getbootfile(3). 2005-05-03 15:28:07 +00:00
ume
f7d29d45c8 the 3rd argument of getsockname() should be socklen_t*.
Submitted by:	stefanf
2005-05-02 04:43:32 +00:00
jkoshy
a21392e3ac Add convenience APIs pmc_width() and pmc_capabilities() to -lpmc.
Have pmcstat(8) and pmccontrol(8) use these APIs.

Return PMC class-related constants (PMC widths and capabilities)
with the OP GETCPUINFO call leaving OP PMCINFO to return only the
dynamic information associated with a PMC (i.e., whether enabled,
owner pid, reload count etc.).

Allow pmc_read() (i.e., OPS PMCRW) on active self-attached PMCs to
get upto-date values from hardware since we can guarantee that the
hardware is running the correct PMC at the time of the call.

Bug fixes:
 - (x86 class processors) Fix a bug that prevented an RDPMC
   instruction from being recognized as permitted till after the
   attached process had context switched out and back in again after
   a pmc_start() call.

   Tighten the rules for using RDPMC class instructions: a GETMSR
   OP is now allowed only after an OP ATTACH has been done by the
   PMC's owner to itself.  OP GETMSR is not allowed for PMCs that
   track descendants, for PMCs attached to processes other than
   their owner processes.

 - (P4/HTT processors only) Fix a bug that caused the MI and MD
   layers to get out of sync.  Add a new MD operation 'get_config()'
   as part of this fix.

 - Allow multiple system-mode PMCs at the same row-index but on
   different CPUs to be allocated.

 - Reject allocation of an administratively disabled PMC.

Misc. code cleanups and refactoring.  Improve a few comments.
2005-05-01 14:11:49 +00:00
ume
abf13089c3 oops, we don't need previous change. 2005-05-01 12:37:12 +00:00
ume
006d6ec57b make it compilable without YP definition. 2005-05-01 12:08:57 +00:00
ume
0adfc804de don't see RES_USE_INET6 when called from getipnodeby*(). 2005-05-01 07:39:45 +00:00
ume
eff8f31f8b 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
ume
ebe4b8304d handling RES_USE_INET6 better. 2005-04-30 19:28:31 +00:00
ume
91b46d9bcd _ht_gethostbyaddr didn't handle RES_USE_INET6 correctly. 2005-04-30 18:46:27 +00:00
ume
7384d01d80 _gethostbynisname() didn't support RES_USE_INET6. 2005-04-30 18:37:35 +00:00
ume
1e5d47dc8c _ht_gethostbyname didn't handle RES_USE_INET6 correctly. 2005-04-30 17:01:18 +00:00
ume
5acac5def1 - 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
ume
a63da37458 NETDB_INTERNAL is not fit, here. return NO_RECOVERY for h_errno. 2005-04-29 17:36:54 +00:00
ume
5e38b9f0d1 our get{addr,name}info() is considered thread-safe. 2005-04-29 14:37:51 +00:00
ume
3a568cbe4a we cannot use inet_ntoa(3), here. so, use inet_ntop(3), instead. 2005-04-29 12:01:36 +00:00
stefanf
16dd1d18f5 Revert the last change, the conversion from long double to double can raise
unwanted underflow exceptions.

Pointed out by:	das
2005-04-28 19:45:55 +00:00
ume
d8dbaeb308 sync _map_v4v6_host*() with bind9's. it treats align better bit.
Obtained from:	BIND9
2005-04-28 18:52:40 +00:00
ume
412b7128e4 we don't need mutex lock to call _gethostbynis*(), anymore. 2005-04-28 18:21:11 +00:00
ume
b384ad94d8 make gethostby*() thread-safe. 2005-04-28 18:03:43 +00:00
ume
f40143a00f _gethostbynis{addr,name}() can handle an IPv6, now. 2005-04-28 17:44:44 +00:00
ume
c2ee427f58 make getnetby*() thread-safe. 2005-04-28 15:32:55 +00:00
ume
1dcbf1fa6d 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
davidxu
094168eea8 Remove COMPAT_32BIT, it is no longer needed. 2005-04-27 01:29:03 +00:00
peter
e4fe1baaf9 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
6e045e2291 No longer use _amd64_set_gsbase(). Use i386_set_gsbase() even when
building for amd64.
2005-04-26 20:46:11 +00:00
peter
408a98eda0 Remove the special _amd64_set_gsbase() code for #ifdef COMPAT_32BIT, now
that the amd64 kernel implements i386_get/set_gsbase().  All the rest of
the ldt backwards compat code should go away soon.
2005-04-26 20:41:48 +00:00