mirror of
https://github.com/postgres/postgres.git
synced 2025-07-11 10:01:57 +03:00
Ensure that all uses of <ctype.h> functions are applied to unsigned-char
values, whether the local char type is signed or not. This is necessary for portability. Per discussion on pghackers around 9/16/00.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.49 2000/11/16 22:30:28 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.50 2000/12/03 20:45:34 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -533,7 +533,7 @@ fitsInFloat(Value *value)
|
||||
ndigits = 0;
|
||||
for (; *ptr; ptr++)
|
||||
{
|
||||
if (isdigit((int) *ptr))
|
||||
if (isdigit((unsigned char) *ptr))
|
||||
ndigits++;
|
||||
else if (*ptr == 'e' || *ptr == 'E')
|
||||
break; /* don't count digits in exponent */
|
||||
|
@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.83 2000/11/16 22:47:44 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.84 2000/12/03 20:45:34 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -478,9 +478,8 @@ other .
|
||||
ScanKeyword *keyword;
|
||||
|
||||
for(i = 0; yytext[i]; i++)
|
||||
if (isascii((int) yytext[i]) &&
|
||||
isupper((int) yytext[i]))
|
||||
yytext[i] = tolower(yytext[i]);
|
||||
if (isupper((unsigned char) yytext[i]))
|
||||
yytext[i] = tolower((unsigned char) yytext[i]);
|
||||
if (i >= NAMEDATALEN)
|
||||
{
|
||||
#ifdef MULTIBYTE
|
||||
|
Reference in New Issue
Block a user