Commit Graph

13200 Commits

Author SHA1 Message Date
Benedict Reuschling
512e57d4f9 s/an struct/a struct
PR:             docs/148660
Submitted by:   Warren Block (wblock at wonkity dot com)
Reviewed by:    Tim Kientzle
Mentored by:    jkois
MFC after:      7 days
2010-07-17 12:53:57 +00:00
Jamie Gritton
fba36ac4de Don't copy and return a potentially unset buffer when jail_get fails. 2010-07-15 19:21:33 +00:00
Jamie Gritton
c26c472cc8 Don't import parameter values in jail_getv, except for the search key.
Remove the internal jailparam_vlist, in favor of using variants of its
 logic separately in jail_setv and jail_getv.
Free the temporary parameter list and exported values in jail_setv
 and jail_getv.

Noted by:	Stanislav Uzunchev
MFC after:	3 days
2010-07-15 19:21:07 +00:00
Marcel Moolenaar
c7904f69f4 Unbreak xz (liblzma) on strong-aligned architectures (and without
emulation of misaligned memory accesses). We cannot map the unaligned
memory access functions to the ones used for aligned accesses, so do
not define TUKLIB_FAST_UNALIGNED_ACCESS.
2010-07-15 03:11:04 +00:00
Jung-uk Kim
4a82f10889 Use type-specific inline function imax() instead of deprecated macro MAX().
Prodded by:	bde
2010-07-12 15:32:45 +00:00
Konstantin Belousov
b144e48b2a Use _SIG_VALID instead of expanded form of the macro.
Submitted by:	Garrett Cooper <yanegomi gmail com>
MFC after:	1 week
2010-07-12 10:15:33 +00:00
Konstantin Belousov
5ebe96648b For xsi_sigpause(3), remove the supplied signal from the process mask
during sigpause(2) call. It was backward.
Check that the signal number is valid.

Reported by:	Garrett Cooper <yanegomi gmail com>
MFC after:	1 week
2010-07-12 10:14:24 +00:00
Nathan Whitehorn
7f503b5731 Build libsmb should be on powerpc64 as well. 2010-07-12 00:56:35 +00:00
Nathan Whitehorn
944792aa12 Fix SVN mismerge. We somehow ended up with the 32-bit powerpc version
in arch/powerpc64 instead of the 64-bit one.
2010-07-11 05:13:38 +00:00
Nathan Whitehorn
daf94b1b7a Since powerpc and powerpc64 share an instruction set, bind can and should
use the 32-bit atomic operations unmodified. Accomplish this by switching
some MACHINE_ARCH values to MACHINE_CPUARCH.
2010-07-10 17:46:53 +00:00
Nathan Whitehorn
f76e14a6ad Teach libstand what to do for powerpc64: the same thing as powerpc. Like
amd64, libstand apps for powerpc64 systems are 32-bit, due to 32-bit Open
Firmware implementations.
2010-07-10 15:16:35 +00:00
Nathan Whitehorn
b5d529643a 64-bit PowerPC KVM support. 2010-07-10 15:15:00 +00:00
Nathan Whitehorn
65801ce52d Powerpc64 thread libraries support. 2010-07-10 15:13:49 +00:00
Nathan Whitehorn
840b91cc52 Provide 64-bit PowerPC support in libc.
Obtained from:	projects/ppc64
2010-07-10 14:45:03 +00:00
Nathan Whitehorn
3c766d1c8f powerpc64 floating-point is identical to powerpc, so use the same
code on both architectures.
2010-07-10 14:40:57 +00:00
Nathan Whitehorn
8869de5e55 The 64-bit PowerPC ABI implemented in binutils 2.15 requires some special
quirks for weak-symbol handling. Text symbols require also marking weak
the special dot-symbol associated with the function, and data symbols
require that you not do that. To fix this, provide a hacked
__weak_reference for powerpc64, and define a new __weak_reference_data
for the single weak data symbol in base.

Revert after:	binutils 2.17 import
Obtained from:	projects/ppc64
2010-07-10 14:39:08 +00:00
Konstantin Belousov
cefac16712 Document pl_siginfo and PT_FLAG_SI for PT_LWPINFO.
MFC after:	1 month
2010-07-10 14:31:44 +00:00
Nathan Whitehorn
282e37622c C startup support for 64-bit PowerPC.
Obtained from:	projects/ppc64
2010-07-10 03:45:55 +00:00
Jung-uk Kim
2857dd23a4 Fix build by defining MAX() macro here. 2010-07-09 05:25:14 +00:00
Jung-uk Kim
5cd8ebeb32 Sync. printf() of libstand(3) with sys/kern/subr_prf.c.
CVS r1.94	jhb:
Cast the integer read as the first argument for %b to an unsigned integer
so it's value is not sign extended when assigned to the uintmax_t variable
used internally by printf.  For example, if bit 31 is set in the cpuid
feature word, then %b would print out the initial value as a 16 character
hexadecimal value.  Now it only prints out an 8 character value.

CVS r1.109	njl:
Add support for 'h' and 'hh' modifiers for printf(9).

CVS r1.117	phk:
If we ignore an unknown % sequence, we must stop interpreting the remaining
% arguments because the varargs are now out of sync and there is a risk that
we might for instance dereference an integer in a %s argument.

SVN r209836	jkim:
Implement optional 'precision' for numbers.  Previously, it was parsed but
ignored.  Some third-party modules (e.g., APCICA) prefer this format over
zero padding flag '0'.
2010-07-08 22:21:18 +00:00
Randall Stewart
335a2d00c4 If a user calls sctp_sendx() with a NULL
sinfo we will crash. Instead we should provide
our own temp structure to use internally.

MFC after:	1 month
2010-07-07 11:19:06 +00:00
Edward Tomasz Napierala
f59646c2af Fix acl_from_text(3) - and, therefore, setfacl(1) - for user and group
names names starting with a digit.

MFC after:	1 month
2010-07-06 17:20:08 +00:00
Edward Tomasz Napierala
ec1f83f78e Remove comment which didn't match reality for a long time.
Reviewed by:	rwatson
2010-07-05 19:01:10 +00:00
Rebecca Cran
45d35a30bd Increment 'sa' at the end of the loop; otherwise, only the first
address ever gets checked.

Approved by: rrs (mentor)
MFC after: 1 month
2010-07-05 03:55:49 +00:00
Konstantin Belousov
098d0537f2 Extend the td_thrinfo_t to include siginfo for the signal that stopped
the target. Take care of ABI.

Suggested by:	davidxu
MFC after:	2 weeks
2010-07-04 12:08:04 +00:00
Rebecca Cran
3d36ac9877 Use ISO C99 integer types instead of the BSD-specific u_int*_t.
Approved by: rrs (mentor)
2010-07-04 08:09:33 +00:00
Dag-Erling Smørgrav
962cf29525 If the A flag is supplied, http_request() will attempt the request only
once, even if authentication is required, instead of retrying with the
proper credentials.  Fix this by bumping the countdown if the origin or
proxy server requests authentication so that the initial unauthenticated
request does not count as an attempt.

PR:		148087
Submitted by:	Tom Evans <tevans.uk@googlemail.com>
MFC after:	2 weeks
2010-07-01 17:44:33 +00:00
Marcel Moolenaar
af448c52e4 Simplify the calculation of s_scale by rewriting the FP expression to
use uintmax_t instead of float and thereby eliminating the need for
a non-FP version.

Tested on: amd64, ia64 & powerpc (book-E)
Suggested by:	bde
MFC after:	1 month
2010-07-01 00:48:00 +00:00
Marcel Moolenaar
c5e0ba5fe4 On powerpc, calculate s_scale using the non-FP version previously
specific to hp300. Since FreeBSD does not support hp300, hp300 has
been removed from the condition altogether.

The FP version broke profiling on powerpc due to invalid results.
Casting to double instead of float resolved the issue, but with
Book-E not having a FP unit, the non-FP version looked preferrable.
Note that even on AIM hardware the FP version yielded an invalid
value for s_scale, so the problem is most likely with the compiler
or with the expression itself.
2010-06-30 01:40:25 +00:00
Pawel Jakub Dawidek
da6ee3126b Just like in case of setgroups(2), for getgroups(2) also advice including
sys/param.h instead of sys/types.h so we get NGROUPS_MAX and NGROUPS
definitions.
2010-06-26 21:44:05 +00:00
Jayachandran C.
60ddfa2837 use PTR_WORD for __curbrk and minbrk instead of .word, the new version
wil support all ABIs.

Approved by:	rrs (mentor)
2010-06-25 05:36:36 +00:00
Ed Schouten
bfc72ed568 Don't build Clang libs during lib32 build.
This should massively reduce the buildworld time on amd64.

Pointy hat to:	me
2010-06-21 19:44:29 +00:00
Maxim Konovalov
03678e1179 Merge from English r198040: add C message catalogue entries for newer
errnos: EBADMSG, EMULTIHOP, ENOLINK, EPROTO, ENOTCAPABLE.

PR:		docs/147983
Submitted by:	pluknet
MFC after:	1 week
2010-06-20 06:52:10 +00:00
Konstantin Belousov
5c1a5e740f Add unwind annotations to the asm part of crt1 on i386. Terminate the
process with SIGTRAP if _start1() unexpectedly returns.

Reviewed by:	kan
MFC after:	2 weeks
2010-06-18 11:10:39 +00:00
Sean Bruno
5f494640de Much closer approximation of the kernel's calculation of this value.
Reviewed by:	alc
Obtained from:	Yahoo Inc.
2010-06-18 01:17:16 +00:00
Jayachandran C.
9279d32a64 Merge jmallett@'s n64 work into HEAD - changeset 2
Update libc Makefiles.
Add makecontext implementation.

Changes from http://svn.freebsd.org/base/user/jmallett/octeon

Approved by:	rrs(mentor), jmallett
2010-06-16 14:13:36 +00:00
Jayachandran C.
a7c139c0af Merge jmallett@'s n64 work into HEAD - changeset 1.
Update libc assembly code to use macros that work on both o32 and n64.
Merge string functions from NetBSD.

The changes are from http://svn.freebsd.org/base/user/jmallett/octeon

Approved by:	rrs (mentor), jmallett
2010-06-16 12:55:14 +00:00
Jilles Tjoelker
196ff96e78 libedit: Reduce surprising behaviour with filename completion some more:
* Quote '*', '?' and '['. While it may be more useful to expand them to
  matching pathnames, this at least matches with the completion we do.
* '@' is a regular character for filenames. Some other shells do
  @<hostname> completion but we do not.
* Prefix names starting with '-' and '+' with './' so they are not seen as
  options.
2010-06-15 22:23:21 +00:00
Jilles Tjoelker
3d0f8bcd30 libedit: Allow simple quoting in filename completion.
The completer recognizes characters escaped with backslashes as being
literal parts of a word, and adds backslashes to avoid almost all
misinterpretation. In particular, filenames containing spaces can be
completed correctly.

For bug compatibility with the NetBSD version, the improved completion
function has a new name, _el_fn_sh_complete, and _el_fn_complete is
unchanged.

Submitted by:	Guy Yur
2010-06-15 21:34:57 +00:00
Jilles Tjoelker
da8301c83a libedit: Fix a bug that could make completion listings incomplete.
The element matches[0] is the common prefix and is not counted in len, so
subtracting 1 is not needed. A counter for the number of matches per line
was incremented twice.

Submitted by:	Guy Yur
2010-06-15 21:00:53 +00:00
Sean Bruno
bf96595915 Add a new column to the output of vmstat -z to indicate the number
of times the system was forced to sleep when requesting a new allocation.

Expand the debugger hook, db_show_uma, to display these results as well.

This has proven to be very useful in out of memory situations when
it is not known why systems have become sluggish or fail in odd ways.

Reviewed by:	rwatson alc
Approved by:	scottl (mentor) peter
Obtained from:	Yahoo Inc.
2010-06-15 19:28:37 +00:00
Ed Schouten
d5f03e1f81 Remove even two more unneeded files from libllvmsupport. 2010-06-15 17:28:16 +00:00
Ed Schouten
9987dff003 Remove unneeded files from the build.
I used the following command to determine which source files were
unneeded:

| for i in `find lib/clang -name '*.o'`
| do
| 	MATCHES="`(nm -g --defined-only $i; nm -g --defined-only \
| 		usr.bin/clang/clang/clang) | sed -e 's/.* //' | \
| 		sort | uniq -d | wc -l`"
| 	[ $MATCHES -eq 0 ] && echo "$i: unneeded"
| done

This should slightly improve the build times.
2010-06-15 17:08:03 +00:00
Ed Schouten
486d3623ba Unbreak Clang on PowerPC.
It seems GCC 4.2.1 on PowerPC miscompiles Clang, causing it to crash
when building even simple Hello World applications. Switch back to -O1
for this architecture.

Submitted by:	nwhitehorn
2010-06-14 06:23:47 +00:00
Tim Kientzle
2ca090b308 Separate _posix1e_acl_id_to_name() into a separate file, to
break an unnecessary dependency on getpwuid() and getgrgid().

MFC after: 1 month
2010-06-14 02:26:13 +00:00
Jilles Tjoelker
96535454fc libedit: Add basic filename completion code from NetBSD.
This will be used to provide filename completion in sh(1).

Changes from the NetBSD code:
* wide character support disabled, as in the rest of libedit
* config.h and related portability stuff reduced/disabled, as in the rest
  of libedit

Submitted by:	Guy Yur
Obtained from:	NetBSD
2010-06-13 17:04:42 +00:00
Ed Schouten
2a008fddd8 Disable usage of posix_spawn() inside LLVM.
Even though it's nice to use posix_spawn() instead of manually using
fork()/exec(), it's better to disable this. FreeBSD 7 doesn't support
this interface. When enabled, we can't build tblgen, which prevents us
from building FreeBSD 9 on 7.

Tested by:	raj
2010-06-13 12:39:22 +00:00
Kai Wang
b2c6fcf986 * Improve compatibility with existing application code by permitting the
use of `elf_getbase()` on non-archive members. This change is needed
  for gcc LTO (-flto) to work properly.
* Style fix: paranthesize returned values.
* Document the current behaviour of `elf_getbase()`.

Tested by:	gerald, Steve Kargl (original patch)
Obtained from:	elftoolchain
MFC after:	3 days
2010-06-13 10:58:50 +00:00
Warner Losh
4c3cf69727 Merge from tbemd:
Convert from using MACHINE_ARCH to MACHINE_CPUARCH.  Hoist path statement
up into the top Makefile rather than repeating it on every arch Makefile.
2010-06-13 01:27:29 +00:00
Colin Percival
ff847ecb82 In threaded processes, destroy the mutex atexit_mutex when we've
finished using it.  This allows the mutex's allocated memory to be
freed.

This is one sense a rather silly change, since at this point we're
less than a microsecond away from calling _exit; but fixing this
memory leak is likely to make life easier for anyone trying to
track down other memory leaks.
2010-06-13 01:13:36 +00:00