summaryrefslogtreecommitdiff
path: root/source3/include/smb.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-08-27 17:52:23 +0000
committerAndrew Tridgell <tridge@samba.org>2001-08-27 17:52:23 +0000
commitee5f7237decfe446f4fdb08422beb2e6cb43af7f (patch)
tree80b217a2938d7e0d46a5d20517c9adb0807ecd1a /source3/include/smb.h
parente8e98c9ea0690e3acf1126b50882e59e1056c7b3 (diff)
downloadsamba-ee5f7237decfe446f4fdb08422beb2e6cb43af7f.tar.gz
samba-ee5f7237decfe446f4fdb08422beb2e6cb43af7f.tar.bz2
samba-ee5f7237decfe446f4fdb08422beb2e6cb43af7f.zip
started converting NTSTATUS to be a structure on systems with gcc in order to make it type incompatible with BOOL so we catch errors sooner. This has already found a number of bugs
(This used to be commit 1b778bc7d22efff3f90dc450eb12baa1241cf68f)
Diffstat (limited to 'source3/include/smb.h')
-rw-r--r--source3/include/smb.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index d8b5540510..cef75d3713 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -207,7 +207,18 @@ typedef struct nttime_info
uint32 high;
} NTTIME;
+#ifdef __GNUC__XX
+typedef struct {uint32 v;} NTSTATUS;
+#define NT_STATUS(x) ((NTSTATUS) { x })
+#define NT_STATUS_V(x) ((x).v)
+#else
typedef uint32 NTSTATUS;
+#define NT_STATUS(x) (x)
+#define NT_STATUS_V(x) (x)
+#endif
+
+#define NT_STATUS_IS_OK(x) (NT_STATUS_V(x) == 0)
+#define NT_STATUS_IS_ERR(x) (NT_STATUS_V(x) & 0xc0000000)
/* Allowable account control bits */
#define ACB_DISABLED 0x0001 /* 1 = User account disabled */