1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00

Rename BITSPERBYTE to BITS_PER_BYTE to avoid conflict with <values.h>

on some platforms.
This commit is contained in:
Tom Lane
2000-08-26 21:53:44 +00:00
parent 662f6a557c
commit d70bf0dd35
7 changed files with 44 additions and 44 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/lib/Attic/bit.c,v 1.10 2000/08/20 19:31:37 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/lib/Attic/bit.c,v 1.11 2000/08/26 21:53:42 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -21,21 +21,21 @@
void
BitArraySetBit(BitArray bitArray, BitIndex bitIndex)
{
bitArray[bitIndex / BITSPERBYTE] |=
(1 << (BITSPERBYTE - 1 - (bitIndex % BITSPERBYTE)));
bitArray[bitIndex / BITS_PER_BYTE] |=
(1 << (BITS_PER_BYTE - 1 - (bitIndex % BITS_PER_BYTE)));
}
void
BitArrayClearBit(BitArray bitArray, BitIndex bitIndex)
{
bitArray[bitIndex / BITSPERBYTE] &=
~(1 << (BITSPERBYTE - 1 - (bitIndex % BITSPERBYTE)));
bitArray[bitIndex / BITS_PER_BYTE] &=
~(1 << (BITS_PER_BYTE - 1 - (bitIndex % BITS_PER_BYTE)));
}
bool
BitArrayBitIsSet(BitArray bitArray, BitIndex bitIndex)
{
return ((bitArray[bitIndex / BITSPERBYTE] &
(1 << (BITSPERBYTE - 1 - (bitIndex % BITSPERBYTE)))
return ((bitArray[bitIndex / BITS_PER_BYTE] &
(1 << (BITS_PER_BYTE - 1 - (bitIndex % BITS_PER_BYTE)))
) != 0);
}