]> git.ipfire.org Git - thirdparty/krb5.git/commit
Add configure checks for portability assumptions 251/head
authorTom Yu <tlyu@mit.edu>
Mon, 9 Feb 2015 20:02:20 +0000 (15:02 -0500)
committerTom Yu <tlyu@mit.edu>
Mon, 9 Feb 2015 20:02:20 +0000 (15:02 -0500)
commit5e54fa769d1b04ccf0d904164e897d081051647f
tree97fdf670d9b92d4c111f4fcc0e577b93b83364c4
parentb5143bdc766ad4819355ac2cd52f685ec5dafa16
Add configure checks for portability assumptions

Check a few portability assumptions:

* Integers are two's complement.  Testing that the bitwise complement
  of the representation of -1 is zero is sufficient, because C99
  6.2.6.2 only allows sign and magnitude, one's complement, and two's
  complement as representations.

* Integer values with sign bit one and value bits zero are valid and
  not trap representations.  C99 6.2.6.2 allows such a value to be a
  trap representation.  Testing that the declared integer value bounds
  are asymmetric in magnitude is sufficient.

* Conversion of an unsigned integer value that is not representable in
  the corresponding signed type preserves the bit pattern.  C99
  6.3.1.3 says this is implementation-defined, or raises an
  implementation-defined signal.  Exhaustively checking for the
  desired behavior is prohibitive, so this spot check will have to do.

* Bytes are 8 bits
src/configure.in