From: Wayne Davison Date: Tue, 12 Dec 2006 20:17:02 +0000 (+0000) Subject: Added BITS_EQUAL() define. X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/0a62f5f38237a5b9a10d1c75f4b624c0035431a3 Added BITS_EQUAL() define. --- diff --git a/rsync.h b/rsync.h index e5a40194..a5092426 100644 --- a/rsync.h +++ b/rsync.h @@ -70,6 +70,8 @@ #define BITS_SET(val,bits) (((val) & (bits)) == (bits)) #define BITS_SETnUNSET(val,onbits,offbits) (((val) & ((onbits)|(offbits))) == (onbits)) +#define BITS_EQUAL(b1,b2,mask) (((unsigned)(b1) & (unsigned)(mask)) \ + == ((unsigned)(b2) & (unsigned)(mask))) /* update this if you make incompatible changes */ #define PROTOCOL_VERSION 30