Fix unportable usages of tolower(). On signed-char machines, it is necessary
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 1 Mar 2008 03:26:44 +0000 (03:26 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 1 Mar 2008 03:26:44 +0000 (03:26 +0000)
commit3df9100cd960c682ab78c015a344925fab52b988
treecee24782c3c1e8397333c3ddfdea86f9120ce37f
parent1328b735ee0f228aa2357d2140bc23c88f2eb7ce
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.
src/backend/utils/adt/like_match.c
src/interfaces/ecpg/ecpglib/execute.c
src/interfaces/ecpg/preproc/preproc.y