aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/timestamp.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-12-03 20:45:40 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-12-03 20:45:40 +0000
commita27b691e2903a886be640db801677f6f988d3793 (patch)
treec68f25c9edef18954e9c5b3d74893f1df87b8871 /src/backend/utils/adt/timestamp.c
parent4d2a506526ceacab5f75df040596a5287ab40612 (diff)
downloadpostgresql-a27b691e2903a886be640db801677f6f988d3793.tar.gz
postgresql-a27b691e2903a886be640db801677f6f988d3793.zip
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.
Diffstat (limited to 'src/backend/utils/adt/timestamp.c')
-rw-r--r--src/backend/utils/adt/timestamp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c
index 4478dc95efa..6930205b156 100644
--- a/src/backend/utils/adt/timestamp.c
+++ b/src/backend/utils/adt/timestamp.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.38 2000/11/11 19:55:19 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.39 2000/12/03 20:45:36 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1597,7 +1597,7 @@ timestamp_trunc(PG_FUNCTION_ARGS)
up = VARDATA(units);
lp = lowunits;
for (i = 0; i < (VARSIZE(units) - VARHDRSZ); i++)
- *lp++ = tolower(*up++);
+ *lp++ = tolower((unsigned char) *up++);
*lp = '\0';
type = DecodeUnits(0, lowunits, &val);
@@ -1730,7 +1730,7 @@ interval_trunc(PG_FUNCTION_ARGS)
up = VARDATA(units);
lp = lowunits;
for (i = 0; i < (VARSIZE(units) - VARHDRSZ); i++)
- *lp++ = tolower(*up++);
+ *lp++ = tolower((unsigned char) *up++);
*lp = '\0';
type = DecodeUnits(0, lowunits, &val);
@@ -1921,7 +1921,7 @@ timestamp_part(PG_FUNCTION_ARGS)
up = VARDATA(units);
lp = lowunits;
for (i = 0; i < (VARSIZE(units) - VARHDRSZ); i++)
- *lp++ = tolower(*up++);
+ *lp++ = tolower((unsigned char) *up++);
*lp = '\0';
type = DecodeUnits(0, lowunits, &val);
@@ -2079,7 +2079,7 @@ interval_part(PG_FUNCTION_ARGS)
up = VARDATA(units);
lp = lowunits;
for (i = 0; i < (VARSIZE(units) - VARHDRSZ); i++)
- *lp++ = tolower(*up++);
+ *lp++ = tolower((unsigned char) *up++);
*lp = '\0';
type = DecodeUnits(0, lowunits, &val);
@@ -2214,7 +2214,7 @@ timestamp_zone(PG_FUNCTION_ARGS)
up = VARDATA(zone);
lp = lowzone;
for (i = 0; i < (VARSIZE(zone) - VARHDRSZ); i++)
- *lp++ = tolower(*up++);
+ *lp++ = tolower((unsigned char) *up++);
*lp = '\0';
type = DecodeSpecial(0, lowzone, &val);
@@ -2237,7 +2237,7 @@ timestamp_zone(PG_FUNCTION_ARGS)
up = upzone;
lp = lowzone;
for (i = 0; *lp != '\0'; i++)
- *up++ = toupper(*lp++);
+ *up++ = toupper((unsigned char) *lp++);
*up = '\0';
tzn = upzone;