MFC	r256448, r257029;

Make di_blocks unsigned in UFS1 as is the case already for UFS2.
 Most of the code between UFS1 and UFS2 is shared so this change
 is pretty safe. Not only this makes UFS1 and 2 consistent but it
 also matches what NetBSD and MacOS X have for some years now.

UFS2: make di_extsize unsigned.
 di_extsize is the EA size and as such it should be unsigned.
 Adjust related types for consistency.

Reviewed by:	mckusick
MFC r241959:

Fix a number of other clang warnings in libstdc++, which could appear
when building other C++ software with it.  Also fix one actual bug in
libsupc++, which was exposed by such a warning.  This latter fix is the
only functional change.

This is required for newer versions of gcc and clang which have
stricter warnings about parenthesis in C++ programs.
MFC r258712;

libcpp: fix an underflow.

Similar fix seen in Apple's gcc42.

Obtained from:	OpenBSD (Rev 1.2)
MFC after:	2 weeks
MFC r244673:

Fix the __glibcxx_min and __glibcxx_max macros for a signed wchar_t.

This seems to be needed by newer compilers.
MFC r257987:
  Initialize prot variable.

  PR:		177417
MFC r259286,259424,259425:
  Apply patch from upstream Heimdal for encoding fix

  RFC 4402 specifies the implementation of the gss_pseudo_random()
  function for the krb5 mechanism (and the C bindings therein).
  The implementation uses a PRF+ function that concatenates the output
  of individual krb5 pseudo-random operations produced with a counter
  and seed.  The original implementation of this function in Heimdal
  incorrectly encoded the counter as a little-endian integer, but the
  RFC specifies the counter encoding as big-endian.  The implementation
  initializes the counter to zero, so the first block of output (16 octets,
  for the modern AES enctypes 17 and 18) is unchanged.  (RFC 4402 specifies
  that the counter should begin at 1, but both existing implementations
  begin with zero and it looks like the standard will be re-issued, with
  test vectors, to begin at zero.)

  This is upstream's commit f85652af868e64811f2b32b815d4198e7f9017f6,
  from 13 October, 2013:
  % Fix krb5's gss_pseudo_random() (n is big-endian)
  %
  % The first enctype RFC3961 prf output length's bytes are correct because
  % the little- and big-endian representations of unsigned zero are the
  % same.  The second block of output was wrong because the counter was not
  % being encoded as big-endian.
  %
  % This change could break applications.  But those applications would not
  % have been interoperating with other implementations anyways (in
  % particular: MIT's).

Bump __FreeBSD_version accordingly and add a note in UPDATING.

Approved by:	hrs (mentor, src committer)
Fix build breakage after r259449

Approved by:	hrs (mentor, src committer)
MFC r258819,258928:

Add new sysctl, kern.supported_archs, containing the list of FreeBSD
MACHINE_ARCH values whose binaries this kernel can run. This patch provides
a feature requested for implementing pkgng ABI identifiers in a robust
way.

The list is designed to indicate whether, say, an i386 package can be run on
the current system. If kern.supported_abis contains "i386", then the answer
is yes. Otherwise, the answer is no.

At the moment, this only supports MACHINE_ARCH and MACHINE_ARCH32. As we
gain support for more interesting combinations, this needs to become more
flexible, possibily through the sysent framework, along with the
hw.machine_arch emulation immediately preceding this code in kern_mib.c.

Reviewed by:	imp
MFC r259023 and r259095:
Improve the XHCI command timeout recovery handling code.
Fix some typos while at it.
MFC r259248 and r259462:
Set chain bit correctly. This will fix some problems sending and
receiving Zero Length Packets, ZLPs. See comment in code for more
information.
MFC r258363:

Add alternate ID for Novatel MiFi 2200 CDMA, which is used by my
Virgin Mobile branded device.  It needs the U3GINIT_SCSIEJECT quirk.
MFC of 259626, tzdata2013i:

Removed support for solar-time-based time zones
Jordan stays at summer time this year.
Fix historical data for Cuba