comparison loader/setup_FS.c @ 1307:d8c1b0b38edc

Add prototypes to wine/loader stuff, so that we can catch __stdcall function attribute mismatch between caller/caller. wine/loader is less sensitive to optimization now. (now that avifile-0.6 has the same patch installed, we're a bit closer to their CVS tree) Speed up win32 "QueryPerformanceFrequency" emulation on solaris.
author jkeil
date Thu, 12 Jul 2001 15:27:48 +0000
parents 72cacd3b8f30
children 73c8f54305b1
comparison
equal deleted inserted replaced
1306:7ce37211e454 1307:d8c1b0b38edc
8 #include <unistd.h> 8 #include <unistd.h>
9 9
10 #ifdef __linux__ 10 #ifdef __linux__
11 #include <asm/unistd.h> 11 #include <asm/unistd.h>
12 #include <asm/ldt.h> 12 #include <asm/ldt.h>
13 #else 13 #else /* !__linux__ */
14 14
15 #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) 15 #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
16 #include <machine/sysarch.h> 16 #include <machine/sysarch.h>
17 #endif 17 #endif
18 18
20 #include <sys/segment.h> 20 #include <sys/segment.h>
21 #include <sys/sysi86.h> 21 #include <sys/sysi86.h>
22 /* solaris x86: add missing prototype for sysi86() */ 22 /* solaris x86: add missing prototype for sysi86() */
23 extern int sysi86(int, void*); 23 extern int sysi86(int, void*);
24 #define TEB_SEL_IDX NUMSYSLDTS 24 #define TEB_SEL_IDX NUMSYSLDTS
25 #endif 25 #endif /* __svr4__ */
26
27
26 28
27 #define LDT_ENTRIES 8192 29 #define LDT_ENTRIES 8192
28 #define LDT_ENTRY_SIZE 8 30 #define LDT_ENTRY_SIZE 8
29 #pragma pack(4) 31 #pragma pack(4)
30 struct modify_ldt_ldt_s { 32 struct modify_ldt_ldt_s {
40 }; 42 };
41 43
42 #define MODIFY_LDT_CONTENTS_DATA 0 44 #define MODIFY_LDT_CONTENTS_DATA 0
43 #define MODIFY_LDT_CONTENTS_STACK 1 45 #define MODIFY_LDT_CONTENTS_STACK 1
44 #define MODIFY_LDT_CONTENTS_CODE 2 46 #define MODIFY_LDT_CONTENTS_CODE 2
45 #endif 47 #endif /* !__linux__ */
48
49 #include "setup_FS.h"
50
46 51
47 52
48 /* user level (privilege level: 3) ldt (1<<2) segment selector */ 53 /* user level (privilege level: 3) ldt (1<<2) segment selector */
49 #define LDT_SEL(idx) ((idx) << 3 | 1 << 2 | 3) 54 #define LDT_SEL(idx) ((idx) << 3 | 1 << 2 | 3)
50 55