Tom Lane writes:
> Well, we could fix it either by propagating use of "unsigned char" all
> over the place, or by casting the arguments given to ctype macros.
> The former would be a lot more invasive because it would propagate to
> routines that don't actually call any ctype macros (since they'd have
> to conform to prototypes, struct definitions, etc).
I'm not married to either solution, I just opine that it is cleaner to use
"signed char" and "unsigned char" explicitly when you depend on the
signed-ness. Otherwise you might just end up moving the problem elsewhere,
namely those structs and prototypes, etc.
> > (Hmm, template/aix contains this: CFLAGS='-qchars=signed ...'. That can't
> > be good.)
>
> Probably Andreas put that in --- maybe he still remembers why. But it
> shouldn't matter. We need to be able to run on platforms where char is
> signed and there's no handy "-funsigned-chars" compiler option.
What I meant was that
(a) according to Oleg's report, the source depends on char being unsigned
in some places, so those places break on AIX, and
(b) according to the above, the source apparently requires char to be
signed in some places, so it breaks when char is made unsigned.
*That* can't be good.
--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/