Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit280acf0

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 parent3512284 commit280acf0

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/0420: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
Pagemappage;
@@ -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
typedefHashMetaPageData*HashMetaPage;
166166

167167
/* Short hands for accessing structure */
168-
#defineBSHIFThashm_bshift
169168
#defineOVFL_POINThashm_ovflpoint
170169
#defineLAST_FREEDhashm_lastfreed
171170
#defineMAX_BUCKEThashm_maxbucket

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp