source: trunk/src/win32k/include/options.h@ 9954

Last change on this file since 9954 was 9954, checked in by bird, 22 years ago

Added pszCustomDllExclude.

File size: 9.7 KB
Line 
1/* $Id: options.h,v 1.25 2003-03-31 01:22:45 bird Exp $
2 *
3 * Options.
4 *
5 * Copyright (c) 1998-1999 knut st. osmundsen
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10
11/* NOINC */
12#ifndef _options_h_
13#define _options_h_
14/* INC */
15
16/*******************************************************************************
17* Defined Constants And Macros *
18*******************************************************************************/
19/* fKernel */
20#define KF_UNI 0x0000
21#define KF_SMP 0x0001
22#define KF_W4 0x0002
23#define KF_REV_MASK 0x0FF0
24#define KF_REV_SHIFT 4
25#define KF_REV_0 0x0000
26#define KF_REV_A 0x0010
27#define KF_REV_B 0x0020
28#define KF_REV_C 0x0030
29#define KF_REV_D 0x0040
30#define KF_REV_E 0x0050
31#define KF_REV_F 0x0060
32#define KF_REV_G 0x0070
33#define KF_REV_H 0x0080
34#define KF_REV_I 0x0090
35#define KF_REV_J 0x00a0
36#define KF_REV_K 0x00b0
37#define KF_REV_L 0x00c0
38#define KF_REV_M 0x00d0
39#define KF_REV_N 0x00e0
40#define KF_REV_O 0x00f0
41#define KF_REV_P 0x0100
42#define KF_REV_Q 0x0110
43#define KF_REV_R 0x0120
44#define KF_REV_S 0x0130
45#define KF_REV_T 0x0140
46#define KF_REV_U 0x0150
47#define KF_REV_V 0x0160
48#define KF_REV_W 0x0170
49#define KF_REV_X 0x0180
50#define KF_REV_Y 0x0190
51#define KF_REV_Z 0x01a0
52#define KF_REV_ECS 0x0900
53#define KF_DEBUG 0x1000
54#define KF_HAS_DEBUGTYPE 0x2000
55#define KF_ALLSTRICT 0x3000
56#define KF_HALFSTRICT 0x7000
57
58/* fPE */
59#define FLAGS_PE_NOT 0x00000000UL
60#define FLAGS_PE_PE2LX 0x00000001UL
61#define FLAGS_PE_PE 0x00000002UL
62#define FLAGS_PE_MIXED 0x00000003UL
63
64/* fPEOneObject */
65#define FLAGS_PEOO_DISABLED 0x00000000UL
66#define FLAGS_PEOO_ENABLED 0x00000001UL
67#define FLAGS_PEOO_FORCED 0x00000002UL
68
69/* ulInfoLevel */
70#define INFOLEVEL_QUIET 0x00000000UL
71#define INFOLEVEL_ERROR 0x00000001UL
72#define INFOLEVEL_WARNING 0x00000002UL
73#define INFOLEVEL_INFO 0x00000003UL
74#define INFOLEVEL_INFOALL 0x00000004UL
75
76/* default heapsizes */
77#define CB_SWP_INIT ((unsigned long)1024*512) /* 512KB */
78#define CB_SWP_MAX ((unsigned long)1024*1024*16) /* 16MB */
79#define CB_RES_INIT ((unsigned long)1024*256) /* 256KB */
80#define CB_RES_MAX ((unsigned long)1024*1024*10) /* 10MB */
81
82/* NOINC */
83/* default assignments */
84#define DEFAULT_OPTION_ASSIGMENTS \
85 {FALSE, /* fQuiet */ \
86 OUTPUT_COM2, /* usCom */ \
87 FALSE, /* fLogging */ \
88 KF_UNI, /* fKernel */ \
89 ~0UL, /* ulBuild */ \
90 (unsigned short)~0, /* usVerMajor */ \
91 (unsigned short)~0, /* usVerMinor */ \
92 FLAGS_PE_PE, /* fPE */ \
93 FLAGS_PEOO_FORCED, /* fPEOneObject */ \
94 INFOLEVEL_QUIET, /* ulInfoLevel */ \
95 FALSE, /* fElf */ \
96 TRUE, /* fUNIXScript */ \
97 TRUE, /* fREXXScript */ \
98 TRUE, /* fJava */ \
99 FALSE, /* fNoLoader */ \
100 FALSE, /* fSkipFixups */ \
101 NULL, /* pszCustomDll */ \
102 NULL, /* pszCustomExports */ \
103 NULL, /* pszCustomDllExclude */ \
104 TRUE, /* fDllFixes */ \
105 TRUE, /* fExeFixes */ \
106 FALSE, /* fForcePreload */ \
107 FALSE, /* fApiEnh */ \
108 CB_SWP_INIT, /* cbSwpHeapInit */ \
109 CB_SWP_MAX, /* cbSwpHeapMax */ \
110 CB_RES_INIT, /* cbResHeapInit */ \
111 CB_RES_MAX} /* cbResHeapMax */
112
113#define isAnyLoaderEnabled() (!options.fNoLoader && \
114 (isPELoaderEnabled() || isELFEnabled() || isUNIXScriptEnabled() || isREXXScriptEnabled() || isJAVAEnabled()))
115#define isPELoaderEnabled() (options.fPE != FLAGS_PE_NOT)
116#define isPELoaderDisabled() (options.fPE == FLAGS_PE_NOT)
117#define isPe2LxLoaderEnabled() (options.fPE == FLAGS_PE_PE2LX)
118#define isMixedPeLoaderEnabled() (options.fPE == FLAGS_PE_MIXED)
119#define isPEOneObjectEnabled() (options.fPEOneObject == FLAGS_PEOO_ENABLED)
120#define isPEOneObjectDisabled() (options.fPEOneObject == FLAGS_PEOO_DISABLED)
121#define isPEOneObjectForced() (options.fPEOneObject == FLAGS_PEOO_FORCED)
122
123#define isELFDisabled() (!options.fElf)
124#define isELFEnabled() (options.fElf)
125#define isUNIXScriptDisabled() (!options.fUNIXScript)
126#define isUNIXScriptEnabled() (options.fUNIXScript)
127#define isREXXScriptDisabled() (!options.fREXXScript)
128#define isREXXScriptEnabled() (options.fREXXScript)
129#define isJAVADisabled() (!options.fJava)
130#define isJAVAEnabled() (options.fJava)
131
132#define areFixupsEnabled() (!options.fSkipFixups)
133#define areFixupsDisabled() (options.fSkipFixups)
134
135#define hasCustomDll() (options.pszCustomDll != NULL)
136#define hasCustomExports() (options.pszCustomExports != NULL)
137
138#define isSMPKernel() (options.fKernel & KF_SMP)
139#define isUNIKernel() (!(options.fKernel & KF_SMP))
140
141#define isHighMemorySupported() (options.ulBuild >= 14000 || isSMPKernel())
142
143#define isDllFixesEnabled() (options.fDllFixes)
144#define isDllFixesDisabled() (!options.fDllFixes)
145
146#define isExeFixesEnabled() (options.fExeFixes)
147#define isExeFixesDisabled() (!options.fExeFixes)
148
149#define isForcePreloadEnabled() (options.fForcePreload)
150#define isForcePreloadDisabled() (!options.fForcePreload)
151
152#define isApiEnhEnabled() (options.fApiEnh)
153#define isApiEnhDisabled() (!options.fApiEnh)
154
155/* INC */
156
157/*******************************************************************************
158* Structures and Typedefs *
159*******************************************************************************/
160/** Option struct */
161#pragma pack(4)
162struct options
163{
164 /** @cat misc */
165 ULONG fQuiet; /* Quiet initialization. */
166
167 /** @cat logging options */
168 USHORT usCom; /* Output port no. */
169 USHORT fLogging; /* Logging. */
170
171 /** @cat kernel selection */
172 ULONG fKernel; /* Smp or uni kernel. */
173 ULONG ulBuild; /* Kernel build. */
174 USHORT usVerMajor; /* OS/2 major ver - 20 */
175 USHORT usVerMinor; /* OS/2 minor ver - 30,40 */
176
177 /** @cat Options affecting the generated LX executables */
178 ULONG fPE; /* Flags set the type of conversion. */
179 ULONG fPEOneObject; /* All in one object. */
180 ULONG ulInfoLevel; /* Pe2Lx InfoLevel. */
181
182 /** @cat Options affecting the generated ELF executables */
183 ULONG fElf; /* Elf flags. */
184
185 /** @cat Options affecting the UNIX script executables */
186 ULONG fUNIXScript; /* UNIX script flags. */
187
188 /** @cat Options affecting the REXX script executables */
189 ULONG fREXXScript; /* REXX script flags. */
190
191 /** @cat Options affecting the JAVA executables */
192 ULONG fJava; /* Java flags. */
193
194 /** @cat Options affecting the executables */
195 ULONG fNoLoader; /* No loader stuff. !FIXME! We should import / functions even if this flag is set!!! */
196
197 ULONG fSkipFixups;
198 char * pszCustomDll; /* Pointer to custom odin dll name */
199 char * pszCustomExports; /* Pointer to custom export table */
200 char * pszCustomDllExclude; /* Pointer to non custom dlls. */
201
202 /** @cat Options affecting the behaviour changes in the OS/2 loader */
203 ULONG fDllFixes; /* Enables the long DLL name and non .DLL extention fixes. */
204 ULONG fExeFixes; /* Enables EXE files to export entry points. */
205 ULONG fForcePreload; /* Forces the loader to preload executable images. Handy for ICAT Ring-3 debugging. */
206 ULONG fApiEnh; /* Enables the API enhancements */
207
208 /** @cat Options affecting the heap. */
209 ULONG cbSwpHeapInit; /* Initial heapsize. */
210 ULONG cbSwpHeapMax; /* Maximum heapsize. */
211 ULONG cbResHeapInit; /* Initial residentheapsize. */
212 ULONG cbResHeapMax; /* Maxiumem residentheapsize. */
213};
214#pragma pack()
215
216/*******************************************************************************
217* Global Variables *
218*******************************************************************************/
219/* NOINC */
220extern struct options DATA16_GLOBAL options; /* defined in d16globals.c */
221extern char szWin32kIni[160]; /* defined in d16globals.c */
222#ifdef RING0
223#if defined(__IBMC__) || defined(__IBMCPP__)
224 #pragma map( options , "_options" )
225 #pragma map( szWin32kIni, "_szWin32kIni" )
226#endif
227#endif
228/* INC */
229
230/* NOINC */
231#endif
232/* INC */
233
Note: See TracBrowser for help on using the repository browser.