From 5bfd34cc32aa26679ac33a268232af991ab629fb Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 11 Dec 2016 20:37:04 -0500 Subject: api headers: nt_thread.h: added visual studio and hosted environment support. --- include/ntapi/nt_thread.h | 14 ++++++++------ 1 file 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 +#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 */ -- cgit v1.2.3