diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-09-05 15:47:22 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-09-05 15:47:22 +0000 |
commit | ce2ac33b736324b818b0dd23be70bb23448320d5 (patch) | |
tree | 0d26e4a51222aa440fcc4e75fc9b4fae302282a3 /source3/include/smb.h | |
parent | 4cf52385994b62de71240b894b37f82b6daa6ee2 (diff) | |
download | samba-ce2ac33b736324b818b0dd23be70bb23448320d5.tar.gz samba-ce2ac33b736324b818b0dd23be70bb23448320d5.tar.bz2 samba-ce2ac33b736324b818b0dd23be70bb23448320d5.zip |
Move the fancy NT_STATUS macros to a new file, so we can include them earlier
in includes.h
Andrew Bartlett
(This used to be commit ed184ed1905b49956528b6835f48a69ba3c1a045)
Diffstat (limited to 'source3/include/smb.h')
-rw-r--r-- | source3/include/smb.h | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h index 909c1a57ec..2ee2f0cb72 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -193,44 +193,6 @@ typedef struct nttime_info } NTTIME; -/* The Splint code analysis tool doesn't like immediate structures. */ - -#ifdef _SPLINT_ /* http://www.splint.org */ -#undef HAVE_IMMEDIATE_STRUCTURES -#endif - -/* the following rather strange looking definitions of NTSTATUS and WERROR - and there in order to catch common coding errors where different error types - are mixed up. This is especially important as we slowly convert Samba - from using BOOL for internal functions -*/ - -#if defined(HAVE_IMMEDIATE_STRUCTURES) -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 - -#if defined(HAVE_IMMEDIATE_STRUCTURES) -typedef struct {uint32 v;} WERROR; -#define W_ERROR(x) ((WERROR) { x }) -#define W_ERROR_V(x) ((x).v) -#else -typedef uint32 WERROR; -#define W_ERROR(x) (x) -#define W_ERROR_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) == 0xc0000000) -#define NT_STATUS_EQUAL(x,y) (NT_STATUS_V(x) == NT_STATUS_V(y)) -#define W_ERROR_IS_OK(x) (W_ERROR_V(x) == 0) - - /* Allowable account control bits */ #define ACB_DISABLED 0x0001 /* 1 = User account disabled */ #define ACB_HOMDIRREQ 0x0002 /* 1 = Home directory required */ |