Skip to content

Commit 280acf0

Browse files
committed
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.
1 parent 3512284 commit 280acf0

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/backend/access/hash/hashovfl.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.17 1998/09/01 03:20:57 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.18 1998/10/04 20:19:08 tgl Exp $
1111
*
1212
* NOTES
1313
* Overflow pages look like ordinary relation pages.
@@ -121,11 +121,11 @@ _hash_getovfladdr(Relation rel, Buffer *metabufp)
121121
splitnum = metap->OVFL_POINT;
122122
max_free = metap->SPARES[splitnum];
123123

124-
free_page = (max_free - 1) >> (metap->BSHIFT + BYTE_TO_BIT);
124+
free_page = (max_free - 1) >> (metap->hashm_bshift + BYTE_TO_BIT);
125125
free_bit = (max_free - 1) & (BMPGSZ_BIT(metap) - 1);
126126

127127
/* Look through all the free maps to find the first free block */
128-
first_page = metap->LAST_FREED >> (metap->BSHIFT + BYTE_TO_BIT);
128+
first_page = metap->LAST_FREED >> (metap->hashm_bshift + BYTE_TO_BIT);
129129
for (i = first_page; i <= free_page; i++)
130130
{
131131
Page mappage;
@@ -369,7 +369,7 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf)
369369
if (ovflpgno < metap->LAST_FREED)
370370
metap->LAST_FREED = ovflpgno;
371371

372-
bitmappage = (ovflpgno >> (metap->BSHIFT + BYTE_TO_BIT));
372+
bitmappage = (ovflpgno >> (metap->hashm_bshift + BYTE_TO_BIT));
373373
bitmapbit = ovflpgno & (BMPGSZ_BIT(metap) - 1);
374374

375375
blkno = metap->hashm_mapp[bitmappage];

src/include/access/hash.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: hash.h,v 1.19 1998/09/01 04:34:11 momjian Exp $
9+
* $Id: hash.h,v 1.20 1998/10/04 20:19:06 tgl Exp $
1010
*
1111
* NOTES
1212
* modeled after Margo Seltzer's hash implementation for unix.
@@ -165,7 +165,6 @@ typedef struct HashMetaPageData
165165
typedef HashMetaPageData *HashMetaPage;
166166

167167
/* Short hands for accessing structure */
168-
#define BSHIFT hashm_bshift
169168
#define OVFL_POINT hashm_ovflpoint
170169
#define LAST_FREED hashm_lastfreed
171170
#define MAX_BUCKET hashm_maxbucket

0 commit comments

Comments
 (0)