Be more careful about signed vs. unsigned char
authorStephen Frost <sfrost@snowman.net>
Thu, 16 Mar 2017 04:13:37 +0000 (00:13 -0400)
committerStephen Frost <sfrost@snowman.net>
Thu, 16 Mar 2017 04:13:37 +0000 (00:13 -0400)
commitcccbddeb1483b85f1853a29dc3b6464647b91eee
treefac5ca3d0a4840364000da701ca405267adfae57
parent7821f7229c6e149046ee0dd8cab57928c4f86a37
Be more careful about signed vs. unsigned char

The buildfarm has reminded me that not all systems consider char to be
signed and we need to be explicit.  Adjust the various bits of mac8.c
for what we intend, mostly using casts to unsigned char as suggested by
Tom, and adjust the tests for valid input accordingly.  Explicitly make
the hexlookup table signed as it's useful to use -1 there to indicate an
invalid value.
src/backend/utils/adt/mac8.c