summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>2000-08-14 11:03:30 +0000
committerLuke Leighton <lkcl@samba.org>2000-08-14 11:03:30 +0000
commit83424f676e56bf7a5a83a64c841a04a12655d00c (patch)
treeee0842940cc33ebb6f41a8428e8b3fd6872733f3
parentd2d074580d604db0cbda5a4fe8b1a17bc819ba11 (diff)
downloadsamba-83424f676e56bf7a5a83a64c841a04a12655d00c.tar.gz
samba-83424f676e56bf7a5a83a64c841a04a12655d00c.tar.bz2
samba-83424f676e56bf7a5a83a64c841a04a12655d00c.zip
restored IS_BITS_SET_xxx macros.
(This used to be commit bc065f9597654666e2f26ec046e058e44247d6e3)
-rw-r--r--source3/include/smb_macros.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index 9fe7f26cb3..007f88edba 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -30,6 +30,11 @@
#define BITSETB(ptr,bit) ((((char *)ptr)[0] & (1<<(bit)))!=0)
#define BITSETW(ptr,bit) ((SVAL(ptr,0) & (1<<(bit)))!=0)
+#define IS_BITS_SET_ALL(var,bit) (((var)&(bit))==(bit))
+#define IS_BITS_SET_SOME(var,bit) (((var)&(bit))!=0)
+#define IS_BITS_CLR_ALL(var,bit) (((var)&(bit))==0)
+#define IS_BITS_CLR_SOME(var,bit) (((var)&(bit))!=(bit))
+
/* for readability... */
#define IS_DOS_READONLY(test_mode) (((test_mode) & aRONLY) != 0)
#define IS_DOS_DIR(test_mode) (((test_mode) & aDIR) != 0)