Re: broken locale in 7.0.2 without multibyte support (FreeBSD 4.1-RELEASE) ?

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: broken locale in 7.0.2 without multibyte support (FreeBSD 4.1-RELEASE) ?
Дата
Msg-id Pine.LNX.4.21.0009180013270.576-100000@peter
обсуждение исходный текст
Ответ на Re: broken locale in 7.0.2 without multibyte support (FreeBSD 4.1-RELEASE) ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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/



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Philip Warner
Дата:
Сообщение: Re: Constant propagation and similar issues
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: Notice and share memory corruption