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
bae3769e
Commit
bae3769e
authored
Dec 02, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Dec 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Set main_(argc|argv|envp) as early as possible.
Fixes:
62a97934
parent
d9342e85
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
env.c
dlls/ntdll/unix/env.c
+1
-5
loader.c
dlls/ntdll/unix/loader.c
+10
-2
unix_private.h
dlls/ntdll/unix/unix_private.h
+1
-1
No files found.
dlls/ntdll/unix/env.c
View file @
bae3769e
...
...
@@ -892,7 +892,7 @@ static void init_locale(void)
/***********************************************************************
* init_environment
*/
void
init_environment
(
int
argc
,
char
*
argv
[],
char
*
envp
[]
)
void
init_environment
(
void
)
{
USHORT
*
case_table
;
...
...
@@ -904,10 +904,6 @@ void init_environment( int argc, char *argv[], char *envp[] )
uctable
=
case_table
+
2
;
lctable
=
case_table
+
case_table
[
1
]
+
2
;
}
main_argc
=
argc
;
main_argv
=
argv
;
main_envp
=
envp
;
}
...
...
dlls/ntdll/unix/loader.c
View file @
bae3769e
...
...
@@ -1890,9 +1890,13 @@ static jstring wine_init_jni( JNIEnv *env, jobject obj, jobjectArray cmdline, jo
java_object
=
(
*
env
)
->
NewGlobalRef
(
env
,
obj
);
main_argc
=
argc
;
main_argv
=
argv
;
main_envp
=
environ
;
init_paths
(
argv
);
virtual_init
();
init_environment
(
argc
,
argv
,
environ
);
init_environment
();
#ifdef __i386__
{
...
...
@@ -2107,6 +2111,10 @@ static void check_command_line( int argc, char *argv[] )
*/
DECLSPEC_EXPORT
void
__wine_main
(
int
argc
,
char
*
argv
[],
char
*
envp
[]
)
{
main_argc
=
argc
;
main_argv
=
argv
;
main_envp
=
envp
;
init_paths
(
argv
);
if
(
!
getenv
(
"WINELOADERNOEXEC"
))
/* first time around */
...
...
@@ -2132,7 +2140,7 @@ DECLSPEC_EXPORT void __wine_main( int argc, char *argv[], char *envp[] )
#endif
virtual_init
();
init_environment
(
argc
,
argv
,
envp
);
init_environment
();
#ifdef __APPLE__
apple_main_thread
();
...
...
dlls/ntdll/unix/unix_private.h
View file @
bae3769e
...
...
@@ -176,7 +176,7 @@ extern SYSTEM_CPU_INFORMATION cpu_info;
extern
struct
ldt_copy
__wine_ldt_copy
;
#endif
extern
void
init_environment
(
int
argc
,
char
*
argv
[],
char
*
envp
[]
);
extern
void
init_environment
(
void
);
extern
void
init_startup_info
(
void
);
extern
void
*
create_startup_info
(
const
UNICODE_STRING
*
nt_image
,
ULONG
process_flags
,
const
RTL_USER_PROCESS_PARAMETERS
*
params
,
...
...
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