Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-patchespgsql-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



pgsql-ports by date

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

pgsql-patches by date

Next:From: Jan WieckDate: 2000-06-16 12:42:12
Subject: Re: Big 7.1 open items
Previous:From: Tom LaneDate: 2000-06-16 07:34:47
Subject: Re: Big 7.1 open items

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group