From ee5f7237decfe446f4fdb08422beb2e6cb43af7f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 27 Aug 2001 17:52:23 +0000 Subject: 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) --- source3/include/smb.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source3/include/smb.h') 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 */ -- cgit