summaryrefslogtreecommitdiff
path: root/libraries/lrmi/lrmi-0.10-newheaders.patch
blob: ae04c47e16ee7fd98b92fa05616821bc14d855eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
diff -up lrmi-0.10/lrmi.c.BAD lrmi-0.10/lrmi.c
--- lrmi-0.10/lrmi.c.BAD	2008-09-17 14:41:28.000000000 -0400
+++ lrmi-0.10/lrmi.c	2008-09-17 14:45:17.000000000 -0400
@@ -239,7 +239,7 @@ LRMI_free_real(void *m)
 
 
 #if defined(__linux__)
-#define DEFAULT_VM86_FLAGS 	(IF_MASK | IOPL_MASK)
+#define DEFAULT_VM86_FLAGS 	(X86_EFLAGS_IF | X86_EFLAGS_IOPL)
 #elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
 #define DEFAULT_VM86_FLAGS  (PSL_I | PSL_IOPL)
 #define TF_MASK         PSL_T
@@ -822,7 +822,7 @@ run_vm86(void)
 
 			CONTEXT_REGS.REG(cs) = get_int_seg(v);
 			CONTEXT_REGS.REG(eip) = get_int_off(v);
-			CONTEXT_REGS.REG(eflags) &= ~(VIF_MASK | TF_MASK);
+			CONTEXT_REGS.REG(eflags) &= ~(X86_EFLAGS_VIF | X86_EFLAGS_TF);
 
 			continue;
 		}
@@ -862,7 +862,7 @@ vm86_callback(int sig, int code, struct 
 
 			CONTEXT_REGS.REG(cs) = get_int_seg(v);
 			CONTEXT_REGS.REG(eip) = get_int_off(v);
-			CONTEXT_REGS.REG(eflags) &= ~(VIF_MASK | TF_MASK);
+			CONTEXT_REGS.REG(eflags) &= ~(X86_EFLAGS_VIF | X86_EFLAGS_TF);
 
 			break;
 		}
@@ -916,7 +916,7 @@ vm86_callback(int sig, int code, struct 
 
 		CONTEXT_REGS.REG(cs) = get_int_seg(addr[1]);
 		CONTEXT_REGS.REG(eip) = get_int_off(addr[1]);
-		CONTEXT_REGS.REG(eflags) &= ~(VIF_MASK | TF_MASK);
+		CONTEXT_REGS.REG(eflags) &= ~(X86_EFLAGS_VIF | X86_EFLAGS_TF);
 	} else {
 		if (emulate() == 0) {
 			context.success = 0;