Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
35818652
Commit
35818652
authored
Jun 07, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for specifying stack size of Winelib apps.
parent
c814a6ce
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
25 deletions
+23
-25
process.c
scheduler/process.c
+7
-24
README
tools/winebuild/README
+4
-0
build.h
tools/winebuild/build.h
+1
-0
main.c
tools/winebuild/main.c
+1
-0
parser.c
tools/winebuild/parser.c
+6
-0
spec32.c
tools/winebuild/spec32.c
+4
-1
No files found.
scheduler/process.c
View file @
35818652
...
@@ -319,12 +319,6 @@ static void start_process(void)
...
@@ -319,12 +319,6 @@ static void start_process(void)
LPTHREAD_START_ROUTINE
entry
;
LPTHREAD_START_ROUTINE
entry
;
WINE_MODREF
*
wm
;
WINE_MODREF
*
wm
;
/* build command line */
if
(
!
ENV_BuildCommandLine
(
main_exe_argv
))
goto
error
;
/* create 32-bit module for main exe */
if
(
!
(
current_process
.
module
=
BUILTIN32_LoadExeModule
(
current_process
.
module
)))
goto
error
;
/* use original argv[0] as name for the main module */
/* use original argv[0] as name for the main module */
if
(
!
main_exe_name
[
0
])
if
(
!
main_exe_name
[
0
])
{
{
...
@@ -498,7 +492,6 @@ void PROCESS_InitWine( int argc, char *argv[], LPSTR win16_exe_name, HANDLE *win
...
@@ -498,7 +492,6 @@ void PROCESS_InitWine( int argc, char *argv[], LPSTR win16_exe_name, HANDLE *win
{
{
if
(
PE_HEADER
(
current_process
.
module
)
->
FileHeader
.
Characteristics
&
IMAGE_FILE_DLL
)
if
(
PE_HEADER
(
current_process
.
module
)
->
FileHeader
.
Characteristics
&
IMAGE_FILE_DLL
)
ExitProcess
(
ERROR_BAD_EXE_FORMAT
);
ExitProcess
(
ERROR_BAD_EXE_FORMAT
);
stack_size
=
PE_HEADER
(
current_process
.
module
)
->
OptionalHeader
.
SizeOfStackReserve
;
goto
found
;
goto
found
;
}
}
...
@@ -512,6 +505,13 @@ void PROCESS_InitWine( int argc, char *argv[], LPSTR win16_exe_name, HANDLE *win
...
@@ -512,6 +505,13 @@ void PROCESS_InitWine( int argc, char *argv[], LPSTR win16_exe_name, HANDLE *win
_EnterWin16Lock
();
_EnterWin16Lock
();
found:
found:
/* build command line */
if
(
!
ENV_BuildCommandLine
(
main_exe_argv
))
goto
error
;
/* create 32-bit module for main exe */
if
(
!
(
current_process
.
module
=
BUILTIN32_LoadExeModule
(
current_process
.
module
)))
goto
error
;
stack_size
=
PE_HEADER
(
current_process
.
module
)
->
OptionalHeader
.
SizeOfStackReserve
;
/* allocate main thread stack */
/* allocate main thread stack */
if
(
!
THREAD_InitStack
(
NtCurrentTeb
(),
stack_size
))
goto
error
;
if
(
!
THREAD_InitStack
(
NtCurrentTeb
(),
stack_size
))
goto
error
;
...
@@ -524,23 +524,6 @@ void PROCESS_InitWine( int argc, char *argv[], LPSTR win16_exe_name, HANDLE *win
...
@@ -524,23 +524,6 @@ void PROCESS_InitWine( int argc, char *argv[], LPSTR win16_exe_name, HANDLE *win
/***********************************************************************
/***********************************************************************
* PROCESS_InitWinelib
*
* Initialisation of a new Winelib process.
*/
void
PROCESS_InitWinelib
(
int
argc
,
char
*
argv
[]
)
{
if
(
!
process_init
(
argv
))
exit
(
1
);
/* allocate main thread stack */
if
(
!
THREAD_InitStack
(
NtCurrentTeb
(),
0
))
ExitProcess
(
GetLastError
()
);
/* switch to the new stack */
SYSDEPS_SwitchToThreadStack
(
start_process
);
}
/***********************************************************************
* build_argv
* build_argv
*
*
* Build an argv array from a command-line.
* Build an argv array from a command-line.
...
...
tools/winebuild/README
View file @
35818652
...
@@ -6,6 +6,7 @@ type win16|win32
...
@@ -6,6 +6,7 @@ type win16|win32
[file WINFILENAME]
[file WINFILENAME]
[mode dll|cuiexe|guiexe|cuiexe_unicode|guiexe_unicode]
[mode dll|cuiexe|guiexe|cuiexe_unicode|guiexe_unicode]
[heap SIZE]
[heap SIZE]
[stack SIZE]
[init FUNCTION]
[init FUNCTION]
[import [IMP_FLAGS] DLL]
[import [IMP_FLAGS] DLL]
[rsrc RESFILE]
[rsrc RESFILE]
...
@@ -40,6 +41,9 @@ This is only valid for Win32 spec files.
...
@@ -40,6 +41,9 @@ This is only valid for Win32 spec files.
"heap" is the size of the module local heap (only valid for Win16
"heap" is the size of the module local heap (only valid for Win16
modules); default is no local heap.
modules); default is no local heap.
"stack" is the stack size for Win32 exe modules, in kilobytes; default
size is 1024 (1Mb stack).
"file" gives the name of the Windows file that is replaced by the
"file" gives the name of the Windows file that is replaced by the
builtin. <name>.DLL is assumed if none is given. (This is important
builtin. <name>.DLL is assumed if none is given. (This is important
for kernel, which lives in the Windows file KRNL386.EXE).
for kernel, which lives in the Windows file KRNL386.EXE).
...
...
tools/winebuild/build.h
View file @
35818652
...
@@ -161,6 +161,7 @@ extern int Limit;
...
@@ -161,6 +161,7 @@ extern int Limit;
extern
int
DLLHeapSize
;
extern
int
DLLHeapSize
;
extern
int
UsePIC
;
extern
int
UsePIC
;
extern
int
debugging
;
extern
int
debugging
;
extern
int
stack_size
;
extern
int
nb_debug_channels
;
extern
int
nb_debug_channels
;
extern
int
nb_lib_paths
;
extern
int
nb_lib_paths
;
...
...
tools/winebuild/main.c
View file @
35818652
...
@@ -27,6 +27,7 @@ int Base = MAX_ORDINALS;
...
@@ -27,6 +27,7 @@ int Base = MAX_ORDINALS;
int
Limit
=
0
;
int
Limit
=
0
;
int
DLLHeapSize
=
0
;
int
DLLHeapSize
=
0
;
int
UsePIC
=
0
;
int
UsePIC
=
0
;
int
stack_size
=
0
;
int
nb_entry_points
=
0
;
int
nb_entry_points
=
0
;
int
nb_names
=
0
;
int
nb_names
=
0
;
int
nb_debug_channels
=
0
;
int
nb_debug_channels
=
0
;
...
...
tools/winebuild/parser.c
View file @
35818652
...
@@ -559,6 +559,12 @@ SPEC_TYPE ParseTopLevel( FILE *file )
...
@@ -559,6 +559,12 @@ SPEC_TYPE ParseTopLevel( FILE *file )
if
(
!
IsNumberString
(
token
))
fatal_error
(
"Expected number after heap
\n
"
);
if
(
!
IsNumberString
(
token
))
fatal_error
(
"Expected number after heap
\n
"
);
DLLHeapSize
=
atoi
(
token
);
DLLHeapSize
=
atoi
(
token
);
}
}
else
if
(
strcmp
(
token
,
"stack"
)
==
0
)
{
token
=
GetToken
(
0
);
if
(
!
IsNumberString
(
token
))
fatal_error
(
"Expected number after stack
\n
"
);
stack_size
=
atoi
(
token
);
}
else
if
(
strcmp
(
token
,
"init"
)
==
0
)
else
if
(
strcmp
(
token
,
"init"
)
==
0
)
{
{
if
(
SpecType
==
SPEC_WIN16
)
if
(
SpecType
==
SPEC_WIN16
)
...
...
tools/winebuild/spec32.c
View file @
35818652
...
@@ -656,7 +656,10 @@ void BuildSpec32File( FILE *outfile )
...
@@ -656,7 +656,10 @@ void BuildSpec32File( FILE *outfile )
fprintf
(
outfile
,
" %ld,
\n
"
,
page_size
);
/* SizeOfHeaders */
fprintf
(
outfile
,
" %ld,
\n
"
,
page_size
);
/* SizeOfHeaders */
fprintf
(
outfile
,
" 0,
\n
"
);
/* CheckSum */
fprintf
(
outfile
,
" 0,
\n
"
);
/* CheckSum */
fprintf
(
outfile
,
" 0x%04x,
\n
"
,
subsystem
);
/* Subsystem */
fprintf
(
outfile
,
" 0x%04x,
\n
"
,
subsystem
);
/* Subsystem */
fprintf
(
outfile
,
" 0, 0, 0, 0, 0, 0,
\n
"
);
fprintf
(
outfile
,
" 0,
\n
"
);
/* DllCharacteristics */
fprintf
(
outfile
,
" %d, 0,
\n
"
,
stack_size
*
1024
);
/* SizeOfStackReserve/Commit */
fprintf
(
outfile
,
" %d, 0,
\n
"
,
DLLHeapSize
*
1024
);
/* SizeOfHeapReserve/Commit */
fprintf
(
outfile
,
" 0,
\n
"
);
/* LoaderFlags */
fprintf
(
outfile
,
" %d,
\n
"
,
IMAGE_NUMBEROF_DIRECTORY_ENTRIES
);
/* NumberOfRvaAndSizes */
fprintf
(
outfile
,
" %d,
\n
"
,
IMAGE_NUMBEROF_DIRECTORY_ENTRIES
);
/* NumberOfRvaAndSizes */
fprintf
(
outfile
,
" {
\n
"
);
fprintf
(
outfile
,
" {
\n
"
);
fprintf
(
outfile
,
" { %s, %d },
\n
"
,
/* IMAGE_DIRECTORY_ENTRY_EXPORT */
fprintf
(
outfile
,
" { %s, %d },
\n
"
,
/* IMAGE_DIRECTORY_ENTRY_EXPORT */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment