sh: Sync with FreeBSD:

* Expand assignment-like words specially for export/readonly/local.
* Remove unused variables.
* Reset pendingsigs before checking pending traps, not after.
* Track continued jobs (even if not continued by bg or fg).
* Inline waitproc() into its only caller.
* Fix EINTR race condition in "wait" and "set -T" using sigsuspend().
* use setinputfile instead of open/setinputfd.
* Prefer internal nextopt() to libc getopt().
* Use C99 flexible array instead of accessing array beyond bounds.
* Fix two issues when an alias is redefined.
* Detect and flag write errors on stdout in builtins.
* Prefer strsignal() to accessing sys_siglist directly.
* Don't lose $? when backquoted command ends with semicolon or newline.
* Fix crash when parsing '{ } &'.
* Pass $? to command substitution containing compound/multiple commands.
* Simplify cd-hash interaction.
* Remove mkinit's initialization routine.
* Move some stackmarks to fix high memory usage in some loops.
* Show negated commands (!) in jobs output.
* Prefer our character classification functions to <ctype.h>.
* Expand here documents in the current process.
* Do not test for digit_contig in mksyntax.
* Simplify mksyntax
* Fix a crash with the stackmark code.
* If a SIGINT or SIGQUIT interrupts "wait", return status 128+sig.
* When executing a trap, keep exit status along with evalskip.
* Update $FreeBSD$ to include SVN id.

Obtained-from:   FreeBSD
async_rcvd: Remove the dead async rcvd message debug logging

This race does happen.
async_rcvd: Move MSGF_DONE test under async rcvd spinlock

This flag is meant to be protected by the async rcvd spinlock; use
ssleep instead of tsleep if race happened.

Sysctl node kern.ipc.async_rcvd_drop_race is added to count the
number of async rcvd message dropping races.
async_rcvd: Don't add/drop socket reference on hot path

Instead, add reference in tcp_attach(), and drop the reference in
tcp_close()
libc/sl_find: sync prototype with NetBSD

The sl_find function does not modify the 'name' argument.
Set the constant qualifier on it to match NetBSD.  FreeBSD will make this
change in the future as well.

Submitted by: Eitan Eadler <eadler@freebsd.org>
bnx: Add support for BCM5762 chips

Taken-from: tg3
bpf - Remove crit_enter/exit calls.

bpf_token is used to protect the code now, critical sections are no
longer needed.

Pointed-out-by: sephe
bnx: Fix transmit hangs for 57766 and 57765 non-Ax chips

For the 57766 and 57765 non-Ax chips, the PCIe Fast Training Sequence
(FTS) value needs to setup to prevent transmit hangs.

Obtained-from: tg3
bnx: Improve 57766 performance by forcing 2K DMA size

Obtained-from: tg3
kernel -- syscons: Resolve unmatched PHOLD() for MOUSE_MODE ioctl.

When a syscons process put itself into MOUSE_MODE, a process-hold
was being placed to stabilize the process for signal delivery. The
hold was not being released on process exit, however.

This change reworks syscons to install a per-process flag as to
whether it is in MOUSE_MODE or not and to remove the excess hold on
exit(). It also cleans up the error handling and prevents stale
process pointers from lingering in syscons stat structures.

Reported-by: mneumann, Studbolt
Closes-bug: 2521
libc/libthread_xu - Fix segfault caused by libpthread used before initialised

If a binary has libpthread as dependency and is linked against libintl,
or any other library that uses pthread locking primitives from libc
without depending on libpthread itself it can happen that functions
from libpthread are called before libpthread's constructor has been
called. This leads to a segfault.

This fix adds a weak symbold to libc, namely _pthread_init_early,
which is called from a libc constructor function and therefore makes
sure that libpthread is initialised early enough.

Thanks to Simon Schubert, Angelos Oikonomopoulos, and Sascha Wildner
for the support in debugging this.
libthread_xu: Remove unnecessary calls to _thr_check_init()

With the previous commit it becomes unnecessary to check whether
libpthread has been initialised. This gets rid of some checks in
hot codepaths.
pcidevs: Add device ID for Sundance ST201
ste: Add another PCI device ID for Sundance ST201

DragonFly-bug: http://bugs.dragonflybsd.org/issues/2529
Merge branch 'master' into gsocdrm_merger
vr: Remove extra VR_ISR_RX_NOBUF test

Pointed-out-by: swildner@
tcp: Cache align tcp_stats

- tcp_stats is padded to multiple cache line size; add comment about it
- Cache align the per-cpu tcp_stats array
kernel/acpi: Fix -Wundef.
kernel/wlan: Fix -Wundef.
kernel/virtio: Fix -Wundef.