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

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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-18 08:56:13
Message-ID: Pine.LNX.4.21.0009180013270.576-100000@peter
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net http://yi.org/peter-e/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2000-09-18 09:05:18 Re: Constant propagation and similar issues
Previous Message Hannu Krosing 2000-09-18 08:17:57 Re: Notice and share memory corruption