summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/ntapi/nt_thread.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/ntapi/nt_thread.h b/include/ntapi/nt_thread.h
index a555336..a4cf1b7 100644
--- a/include/ntapi/nt_thread.h
+++ b/include/ntapi/nt_thread.h
@@ -2,6 +2,7 @@
#define _NT_THREAD_H_
#include <psxtypes/psxtypes.h>
+#include "nt_compiler.h"
#include "nt_object.h"
#include "bits/nt32/nt_thread_i386.h"
#include "bits/nt64/nt_thread_x86_64.h"
@@ -75,13 +76,14 @@ typedef enum _nt_exception_disposition {
/* thread context */
#define NT_CONTEXT_JUST_EVERYTHING (intptr_t)-1
-
/* source mark: arch-specific code: begin */
-#if defined(__NT32) && defined (__X86_MODEL)
-typedef struct _nt_thread_context_i386 nt_thread_context;
-#elif defined(__NT64) && defined (__X86_64_MODEL)
-typedef nt_mcontext_x86_64_t nt_thread_context;
-typedef nt_mcontext_x86_64_t nt_mcontext_t;
+#if (__SIZEOF_POINTER__ == 4)
+typedef struct _nt_thread_context_i386 nt_thread_context;
+#endif
+
+#if (__SIZEOF_POINTER__ == 8)
+typedef nt_mcontext_x86_64_t nt_thread_context;
+typedef nt_mcontext_x86_64_t nt_mcontext_t;
#endif
/* source mark: arch-specific code: end */