aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils')
-rw-r--r--src/backend/utils/adt/acl.c12
-rw-r--r--src/backend/utils/adt/arrayfuncs.c14
-rw-r--r--src/backend/utils/adt/cash.c12
-rw-r--r--src/backend/utils/adt/datetime.c48
-rw-r--r--src/backend/utils/adt/float.c7
-rw-r--r--src/backend/utils/adt/formatting.c4
-rw-r--r--src/backend/utils/adt/geo_ops.c36
-rw-r--r--src/backend/utils/adt/inet_net_pton.c8
-rw-r--r--src/backend/utils/adt/int.c8
-rw-r--r--src/backend/utils/adt/int8.c8
-rw-r--r--src/backend/utils/adt/numeric.c10
-rw-r--r--src/backend/utils/adt/oid.c8
-rw-r--r--src/backend/utils/adt/selfuncs.c4
-rw-r--r--src/backend/utils/adt/varlena.c12
-rw-r--r--src/backend/utils/init/miscinit.c6
15 files changed, 101 insertions, 96 deletions
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index 0a6c664e7dc..4cbaba9b12f 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.46 2000/06/05 07:28:51 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.47 2000/06/14 18:17:42 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -55,7 +55,7 @@ getid(char *s, char *n)
Assert(s && n);
- while (isspace(*s))
+ while (isspace((int) *s))
++s;
if (*s == '"')
@@ -64,7 +64,7 @@ getid(char *s, char *n)
s++;
}
- for (id = s, len = 0; isalnum(*s) || *s == '_' || in_quotes; ++len, ++s)
+ for (id = s, len = 0; isalnum((int) *s) || *s == '_' || in_quotes; ++len, ++s)
{
if (in_quotes && *s == '"')
{
@@ -78,7 +78,7 @@ getid(char *s, char *n)
if (len > 0)
memmove(n, id, len);
n[len] = '\0';
- while (isspace(*s))
+ while (isspace((int) *s))
++s;
return s;
}
@@ -147,7 +147,7 @@ aclparse(char *s, AclItem *aip, unsigned *modechg)
}
aip->ai_mode = ACL_NO;
- while (isalpha(*++s))
+ while (isalpha((int) *++s))
{
switch (*s)
{
@@ -244,7 +244,7 @@ aclitemin(char *s)
s = aclparse(s, aip, &modechg);
if (modechg != ACL_MODECHG_EQL)
elog(ERROR, "aclitemin: cannot accept anything but = ACLs");
- while (isspace(*s))
+ while (isspace((int) *s))
++s;
if (*s)
elog(ERROR, "aclitemin: extra garbage at end of specification");
diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c
index aae18aa047f..fe96d77f43a 100644
--- a/src/backend/utils/adt/arrayfuncs.c
+++ b/src/backend/utils/adt/arrayfuncs.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.58 2000/06/14 05:24:48 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.59 2000/06/14 18:17:42 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -121,7 +121,7 @@ array_in(PG_FUNCTION_ARGS)
done = false;
for (ndim = 0; !done;)
{
- while (isspace(*p))
+ while (isspace((int) *p))
p++;
if (*p == '[')
{
@@ -134,7 +134,7 @@ array_in(PG_FUNCTION_ARGS)
lBound[ndim] = atoi(p);
p = r + 1;
}
- for (q = p; isdigit(*q); q++);
+ for (q = p; isdigit((int) *q); q++);
if (*q != ']')
elog(ERROR, "array_in: missing ']' in array declaration");
*q = '\0';
@@ -163,12 +163,12 @@ array_in(PG_FUNCTION_ARGS)
}
else
{
- while (isspace(*p))
+ while (isspace((int) *p))
p++;
if (strncmp(p, ASSGN, strlen(ASSGN)))
elog(ERROR, "array_in: missing assignment operator");
p += strlen(ASSGN);
- while (isspace(*p))
+ while (isspace((int) *p))
p++;
}
@@ -321,7 +321,7 @@ _ArrayCount(char *str, int *dim, int typdelim)
temp[ndim - 1]++;
q++;
if (!eoArray)
- while (isspace(*q))
+ while (isspace((int) *q))
q++;
}
for (i = 0; i < ndim; ++i)
@@ -452,7 +452,7 @@ _ReadArrayStr(char *arrayStr,
/*
* if not at the end of the array skip white space
*/
- while (isspace(*q))
+ while (isspace((int) *q))
{
p++;
q++;
diff --git a/src/backend/utils/adt/cash.c b/src/backend/utils/adt/cash.c
index 861d5931d47..15386fe20ae 100644
--- a/src/backend/utils/adt/cash.c
+++ b/src/backend/utils/adt/cash.c
@@ -9,7 +9,7 @@
* workings can be found in the book "Software Solutions in C" by
* Dale Schumacher, Academic Press, ISBN: 0-12-632360-7.
*
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.38 2000/06/13 07:35:03 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.39 2000/06/14 18:17:42 petere Exp $
*/
#include <limits.h>
@@ -115,7 +115,7 @@ cash_in(const char *str)
/* we need to add all sorts of checking here. For now just */
/* strip all leading whitespace and any leading currency symbol */
- while (isspace(*s))
+ while (isspace((int) *s))
s++;
if (strncmp(s, csymbol, strlen(csymbol)) == 0)
s += strlen(csymbol);
@@ -147,7 +147,7 @@ cash_in(const char *str)
printf("cashin- string is '%s'\n", s);
#endif
- while (isspace(*s))
+ while (isspace((int) *s))
s++;
if (strncmp(s, csymbol, strlen(csymbol)) == 0)
s += strlen(csymbol);
@@ -160,7 +160,7 @@ cash_in(const char *str)
{
/* we look for digits as int4 as we have less */
/* than the required number of decimal places */
- if (isdigit(*s) && dec < fpoint)
+ if (isdigit((int) *s) && dec < fpoint)
{
value = (value * 10) + *s - '0';
@@ -182,7 +182,7 @@ cash_in(const char *str)
else
{
/* round off */
- if (isdigit(*s) && *s >= '5')
+ if (isdigit((int) *s) && *s >= '5')
value++;
/* adjust for less than required decimal places */
@@ -193,7 +193,7 @@ cash_in(const char *str)
}
}
- while (isspace(*s) || *s == '0' || *s == ')')
+ while (isspace((int) *s) || *s == '0' || *s == ')')
s++;
if (*s != '\0')
diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c
index 790c166ad4d..229667e1b50 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.49 2000/06/08 22:37:28 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.50 2000/06/14 18:17:42 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -425,16 +425,16 @@ ParseDateTime(char *timestr, char *lowstr,
field[nf] = lp;
/* leading digit? then date or time */
- if (isdigit(*cp) || (*cp == '.'))
+ if (isdigit((int) *cp) || (*cp == '.'))
{
*lp++ = *cp++;
- while (isdigit(*cp))
+ while (isdigit((int) *cp))
*lp++ = *cp++;
/* time field? */
if (*cp == ':')
{
ftype[nf] = DTK_TIME;
- while (isdigit(*cp) || (*cp == ':') || (*cp == '.'))
+ while (isdigit((int) *cp) || (*cp == ':') || (*cp == '.'))
*lp++ = *cp++;
}
@@ -442,7 +442,7 @@ ParseDateTime(char *timestr, char *lowstr,
else if ((*cp == '-') || (*cp == '/') || (*cp == '.'))
{
ftype[nf] = DTK_DATE;
- while (isalnum(*cp) || (*cp == '-') || (*cp == '/') || (*cp == '.'))
+ while (isalnum((int) *cp) || (*cp == '-') || (*cp == '/') || (*cp == '.'))
*lp++ = tolower(*cp++);
}
@@ -460,11 +460,11 @@ ParseDateTime(char *timestr, char *lowstr,
* text? then date string, month, day of week, special, or
* timezone
*/
- else if (isalpha(*cp))
+ else if (isalpha((int) *cp))
{
ftype[nf] = DTK_STRING;
*lp++ = tolower(*cp++);
- while (isalpha(*cp))
+ while (isalpha((int) *cp))
*lp++ = tolower(*cp++);
/*
@@ -493,13 +493,13 @@ ParseDateTime(char *timestr, char *lowstr,
#endif
ftype[nf] = DTK_DATE;
- while (isdigit(*cp) || (*cp == '-') || (*cp == '/') || (*cp == '.'))
+ while (isdigit((int) *cp) || (*cp == '-') || (*cp == '/') || (*cp == '.'))
*lp++ = tolower(*cp++);
}
/* skip leading spaces */
}
- else if (isspace(*cp))
+ else if (isspace((int) *cp))
{
cp++;
continue;
@@ -510,23 +510,23 @@ ParseDateTime(char *timestr, char *lowstr,
{
*lp++ = *cp++;
/* soak up leading whitespace */
- while (isspace(*cp))
+ while (isspace((int) *cp))
cp++;
/* numeric timezone? */
- if (isdigit(*cp))
+ if (isdigit((int) *cp))
{
ftype[nf] = DTK_TZ;
*lp++ = *cp++;
- while (isdigit(*cp) || (*cp == ':'))
+ while (isdigit((int) *cp) || (*cp == ':'))
*lp++ = *cp++;
/* special? */
}
- else if (isalpha(*cp))
+ else if (isalpha((int) *cp))
{
ftype[nf] = DTK_SPECIAL;
*lp++ = tolower(*cp++);
- while (isalpha(*cp))
+ while (isalpha((int) *cp))
*lp++ = tolower(*cp++);
/* otherwise something wrong... */
@@ -536,7 +536,7 @@ ParseDateTime(char *timestr, char *lowstr,
/* ignore punctuation but use as delimiter */
}
- else if (ispunct(*cp))
+ else if (ispunct((int) *cp))
{
cp++;
continue;
@@ -654,7 +654,7 @@ DecodeDateTime(char **field, int *ftype, int nf,
* PST)
*/
if ((i > 0) && ((fmask & DTK_M(TZ)) != 0)
- && (ftype[i - 1] == DTK_TZ) && (isalpha(*field[i - 1])))
+ && (ftype[i - 1] == DTK_TZ) && (isalpha((int) *field[i - 1])))
{
*tzp -= tz;
tmask = 0;
@@ -999,7 +999,7 @@ DecodeTimeOnly(char **field, int *ftype, int nf,
* PST)
*/
if ((i > 0) && ((fmask & DTK_M(TZ)) != 0)
- && (ftype[i - 1] == DTK_TZ) && (isalpha(*field[i - 1])))
+ && (ftype[i - 1] == DTK_TZ) && (isalpha((int) *field[i - 1])))
{
*tzp -= tz;
tmask = 0;
@@ -1189,18 +1189,18 @@ DecodeDate(char *str, int fmask, int *tmask, struct tm * tm)
while ((*str != '\0') && (nf < MAXDATEFIELDS))
{
/* skip field separators */
- while (!isalnum(*str))
+ while (!isalnum((int) *str))
str++;
field[nf] = str;
- if (isdigit(*str))
+ if (isdigit((int) *str))
{
- while (isdigit(*str))
+ while (isdigit((int) *str))
str++;
}
- else if (isalpha(*str))
+ else if (isalpha((int) *str))
{
- while (isalpha(*str))
+ while (isalpha((int) *str))
str++;
}
@@ -1220,7 +1220,7 @@ DecodeDate(char *str, int fmask, int *tmask, struct tm * tm)
/* look first for text fields, since that will be unambiguous month */
for (i = 0; i < nf; i++)
{
- if (isalpha(*field[i]))
+ if (isalpha((int) *field[i]))
{
type = DecodeSpecial(i, field[i], &val);
if (type == IGNORE)
@@ -1583,7 +1583,7 @@ DecodePosixTimezone(char *str, int *tzp)
char delim;
cp = str;
- while ((*cp != '\0') && isalpha(*cp))
+ while ((*cp != '\0') && isalpha((int) *cp))
cp++;
if (DecodeTimezone(cp, &tz) != 0)
diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c
index 428fb5bf2c4..f8c3a3f1560 100644
--- a/src/backend/utils/adt/float.c
+++ b/src/backend/utils/adt/float.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.60 2000/06/13 07:35:04 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.61 2000/06/14 18:17:42 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -64,6 +64,11 @@
#endif
#endif
+/* for finite() on Solaris */
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+
#include "fmgr.h"
#include "utils/builtins.h"
diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c
index 6f6e3a54c89..45a1ac0bb0f 100644
--- a/src/backend/utils/adt/formatting.c
+++ b/src/backend/utils/adt/formatting.c
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------
* formatting.c
*
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.12 2000/06/13 07:35:04 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.13 2000/06/14 18:17:42 petere Exp $
*
*
* Portions Copyright (c) 1999-2000, PostgreSQL, Inc
@@ -1192,7 +1192,7 @@ DCH_processor(FormatNode *node, char *inout, int flag)
*/
if (isspace(n->character) && IS_FX == 0)
{
- while (*s != '\0' && isspace(*(s + 1)))
+ while (*s != '\0' && isspace((int) *(s + 1)))
++s;
}
}
diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c
index dc6e077d6bf..37dff3b9089 100644
--- a/src/backend/utils/adt/geo_ops.c
+++ b/src/backend/utils/adt/geo_ops.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.51 2000/06/13 07:35:07 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.52 2000/06/14 18:17:42 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -111,7 +111,7 @@ single_decode(char *str, float8 *x, char **s)
if (!PointerIsValid(str))
return FALSE;
- while (isspace(*str))
+ while (isspace((int) *str))
str++;
*x = strtod(str, &cp);
#ifdef GEODEBUG
@@ -119,7 +119,7 @@ single_decode(char *str, float8 *x, char **s)
#endif
if (cp <= str)
return FALSE;
- while (isspace(*cp))
+ while (isspace((int) *cp))
cp++;
if (s != NULL)
@@ -144,33 +144,33 @@ pair_decode(char *str, float8 *x, float8 *y, char **s)
if (!PointerIsValid(str))
return FALSE;
- while (isspace(*str))
+ while (isspace((int) *str))
str++;
if ((has_delim = (*str == LDELIM)))
str++;
- while (isspace(*str))
+ while (isspace((int) *str))
str++;
*x = strtod(str, &cp);
if (cp <= str)
return FALSE;
- while (isspace(*cp))
+ while (isspace((int) *cp))
cp++;
if (*cp++ != DELIM)
return FALSE;
- while (isspace(*cp))
+ while (isspace((int) *cp))
cp++;
*y = strtod(cp, &str);
if (str <= cp)
return FALSE;
- while (isspace(*str))
+ while (isspace((int) *str))
str++;
if (has_delim)
{
if (*str != RDELIM)
return FALSE;
str++;
- while (isspace(*str))
+ while (isspace((int) *str))
str++;
}
if (s != NULL)
@@ -195,7 +195,7 @@ path_decode(int opentype, int npts, char *str, int *isopen, char **ss, Point *p)
int i;
s = str;
- while (isspace(*s))
+ while (isspace((int) *s))
s++;
if ((*isopen = (*s == LDELIM_EP)))
{
@@ -204,14 +204,14 @@ path_decode(int opentype, int npts, char *str, int *isopen, char **ss, Point *p)
return FALSE;
depth++;
s++;
- while (isspace(*s))
+ while (isspace((int) *s))
s++;
}
else if (*s == LDELIM)
{
cp = (s + 1);
- while (isspace(*cp))
+ while (isspace((int) *cp))
cp++;
if (*cp == LDELIM)
{
@@ -247,7 +247,7 @@ path_decode(int opentype, int npts, char *str, int *isopen, char **ss, Point *p)
{
depth--;
s++;
- while (isspace(*s))
+ while (isspace((int) *s))
s++;
}
else
@@ -1157,7 +1157,7 @@ path_in(char *str)
elog(ERROR, "Bad path external representation '%s'", str);
s = str;
- while (isspace(*s))
+ while (isspace((int) *s))
s++;
/* skip single leading paren */
@@ -3845,13 +3845,13 @@ circle_in(char *str)
circle = palloc(sizeof(CIRCLE));
s = str;
- while (isspace(*s))
+ while (isspace((int) *s))
s++;
if ((*s == LDELIM_C) || (*s == LDELIM))
{
depth++;
cp = (s + 1);
- while (isspace(*cp))
+ while (isspace((int) *cp))
cp++;
if (*cp == LDELIM)
s = cp;
@@ -3862,7 +3862,7 @@ circle_in(char *str)
if (*s == DELIM)
s++;
- while (isspace(*s))
+ while (isspace((int) *s))
s++;
if ((!single_decode(s, &circle->radius, &s)) || (circle->radius < 0))
@@ -3875,7 +3875,7 @@ circle_in(char *str)
{
depth--;
s++;
- while (isspace(*s))
+ while (isspace((int) *s))
s++;
}
else
diff --git a/src/backend/utils/adt/inet_net_pton.c b/src/backend/utils/adt/inet_net_pton.c
index 977c7ed4ed5..a8a03032a48 100644
--- a/src/backend/utils/adt/inet_net_pton.c
+++ b/src/backend/utils/adt/inet_net_pton.c
@@ -16,7 +16,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: inet_net_pton.c,v 1.10 1999/07/17 20:17:56 momjian Exp $";
+static const char rcsid[] = "$Id: inet_net_pton.c,v 1.11 2000/06/14 18:17:44 petere Exp $";
#endif
@@ -105,7 +105,7 @@ inet_cidr_pton_ipv4(const char *src, u_char *dst, size_t size)
ch = *src++;
if (ch == '0' && (src[0] == 'x' || src[0] == 'X')
- && isascii(src[1]) && isxdigit(src[1]))
+ && isascii((int) src[1]) && isxdigit((int) src[1]))
{
/* Hexadecimal: Eat nybble string. */
if (size <= 0)
@@ -170,7 +170,7 @@ inet_cidr_pton_ipv4(const char *src, u_char *dst, size_t size)
goto enoent;
bits = -1;
- if (ch == '/' && isascii(src[0]) && isdigit(src[0]) && dst > odst)
+ if (ch == '/' && isascii((int) src[0]) && isdigit((int) src[0]) && dst > odst)
{
/* CIDR width specifier. Nothing can follow it. */
ch = *src++; /* Skip over the /. */
@@ -284,7 +284,7 @@ inet_net_pton_ipv4(const char *src, u_char *dst)
/* Get the prefix length if any. */
bits = -1;
- if (ch == '/' && isascii(src[0]) && isdigit(src[0]) && dst > odst)
+ if (ch == '/' && isascii((int) src[0]) && isdigit((int) src[0]) && dst > odst)
{
/* CIDR width specifier. Nothing can follow it. */
ch = *src++; /* Skip over the /. */
diff --git a/src/backend/utils/adt/int.c b/src/backend/utils/adt/int.c
index 6e236a01c74..b5f66f11188 100644
--- a/src/backend/utils/adt/int.c
+++ b/src/backend/utils/adt/int.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.37 2000/06/05 07:28:52 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.38 2000/06/14 18:17:44 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -88,12 +88,12 @@ int2vectorin(PG_FUNCTION_ARGS)
{
if (sscanf(intString, "%hd", &result[slot]) != 1)
break;
- while (*intString && isspace(*intString))
+ while (*intString && isspace((int) *intString))
intString++;
- while (*intString && !isspace(*intString))
+ while (*intString && !isspace((int) *intString))
intString++;
}
- while (*intString && isspace(*intString))
+ while (*intString && isspace((int) *intString))
intString++;
if (*intString)
elog(ERROR, "int2vector value has too many values");
diff --git a/src/backend/utils/adt/int8.c b/src/backend/utils/adt/int8.c
index 774e9aba89c..ea29ffaff55 100644
--- a/src/backend/utils/adt/int8.c
+++ b/src/backend/utils/adt/int8.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/int8.c,v 1.20 2000/06/13 07:35:07 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/int8.c,v 1.21 2000/06/14 18:17:44 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -70,15 +70,15 @@ int8in(PG_FUNCTION_ARGS)
* Do our own scan, rather than relying on sscanf which might be
* broken for long long.
*/
- while (*ptr && isspace(*ptr)) /* skip leading spaces */
+ while (*ptr && isspace((int) *ptr)) /* skip leading spaces */
ptr++;
if (*ptr == '-') /* handle sign */
sign = -1, ptr++;
else if (*ptr == '+')
ptr++;
- if (!isdigit(*ptr)) /* require at least one digit */
+ if (!isdigit((int) *ptr)) /* require at least one digit */
elog(ERROR, "Bad int8 external representation \"%s\"", str);
- while (*ptr && isdigit(*ptr)) /* process digits */
+ while (*ptr && isdigit((int) *ptr)) /* process digits */
{
int64 newtmp = tmp * 10 + (*ptr++ - '0');
diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c
index a628e9c8f3a..088897c0682 100644
--- a/src/backend/utils/adt/numeric.c
+++ b/src/backend/utils/adt/numeric.c
@@ -5,7 +5,7 @@
*
* 1998 Jan Wieck
*
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.29 2000/06/13 07:35:07 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.30 2000/06/14 18:17:44 petere Exp $
*
* ----------
*/
@@ -2084,7 +2084,7 @@ set_var_from_str(char *str, NumericVar *dest)
while (*cp)
{
- if (!isspace(*cp))
+ if (!isspace((int) *cp))
break;
cp++;
}
@@ -2113,12 +2113,12 @@ set_var_from_str(char *str, NumericVar *dest)
cp++;
}
- if (!isdigit(*cp))
+ if (!isdigit((int) *cp))
elog(ERROR, "Bad numeric input format '%s'", str);
while (*cp)
{
- if (isdigit(*cp))
+ if (isdigit((int) *cp))
{
dest->digits[i++] = *cp++ - '0';
if (!have_dp)
@@ -2161,7 +2161,7 @@ set_var_from_str(char *str, NumericVar *dest)
/* Should be nothing left but spaces */
while (*cp)
{
- if (!isspace(*cp))
+ if (!isspace((int) *cp))
elog(ERROR, "Bad numeric input format '%s'", str);
cp++;
}
diff --git a/src/backend/utils/adt/oid.c b/src/backend/utils/adt/oid.c
index 2f1651378cf..156237862b1 100644
--- a/src/backend/utils/adt/oid.c
+++ b/src/backend/utils/adt/oid.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.35 2000/06/05 07:28:52 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.36 2000/06/14 18:17:45 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -41,12 +41,12 @@ oidvectorin(PG_FUNCTION_ARGS)
{
if (sscanf(oidString, "%u", &result[slot]) != 1)
break;
- while (*oidString && isspace(*oidString))
+ while (*oidString && isspace((int) *oidString))
oidString++;
- while (*oidString && !isspace(*oidString))
+ while (*oidString && !isspace((int) *oidString))
oidString++;
}
- while (*oidString && isspace(*oidString))
+ while (*oidString && isspace((int) *oidString))
oidString++;
if (*oidString)
elog(ERROR, "oidvector value has too many values");
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index 7ed17da41f3..5a8c745b238 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.71 2000/06/14 05:24:49 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.72 2000/06/14 18:17:45 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1383,7 +1383,7 @@ regex_fixed_prefix(char *patt, bool case_insensitive,
patt[pos] == '(' ||
patt[pos] == '[' ||
patt[pos] == '$' ||
- (case_insensitive && isalpha(patt[pos])))
+ (case_insensitive && isalpha((int) patt[pos])))
break;
/*
* Check for quantifiers. Except for +, this means the preceding
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index 34a3c13e1aa..fedd29f0c3e 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.59 2000/06/13 07:35:08 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.60 2000/06/14 18:17:45 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -57,9 +57,9 @@ byteain(char *inputText)
{
if (*tp == '\\')
tp++;
- else if (!isdigit(*tp++) ||
- !isdigit(*tp++) ||
- !isdigit(*tp++))
+ else if (!isdigit((int) *tp++) ||
+ !isdigit((int) *tp++) ||
+ !isdigit((int) *tp++))
elog(ERROR, "Bad input string for type bytea");
}
tp = inputText;
@@ -111,7 +111,7 @@ byteaout(bytea *vlena)
for (i = vlena->vl_len - VARHDRSZ; i != 0; i--, vp++)
if (*vp == '\\')
len += 2;
- else if (isascii(*vp) && isprint(*vp))
+ else if (isascii((int) *vp) && isprint((int) *vp))
len++;
else
len += VARHDRSZ;
@@ -124,7 +124,7 @@ byteaout(bytea *vlena)
*rp++ = '\\';
*rp++ = '\\';
}
- else if (isascii(*vp) && isprint(*vp))
+ else if (isascii((int) *vp) && isprint((int) *vp))
*rp++ = *vp++;
else
{
diff --git a/src/backend/utils/init/miscinit.c b/src/backend/utils/init/miscinit.c
index 3dee08ec51b..eaee59d81fe 100644
--- a/src/backend/utils/init/miscinit.c
+++ b/src/backend/utils/init/miscinit.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.49 2000/06/13 07:35:09 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.50 2000/06/14 18:17:46 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -500,14 +500,14 @@ SetPidFile(pid_t pid)
*/
fprintf(stderr, "Can't create pid file: %s\n", pidfile);
if (is_postgres)
- fprintf(stderr, "Is another postgres (pid: %d) running?\n", post_pid);
+ fprintf(stderr, "Is another postgres (pid: %d) running?\n", (int) post_pid);
else
fprintf(stderr, "Is another postmaster (pid: %s) running?\n", pidstr);
return (-1);
}
}
- sprintf(pidstr, "%d", pid);
+ sprintf(pidstr, "%d", (int) pid);
if (write(fd, pidstr, strlen(pidstr)) != strlen(pidstr))
{
fprintf(stderr, "Write to pid file failed\n");