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
#
# $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@
......@@ -30,26 +30,27 @@ distclean:
.PHONY: all install clean distclean
AUTOCONF = @AUTOCONF@
ACLOCAL = @ACLOCAL@
GNUmakefile: GNUmakefile.in $(top_builddir)/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
# cd $(top_builddir) && ./config.status --recheck
# These dependencies are risky because both the target and the sources
# 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
# 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
AUTOCONF = autoconf
# $(top_srcdir)/configure: $(top_srcdir)/configure.in $(top_srcdir)/aclocal.m4
# cd $(top_srcdir) && $(AUTOCONF)
# Only use this rule if you actually said `make configure'.
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)
# cd $(top_srcdir) && $(ACLOCAL) -I config
# This one we can leave unprotected because by default nothing depends
# 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)
AC_SUBST(INSTL_EXE_OPTS)
AC_PROG_AWK
AM_MISSING_PROG(AUTOCONF, autoconf, [\${SHELL} \${top_srcdir}/config])
AM_MISSING_PROG(ACLOCAL, aclocal, [\${SHELL} \${top_srcdir}/config])
AC_PROG_LEX
if test "$LEX" = "flex"; then
......
......@@ -7,7 +7,7 @@
*
*
* 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,
elog(ERROR, "COPY command, running in backend with "
"effective uid %d, could not open file '%s' for "
"reading. Errno = %s (%d).",
geteuid(), filename, strerror(errno), errno);
(int) geteuid(), filename, strerror(errno), errno);
}
CopyFrom(rel, binary, oids, fp, delim, null_print);
}
......@@ -358,7 +358,7 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
elog(ERROR, "COPY command, running in backend with "
"effective uid %d, could not open file '%s' for "
"writing. Errno = %s (%d).",
geteuid(), filename, strerror(errno), errno);
(int) geteuid(), filename, strerror(errno), errno);
}
CopyTo(rel, binary, oids, fp, delim, null_print);
}
......
......@@ -398,8 +398,8 @@ get_seq_name(text *seqin)
*/
for (; *rawname; rawname++)
{
if (isascii((unsigned char) *rawname) &&
isupper(*rawname))
if (isascii((int) *rawname) &&
isupper((int) *rawname))
*rawname = tolower(*rawname);
}
}
......
......@@ -9,7 +9,7 @@
*
*
* 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)
return NULL;
/* skip leading white space */
while (isspace(*str))
while (isspace((int) *str))
str++;
/* end of string? then return NULL */
......@@ -110,7 +110,7 @@ get_token(char **tok, char **val, char *str)
*tok = str;
/* Advance to end of word */
while (*str && !isspace(*str) && *str != ',' && *str != '=')
while (*str && !isspace((int) *str) && *str != ',' && *str != '=')
str++;
/* Terminate word string for caller */
......@@ -118,7 +118,7 @@ get_token(char **tok, char **val, char *str)
*str = '\0';
/* Skip any whitespace */
while (isspace(ch))
while (isspace((int) ch))
ch = *(++str);
/* end of string? */
......@@ -136,7 +136,7 @@ get_token(char **tok, char **val, char *str)
str++;
/* skip whitespace after '=' */
while (isspace(*str))
while (isspace((int) *str))
str++;
if (*str == ',' || *str == '\0')
......@@ -146,7 +146,7 @@ get_token(char **tok, char **val, char *str)
*val = str;
/* Advance to end of word */
while (*str && !isspace(*str) && *str != ',')
while (*str && !isspace((int) *str) && *str != ',')
str++;
/* Terminate word string for caller */
......@@ -154,7 +154,7 @@ get_token(char **tok, char **val, char *str)
*str = '\0';
/* Skip any whitespace */
while (isspace(ch))
while (isspace((int) ch))
ch = *(++str);
/* end of string? */
......
......@@ -29,7 +29,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* 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)
int on = 1;
if (setsockopt(port->sock, IPPROTO_TCP, TCP_NODELAY,
&on, sizeof(on)) < 0)
(char *) &on, sizeof(on)) < 0)
{
perror("postmaster: StreamConnection: setsockopt(TCP_NODELAY)");
return STATUS_ERROR;
}
if (setsockopt(port->sock, SOL_SOCKET, SO_KEEPALIVE,
&on, sizeof(on)) < 0)
(char *) &on, sizeof(on)) < 0)
{
perror("postmaster: StreamConnection: setsockopt(SO_KEEPALIVE)");
return STATUS_ERROR;
......
......@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* 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
* Every (plan) node in POSTGRES has an associated "out" routine which
......@@ -70,8 +70,8 @@ _outToken(StringInfo str, char *s)
if (*s == '<' ||
*s == '\"' ||
*s == '@' ||
isdigit(*s) ||
(*s == '-' && isdigit(s[1])))
isdigit((int) *s) ||
(*s == '-' && isdigit((int) s[1])))
appendStringInfoChar(str, '\\');
while (*s)
{
......
......@@ -9,7 +9,7 @@
*
*
* 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
* AUTHOR DATE MAJOR EVENT
......@@ -205,8 +205,8 @@ nodeTokenType(char *token, int length)
numlen = length;
if (*numptr == '+' || *numptr == '-')
numptr++, numlen--;
if ((numlen > 0 && isdigit(*numptr)) ||
(numlen > 1 && *numptr == '.' && isdigit(numptr[1])))
if ((numlen > 0 && isdigit((int) *numptr)) ||
(numlen > 1 && *numptr == '.' && isdigit((int) numptr[1])))
{
/*
......
......@@ -8,7 +8,7 @@
*
*
* 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)
ndigits = 0;
for (; *ptr; ptr++)
{
if (isdigit(*ptr))
if (isdigit((int) *ptr))
ndigits++;
else if (*ptr == 'e' || *ptr == 'E')
break; /* don't count digits in exponent */
......
......@@ -9,7 +9,7 @@
*
*
* 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 .
ScanKeyword *keyword;
for(i = 0; yytext[i]; i++)
if (isascii((unsigned char)yytext[i]) &&
isupper(yytext[i]))
if (isascii((int) yytext[i]) &&
isupper((int) yytext[i]))
yytext[i] = tolower(yytext[i]);
if (i >= NAMEDATALEN)
{
......
......@@ -11,7 +11,7 @@
*
*
* 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
*
......@@ -1801,12 +1801,12 @@ split_opts(char **argv, int *argcp, char *s)
{
while (s && *s)
{
while (isspace(*s))
while (isspace((int) *s))
++s;
if (*s == '\0')
break;
argv[(*argcp)++] = s;
while (*s && !isspace(*s))
while (*s && !isspace((int) *s))
++s;
if (*s)
*s++ = '\0';
......
......@@ -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");
......
......@@ -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++;
......
......@@ -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')
......
......@@ -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)
......
......@@ -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"
......
/* -----------------------------------------------------------------------
* 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;
}
}
......
......@@ -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
......
......@@ -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 /. */
......
......@@ -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");
......
......@@ -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');
......
......@@ -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++;
}
......
......@@ -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");
......
......@@ -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
......
......@@ -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
{
......
......@@ -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");
......
......@@ -8,7 +8,7 @@
*
*
* 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
*
......@@ -190,7 +190,7 @@ parseNumericArray(const char *str, char **array, int arraysize)
}
else
{
if (!(isdigit(s) || s == '-') || j >= sizeof(temp) - 1)
if (!(isdigit((int) s) || s == '-') || j >= sizeof(temp) - 1)
{
fprintf(stderr, "parseNumericArray: bogus number\n");
exit(2);
......@@ -517,12 +517,12 @@ fmtId(const char *rawid, bool force_quotes)
if (!force_quotes)
{
if (!islower(*rawid))
if (!islower((int) *rawid))
force_quotes = true;
else
for (cp = rawid; *cp; cp++)
{
if (!(islower(*cp) || isdigit(*cp) || (*cp == '_')))
if (!(islower((int) *cp) || isdigit((int) *cp) || (*cp == '_')))
{
force_quotes = true;
break;
......
......@@ -22,7 +22,7 @@
*
*
* 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
*
......@@ -699,8 +699,8 @@ main(int argc, char **argv)
else
{
for (i = 0; tablename[i]; i++)
if (isascii((unsigned char) tablename[i]) &&
isupper(tablename[i]))
if (isascii((int) tablename[i]) &&
isupper((int) tablename[i]))
tablename[i] = tolower(tablename[i]);
}
}
......
......@@ -12,7 +12,7 @@
*
*
* 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})*.*
/* this should leave the last byte set to '\0' */
strncpy(lower_text, yytext, NAMEDATALEN-1);
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]);
if (i >= NAMEDATALEN)
......@@ -682,7 +682,7 @@ cppline {space}*#(.*\\{line_end})*.*
/* skip the ";" and trailing whitespace. Note that yytext contains
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';
for ( defptr = defines; defptr != NULL &&
......@@ -754,7 +754,7 @@ cppline {space}*#(.*\\{line_end})*.*
/* skip the ";" and trailing whitespace. Note that yytext contains
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';
yyin = NULL;
......
......@@ -8,7 +8,7 @@
*
*
* 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)
int on = 1;
if (setsockopt(conn->sock, IPPROTO_TCP, TCP_NODELAY,
#ifdef WIN32
(char *)
#endif
&on,
(char *) &on,
sizeof(on)) < 0)
{
printfPQExpBuffer(&conn->errorMessage,
......@@ -1098,7 +1095,7 @@ keep_going: /* We will come back to here until there
*/
if (getsockopt(conn->sock, SOL_SOCKET, SO_ERROR,
&optval, &optlen) == -1)
(char *) &optval, &optlen) == -1)
{
printfPQExpBuffer(&conn->errorMessage,
"PQconnectPoll() -- getsockopt() failed: "
......@@ -2117,7 +2114,7 @@ conninfo_parse(const char *conninfo, PQExpBuffer errorMessage)
while (*cp)
{
/* Skip blanks before the parameter name */
if (isspace(*cp))
if (isspace((int) *cp))
{
cp++;
continue;
......@@ -2129,12 +2126,12 @@ conninfo_parse(const char *conninfo, PQExpBuffer errorMessage)
{
if (*cp == '=')
break;
if (isspace(*cp))
if (isspace((int) *cp))
{
*cp++ = '\0';
while (*cp)
{
if (!isspace(*cp))
if (!isspace((int) *cp))
break;
cp++;
}
......@@ -2158,7 +2155,7 @@ conninfo_parse(const char *conninfo, PQExpBuffer errorMessage)
/* Skip blanks after the '=' */
while (*cp)
{
if (!isspace(*cp))
if (!isspace((int) *cp))
break;
cp++;
}
......@@ -2171,7 +2168,7 @@ conninfo_parse(const char *conninfo, PQExpBuffer errorMessage)
cp2 = pval;
while (*cp)
{
if (isspace(*cp))
if (isspace((int) *cp))
{
*cp++ = '\0';
break;
......
......@@ -8,7 +8,7 @@
*
*
* 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)
}
else
for (i = 0; field_case[i]; i++)
if (isascii((unsigned char) field_case[i]) &&
isupper(field_case[i]))
if (isascii((int) field_case[i]) &&
isupper((int) field_case[i]))
field_case[i] = tolower(field_case[i]);
for (i = 0; i < res->numAttributes; i++)
......
......@@ -3,7 +3,7 @@
* procedural language
*
* 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.
*
......@@ -354,7 +354,7 @@ plpgsql_tolower(char *s)
}
else
{
if (isupper(*s))
if (isupper((int) *s))
*cp++ = tolower(*s++);
else
*cp++ = *s++;
......
......@@ -8,7 +8,7 @@
*
*
* 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
* with any...
......@@ -76,7 +76,7 @@ ValidatePgVersion(const char *path, char **reason_p)
{
nread = read(fd, version, sizeof(version) - 1);
if (nread < 4 ||
!isdigit(version[0]) ||
!isdigit((int)version[0]) ||
version[nread - 1] != '\n')
{
*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