1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +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

@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.45 2000/09/23 22:40:12 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.46 2000/11/16 05:50:57 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -139,7 +139,8 @@ index_formtuple(TupleDesc tupleDescriptor,
*/
if ((size & INDEX_SIZE_MASK) != size)
elog(ERROR, "index_formtuple: data takes %d bytes: too big", size);
elog(ERROR, "index_formtuple: data takes %lu bytes: too big",
(unsigned long)size);
infomask |= size;

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Id: hio.c,v 1.33 2000/09/07 09:58:35 vadim Exp $
* $Id: hio.c,v 1.34 2000/11/16 05:50:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -91,8 +91,8 @@ RelationGetBufferForTuple(Relation relation, Size len)
* If we're gonna fail for oversize tuple, do it right away
*/
if (len > MaxTupleSize)
elog(ERROR, "Tuple is too big: size %u, max size %ld",
len, MaxTupleSize);
elog(ERROR, "Tuple is too big: size %lu, max size %ld",
(unsigned long)len, MaxTupleSize);
if (!relation->rd_myxactonly)
LockPage(relation, 0, ExclusiveLock);
@@ -139,7 +139,8 @@ RelationGetBufferForTuple(Relation relation, Size len)
if (len > PageGetFreeSpace(pageHeader))
{
/* We should not get here given the test at the top */
elog(STOP, "Tuple is too big: size %u", len);
elog(STOP, "Tuple is too big: size %lu",
(unsigned long)len);
}
}

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.67 2000/10/21 15:43:18 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.68 2000/11/16 05:50:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -348,8 +348,8 @@ _bt_insertonpg(Relation rel,
* itemsz doesn't include the ItemId.
*/
if (itemsz > (PageGetPageSize(page) - sizeof(PageHeaderData) - MAXALIGN(sizeof(BTPageOpaqueData))) / 3 - sizeof(ItemIdData))
elog(ERROR, "btree: index item size %u exceeds maximum %lu",
itemsz,
elog(ERROR, "btree: index item size %lu exceeds maximum %lu",
(unsigned long)itemsz,
(PageGetPageSize(page) - sizeof(PageHeaderData) - MAXALIGN(sizeof(BTPageOpaqueData))) /3 - sizeof(ItemIdData));
/*

View File

@@ -35,7 +35,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsort.c,v 1.57 2000/08/10 02:33:20 inoue Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsort.c,v 1.58 2000/11/16 05:50:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -346,8 +346,8 @@ _bt_buildadd(Relation index, BTPageState *state, BTItem bti)
* during creation of an index, we don't go through there.
*/
if (btisz > (PageGetPageSize(npage) - sizeof(PageHeaderData) - MAXALIGN(sizeof(BTPageOpaqueData))) / 3 - sizeof(ItemIdData))
elog(ERROR, "btree: index item size %d exceeds maximum %ld",
btisz,
elog(ERROR, "btree: index item size %lu exceeds maximum %ld",
(unsigned long)btisz,
(PageGetPageSize(npage) - sizeof(PageHeaderData) - MAXALIGN(sizeof(BTPageOpaqueData))) /3 - sizeof(ItemIdData));
if (pgspc < btisz || pgspc < state->btps_full)

View File

@@ -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/access/transam/xlog.c,v 1.25 2000/11/09 11:25:58 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.26 2000/11/16 05:50:59 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1274,7 +1274,6 @@ BootStrapXLOG()
int fd;
char buffer[BLCKSZ];
CheckPoint checkPoint;
bool usexistent = false;
#ifdef XLOG
XLogPageHeader page = (XLogPageHeader) buffer;