mirror of
https://github.com/postgres/postgres.git
synced 2025-06-06 00:02:36 -04:00
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:
parent
3512284bda
commit
280acf0904
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
* NOTES
|
||||||
* Overflow pages look like ordinary relation pages.
|
* Overflow pages look like ordinary relation pages.
|
||||||
@ -121,11 +121,11 @@ _hash_getovfladdr(Relation rel, Buffer *metabufp)
|
|||||||
splitnum = metap->OVFL_POINT;
|
splitnum = metap->OVFL_POINT;
|
||||||
max_free = metap->SPARES[splitnum];
|
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);
|
free_bit = (max_free - 1) & (BMPGSZ_BIT(metap) - 1);
|
||||||
|
|
||||||
/* Look through all the free maps to find the first free block */
|
/* 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++)
|
for (i = first_page; i <= free_page; i++)
|
||||||
{
|
{
|
||||||
Page mappage;
|
Page mappage;
|
||||||
@ -369,7 +369,7 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf)
|
|||||||
if (ovflpgno < metap->LAST_FREED)
|
if (ovflpgno < metap->LAST_FREED)
|
||||||
metap->LAST_FREED = ovflpgno;
|
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);
|
bitmapbit = ovflpgno & (BMPGSZ_BIT(metap) - 1);
|
||||||
|
|
||||||
blkno = metap->hashm_mapp[bitmappage];
|
blkno = metap->hashm_mapp[bitmappage];
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* 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
|
* NOTES
|
||||||
* modeled after Margo Seltzer's hash implementation for unix.
|
* modeled after Margo Seltzer's hash implementation for unix.
|
||||||
@ -165,7 +165,6 @@ typedef struct HashMetaPageData
|
|||||||
typedef HashMetaPageData *HashMetaPage;
|
typedef HashMetaPageData *HashMetaPage;
|
||||||
|
|
||||||
/* Short hands for accessing structure */
|
/* Short hands for accessing structure */
|
||||||
#define BSHIFT hashm_bshift
|
|
||||||
#define OVFL_POINT hashm_ovflpoint
|
#define OVFL_POINT hashm_ovflpoint
|
||||||
#define LAST_FREED hashm_lastfreed
|
#define LAST_FREED hashm_lastfreed
|
||||||
#define MAX_BUCKET hashm_maxbucket
|
#define MAX_BUCKET hashm_maxbucket
|
||||||
|
Loading…
x
Reference in New Issue
Block a user