Prevent alq from panic when the invalid alq_file path specified.

MFC after:	1 week
- Fix the setup of interrupts for banks 2 and 3 on AM335x.

    On AM335x each one of the four GPIO banks has two physical interrupt
    lines, so we now allocate resources and setup our interrupt handler for
    all the (8) available interrupts.

    On OMAP3 and OMAP4 there is only one interrupt for each GPIO bank (6
    banks, 6 interrupts), but there are two set of registers where the
    first one is used to setup the delivery of interrupts to the MPU and
    the second set, setup the delivery of interrupts to the DSP.

    On AM335x, each set of registers controls each one of the interrupt
    lines.

- Remove nonexistent registers for OMAP4 and AM335x, replace their use with
  the correct ones for these SoCs.

- Remove stray whitespace.

Based on OMAP3, OMAP4 and AM335x TRMs.

Tested on Beaglebone-black.
The proper way to request no man pages currently is NO_MAN=xxx. Use it
in preference to the user WITHOUT_MAN knob, which should never be set
in normal src Makefiles.
Convert from WITHOUT_SYSCALL_COMPAT to MK_SYSCALL_COMPAT.
use MK_KERBEROS=no in preference to WITHOUT_KERBEROS
Use MK_CRYPT=no in preference to WITHOUT_CRYPT here.
Document upcoming build option WITH_SORT_THREADS
Convert sort to using newer MK_ convention.
Remove code under PMAP_CACHE_VIVT that is not compiled anymore.

This is for ARMv4/ARMv5 and it doesn't belong in ARMv6 code.

Reviewed by:	ian
The getlogin_basic() function can return a 0 status with a NULL
pointer for the login name (result). Make sure to handle that
case properly. Improve robustness by checking namelen and then
nul-terminating the provided buffer to simplify subsequent logic.

Obtained from:	Juniper Networks, Inc.
MFC after:	1 week
Accept RFC 2292 option values so that RFC 2292 compliant programs that
are unaware of RFC 3542 can construct control messages.

The kernel disallows mixing RFC 2292 behaviour with RFC 3542 behaviour.
Only sockets that have specifically been marked as using the RFC 2292
API can use RFC 2292 specific options. This is all good and well, but
libc itself seems inconsistent with this.

The root cause of this inconsistency seems to relate to the definitions
of IPV6_HOPOPTS and IPV6_DSTOPTS. They are defined in RFC 2292 and re-used
in RFC 3542, yet have distinct values in the kernel. It's for this reason
that the kernel also has definitions for IPV6_2292HOPOPTS and
IPV6_2292DSTOPTS. Not so in libc.

For example: some program calls inet6_option_init() (defined by RFC 2292)
with the RFC 2292 defined IPV6_HOPOPTS and IPV6_DSTOPTS. Before RFC 3542,
this was translated to values of 22 and 23 (resp.) The libc implementation
correctly checks that only options IPV6_HOPOPTS and IPV6_DSTOPTS are given
(as per RFC 2292) but since these defines have taken on the values defined
by RFC 3542 (values 49 and 50 resp,) rejects the correct option values
(22 and 23) passed said program and returns -1.

The precisie fix is to have inet6_option_init() and friends only accept the
RFC 2292 defined IPV6_HOPOPTS & IPV6_DSTOPTS, but that breaks other code
(like mld6query(8)), which seem to not be aware of RFC 3542 and how it
hi-jacked the option names. So the best fix is to accept the options from
both.

Obtained from:	Juniper Networks, Inc.
MFC after:	1 week
Remove hack to pass STAILQ to a function and do it properly instead.

Sponsored by:	The FreeBSD Foundation
In freebsd32_sendmsg(), replace the call to sockargs() followed by a
call to freebsd32_convert_msg_in() with freebsd32_copyin_control() to
readin and convert in a single step. This makes it simpler to put all
the control messages in a single mbuf or mbuf cluster as per the
limitations imposed upon us by ip6_setpktopts().

The logic is as follows:
1.  Go over the array of control messages to determine overall size
    and include extra padding for proper alignment as we go.
2.  Get a mbuf or mbuf cluster as needed or fail if the overall
    (adjusted) size is larger than a cluster.
3.  Go over the array of control messages again, but now copy them
    into kernel space and into aligned offsets.
4.  Update the length of the control message to take padding between
    the header and the data into account (but not for padding added
    between one control message and the next).

Obtained from:	Juniper Networks, Inc.
MFC after:	1 week
run.4: D1 is an mdoc macro, so we have to escape it.

Obtained from:	DragonFlyBSD (357f4b5)
lib: Remove duplicate SUBDIR libnv.

With SUBDIR_PARALLEL, duplicates in ${SUBDIR} cause harmless but verbose
warnings.
Use realloc(9) instead of doing the reallocation inline.

Submitted by:	bde
MFC after:	1 week
Speed up the lookup of interfaces when there are a large number
of them, such in a system with a large number of VLANs.

Submitted by: Nick Rogers
MFC after: 2 weeks
Do not prevent processes from making changes to the baudrate or the
CLOCAL and HUPCL control flags. There are legit reasons for allowing
those to be changed. When /etc/ttys has the "3wire" type (without a
baudrate) for the serial port that is the low-level console, then
this change has no effect.

Obtained from:	Juniper Networks, Inc.
Fix typo (s/teh/the/) in previous commit.

Pointed out by: rpaulo (thanks!)
Make some unwise casts. On i386 these casts wind up being safe. Rather
than disturb the API, go with these casts to shut gcc up.