summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-10-05 12:05:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:07:46 -0500
commit3b07f6aeb1a060efcf8218e76b8b84fb8850f337 (patch)
treeeed739de19b892bf0c6e183ee1c7ca829cf20646 /source4/libcli
parentbf0ee695db9c96a28dde6e11cedba3590f8cd11c (diff)
downloadsamba-3b07f6aeb1a060efcf8218e76b8b84fb8850f337.tar.gz
samba-3b07f6aeb1a060efcf8218e76b8b84fb8850f337.tar.bz2
samba-3b07f6aeb1a060efcf8218e76b8b84fb8850f337.zip
r25515: Revert r25448:
Immediate structures are *not* supportet by the native C compiler at least on Solaris, Tru64 and HP-UX. Michael (This used to be commit 6d07e29de2a7e535139622fa688b407da232c816)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/util/ntstatus.h6
-rw-r--r--source4/libcli/util/werror.h8
2 files changed, 13 insertions, 1 deletions
diff --git a/source4/libcli/util/ntstatus.h b/source4/libcli/util/ntstatus.h
index 84d924c2ec..026b5162db 100644
--- a/source4/libcli/util/ntstatus.h
+++ b/source4/libcli/util/ntstatus.h
@@ -29,9 +29,15 @@
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
/* Win32 Status codes. */
diff --git a/source4/libcli/util/werror.h b/source4/libcli/util/werror.h
index 3cd76816dc..0f49514b9f 100644
--- a/source4/libcli/util/werror.h
+++ b/source4/libcli/util/werror.h
@@ -19,7 +19,7 @@
*/
#ifndef _WERROR_H_
-#define _WERROR_H_
+#define _WERROR_H
#include <stdint.h>
@@ -29,9 +29,15 @@
from using bool for internal functions
*/
+#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 W_ERROR_IS_OK(x) (W_ERROR_V(x) == 0)
#define W_ERROR_EQUAL(x,y) (W_ERROR_V(x) == W_ERROR_V(y))