Re: Re: [PORTS] Locale bug

From: Giles Lean <giles(at)nemeton(dot)com(dot)au>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Andriy I Pilipenko <bamby(at)marka(dot)net(dot)ua>, pgsql-patches(at)postgresql(dot)org, pgsql-ports(at)postgresql(dot)org
Subject: Re: Re: [PORTS] Locale bug
Date: 2000-06-16 09:28:17
Message-ID: 10189.961147697@nemeton.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches pgsql-ports


> Can someone comment on this?

The ctype functions operate for unsigned characters. I think it's a
K&R C hangover that they take int arguments, as anything smaller than
int was widened as it was passed in a function call.

There are plenty of platforms where 'char' is a signed type, including
HP-UX on PA-RISC and some NetBSD but not all NetBSD ports.

> > othercase(ch)
> > int ch;
> > {
> > ...
> > return toupper(ch);

That's definitely not OK. toupper((unsigned char) ch) is. I'm not
familiar enough with the code that is being patched to comment on the
patch that was offered, sorry.

Regards,

Giles

Browse pgsql-patches by date

  From Date Subject
Next Message Jan Wieck 2000-06-16 12:42:12 Re: Big 7.1 open items
Previous Message Tom Lane 2000-06-16 07:34:47 Re: Big 7.1 open items

Browse pgsql-ports by date

  From Date Subject
Next Message Mariusz Topczewski 2000-06-16 09:56:30 Postgresql 7 on Win2000
Previous Message Steve Núñez 2000-06-16 01:41:54 Re: BSDI regression tests