1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-29 10:41:53 +03:00

Make pgsql compile on FreeBSD-alpha.

Context diff this time.

Remove -m486 compile args for FreeBSD-i386, compile -O2 on i386.

Compile with only -O on alpha for codegen safety.

Make the port use the TEST_AND_SET for alpha and i386 on FreeBSD.

Fix a lot of bogus string formats for outputting pointers (cast to int
and %u/%x replaced with no cast and %p), and 'Size'(size_t) are now
cast to 'unsigned long' and output with %lu/

Remove an unused variable.

Alfred Perlstein
This commit is contained in:
Bruce Momjian
2000-11-16 05:51:07 +00:00
parent 580d2bc60f
commit 312063c97b
14 changed files with 69 additions and 58 deletions

View File

@ -25,7 +25,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.41 2000/04/12 17:17:15 momjian Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.42 2000/11/16 05:51:05 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -209,7 +209,7 @@ pqGetnchar(char *s, size_t len, PGconn *conn)
conn->inCursor += len;
if (conn->Pfdebug)
fprintf(conn->Pfdebug, "From backend (%d)> %.*s\n", len, (int) len, s);
fprintf(conn->Pfdebug, "From backend (%lu)> %.*s\n", (unsigned long)len, (int) len, s);
return 0;
}
@ -260,13 +260,13 @@ pqGetInt(int *result, size_t bytes, PGconn *conn)
break;
default:
sprintf(noticeBuf,
"pqGetInt: int size %d not supported\n", bytes);
"pqGetInt: int size %lu not supported\n", (unsigned long)bytes);
DONOTICE(conn, noticeBuf);
return EOF;
}
if (conn->Pfdebug)
fprintf(conn->Pfdebug, "From backend (#%d)> %d\n", bytes, *result);
fprintf(conn->Pfdebug, "From backend (#%lu)> %d\n", (unsigned long)bytes, *result);
return 0;
}
@ -297,13 +297,13 @@ pqPutInt(int value, size_t bytes, PGconn *conn)
break;
default:
sprintf(noticeBuf,
"pqPutInt: int size %d not supported\n", bytes);
"pqPutInt: int size %lu not supported\n", (unsigned long)bytes);
DONOTICE(conn, noticeBuf);
return EOF;
}
if (conn->Pfdebug)
fprintf(conn->Pfdebug, "To backend (%d#)> %d\n", bytes, value);
fprintf(conn->Pfdebug, "To backend (%lu#)> %d\n", (unsigned long)bytes, value);
return 0;
}