hash.h's use of BSHIFT conflicts with <sys/param.h> on my

system.  Finally got tired of looking at the compiler warning messages.
BSHIFT isn't all that useful, so I just took out the macro.
This commit is contained in:
Tom Lane 1998-10-04 20:19:08 +00:00
parent 3512284bda
commit 280acf0904
2 changed files with 5 additions and 6 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.17 1998/09/01 03:20:57 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.18 1998/10/04 20:19:08 tgl Exp $
*
* NOTES
* Overflow pages look like ordinary relation pages.
@ -121,11 +121,11 @@ _hash_getovfladdr(Relation rel, Buffer *metabufp)
splitnum = metap->OVFL_POINT;
max_free = metap->SPARES[splitnum];
free_page = (max_free - 1) >> (metap->BSHIFT + BYTE_TO_BIT);
free_page = (max_free - 1) >> (metap->hashm_bshift + BYTE_TO_BIT);
free_bit = (max_free - 1) & (BMPGSZ_BIT(metap) - 1);
/* Look through all the free maps to find the first free block */
first_page = metap->LAST_FREED >> (metap->BSHIFT + BYTE_TO_BIT);
first_page = metap->LAST_FREED >> (metap->hashm_bshift + BYTE_TO_BIT);
for (i = first_page; i <= free_page; i++)
{
Page mappage;
@ -369,7 +369,7 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf)
if (ovflpgno < metap->LAST_FREED)
metap->LAST_FREED = ovflpgno;
bitmappage = (ovflpgno >> (metap->BSHIFT + BYTE_TO_BIT));
bitmappage = (ovflpgno >> (metap->hashm_bshift + BYTE_TO_BIT));
bitmapbit = ovflpgno & (BMPGSZ_BIT(metap) - 1);
blkno = metap->hashm_mapp[bitmappage];

View File

@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: hash.h,v 1.19 1998/09/01 04:34:11 momjian Exp $
* $Id: hash.h,v 1.20 1998/10/04 20:19:06 tgl Exp $
*
* NOTES
* modeled after Margo Seltzer's hash implementation for unix.
@ -165,7 +165,6 @@ typedef struct HashMetaPageData
typedef HashMetaPageData *HashMetaPage;
/* Short hands for accessing structure */
#define BSHIFT hashm_bshift
#define OVFL_POINT hashm_ovflpoint
#define LAST_FREED hashm_lastfreed
#define MAX_BUCKET hashm_maxbucket