summaryrefslogtreecommitdiff
path: root/util/imb_api.h
diff options
context:
space:
mode:
Diffstat (limited to 'util/imb_api.h')
-rw-r--r--util/imb_api.h29
1 files changed, 14 insertions, 15 deletions
diff --git a/util/imb_api.h b/util/imb_api.h
index e6951f8..cca3c5f 100644
--- a/util/imb_api.h
+++ b/util/imb_api.h
@@ -37,24 +37,27 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _WINDEFS_H
#define _WINDEFS_H
-#ifndef NULL
-#define NULL 0
-#endif
-#define TRUE 1
-#define FALSE 0
-
#if defined(WIN32) | defined(BSD) | defined(DOS)
/* WIN32 defines wchar_t in stdio.h */
/* BSD defines wchar_t in stdlib.h */
/* DOS defines wchar_t in stdlib.h */
-#else
- // defined(LINUX) | defined(SOLARIS)
-#if !defined(_WCHAR_T) && !defined(__WCHAR_TYPE__)
-#define _WCHAR_T
+#else
+#if defined(LINUX)
+/* LINUX should define wchar_t in stdlib.h */
+#include <stdlib.h>
+#endif
+// SOLARIS or MACOS may need wchar_t
+#include "config.h"
+#if !HAVE_WCHAR_T
typedef long wchar_t;
#endif
#endif
+#ifndef NULL
+#define NULL 0
+#endif
+#define TRUE 1
+#define FALSE 0
#define far
#define near
#define FAR far
@@ -136,9 +139,6 @@ typedef LARGE_INTEGER * PPHYSICAL_ADDRESS;
typedef ULARGE_INTEGER * PULARGE_INTEGER;
typedef UCHAR BOOLEAN;
typedef BOOLEAN *PBOOLEAN;
-typedef wchar_t WCHAR;
-typedef WCHAR *PWCHAR, *PWSTR;
-typedef CONST WCHAR *LPCWSTR, *PCWSTR;
/*
Unicode strings are counted 16-bit character strings. If they are
@@ -147,10 +147,9 @@ typedef CONST WCHAR *LPCWSTR, *PCWSTR;
typedef struct _UNICODE_STRING {
USHORT Length;
USHORT MaximumLength;
- PWSTR Buffer;
+ wchar_t *Buffer;
} UNICODE_STRING;
typedef UNICODE_STRING *PUNICODE_STRING;
-#define UNICODE_NULL ((WCHAR)0) /* winnt*/
#define IN /* */
#define OUT /* */
#define OPTIONAL /* */