ntdll/tests/exception.c: Fix the compilation with the PSDK headers.

Francois Gouget fgouget at free.fr
Mon Nov 6 17:50:24 CST 2006


The PSDK's winnt.h is missing EXCEPTION_REGISTRATION_RECORD.
---

Both the PSDK and Wine's winnt.h are protected by '_WINNT_'. So I used 
another macro that seems related to EXCEPTION_REGISTRATION_RECORD.

 dlls/ntdll/tests/exception.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
old mode 100644
new mode 100755
index a87cadf..d7809da
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -36,6 +36,11 @@ #include "wine/test.h"
 
 #ifdef __i386__
 
+/* Assume that if EXCEPTION_CONTINUABLE is defined, then the winnt.h header
+ * also provides a proper definition for EXCEPTION_REGISTRATION_RECORD
+ */
+#ifdef EXCEPTION_CONTINUABLE
+
 static struct _TEB * (WINAPI *pNtCurrentTeb)(void);
 static NTSTATUS  (WINAPI *pNtGetContextThread)(HANDLE,CONTEXT*);
 
@@ -376,11 +381,12 @@ static void test_align_faults(void)
     pNtCurrentTeb()->Tib.ExceptionList = exc_frame.frame.Prev;
 }
 
+#endif /* EXCEPTION_CONTINUABLE */
 #endif  /* __i386__ */
 
 START_TEST(exception)
 {
-#ifdef __i386__
+#if defined(__i386__) && defined(EXCEPTION_CONTINUABLE)
     test_prot_fault();
     test_debug_regs();
     test_single_step();
-- 
1.4.1.1




More information about the wine-patches mailing list