aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-12-30 23:09:42 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-12-30 23:09:42 +0000
commitee051baeac9dce2dbfd5da50da21ae425b548c43 (patch)
treee1e24cb9f15642b9359eaf9bf6f8940bf9f76efc /src
parente7d9a6bf630e8784fc1723d138e4e4e973550017 (diff)
downloadpostgresql-ee051baeac9dce2dbfd5da50da21ae425b548c43.tar.gz
postgresql-ee051baeac9dce2dbfd5da50da21ae425b548c43.zip
Make sure that all <ctype.h> routines are called with unsigned char
values; it's not portable to call them with signed chars. I recall doing this for the last release, but a few more uncasted calls have snuck in.
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/adt/datetime.c6
-rw-r--r--src/interfaces/odbc/connection.c2
-rw-r--r--src/interfaces/odbc/convert.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c
index 674eaeb91a1..49e93abe99a 100644
--- a/src/backend/utils/adt/datetime.c
+++ b/src/backend/utils/adt/datetime.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.85 2001/12/29 21:28:18 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.86 2001/12/30 23:09:41 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -959,7 +959,7 @@ DecodeDateTime(char **field, int *ftype, int nf,
if (tzp == NULL)
return -1;
- if (isdigit(*field[i]) || ptype != 0)
+ if (isdigit((unsigned char) *field[i]) || ptype != 0)
{
char *cp;
@@ -1573,7 +1573,7 @@ DecodeTimeOnly(char **field, int *ftype, int nf,
/* otherwise, this is a time and/or time zone */
else
{
- if (isdigit(*field[i]))
+ if (isdigit((unsigned char) *field[i]))
{
char *cp;
diff --git a/src/interfaces/odbc/connection.c b/src/interfaces/odbc/connection.c
index e39501f8007..e057d7b73f9 100644
--- a/src/interfaces/odbc/connection.c
+++ b/src/interfaces/odbc/connection.c
@@ -1092,7 +1092,7 @@ CC_send_query(ConnectionClass *self, char *query, QueryInfo *qi)
ReadyToReturn = FALSE;
empty_reqs = 0;
- for (wq = query; isspace(*wq); wq++)
+ for (wq = query; isspace((unsigned char) *wq); wq++)
;
if (*wq == '\0')
empty_reqs = 1;
diff --git a/src/interfaces/odbc/convert.c b/src/interfaces/odbc/convert.c
index 57bf6b70dfc..0b609a07dbe 100644
--- a/src/interfaces/odbc/convert.c
+++ b/src/interfaces/odbc/convert.c
@@ -193,7 +193,7 @@ timestamp2stime(const char *str, SIMPLE_TIME *st, BOOL *bZone, int *zone)
}
for (i = 1; i < 10; i++)
{
- if (!isdigit(rest[i]))
+ if (!isdigit((unsigned char) rest[i]))
break;
}
for (; i < 10; i++)
@@ -1351,7 +1351,7 @@ copy_statement_with_parameters(StatementClass *stmt)
while (isspace((unsigned char) old_statement[++opos]));
}
if (strnicmp(&old_statement[opos], "call", lit_call_len) ||
- !isspace(old_statement[opos + lit_call_len]))
+ !isspace((unsigned char) old_statement[opos + lit_call_len]))
{
opos--;
continue;
@@ -1407,7 +1407,7 @@ copy_statement_with_parameters(StatementClass *stmt)
in_dquote = TRUE;
else
{
- if (isspace(oldchar))
+ if (isspace((unsigned char) oldchar))
{
if (!prev_token_end)
{