1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

Fix bugs in plpgsql and ecpg caused by assuming that isspace() would only

return true for exactly the characters treated as whitespace by their flex
scanners.  Per report from Victor Snezhko and subsequent investigation.

Also fix a passel of unsafe usages of <ctype.h> functions, that is, ye olde
char-vs-unsigned-char issue.  I won't miss <ctype.h> when we are finally
able to stop using it.
This commit is contained in:
Tom Lane
2006-09-22 21:39:58 +00:00
parent 6d0efd3a09
commit beca984e5f
19 changed files with 112 additions and 61 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/port/path.c,v 1.67 2006/09/11 20:10:30 tgl Exp $
* $PostgreSQL: pgsql/src/port/path.c,v 1.68 2006/09/22 21:39:58 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -69,7 +69,7 @@ skip_drive(const char *path)
while (*path && !IS_DIR_SEP(*path))
path++;
}
else if (isalpha(path[0]) && path[1] == ':')
else if (isalpha((unsigned char) path[0]) && path[1] == ':')
{
path += 2;
}