1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Fix some more compatibility issues (ctype.h macros must never be passed

signed chars...)
This commit is contained in:
Tom Lane
2004-04-02 00:41:18 +00:00
parent eeaef25ad6
commit 89ee5b89a6
3 changed files with 14 additions and 13 deletions

View File

@ -310,7 +310,7 @@ gettoken_tsvector(TI_IN_STATE * state)
}
else if (state->state == INPOSINFO)
{
if (isdigit(*(state->prsbuf)))
if (isdigit((unsigned char) *(state->prsbuf)))
{
if (state->alen == 0)
{
@ -373,9 +373,10 @@ gettoken_tsvector(TI_IN_STATE * state)
errmsg("syntax error")));
state->pos[*(uint16 *) (state->pos)].weight = 0;
}
else if (isspace(*(state->prsbuf)) || *(state->prsbuf) == '\0')
else if (isspace((unsigned char) *(state->prsbuf)) ||
*(state->prsbuf) == '\0')
return 1;
else if (!isdigit(*(state->prsbuf)))
else if (!isdigit((unsigned char) *(state->prsbuf)))
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("syntax error")));