summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)