c: improve patch for UCHAR_MAX etc. problem
commit3f320159e32870bbba3b526da3290880bb15debc
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 10 Oct 2019 19:04:26 +0000 (10 12:04 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 10 Oct 2019 19:08:42 +0000 (10 12:08 -0700)
tree8741451b783ac2930381d66d41c381f43b833a32
parentf41e0cf73cba064f828ae3faa32cbd55ad15d19a
c: improve patch for UCHAR_MAX etc. problem

* data/skeletons/c.m4 (b4_c99_int_type_define): Reorder to put the
signed types first, since they’re simpler and this keeps similar
code closer.  For signed types, don’t bother checking whether the
type promotes to int since the type must be signed anyway.  For
unsigned types, protect a test like ‘UCHAR_MAX <= INT_MAX’ with
‘!defined __UINT_LEAST8_MAX__’, as otherwise the logic is wrong
for oddball platforms; and once we do that, there should no need
for ‘defined INT_MAX’ so remove that.
data/skeletons/c.m4