From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: broken locale in 7.0.2 without multibyte support (FreeBSD 4.1-RELEASE) ? |
Date: | 2000-09-17 17:48:37 |
Message-ID: | 6698.969212917@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> I think that the problem might rather be that lower_text (and various
> other arrays) are not declared as unsigned char in the first place. That
> would also explain why -funsigned-chars fixes it. Because calling
> toupper() etc. with a signed char argument is in violation of the spec.
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). So I'm inclined to
go with the latter. A quick search-and-replace scan ought to do it.
Also, on machines where the ctype macros actually are implemented as
array lookups, gcc -Wall should warn about any calls we miss, so as
long as someone is paying attention on such a platform, we don't have
to worry about the problem sneaking back in.
> (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.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-09-17 17:52:10 | Re: Where to stick function setuid |
Previous Message | Peter Eisentraut | 2000-09-17 13:11:17 | Re: Where to stick function setuid |