mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Standardize on using the Min, Max, and Abs macros that are in our c.h file,
getting rid of numerous ad-hoc versions that have popped up in various places. Shortens code and avoids conflict with Windows min() and max() macros.
This commit is contained in:
@ -33,8 +33,6 @@ typedef char *BITVECP;
|
||||
#define SETBIT(x,i) GETBYTE(x,i) |= ( 0x01 << ( (i) % BITBYTE ) )
|
||||
#define GETBIT(x,i) ( (GETBYTE(x,i) >> ( (i) % BITBYTE )) & 0x01 )
|
||||
|
||||
#define abs(a) ((a) < (0) ? -(a) : (a))
|
||||
#define min(a,b) ((a) < (b) ? (a) : (b))
|
||||
#define HASHVAL(val) (((unsigned int)(val)) % SIGLENBIT)
|
||||
#define HASH(sign, val) SETBIT((sign), HASHVAL(val))
|
||||
|
||||
|
Reference in New Issue
Block a user