MFC r233473,233512,233518,233992,233994,238808,238920,250209-250211.

libc/locale: sync mdoc changes with head.

 r233473:
  mdoc: document title should be all caps.

 r233512:
  mdoc: remove empty lines.

 r233518:
  mdoc: remove unknown macro.

 r233992:
  mdoc: fix column names, indentation, column separation within each row, and
  quotation. Also make sure we have the same amount of columns in each row as
  the number of columns we specify in the head arguments.

 r233994:
  mdoc: fix function type.

 r238808:
  Start manpage with Dd macro and also remove a trailing whitespace
  while here.

 r238920:
  Remove trailing whitespace.

 r250209:
  querylocale(3): remove the STANDARDS section.

 r250210,r250211:
  Remove an extra comma, add a missing period.


git-svn-id: svn://svn.freebsd.org/base/stable/9@250213 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r228269,228921:

- libc: Eliminate 13 relative relocations in wctype().
- libc: Eliminate some relative relocations in setlocale().


git-svn-id: svn://svn.freebsd.org/base/stable/9@250215 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r244091:

Improve style(9) compliance of function declarations.


git-svn-id: svn://svn.freebsd.org/base/stable/9@250216 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r250000:
  Move IPPROTO_IPV6 from #ifdef __BSD_VISIBLE to #if __POSIX_VISIBLE >= 201112
  since POSIX 2001 states that it shall be defined.


git-svn-id: svn://svn.freebsd.org/base/stable/9@250228 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r249983: syslogd: Use closefrom() instead of getdtablesize()/close()
loop.

When syslogd forks a process for '|' destinations, it closes all file
descriptors greater than 2.

Use closefrom() for this instead of a getdtablesize()/close() loop because
it is both faster and avoids leaving file descriptors open because the limit
was lowered after they were opened.


git-svn-id: svn://svn.freebsd.org/base/stable/9@250232 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r245304 (by theraven):

  Merge new version of libcxxrt.  This brings in three fixes:

  - Don't treat pointers to members as pointers in catch blocks
    (they're usually fat pointers).

  - Correctly catch foreign exceptions in catchalls.

  - Ensure that a happens-before relationship is established when
    setting terminate handlers in one thread and calling them in
    another.

MFC r245327 (by theraven):

  Fix libcxxrt / libc++ build with the clang in head.

  Pointy hat to:	theraven

MFC r245745 (by theraven):

  Import new fix from libcxxrt.  This fixes the case where you attempt
  to rethrow an exception when you haven't caught one.  This is largely
  a cosmetic fix, as (unless you have a very unusual terminate handler
  installed) it will print a nice error and then abort, rather than
  just aborting.

MFC r246462 (by theraven):

  Fix a copy-and-paste error in libcxxrt.

MFC r249993:

  Merge libcxxrt c812a07cd2f95c1403baf0bbe0366e7618d1d6d3:

  * Don't call the _fast version of the TLS accessor in terminate() or
    unexpected().
    1) TLS may not have been set up yet.
    2) When we're in one of these functions, Really Bad Stuff has
       happened and potentially saving a few cycles really isn't
       important.
  * Merge in fixes from FreeBSD trunk to make atomics work with recent
    clang.


git-svn-id: svn://svn.freebsd.org/base/stable/9@250241 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r248933:

Use a shared lock for VOP_GETEXTATTR, as it is a read-like operation.


git-svn-id: svn://svn.freebsd.org/base/stable/9@250248 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: r249623
Both NFS clients can deadlock when using the "rdirplus" mount
option. This can occur when an nfsiod thread that already holds
a buffer lock attempts to acquire a vnode lock on an entry in
the directory (a LOR) when another thread holding the vnode lock
is waiting on an nfsiod thread. This patch avoids the deadlock by disabling
readahead for this case, so the nfsiod threads never do readdirplus.
Since readaheads for directories need the directory offset cookie
from the previous read, they cannot normally happen in parallel.
As such, testing by jhb@ and myself didn't find any performance
degredation when this patch is applied. If there is a case where
this results in a significant performance degradation, mounting
without the "rdirplus" option can be done to re-enable readahead
for directories.


git-svn-id: svn://svn.freebsd.org/base/stable/9@250257 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: r249630
When an NFS unmount occurs, once vflush() writes the last dirty
buffer for the last vnode on the mount back to the server, it
returns. At that point, the code continues with the unmount,
including freeing up the nfs specific part of the mount structure.
It is possible that an nfsiod thread will try to check for an
empty I/O queue in the nfs specific part of the mount structure
after it has been free'd by the unmount. This patch avoids this problem by
setting the iodmount entries for the mount back to NULL while holding the
mutex in the unmount and checking the appropriate entry is non-NULL after
acquiring the mutex in the nfsiod thread.


git-svn-id: svn://svn.freebsd.org/base/stable/9@250258 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r250026:

Convert panic() into KASSERT().


git-svn-id: svn://svn.freebsd.org/base/stable/9@250262 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r250028:
Assert that the object type for the vnode' non-NULL v_object, passed
to vnode_pager_setsize(), is either OBJT_VNODE, or, if vnode was
already reclaimed, OBJT_DEAD.

More, if the object is terminated, do not perform the resizing operation.


git-svn-id: svn://svn.freebsd.org/base/stable/9@250263 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge r246619 from head:
  Correct spelling of "daemon".  No .Dd bump.
  Noticed by:   Nathan Rich <Nathan.Rich dynastysystems com>


git-svn-id: svn://svn.freebsd.org/base/stable/9@250277 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge r247915 from head:
  The ZyXEL ZyAIR G-202 is also supported by zyd(4)


git-svn-id: svn://svn.freebsd.org/base/stable/9@250278 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge r247961 from head:
  Support the FAT16 partition type in gpart(8)

PR:		kern/174714
Submitted by:	4721 at hushmail dot com


git-svn-id: svn://svn.freebsd.org/base/stable/9@250287 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge r248175 from head:
  Add support for Optoelectronics USB barcode readers to uftdi(4).
  Add entries for other Optoelectronics devices to usbdevs.


git-svn-id: svn://svn.freebsd.org/base/stable/9@250288 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge remote-tracking branch 'upstream/svn_stable_9' into svn_stable_9