Commit Graph

13177 Commits

Author SHA1 Message Date
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
David Schultz
efd0f253c2 Introduce __isnanf() as an alias for isnanf(), and make the isnan()
macro expand to __isnanf() instead of isnanf() for float arguments.
This change is needed because isnanf() isn't declared in strict POSIX
or C99 mode.

Compatibility note: Apps using isnan(float) that are compiled after
this change won't link against an older libm.

Reported by:	Florian Forster <octo@verplant.org>
2010-06-12 17:32:05 +00:00
Ed Schouten
c1fe4c5343 Do the branding right this time.
I've looked at other places in the source tree where CLANG_VENDOR is
used and I suspect it might not be safe to use newlines here.
CLANG_VENDOR should just be defined to "FreeBSD ", just like the latest
Clang preview in OS X uses "Apple ". Properly use SVN_REVISION to define
it to the imported revision of Clang. I do want to have a date in there,
so slightly modify the code to support CLANG_VENDOR_SUFFIX.
2010-06-12 15:13:36 +00:00
Xin LI
6701e403de Detect bit endianness through machine/endian.h. This fixes xz on big-endian
systems.

Tested on:	sparc64 (kindly provided by linimon), amd64
2010-06-11 22:29:49 +00:00
Rebecca Cran
cefac273a4 sctp_recvmsg returns the number of bytes received, not sent.
Approved by:	rrs (mentor)
MFC after:	1 month
2010-06-11 18:43:55 +00:00
Ulrich Spörlein
a6dcdf3b5f mdoc: stop abusing -column lists and use .Bl -tag instead 2010-06-11 06:03:54 +00:00
Ulrich Spörlein
134d45e8c6 mdoc nitpicking: the title argument shall be uppercase 2010-06-11 06:03:47 +00:00
Ed Schouten
3e241e2e08 Disable usage of __DATE__.
This ensures that the Clang binary doesn't change checksums every time
it's built.
2010-06-10 12:15:09 +00:00
Ed Schouten
8089dccd09 Brand our Clang binary.
That way it's easier for the Clang folks to keep track of what we're
doing.
2010-06-10 12:06:35 +00:00
Roman Divacky
6513cfc82f Hook clang into the build on i386/amd64/powerpc.
Approved by:	ed (mentor)
2010-06-09 19:57:20 +00:00
Roman Divacky
47c832c3dd Import the build makefiles for clang/LLVM.
Approved by:	ed (mentor)
2010-06-09 19:32:20 +00:00
Ulrich Spörlein
df26753b39 mdoc: spell out theta, the Unicode glyph is hard to read for terminal fonts
It is referred to as "theta" later in the document anyway,
so stop being fancy.
2010-06-09 07:31:32 +00:00
Ulrich Spörlein
ef8a3e5cf2 mdoc: remove literal tabs where they don't belong 2010-06-08 16:48:59 +00:00
Fabien Thomas
d66caf62a2 Fix memory leak on error.
Found with:	Coverity Prevent(tm)
MFC after:	1 month
2010-06-05 23:00:02 +00:00
Edward Tomasz Napierala
eec80038e3 Don't use pointer to 64 bit value (id_t) to point to 32 bit value (uid_t).
Found with:	Coverity Prevent
CID:		7466, 7467
MFC after:	2 weeks
2010-06-05 07:40:32 +00:00
Edward Tomasz Napierala
a3a11ad455 Don't forget to free the string in error case.
Found with:	Coverity Prevent
CID:		6585
2010-06-03 14:51:29 +00:00
Edward Tomasz Napierala
d72fb30a43 _posix1e_acl_sort() never returns anything other than 0; change its
return type to void and update callers.  This simplifies code and
fixes one place where the returned value was not actually checked.

Found with:	Coverity Prevent
CID:		4791
2010-06-03 14:29:17 +00:00
Edward Tomasz Napierala
7945d60d1e Fix usage of uninitialized variable.
Found with:	Coverity Prevent
CID:		7517
MFC after:	2 weeks
2010-06-03 14:27:18 +00:00
Edward Tomasz Napierala
18c12a53a1 The 'acl_cnt' field is unsigned; no point in checking if it's >= 0.
Found with:	Coverity Prevent
CID:		6192
2010-06-03 14:16:58 +00:00
Edward Tomasz Napierala
d243a85e99 The 'acl_cnt' field is unsigned; no point in checking if it's >= 0.
Found with:	Coverity Prevent
CID:		6193
2010-06-03 14:15:08 +00:00
Ulrich Spörlein
e3303e900e mdoc: spell macros correctly, there's no need for the backslash escape 2010-06-02 10:20:38 +00:00
Ulrich Spörlein
e10c1be450 mdoc cleanup
Garbage collect unused sections, macros and arguments. Fix prologue and
remove empty lines.

Found by: mdocml
2010-06-02 10:20:23 +00:00
Ulrich Spörlein
b27f498819 mdoc: Use mdoc macro for the (R) symbol
While here, also drop the unneeded quotes
2010-05-27 13:56:33 +00:00
Ulrich Spörlein
25c8b07fc2 mdoc: Garbage collect unused/unneeded macros 2010-05-27 13:56:27 +00:00