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

pgsql: Fix unportable usages of tolower().

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix unportable usages of tolower().
Date: 2008-03-01 03:26:44
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committers
Log Message:
Fix unportable usages of tolower().  On signed-char machines, it is necessary
to explicitly cast the output back to char before comparing it to a char
value, else we get the wrong result for high-bit-set characters.  Found by
Rolf Jentsch.  Also, fix several places where <ctype.h> functions were being
called without casting the argument to unsigned char; this is likewise
unportable, but we keep making that mistake :-(.  These found by buildfarm
member salamander, which I will desperately miss if it ever goes belly-up.


Modified Files:
        like_match.c (r1.20 -> r1.20.2.1)
        execute.c (r1.76 -> r1.76.2.1)
        preproc.y (r1.359.2.1 -> r1.359.2.2)

pgsql-committers by date

Next:From: Magnus HaganderDate: 2008-03-01 09:57:32
Subject: Re: pgsql: Fix handling of restricted processes for Windows Vista (mainly),
Previous:From: Tom LaneDate: 2008-03-01 03:26:35
Subject: pgsql: Fix unportable usages of tolower().

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