Really import mdocml version 1.12.3 and not a preliminary tarball.
Make ufs_dirhashreclaimperc a percentage for real and
rename it to ufs_dirhashreclaimpercent, as suggested
by jhb@. As an added bonus this avoids divide-by-zero
errors.

Requested by:	jhb, markj
Reviewied by:	jhb, markj
Use the correct variable name.
Add a new soeliminate(1) command

mandoc(1) does not provide an equivalent of the GNU groff's soelim(1) as an
external binary. It does provide the funcitonnality but internally.

Lots if manpages in ports uses ".so" directives to include the content of
another manpage, which works properly if the manpages are not compressed.
With compressed manpages it will fail. So we need to preprocess those manpages
with soelim(1) before compressing them.

soeliminate(1) add the minimum functionnality from soelim(1) required for that
task, in order to still be able to prepare properly those manpages in case we
ship the base system only with mandoc as a manpage renderer.

soeliminate(1) accept all the arguments from soelim(1) for compatibility but
only '-I dir' is really functionnal.

Name it soeliminate and not soelim, so groff from base or ports can still call
soelim(1) for its internal use and avoid potential incompatibilities

MFC after:	1 month
Revert accidently message Makefile from 274836 and connect soeliminate(1)
When doing a PREREAD sync of an mbuf-type dma buffer, do a writeback of
the first cacheline if the buffer start address is not on a cacheline
boundary.  Normally a buffer which is not cacheline-aligned is bounced,
but a special rule applies for mbufs, which are always misaligned due to
the header.  We know the cpu will not write to the header while dma is in
progress (so we've been told anyway), but it may have written to the
header shortly before starting a read, so we need to flush that write out
to memory before invalidating the whole buffer.

In collaboration with Mical Meloun and Svata Kraus.
Make iSCSI frontend less chatty while waiting for tasks termination.

MFC after:	1 week
Remove examples of gif_interfaces and gifconfig.  These have already been
marked as deprecated in rc.conf(5) manual page but these examples
were still here.

Spotted by:	jmg
Use correct length mask for split transactions. The hardware would
sometimes put non-zero values in the upper length bits, which are
available for high-speed-only USB transactions, breaking the reception
of data.
Move icl_pdu_get_data() and xpt_done() out of initiator's session lock.

During heavy reads data copying in icl_pdu_get_data() may consume large
percent of CPU time.  Moving it out of the lock significantly reduces
lock hold time and respectively lock congestion on read operations.

MFC after:	2 weeks
Fix use-after-free introduced in r274843.

I've missed that iscsi_outstanding_remove() frees the second pointer,
so it should no longer be used.  And in fact we don't really need to.

MFC after:	2 weeks
Fix the following -Werror warning from clang 3.5.0, while building
usr.bin/cpio on amd64 (or any arch with 64-bit time_t):

contrib/libarchive/cpio/cpio.c:1143:6: error: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
        if (abs(mtime - now) > (365/2)*86400)
            ^
contrib/libarchive/cpio/cpio.c:1143:6: note: use function 'labs' instead
        if (abs(mtime - now) > (365/2)*86400)
            ^~~
            labs
1 error generated.

This is because time_t is a long on amd64. To avoid the warning, just
copy the equivalent test from a few lines before, which is used in the
Windows case, and which is type safe.

Reviewed by:	emaste
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D1198
Fix the following -Werror warnings from clang 3.5.0, while building
usr.bin/locate:

usr.bin/locate/locate/util.c:249:29: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                            MAXPATHLEN, abs(i) < abs(htonl(i)) ? i : htonl(i));
                                                 ^
usr.bin/locate/locate/util.c:249:29: note: remove the call to 'abs' since unsigned values cannot be negative
                            MAXPATHLEN, abs(i) < abs(htonl(i)) ? i : htonl(i));
                                                 ^~~
usr.bin/locate/locate/util.c:274:32: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                            MAXPATHLEN, abs(word) < abs(htonl(word)) ? word :
                                                    ^
usr.bin/locate/locate/util.c:274:32: note: remove the call to 'abs' since unsigned values cannot be negative
                            MAXPATHLEN, abs(word) < abs(htonl(word)) ? word :
                                                    ^~~

The problem is that ntohl() always returns an unsigned quantity.  In
this case, it's expected to be cast back to a signed integer, but to
stop complaints about abs() we just store it into an integer, and don't
call ntohl() again.

Reviewed by:	ngie
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D1196
Enforce -lpthread and -lc to always be the 2 last components of the link list

Differential Revision:	https://reviews.freebsd.org/D1118
Suggested by:		kib
Add libm to eliminate "undefined reference to sqrt" on arm 'softfp' builds.
Fix build with asr driver

This was broken by r274819 as asr is not in GENERIC because its not 64bit
safe.

MFC after:	1 month
X-MFC-With:	r274819
Sponsored by:	Multiplay
For both iSCSI initiator and target increase socket buffer sizes before
establishing connection.

This is a workaround for Chelsio TOE driver, that does not update socket
buffer size in hardware after connection established, and unless that is
done beforehand, kernel code will stuck, attempting to send/receive full
PDU at once.

MFC after:	1 week
sh: Use DQSYNTAX only while expanding, not SQSYNTAX.

Quoting during expansion only cares about CCTL, which is the same for
DQSYNTAX and SQSYNTAX.
Avoid undefined behaviour in gas's rotate_left() macro for n == 0.
Otherwise, clang can effectively remove the first iteration of the for
loops where this macro is invoked, and as a result, "cmp r0, #99" fails
to assemble.

Obtained from:	joerg at netbsd
MFC after:	3 days
Cross-reference automount(8) from mount(8).

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation