Commit 44d1abeb authored by Peter Eisentraut's avatar Peter Eisentraut

Big warnings cleanup for Solaris/GCC. Down to about 40 now, but

we'll get there one day.

Use `cat' to create aclocal.m4, not `aclocal'. Some people don't
have automake installed.

Only run the autoconf rule in the top-level GNUmakefile if the
invoker specified `make configure', don't run it automatically
because of CVS timestamp skew.
parent 4786a808
# #
# PostgreSQL top level makefile # PostgreSQL top level makefile
# #
# $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.4 2000/06/11 18:43:52 tgl Exp $ # $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.5 2000/06/14 18:17:24 petere Exp $
# #
srcdir = @srcdir@ srcdir = @srcdir@
...@@ -30,26 +30,27 @@ distclean: ...@@ -30,26 +30,27 @@ distclean:
.PHONY: all install clean distclean .PHONY: all install clean distclean
AUTOCONF = @AUTOCONF@
ACLOCAL = @ACLOCAL@
GNUmakefile: GNUmakefile.in $(top_builddir)/config.status GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
# This rule does not work --- what if config.status doesn't exist? $(top_builddir)/config.status: $(top_srcdir)/configure
cd $(top_builddir) && ./config.status --recheck
# $(top_builddir)/config.status: $(top_srcdir)/configure # These dependencies are risky because both the target and the sources
# cd $(top_builddir) && ./config.status --recheck # are in CVS and CVS doesn't preserve timestamps, thus leading to
# unnecessary reruns of these rules.
# These dependencies are evil and dangerous, because they can cause make AUTOCONF = autoconf
# to re-run autoconf and then re-run configure due to configure not
# having a newer timestamp than configure.in after a CVS pull. Same
# problem for aclocal timestamp skew. This solution is considerably
# worse than the problem it was intended to solve.
# Do not put it back or I will take it right out again --- tgl
# $(top_srcdir)/configure: $(top_srcdir)/configure.in $(top_srcdir)/aclocal.m4 # Only use this rule if you actually said `make configure'.
# cd $(top_srcdir) && $(AUTOCONF) ifeq ($(MAKECMDGOALS),configure)
$(top_srcdir)/configure: $(top_srcdir)/configure.in $(top_srcdir)/aclocal.m4
cd $(top_srcdir) && $(AUTOCONF)
endif
# $(top_srcdir)/aclocal.m4: $(wildcard $(top_srcdir)/config/*.m4) # This one we can leave unprotected because by default nothing depends
# cd $(top_srcdir) && $(ACLOCAL) -I config # on aclocal.m4. This rule is only invoked if you say `make
# aclocal.m4' or `make configure'.
$(top_srcdir)/aclocal.m4: $(wildcard $(top_srcdir)/config/*.m4)
cat $^ > $@
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -606,8 +606,6 @@ AC_SUBST(INSTL_SHLIB_OPTS) ...@@ -606,8 +606,6 @@ AC_SUBST(INSTL_SHLIB_OPTS)
AC_SUBST(INSTL_EXE_OPTS) AC_SUBST(INSTL_EXE_OPTS)
AC_PROG_AWK AC_PROG_AWK
AM_MISSING_PROG(AUTOCONF, autoconf, [\${SHELL} \${top_srcdir}/config])
AM_MISSING_PROG(ACLOCAL, aclocal, [\${SHELL} \${top_srcdir}/config])
AC_PROG_LEX AC_PROG_LEX
if test "$LEX" = "flex"; then if test "$LEX" = "flex"; then
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.112 2000/06/05 17:07:56 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.113 2000/06/14 18:17:25 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -325,7 +325,7 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe, ...@@ -325,7 +325,7 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
elog(ERROR, "COPY command, running in backend with " elog(ERROR, "COPY command, running in backend with "
"effective uid %d, could not open file '%s' for " "effective uid %d, could not open file '%s' for "
"reading. Errno = %s (%d).", "reading. Errno = %s (%d).",
geteuid(), filename, strerror(errno), errno); (int) geteuid(), filename, strerror(errno), errno);
} }
CopyFrom(rel, binary, oids, fp, delim, null_print); CopyFrom(rel, binary, oids, fp, delim, null_print);
} }
...@@ -358,7 +358,7 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe, ...@@ -358,7 +358,7 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
elog(ERROR, "COPY command, running in backend with " elog(ERROR, "COPY command, running in backend with "
"effective uid %d, could not open file '%s' for " "effective uid %d, could not open file '%s' for "
"writing. Errno = %s (%d).", "writing. Errno = %s (%d).",
geteuid(), filename, strerror(errno), errno); (int) geteuid(), filename, strerror(errno), errno);
} }
CopyTo(rel, binary, oids, fp, delim, null_print); CopyTo(rel, binary, oids, fp, delim, null_print);
} }
......
...@@ -398,8 +398,8 @@ get_seq_name(text *seqin) ...@@ -398,8 +398,8 @@ get_seq_name(text *seqin)
*/ */
for (; *rawname; rawname++) for (; *rawname; rawname++)
{ {
if (isascii((unsigned char) *rawname) && if (isascii((int) *rawname) &&
isupper(*rawname)) isupper((int) *rawname))
*rawname = tolower(*rawname); *rawname = tolower(*rawname);
} }
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.36 2000/06/09 01:44:03 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.37 2000/06/14 18:17:25 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -96,7 +96,7 @@ get_token(char **tok, char **val, char *str) ...@@ -96,7 +96,7 @@ get_token(char **tok, char **val, char *str)
return NULL; return NULL;
/* skip leading white space */ /* skip leading white space */
while (isspace(*str)) while (isspace((int) *str))
str++; str++;
/* end of string? then return NULL */ /* end of string? then return NULL */
...@@ -110,7 +110,7 @@ get_token(char **tok, char **val, char *str) ...@@ -110,7 +110,7 @@ get_token(char **tok, char **val, char *str)
*tok = str; *tok = str;
/* Advance to end of word */ /* Advance to end of word */
while (*str && !isspace(*str) && *str != ',' && *str != '=') while (*str && !isspace((int) *str) && *str != ',' && *str != '=')
str++; str++;
/* Terminate word string for caller */ /* Terminate word string for caller */
...@@ -118,7 +118,7 @@ get_token(char **tok, char **val, char *str) ...@@ -118,7 +118,7 @@ get_token(char **tok, char **val, char *str)
*str = '\0'; *str = '\0';
/* Skip any whitespace */ /* Skip any whitespace */
while (isspace(ch)) while (isspace((int) ch))
ch = *(++str); ch = *(++str);
/* end of string? */ /* end of string? */
...@@ -136,7 +136,7 @@ get_token(char **tok, char **val, char *str) ...@@ -136,7 +136,7 @@ get_token(char **tok, char **val, char *str)
str++; str++;
/* skip whitespace after '=' */ /* skip whitespace after '=' */
while (isspace(*str)) while (isspace((int) *str))
str++; str++;
if (*str == ',' || *str == '\0') if (*str == ',' || *str == '\0')
...@@ -146,7 +146,7 @@ get_token(char **tok, char **val, char *str) ...@@ -146,7 +146,7 @@ get_token(char **tok, char **val, char *str)
*val = str; *val = str;
/* Advance to end of word */ /* Advance to end of word */
while (*str && !isspace(*str) && *str != ',') while (*str && !isspace((int) *str) && *str != ',')
str++; str++;
/* Terminate word string for caller */ /* Terminate word string for caller */
...@@ -154,7 +154,7 @@ get_token(char **tok, char **val, char *str) ...@@ -154,7 +154,7 @@ get_token(char **tok, char **val, char *str)
*str = '\0'; *str = '\0';
/* Skip any whitespace */ /* Skip any whitespace */
while (isspace(ch)) while (isspace((int) ch))
ch = *(++str); ch = *(++str);
/* end of string? */ /* end of string? */
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: pqcomm.c,v 1.97 2000/06/11 11:39:50 petere Exp $ * $Id: pqcomm.c,v 1.98 2000/06/14 18:17:28 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -342,13 +342,13 @@ StreamConnection(int server_fd, Port *port) ...@@ -342,13 +342,13 @@ StreamConnection(int server_fd, Port *port)
int on = 1; int on = 1;
if (setsockopt(port->sock, IPPROTO_TCP, TCP_NODELAY, if (setsockopt(port->sock, IPPROTO_TCP, TCP_NODELAY,
&on, sizeof(on)) < 0) (char *) &on, sizeof(on)) < 0)
{ {
perror("postmaster: StreamConnection: setsockopt(TCP_NODELAY)"); perror("postmaster: StreamConnection: setsockopt(TCP_NODELAY)");
return STATUS_ERROR; return STATUS_ERROR;
} }
if (setsockopt(port->sock, SOL_SOCKET, SO_KEEPALIVE, if (setsockopt(port->sock, SOL_SOCKET, SO_KEEPALIVE,
&on, sizeof(on)) < 0) (char *) &on, sizeof(on)) < 0)
{ {
perror("postmaster: StreamConnection: setsockopt(SO_KEEPALIVE)"); perror("postmaster: StreamConnection: setsockopt(SO_KEEPALIVE)");
return STATUS_ERROR; return STATUS_ERROR;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.117 2000/05/29 05:44:47 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.118 2000/06/14 18:17:32 petere Exp $
* *
* NOTES * NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which * Every (plan) node in POSTGRES has an associated "out" routine which
...@@ -70,8 +70,8 @@ _outToken(StringInfo str, char *s) ...@@ -70,8 +70,8 @@ _outToken(StringInfo str, char *s)
if (*s == '<' || if (*s == '<' ||
*s == '\"' || *s == '\"' ||
*s == '@' || *s == '@' ||
isdigit(*s) || isdigit((int) *s) ||
(*s == '-' && isdigit(s[1]))) (*s == '-' && isdigit((int) s[1])))
appendStringInfoChar(str, '\\'); appendStringInfoChar(str, '\\');
while (*s) while (*s)
{ {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.22 2000/04/12 17:15:16 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.23 2000/06/14 18:17:32 petere Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -205,8 +205,8 @@ nodeTokenType(char *token, int length) ...@@ -205,8 +205,8 @@ nodeTokenType(char *token, int length)
numlen = length; numlen = length;
if (*numptr == '+' || *numptr == '-') if (*numptr == '+' || *numptr == '-')
numptr++, numlen--; numptr++, numlen--;
if ((numlen > 0 && isdigit(*numptr)) || if ((numlen > 0 && isdigit((int) *numptr)) ||
(numlen > 1 && *numptr == '.' && isdigit(numptr[1]))) (numlen > 1 && *numptr == '.' && isdigit((int) numptr[1])))
{ {
/* /*
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.41 2000/06/13 07:35:01 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.42 2000/06/14 18:17:36 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -520,7 +520,7 @@ fitsInFloat(Value *value) ...@@ -520,7 +520,7 @@ fitsInFloat(Value *value)
ndigits = 0; ndigits = 0;
for (; *ptr; ptr++) for (; *ptr; ptr++)
{ {
if (isdigit(*ptr)) if (isdigit((int) *ptr))
ndigits++; ndigits++;
else if (*ptr == 'e' || *ptr == 'E') else if (*ptr == 'e' || *ptr == 'E')
break; /* don't count digits in exponent */ break; /* don't count digits in exponent */
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.71 2000/06/01 22:21:05 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.72 2000/06/14 18:17:37 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -446,8 +446,8 @@ other . ...@@ -446,8 +446,8 @@ other .
ScanKeyword *keyword; ScanKeyword *keyword;
for(i = 0; yytext[i]; i++) for(i = 0; yytext[i]; i++)
if (isascii((unsigned char)yytext[i]) && if (isascii((int) yytext[i]) &&
isupper(yytext[i])) isupper((int) yytext[i]))
yytext[i] = tolower(yytext[i]); yytext[i] = tolower(yytext[i]);
if (i >= NAMEDATALEN) if (i >= NAMEDATALEN)
{ {
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.147 2000/06/06 16:04:29 petere Exp $ * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.148 2000/06/14 18:17:38 petere Exp $
* *
* NOTES * NOTES
* *
...@@ -1801,12 +1801,12 @@ split_opts(char **argv, int *argcp, char *s) ...@@ -1801,12 +1801,12 @@ split_opts(char **argv, int *argcp, char *s)
{ {
while (s && *s) while (s && *s)
{ {
while (isspace(*s)) while (isspace((int) *s))
++s; ++s;
if (*s == '\0') if (*s == '\0')
break; break;
argv[(*argcp)++] = s; argv[(*argcp)++] = s;
while (*s && !isspace(*s)) while (*s && !isspace((int) *s))
++s; ++s;
if (*s) if (*s)
*s++ = '\0'; *s++ = '\0';
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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) ...@@ -55,7 +55,7 @@ getid(char *s, char *n)
Assert(s && n); Assert(s && n);
while (isspace(*s)) while (isspace((int) *s))
++s; ++s;
if (*s == '"') if (*s == '"')
...@@ -64,7 +64,7 @@ getid(char *s, char *n) ...@@ -64,7 +64,7 @@ getid(char *s, char *n)
s++; 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 == '"') if (in_quotes && *s == '"')
{ {
...@@ -78,7 +78,7 @@ getid(char *s, char *n) ...@@ -78,7 +78,7 @@ getid(char *s, char *n)
if (len > 0) if (len > 0)
memmove(n, id, len); memmove(n, id, len);
n[len] = '\0'; n[len] = '\0';
while (isspace(*s)) while (isspace((int) *s))
++s; ++s;
return s; return s;
} }
...@@ -147,7 +147,7 @@ aclparse(char *s, AclItem *aip, unsigned *modechg) ...@@ -147,7 +147,7 @@ aclparse(char *s, AclItem *aip, unsigned *modechg)
} }
aip->ai_mode = ACL_NO; aip->ai_mode = ACL_NO;
while (isalpha(*++s)) while (isalpha((int) *++s))
{ {
switch (*s) switch (*s)
{ {
...@@ -244,7 +244,7 @@ aclitemin(char *s) ...@@ -244,7 +244,7 @@ aclitemin(char *s)
s = aclparse(s, aip, &modechg); s = aclparse(s, aip, &modechg);
if (modechg != ACL_MODECHG_EQL) if (modechg != ACL_MODECHG_EQL)
elog(ERROR, "aclitemin: cannot accept anything but = ACLs"); elog(ERROR, "aclitemin: cannot accept anything but = ACLs");
while (isspace(*s)) while (isspace((int) *s))
++s; ++s;
if (*s) if (*s)
elog(ERROR, "aclitemin: extra garbage at end of specification"); elog(ERROR, "aclitemin: extra garbage at end of specification");
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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) ...@@ -121,7 +121,7 @@ array_in(PG_FUNCTION_ARGS)
done = false; done = false;
for (ndim = 0; !done;) for (ndim = 0; !done;)
{ {
while (isspace(*p)) while (isspace((int) *p))
p++; p++;
if (*p == '[') if (*p == '[')
{ {
...@@ -134,7 +134,7 @@ array_in(PG_FUNCTION_ARGS) ...@@ -134,7 +134,7 @@ array_in(PG_FUNCTION_ARGS)
lBound[ndim] = atoi(p); lBound[ndim] = atoi(p);
p = r + 1; p = r + 1;
} }
for (q = p; isdigit(*q); q++); for (q = p; isdigit((int) *q); q++);
if (*q != ']') if (*q != ']')
elog(ERROR, "array_in: missing ']' in array declaration"); elog(ERROR, "array_in: missing ']' in array declaration");
*q = '\0'; *q = '\0';
...@@ -163,12 +163,12 @@ array_in(PG_FUNCTION_ARGS) ...@@ -163,12 +163,12 @@ array_in(PG_FUNCTION_ARGS)
} }
else else
{ {
while (isspace(*p)) while (isspace((int) *p))
p++; p++;
if (strncmp(p, ASSGN, strlen(ASSGN))) if (strncmp(p, ASSGN, strlen(ASSGN)))
elog(ERROR, "array_in: missing assignment operator"); elog(ERROR, "array_in: missing assignment operator");
p += strlen(ASSGN); p += strlen(ASSGN);
while (isspace(*p)) while (isspace((int) *p))
p++; p++;
} }
...@@ -321,7 +321,7 @@ _ArrayCount(char *str, int *dim, int typdelim) ...@@ -321,7 +321,7 @@ _ArrayCount(char *str, int *dim, int typdelim)
temp[ndim - 1]++; temp[ndim - 1]++;
q++; q++;
if (!eoArray) if (!eoArray)
while (isspace(*q)) while (isspace((int) *q))
q++; q++;
} }
for (i = 0; i < ndim; ++i) for (i = 0; i < ndim; ++i)
...@@ -452,7 +452,7 @@ _ReadArrayStr(char *arrayStr, ...@@ -452,7 +452,7 @@ _ReadArrayStr(char *arrayStr,
/* /*
* if not at the end of the array skip white space * if not at the end of the array skip white space
*/ */
while (isspace(*q)) while (isspace((int) *q))
{ {
p++; p++;
q++; q++;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* workings can be found in the book "Software Solutions in C" by * workings can be found in the book "Software Solutions in C" by
* Dale Schumacher, Academic Press, ISBN: 0-12-632360-7. * 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> #include <limits.h>
...@@ -115,7 +115,7 @@ cash_in(const char *str) ...@@ -115,7 +115,7 @@ cash_in(const char *str)
/* we need to add all sorts of checking here. For now just */ /* we need to add all sorts of checking here. For now just */
/* strip all leading whitespace and any leading currency symbol */ /* strip all leading whitespace and any leading currency symbol */
while (isspace(*s)) while (isspace((int) *s))
s++; s++;
if (strncmp(s, csymbol, strlen(csymbol)) == 0) if (strncmp(s, csymbol, strlen(csymbol)) == 0)
s += strlen(csymbol); s += strlen(csymbol);
...@@ -147,7 +147,7 @@ cash_in(const char *str) ...@@ -147,7 +147,7 @@ cash_in(const char *str)
printf("cashin- string is '%s'\n", s); printf("cashin- string is '%s'\n", s);
#endif #endif
while (isspace(*s)) while (isspace((int) *s))
s++; s++;
if (strncmp(s, csymbol, strlen(csymbol)) == 0) if (strncmp(s, csymbol, strlen(csymbol)) == 0)
s += strlen(csymbol); s += strlen(csymbol);
...@@ -160,7 +160,7 @@ cash_in(const char *str) ...@@ -160,7 +160,7 @@ cash_in(const char *str)
{ {
/* we look for digits as int4 as we have less */ /* we look for digits as int4 as we have less */
/* than the required number of decimal places */ /* than the required number of decimal places */
if (isdigit(*s) && dec < fpoint) if (isdigit((int) *s) && dec < fpoint)
{ {
value = (value * 10) + *s - '0'; value = (value * 10) + *s - '0';
...@@ -182,7 +182,7 @@ cash_in(const char *str) ...@@ -182,7 +182,7 @@ cash_in(const char *str)
else else
{ {
/* round off */ /* round off */
if (isdigit(*s) && *s >= '5') if (isdigit((int) *s) && *s >= '5')
value++; value++;
/* adjust for less than required decimal places */ /* adjust for less than required decimal places */
...@@ -193,7 +193,7 @@ cash_in(const char *str) ...@@ -193,7 +193,7 @@ cash_in(const char *str)
} }
} }
while (isspace(*s) || *s == '0' || *s == ')') while (isspace((int) *s) || *s == '0' || *s == ')')
s++; s++;
if (*s != '\0') if (*s != '\0')
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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, ...@@ -425,16 +425,16 @@ ParseDateTime(char *timestr, char *lowstr,
field[nf] = lp; field[nf] = lp;
/* leading digit? then date or time */ /* leading digit? then date or time */
if (isdigit(*cp) || (*cp == '.')) if (isdigit((int) *cp) || (*cp == '.'))
{ {
*lp++ = *cp++; *lp++ = *cp++;
while (isdigit(*cp)) while (isdigit((int) *cp))
*lp++ = *cp++; *lp++ = *cp++;
/* time field? */ /* time field? */
if (*cp == ':') if (*cp == ':')
{ {
ftype[nf] = DTK_TIME; ftype[nf] = DTK_TIME;
while (isdigit(*cp) || (*cp == ':') || (*cp == '.')) while (isdigit((int) *cp) || (*cp == ':') || (*cp == '.'))
*lp++ = *cp++; *lp++ = *cp++;
} }
...@@ -442,7 +442,7 @@ ParseDateTime(char *timestr, char *lowstr, ...@@ -442,7 +442,7 @@ ParseDateTime(char *timestr, char *lowstr,
else if ((*cp == '-') || (*cp == '/') || (*cp == '.')) else if ((*cp == '-') || (*cp == '/') || (*cp == '.'))
{ {
ftype[nf] = DTK_DATE; ftype[nf] = DTK_DATE;
while (isalnum(*cp) || (*cp == '-') || (*cp == '/') || (*cp == '.')) while (isalnum((int) *cp) || (*cp == '-') || (*cp == '/') || (*cp == '.'))
*lp++ = tolower(*cp++); *lp++ = tolower(*cp++);
} }
...@@ -460,11 +460,11 @@ ParseDateTime(char *timestr, char *lowstr, ...@@ -460,11 +460,11 @@ ParseDateTime(char *timestr, char *lowstr,
* text? then date string, month, day of week, special, or * text? then date string, month, day of week, special, or
* timezone * timezone
*/ */
else if (isalpha(*cp)) else if (isalpha((int) *cp))
{ {
ftype[nf] = DTK_STRING; ftype[nf] = DTK_STRING;
*lp++ = tolower(*cp++); *lp++ = tolower(*cp++);
while (isalpha(*cp)) while (isalpha((int) *cp))
*lp++ = tolower(*cp++); *lp++ = tolower(*cp++);
/* /*
...@@ -493,13 +493,13 @@ ParseDateTime(char *timestr, char *lowstr, ...@@ -493,13 +493,13 @@ ParseDateTime(char *timestr, char *lowstr,
#endif #endif
ftype[nf] = DTK_DATE; ftype[nf] = DTK_DATE;
while (isdigit(*cp) || (*cp == '-') || (*cp == '/') || (*cp == '.')) while (isdigit((int) *cp) || (*cp == '-') || (*cp == '/') || (*cp == '.'))
*lp++ = tolower(*cp++); *lp++ = tolower(*cp++);
} }
/* skip leading spaces */ /* skip leading spaces */
} }
else if (isspace(*cp)) else if (isspace((int) *cp))
{ {
cp++; cp++;
continue; continue;
...@@ -510,23 +510,23 @@ ParseDateTime(char *timestr, char *lowstr, ...@@ -510,23 +510,23 @@ ParseDateTime(char *timestr, char *lowstr,
{ {
*lp++ = *cp++; *lp++ = *cp++;
/* soak up leading whitespace */ /* soak up leading whitespace */
while (isspace(*cp)) while (isspace((int) *cp))
cp++; cp++;
/* numeric timezone? */ /* numeric timezone? */
if (isdigit(*cp)) if (isdigit((int) *cp))
{ {
ftype[nf] = DTK_TZ; ftype[nf] = DTK_TZ;
*lp++ = *cp++; *lp++ = *cp++;
while (isdigit(*cp) || (*cp == ':')) while (isdigit((int) *cp) || (*cp == ':'))
*lp++ = *cp++; *lp++ = *cp++;
/* special? */ /* special? */
} }
else if (isalpha(*cp)) else if (isalpha((int) *cp))
{ {
ftype[nf] = DTK_SPECIAL; ftype[nf] = DTK_SPECIAL;
*lp++ = tolower(*cp++); *lp++ = tolower(*cp++);
while (isalpha(*cp)) while (isalpha((int) *cp))
*lp++ = tolower(*cp++); *lp++ = tolower(*cp++);
/* otherwise something wrong... */ /* otherwise something wrong... */
...@@ -536,7 +536,7 @@ ParseDateTime(char *timestr, char *lowstr, ...@@ -536,7 +536,7 @@ ParseDateTime(char *timestr, char *lowstr,
/* ignore punctuation but use as delimiter */ /* ignore punctuation but use as delimiter */
} }
else if (ispunct(*cp)) else if (ispunct((int) *cp))
{ {
cp++; cp++;
continue; continue;
...@@ -654,7 +654,7 @@ DecodeDateTime(char **field, int *ftype, int nf, ...@@ -654,7 +654,7 @@ DecodeDateTime(char **field, int *ftype, int nf,
* PST) * PST)
*/ */
if ((i > 0) && ((fmask & DTK_M(TZ)) != 0) 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; *tzp -= tz;
tmask = 0; tmask = 0;
...@@ -999,7 +999,7 @@ DecodeTimeOnly(char **field, int *ftype, int nf, ...@@ -999,7 +999,7 @@ DecodeTimeOnly(char **field, int *ftype, int nf,
* PST) * PST)
*/ */
if ((i > 0) && ((fmask & DTK_M(TZ)) != 0) 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; *tzp -= tz;
tmask = 0; tmask = 0;
...@@ -1189,18 +1189,18 @@ DecodeDate(char *str, int fmask, int *tmask, struct tm * tm) ...@@ -1189,18 +1189,18 @@ DecodeDate(char *str, int fmask, int *tmask, struct tm * tm)
while ((*str != '\0') && (nf < MAXDATEFIELDS)) while ((*str != '\0') && (nf < MAXDATEFIELDS))
{ {
/* skip field separators */ /* skip field separators */
while (!isalnum(*str)) while (!isalnum((int) *str))
str++; str++;
field[nf] = str; field[nf] = str;
if (isdigit(*str)) if (isdigit((int) *str))
{ {
while (isdigit(*str)) while (isdigit((int) *str))
str++; str++;
} }
else if (isalpha(*str)) else if (isalpha((int) *str))
{ {
while (isalpha(*str)) while (isalpha((int) *str))
str++; str++;
} }
...@@ -1220,7 +1220,7 @@ DecodeDate(char *str, int fmask, int *tmask, struct tm * tm) ...@@ -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 */ /* look first for text fields, since that will be unambiguous month */
for (i = 0; i < nf; i++) for (i = 0; i < nf; i++)
{ {
if (isalpha(*field[i])) if (isalpha((int) *field[i]))
{ {
type = DecodeSpecial(i, field[i], &val); type = DecodeSpecial(i, field[i], &val);
if (type == IGNORE) if (type == IGNORE)
...@@ -1583,7 +1583,7 @@ DecodePosixTimezone(char *str, int *tzp) ...@@ -1583,7 +1583,7 @@ DecodePosixTimezone(char *str, int *tzp)
char delim; char delim;
cp = str; cp = str;
while ((*cp != '\0') && isalpha(*cp)) while ((*cp != '\0') && isalpha((int) *cp))
cp++; cp++;
if (DecodeTimezone(cp, &tz) != 0) if (DecodeTimezone(cp, &tz) != 0)
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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 @@ ...@@ -64,6 +64,11 @@
#endif #endif
#endif #endif
/* for finite() on Solaris */
#ifdef HAVE_IEEEFP_H
# include <ieeefp.h>
#endif
#include "fmgr.h" #include "fmgr.h"
#include "utils/builtins.h" #include "utils/builtins.h"
......
/* ----------------------------------------------------------------------- /* -----------------------------------------------------------------------
* formatting.c * 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 * Portions Copyright (c) 1999-2000, PostgreSQL, Inc
...@@ -1192,7 +1192,7 @@ DCH_processor(FormatNode *node, char *inout, int flag) ...@@ -1192,7 +1192,7 @@ DCH_processor(FormatNode *node, char *inout, int flag)
*/ */
if (isspace(n->character) && IS_FX == 0) if (isspace(n->character) && IS_FX == 0)
{ {
while (*s != '\0' && isspace(*(s + 1))) while (*s != '\0' && isspace((int) *(s + 1)))
++s; ++s;
} }
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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) ...@@ -111,7 +111,7 @@ single_decode(char *str, float8 *x, char **s)
if (!PointerIsValid(str)) if (!PointerIsValid(str))
return FALSE; return FALSE;
while (isspace(*str)) while (isspace((int) *str))
str++; str++;
*x = strtod(str, &cp); *x = strtod(str, &cp);
#ifdef GEODEBUG #ifdef GEODEBUG
...@@ -119,7 +119,7 @@ single_decode(char *str, float8 *x, char **s) ...@@ -119,7 +119,7 @@ single_decode(char *str, float8 *x, char **s)
#endif #endif
if (cp <= str) if (cp <= str)
return FALSE; return FALSE;
while (isspace(*cp)) while (isspace((int) *cp))
cp++; cp++;
if (s != NULL) if (s != NULL)
...@@ -144,33 +144,33 @@ pair_decode(char *str, float8 *x, float8 *y, char **s) ...@@ -144,33 +144,33 @@ pair_decode(char *str, float8 *x, float8 *y, char **s)
if (!PointerIsValid(str)) if (!PointerIsValid(str))
return FALSE; return FALSE;
while (isspace(*str)) while (isspace((int) *str))
str++; str++;
if ((has_delim = (*str == LDELIM))) if ((has_delim = (*str == LDELIM)))
str++; str++;
while (isspace(*str)) while (isspace((int) *str))
str++; str++;
*x = strtod(str, &cp); *x = strtod(str, &cp);
if (cp <= str) if (cp <= str)
return FALSE; return FALSE;
while (isspace(*cp)) while (isspace((int) *cp))
cp++; cp++;
if (*cp++ != DELIM) if (*cp++ != DELIM)
return FALSE; return FALSE;
while (isspace(*cp)) while (isspace((int) *cp))
cp++; cp++;
*y = strtod(cp, &str); *y = strtod(cp, &str);
if (str <= cp) if (str <= cp)
return FALSE; return FALSE;
while (isspace(*str)) while (isspace((int) *str))
str++; str++;
if (has_delim) if (has_delim)
{ {
if (*str != RDELIM) if (*str != RDELIM)
return FALSE; return FALSE;
str++; str++;
while (isspace(*str)) while (isspace((int) *str))
str++; str++;
} }
if (s != NULL) if (s != NULL)
...@@ -195,7 +195,7 @@ path_decode(int opentype, int npts, char *str, int *isopen, char **ss, Point *p) ...@@ -195,7 +195,7 @@ path_decode(int opentype, int npts, char *str, int *isopen, char **ss, Point *p)
int i; int i;
s = str; s = str;
while (isspace(*s)) while (isspace((int) *s))
s++; s++;
if ((*isopen = (*s == LDELIM_EP))) if ((*isopen = (*s == LDELIM_EP)))
{ {
...@@ -204,14 +204,14 @@ path_decode(int opentype, int npts, char *str, int *isopen, char **ss, Point *p) ...@@ -204,14 +204,14 @@ path_decode(int opentype, int npts, char *str, int *isopen, char **ss, Point *p)
return FALSE; return FALSE;
depth++; depth++;
s++; s++;
while (isspace(*s)) while (isspace((int) *s))
s++; s++;
} }
else if (*s == LDELIM) else if (*s == LDELIM)
{ {
cp = (s + 1); cp = (s + 1);
while (isspace(*cp)) while (isspace((int) *cp))
cp++; cp++;
if (*cp == LDELIM) if (*cp == LDELIM)
{ {
...@@ -247,7 +247,7 @@ path_decode(int opentype, int npts, char *str, int *isopen, char **ss, Point *p) ...@@ -247,7 +247,7 @@ path_decode(int opentype, int npts, char *str, int *isopen, char **ss, Point *p)
{ {
depth--; depth--;
s++; s++;
while (isspace(*s)) while (isspace((int) *s))
s++; s++;
} }
else else
...@@ -1157,7 +1157,7 @@ path_in(char *str) ...@@ -1157,7 +1157,7 @@ path_in(char *str)
elog(ERROR, "Bad path external representation '%s'", str); elog(ERROR, "Bad path external representation '%s'", str);
s = str; s = str;
while (isspace(*s)) while (isspace((int) *s))
s++; s++;
/* skip single leading paren */ /* skip single leading paren */
...@@ -3845,13 +3845,13 @@ circle_in(char *str) ...@@ -3845,13 +3845,13 @@ circle_in(char *str)
circle = palloc(sizeof(CIRCLE)); circle = palloc(sizeof(CIRCLE));
s = str; s = str;
while (isspace(*s)) while (isspace((int) *s))
s++; s++;
if ((*s == LDELIM_C) || (*s == LDELIM)) if ((*s == LDELIM_C) || (*s == LDELIM))
{ {
depth++; depth++;
cp = (s + 1); cp = (s + 1);
while (isspace(*cp)) while (isspace((int) *cp))
cp++; cp++;
if (*cp == LDELIM) if (*cp == LDELIM)
s = cp; s = cp;
...@@ -3862,7 +3862,7 @@ circle_in(char *str) ...@@ -3862,7 +3862,7 @@ circle_in(char *str)
if (*s == DELIM) if (*s == DELIM)
s++; s++;
while (isspace(*s)) while (isspace((int) *s))
s++; s++;
if ((!single_decode(s, &circle->radius, &s)) || (circle->radius < 0)) if ((!single_decode(s, &circle->radius, &s)) || (circle->radius < 0))
...@@ -3875,7 +3875,7 @@ circle_in(char *str) ...@@ -3875,7 +3875,7 @@ circle_in(char *str)
{ {
depth--; depth--;
s++; s++;
while (isspace(*s)) while (isspace((int) *s))
s++; s++;
} }
else else
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
*/ */
#if defined(LIBC_SCCS) && !defined(lint) #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 #endif
...@@ -105,7 +105,7 @@ inet_cidr_pton_ipv4(const char *src, u_char *dst, size_t size) ...@@ -105,7 +105,7 @@ inet_cidr_pton_ipv4(const char *src, u_char *dst, size_t size)
ch = *src++; ch = *src++;
if (ch == '0' && (src[0] == 'x' || src[0] == 'X') 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. */ /* Hexadecimal: Eat nybble string. */
if (size <= 0) if (size <= 0)
...@@ -170,7 +170,7 @@ inet_cidr_pton_ipv4(const char *src, u_char *dst, size_t size) ...@@ -170,7 +170,7 @@ inet_cidr_pton_ipv4(const char *src, u_char *dst, size_t size)
goto enoent; goto enoent;
bits = -1; 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. */ /* CIDR width specifier. Nothing can follow it. */
ch = *src++; /* Skip over the /. */ ch = *src++; /* Skip over the /. */
...@@ -284,7 +284,7 @@ inet_net_pton_ipv4(const char *src, u_char *dst) ...@@ -284,7 +284,7 @@ inet_net_pton_ipv4(const char *src, u_char *dst)
/* Get the prefix length if any. */ /* Get the prefix length if any. */
bits = -1; 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. */ /* CIDR width specifier. Nothing can follow it. */
ch = *src++; /* Skip over the /. */ ch = *src++; /* Skip over the /. */
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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) ...@@ -88,12 +88,12 @@ int2vectorin(PG_FUNCTION_ARGS)
{ {
if (sscanf(intString, "%hd", &result[slot]) != 1) if (sscanf(intString, "%hd", &result[slot]) != 1)
break; break;
while (*intString && isspace(*intString)) while (*intString && isspace((int) *intString))
intString++; intString++;
while (*intString && !isspace(*intString)) while (*intString && !isspace((int) *intString))
intString++; intString++;
} }
while (*intString && isspace(*intString)) while (*intString && isspace((int) *intString))
intString++; intString++;
if (*intString) if (*intString)
elog(ERROR, "int2vector value has too many values"); elog(ERROR, "int2vector value has too many values");
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * 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) ...@@ -70,15 +70,15 @@ int8in(PG_FUNCTION_ARGS)
* Do our own scan, rather than relying on sscanf which might be * Do our own scan, rather than relying on sscanf which might be
* broken for long long. * broken for long long.
*/ */
while (*ptr && isspace(*ptr)) /* skip leading spaces */ while (*ptr && isspace((int) *ptr)) /* skip leading spaces */
ptr++; ptr++;
if (*ptr == '-') /* handle sign */ if (*ptr == '-') /* handle sign */
sign = -1, ptr++; sign = -1, ptr++;
else if (*ptr == '+') else if (*ptr == '+')
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); 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'); int64 newtmp = tmp * 10 + (*ptr++ - '0');
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* 1998 Jan Wieck * 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) ...@@ -2084,7 +2084,7 @@ set_var_from_str(char *str, NumericVar *dest)
while (*cp) while (*cp)
{ {
if (!isspace(*cp)) if (!isspace((int) *cp))
break; break;
cp++; cp++;
} }
...@@ -2113,12 +2113,12 @@ set_var_from_str(char *str, NumericVar *dest) ...@@ -2113,12 +2113,12 @@ set_var_from_str(char *str, NumericVar *dest)
cp++; cp++;
} }
if (!isdigit(*cp)) if (!isdigit((int) *cp))
elog(ERROR, "Bad numeric input format '%s'", str); elog(ERROR, "Bad numeric input format '%s'", str);
while (*cp) while (*cp)
{ {
if (isdigit(*cp)) if (isdigit((int) *cp))
{ {
dest->digits[i++] = *cp++ - '0'; dest->digits[i++] = *cp++ - '0';
if (!have_dp) if (!have_dp)
...@@ -2161,7 +2161,7 @@ set_var_from_str(char *str, NumericVar *dest) ...@@ -2161,7 +2161,7 @@ set_var_from_str(char *str, NumericVar *dest)
/* Should be nothing left but spaces */ /* Should be nothing left but spaces */
while (*cp) while (*cp)
{ {
if (!isspace(*cp)) if (!isspace((int) *cp))
elog(ERROR, "Bad numeric input format '%s'", str); elog(ERROR, "Bad numeric input format '%s'", str);
cp++; cp++;
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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) ...@@ -41,12 +41,12 @@ oidvectorin(PG_FUNCTION_ARGS)
{ {
if (sscanf(oidString, "%u", &result[slot]) != 1) if (sscanf(oidString, "%u", &result[slot]) != 1)
break; break;
while (*oidString && isspace(*oidString)) while (*oidString && isspace((int) *oidString))
oidString++; oidString++;
while (*oidString && !isspace(*oidString)) while (*oidString && !isspace((int) *oidString))
oidString++; oidString++;
} }
while (*oidString && isspace(*oidString)) while (*oidString && isspace((int) *oidString))
oidString++; oidString++;
if (*oidString) if (*oidString)
elog(ERROR, "oidvector value has too many values"); elog(ERROR, "oidvector value has too many values");
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* *
* *
* IDENTIFICATION * 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, ...@@ -1383,7 +1383,7 @@ regex_fixed_prefix(char *patt, bool case_insensitive,
patt[pos] == '(' || patt[pos] == '(' ||
patt[pos] == '[' || patt[pos] == '[' ||
patt[pos] == '$' || patt[pos] == '$' ||
(case_insensitive && isalpha(patt[pos]))) (case_insensitive && isalpha((int) patt[pos])))
break; break;
/* /*
* Check for quantifiers. Except for +, this means the preceding * Check for quantifiers. Except for +, this means the preceding
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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) ...@@ -57,9 +57,9 @@ byteain(char *inputText)
{ {
if (*tp == '\\') if (*tp == '\\')
tp++; tp++;
else if (!isdigit(*tp++) || else if (!isdigit((int) *tp++) ||
!isdigit(*tp++) || !isdigit((int) *tp++) ||
!isdigit(*tp++)) !isdigit((int) *tp++))
elog(ERROR, "Bad input string for type bytea"); elog(ERROR, "Bad input string for type bytea");
} }
tp = inputText; tp = inputText;
...@@ -111,7 +111,7 @@ byteaout(bytea *vlena) ...@@ -111,7 +111,7 @@ byteaout(bytea *vlena)
for (i = vlena->vl_len - VARHDRSZ; i != 0; i--, vp++) for (i = vlena->vl_len - VARHDRSZ; i != 0; i--, vp++)
if (*vp == '\\') if (*vp == '\\')
len += 2; len += 2;
else if (isascii(*vp) && isprint(*vp)) else if (isascii((int) *vp) && isprint((int) *vp))
len++; len++;
else else
len += VARHDRSZ; len += VARHDRSZ;
...@@ -124,7 +124,7 @@ byteaout(bytea *vlena) ...@@ -124,7 +124,7 @@ byteaout(bytea *vlena)
*rp++ = '\\'; *rp++ = '\\';
*rp++ = '\\'; *rp++ = '\\';
} }
else if (isascii(*vp) && isprint(*vp)) else if (isascii((int) *vp) && isprint((int) *vp))
*rp++ = *vp++; *rp++ = *vp++;
else else
{ {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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) ...@@ -500,14 +500,14 @@ SetPidFile(pid_t pid)
*/ */
fprintf(stderr, "Can't create pid file: %s\n", pidfile); fprintf(stderr, "Can't create pid file: %s\n", pidfile);
if (is_postgres) 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 else
fprintf(stderr, "Is another postmaster (pid: %s) running?\n", pidstr); fprintf(stderr, "Is another postmaster (pid: %s) running?\n", pidstr);
return (-1); return (-1);
} }
} }
sprintf(pidstr, "%d", pid); sprintf(pidstr, "%d", (int) pid);
if (write(fd, pidstr, strlen(pidstr)) != strlen(pidstr)) if (write(fd, pidstr, strlen(pidstr)) != strlen(pidstr))
{ {
fprintf(stderr, "Write to pid file failed\n"); fprintf(stderr, "Write to pid file failed\n");
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.42 2000/05/19 23:00:00 tgl Exp $ * $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.43 2000/06/14 18:17:50 petere Exp $
* *
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2 * Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
* *
...@@ -190,7 +190,7 @@ parseNumericArray(const char *str, char **array, int arraysize) ...@@ -190,7 +190,7 @@ parseNumericArray(const char *str, char **array, int arraysize)
} }
else else
{ {
if (!(isdigit(s) || s == '-') || j >= sizeof(temp) - 1) if (!(isdigit((int) s) || s == '-') || j >= sizeof(temp) - 1)
{ {
fprintf(stderr, "parseNumericArray: bogus number\n"); fprintf(stderr, "parseNumericArray: bogus number\n");
exit(2); exit(2);
...@@ -517,12 +517,12 @@ fmtId(const char *rawid, bool force_quotes) ...@@ -517,12 +517,12 @@ fmtId(const char *rawid, bool force_quotes)
if (!force_quotes) if (!force_quotes)
{ {
if (!islower(*rawid)) if (!islower((int) *rawid))
force_quotes = true; force_quotes = true;
else else
for (cp = rawid; *cp; cp++) for (cp = rawid; *cp; cp++)
{ {
if (!(islower(*cp) || isdigit(*cp) || (*cp == '_'))) if (!(islower((int) *cp) || isdigit((int) *cp) || (*cp == '_')))
{ {
force_quotes = true; force_quotes = true;
break; break;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.151 2000/06/10 03:53:59 tgl Exp $ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.152 2000/06/14 18:17:50 petere Exp $
* *
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
* *
...@@ -699,8 +699,8 @@ main(int argc, char **argv) ...@@ -699,8 +699,8 @@ main(int argc, char **argv)
else else
{ {
for (i = 0; tablename[i]; i++) for (i = 0; tablename[i]; i++)
if (isascii((unsigned char) tablename[i]) && if (isascii((int) tablename[i]) &&
isupper(tablename[i])) isupper((int) tablename[i]))
tablename[i] = tolower(tablename[i]); tablename[i] = tolower(tablename[i]);
} }
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.58 2000/04/05 09:05:34 meskes Exp $ * $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.59 2000/06/14 18:17:54 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -491,7 +491,7 @@ cppline {space}*#(.*\\{line_end})*.* ...@@ -491,7 +491,7 @@ cppline {space}*#(.*\\{line_end})*.*
/* this should leave the last byte set to '\0' */ /* this should leave the last byte set to '\0' */
strncpy(lower_text, yytext, NAMEDATALEN-1); strncpy(lower_text, yytext, NAMEDATALEN-1);
for(i = 0; lower_text[i]; i++) for(i = 0; lower_text[i]; i++)
if (isascii((unsigned char)lower_text[i]) && isupper(lower_text[i])) if (isascii((int)lower_text[i]) && isupper((int) lower_text[i]))
lower_text[i] = tolower(lower_text[i]); lower_text[i] = tolower(lower_text[i]);
if (i >= NAMEDATALEN) if (i >= NAMEDATALEN)
...@@ -682,7 +682,7 @@ cppline {space}*#(.*\\{line_end})*.* ...@@ -682,7 +682,7 @@ cppline {space}*#(.*\\{line_end})*.*
/* skip the ";" and trailing whitespace. Note that yytext contains /* skip the ";" and trailing whitespace. Note that yytext contains
at least one non-space character plus the ";" */ at least one non-space character plus the ";" */
for ( i = strlen(yytext)-2; i > 0 && isspace(yytext[i]); i-- ) {} for ( i = strlen(yytext)-2; i > 0 && isspace((int) yytext[i]); i-- ) {}
yytext[i+1] = '\0'; yytext[i+1] = '\0';
for ( defptr = defines; defptr != NULL && for ( defptr = defines; defptr != NULL &&
...@@ -754,7 +754,7 @@ cppline {space}*#(.*\\{line_end})*.* ...@@ -754,7 +754,7 @@ cppline {space}*#(.*\\{line_end})*.*
/* skip the ";" and trailing whitespace. Note that yytext contains /* skip the ";" and trailing whitespace. Note that yytext contains
at least one non-space character plus the ";" */ at least one non-space character plus the ";" */
for ( i = strlen(yytext)-2; i > 0 && isspace(yytext[i]); i-- ) {} for ( i = strlen(yytext)-2; i > 0 && isspace((int) yytext[i]); i-- ) {}
yytext[i+1] = '\0'; yytext[i+1] = '\0';
yyin = NULL; yyin = NULL;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.129 2000/06/11 11:40:07 petere Exp $ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.130 2000/06/14 18:17:58 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -629,10 +629,7 @@ connectNoDelay(PGconn *conn) ...@@ -629,10 +629,7 @@ connectNoDelay(PGconn *conn)
int on = 1; int on = 1;
if (setsockopt(conn->sock, IPPROTO_TCP, TCP_NODELAY, if (setsockopt(conn->sock, IPPROTO_TCP, TCP_NODELAY,
#ifdef WIN32 (char *) &on,
(char *)
#endif
&on,
sizeof(on)) < 0) sizeof(on)) < 0)
{ {
printfPQExpBuffer(&conn->errorMessage, printfPQExpBuffer(&conn->errorMessage,
...@@ -1098,7 +1095,7 @@ keep_going: /* We will come back to here until there ...@@ -1098,7 +1095,7 @@ keep_going: /* We will come back to here until there
*/ */
if (getsockopt(conn->sock, SOL_SOCKET, SO_ERROR, if (getsockopt(conn->sock, SOL_SOCKET, SO_ERROR,
&optval, &optlen) == -1) (char *) &optval, &optlen) == -1)
{ {
printfPQExpBuffer(&conn->errorMessage, printfPQExpBuffer(&conn->errorMessage,
"PQconnectPoll() -- getsockopt() failed: " "PQconnectPoll() -- getsockopt() failed: "
...@@ -2117,7 +2114,7 @@ conninfo_parse(const char *conninfo, PQExpBuffer errorMessage) ...@@ -2117,7 +2114,7 @@ conninfo_parse(const char *conninfo, PQExpBuffer errorMessage)
while (*cp) while (*cp)
{ {
/* Skip blanks before the parameter name */ /* Skip blanks before the parameter name */
if (isspace(*cp)) if (isspace((int) *cp))
{ {
cp++; cp++;
continue; continue;
...@@ -2129,12 +2126,12 @@ conninfo_parse(const char *conninfo, PQExpBuffer errorMessage) ...@@ -2129,12 +2126,12 @@ conninfo_parse(const char *conninfo, PQExpBuffer errorMessage)
{ {
if (*cp == '=') if (*cp == '=')
break; break;
if (isspace(*cp)) if (isspace((int) *cp))
{ {
*cp++ = '\0'; *cp++ = '\0';
while (*cp) while (*cp)
{ {
if (!isspace(*cp)) if (!isspace((int) *cp))
break; break;
cp++; cp++;
} }
...@@ -2158,7 +2155,7 @@ conninfo_parse(const char *conninfo, PQExpBuffer errorMessage) ...@@ -2158,7 +2155,7 @@ conninfo_parse(const char *conninfo, PQExpBuffer errorMessage)
/* Skip blanks after the '=' */ /* Skip blanks after the '=' */
while (*cp) while (*cp)
{ {
if (!isspace(*cp)) if (!isspace((int) *cp))
break; break;
cp++; cp++;
} }
...@@ -2171,7 +2168,7 @@ conninfo_parse(const char *conninfo, PQExpBuffer errorMessage) ...@@ -2171,7 +2168,7 @@ conninfo_parse(const char *conninfo, PQExpBuffer errorMessage)
cp2 = pval; cp2 = pval;
while (*cp) while (*cp)
{ {
if (isspace(*cp)) if (isspace((int) *cp))
{ {
*cp++ = '\0'; *cp++ = '\0';
break; break;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.95 2000/05/25 19:09:55 momjian Exp $ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.96 2000/06/14 18:17:58 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1955,8 +1955,8 @@ PQfnumber(const PGresult *res, const char *field_name) ...@@ -1955,8 +1955,8 @@ PQfnumber(const PGresult *res, const char *field_name)
} }
else else
for (i = 0; field_case[i]; i++) for (i = 0; field_case[i]; i++)
if (isascii((unsigned char) field_case[i]) && if (isascii((int) field_case[i]) &&
isupper(field_case[i])) isupper((int) field_case[i]))
field_case[i] = tolower(field_case[i]); field_case[i] = tolower(field_case[i]);
for (i = 0; i < res->numAttributes; i++) for (i = 0; i < res->numAttributes; i++)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* procedural language * procedural language
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_funcs.c,v 1.5 1999/05/25 16:15:18 momjian Exp $ * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_funcs.c,v 1.6 2000/06/14 18:18:00 petere Exp $
* *
* This software is copyrighted by Jan Wieck - Hamburg. * This software is copyrighted by Jan Wieck - Hamburg.
* *
...@@ -354,7 +354,7 @@ plpgsql_tolower(char *s) ...@@ -354,7 +354,7 @@ plpgsql_tolower(char *s)
} }
else else
{ {
if (isupper(*s)) if (isupper((int) *s))
*cp++ = tolower(*s++); *cp++ = tolower(*s++);
else else
*cp++ = *s++; *cp++ = *s++;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/utils/Attic/version.c,v 1.16 2000/06/02 15:57:44 momjian Exp $ * $Header: /cvsroot/pgsql/src/utils/Attic/version.c,v 1.17 2000/06/14 18:18:01 petere Exp $
* *
* STANDALONE CODE - do not use error routines as this code is not linked * STANDALONE CODE - do not use error routines as this code is not linked
* with any... * with any...
...@@ -76,7 +76,7 @@ ValidatePgVersion(const char *path, char **reason_p) ...@@ -76,7 +76,7 @@ ValidatePgVersion(const char *path, char **reason_p)
{ {
nread = read(fd, version, sizeof(version) - 1); nread = read(fd, version, sizeof(version) - 1);
if (nread < 4 || if (nread < 4 ||
!isdigit(version[0]) || !isdigit((int)version[0]) ||
version[nread - 1] != '\n') version[nread - 1] != '\n')
{ {
*reason_p = malloc(100 + strlen(full_path)); *reason_p = malloc(100 + strlen(full_path));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment