1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-12 04:23:49 +03:00

r25515: Revert r25448:

Immediate structures are *not* supportet by the native C compiler
at least on Solaris, Tru64 and HP-UX.

Michael
This commit is contained in:
Michael Adam
2007-10-05 12:05:40 +00:00
committed by Gerald (Jerry) Carter
parent 9dd66317bd
commit 6d07e29de2
5 changed files with 19 additions and 4 deletions

View File

@@ -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. */

View File

@@ -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))