summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-03-17 01:36:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:57:34 -0500
commit2d558d5e195bc35f7af2bd1d2150bf9882d0cc24 (patch)
treea5f6c9c70be48943bb7f89475167221545e9486b /source4/libcli
parent5c79bbadd5cfa921c8b4f87b5b4cafe5c488ebda (diff)
downloadsamba-2d558d5e195bc35f7af2bd1d2150bf9882d0cc24.tar.gz
samba-2d558d5e195bc35f7af2bd1d2150bf9882d0cc24.tar.bz2
samba-2d558d5e195bc35f7af2bd1d2150bf9882d0cc24.zip
r14498: Revert part of my commit that removed support for compilers that
don't support immediate structures (This used to be commit 657a893b25bc6669f016a9d251e07120d025f436)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/util/nt_status.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/libcli/util/nt_status.h b/source4/libcli/util/nt_status.h
index fe1dbf866d..06aeaa3dac 100644
--- a/source4/libcli/util/nt_status.h
+++ b/source4/libcli/util/nt_status.h
@@ -28,13 +28,25 @@
from using BOOL for internal functions
*/
+#if defined(HAVE_IMMEDIATE_STRUCTURES)
typedef struct {uint32_t v;} NTSTATUS;
#define NT_STATUS(x) ((NTSTATUS) { x })
#define NT_STATUS_V(x) ((x).v)
+#else
+typedef uint32_t NTSTATUS;
+#define NT_STATUS(x) (x)
+#define NT_STATUS_V(x) (x)
+#endif
+#if defined(HAVE_IMMEDIATE_STRUCTURES)
typedef struct {uint32_t v;} WERROR;
#define W_ERROR(x) ((WERROR) { x })
#define W_ERROR_V(x) ((x).v)
+#else
+typedef uint32_t 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)