pgsql: Fix unportable usages of tolower(). - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix unportable usages of tolower().
Date
Msg-id 20080301032635.280A4754108@cvs.postgresql.org
Whole thread Raw
List 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:
--------------
    pgsql/src/backend/utils/adt:
        like_match.c (r1.20 -> r1.21)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/like_match.c?r1=1.20&r2=1.21)
    pgsql/src/interfaces/ecpg/ecpglib:
        execute.c (r1.76 -> r1.77)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/ecpglib/execute.c?r1=1.76&r2=1.77)
    pgsql/src/interfaces/ecpg/preproc:
        preproc.y (r1.361 -> r1.362)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/preproc/preproc.y?r1=1.361&r2=1.362)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Disable the undocumented xmlvalidate() function, which was
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix unportable usages of tolower().