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

Re: [PORTS] Locale bug

From: bamby <bamby(at)marka(dot)net(dot)ua>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Giles Lean <giles(at)nemeton(dot)com(dot)au>
Cc: pgsql-patches(at)postgresql(dot)org, pgsql-ports(at)postgresql(dot)org
Subject: Re: [PORTS] Locale bug
Date: 2001-01-24 19:41:09
Message-ID: Pine.BSF.4.05.10101242101040.22288-100000@hawk1.marka.net.ua (view raw or flat)
Thread:
Lists: pgsql-patchespgsql-ports
On Wed, 24 Jan 2001, Bruce Momjian wrote:

> 
> Is this still an issue on FreeBSD?  Do we need to disable this problem
> somehow?

This is still actual problem on recent FreeBSD 4.2-STABLE. And I
successfully resolved this problem with my patch on several FreeBSD
installations of PostgreSQL including version 7.0.3. 

As to comments on the patch, I found only one.

On Fri, 16 Jun 2000, Giles Lean wrote:

> 
> > 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.

FreeBSD have signed char by default too and this is the main piece of the
problem.

> > >   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.

This comment refers to original code, not to patched one. 

  Kind regards,
  Andriy I Pilipenko
  PAI1-RIPE


In response to

pgsql-ports by date

Next:From: Tom LaneDate: 2001-01-25 04:14:01
Subject: Re: Re: [PORTS] Locale bug
Previous:From: Bruce MomjianDate: 2001-01-24 14:35:00
Subject: Re: DEC UNIX

pgsql-patches by date

Next:From: Barry LindDate: 2001-01-24 21:27:34
Subject: PATCH for arrayindexoutofbounds exception in latest code
Previous:From: Dave PageDate: 2001-01-24 17:03:50
Subject: RE: [PATCHES] ODBC Patch for OJs/Large Querys & Rows

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