mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-15 10:11:36 +00:00
msvcrt: Fix getmainargs() family to return correct environment block.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This commit is contained in:
parent
bba9e5aea1
commit
988884a4f1
|
@ -559,7 +559,7 @@ int CDECL __wgetmainargs(int *argc, wchar_t** *wargv, wchar_t** *wenvp,
|
||||||
MSVCRT__wenviron = msvcrt_SnapshotOfEnvironmentW(NULL);
|
MSVCRT__wenviron = msvcrt_SnapshotOfEnvironmentW(NULL);
|
||||||
*argc = MSVCRT___argc;
|
*argc = MSVCRT___argc;
|
||||||
*wargv = MSVCRT___wargv;
|
*wargv = MSVCRT___wargv;
|
||||||
*wenvp = MSVCRT___winitenv;
|
*wenvp = MSVCRT__wenviron;
|
||||||
if (new_mode)
|
if (new_mode)
|
||||||
_set_new_mode( *new_mode );
|
_set_new_mode( *new_mode );
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -593,7 +593,7 @@ int CDECL __getmainargs(int *argc, char** *argv, char** *envp,
|
||||||
|
|
||||||
*argc = MSVCRT___argc;
|
*argc = MSVCRT___argc;
|
||||||
*argv = MSVCRT___argv;
|
*argv = MSVCRT___argv;
|
||||||
*envp = MSVCRT___initenv;
|
*envp = MSVCRT__environ;
|
||||||
|
|
||||||
if (new_mode)
|
if (new_mode)
|
||||||
_set_new_mode( *new_mode );
|
_set_new_mode( *new_mode );
|
||||||
|
|
|
@ -152,7 +152,6 @@ static void test__environ(void)
|
||||||
|
|
||||||
ok( envp != NULL,
|
ok( envp != NULL,
|
||||||
"Expected initial environment block pointer to be non-NULL\n" );
|
"Expected initial environment block pointer to be non-NULL\n" );
|
||||||
todo_wine
|
|
||||||
ok( envp == *p_environ,
|
ok( envp == *p_environ,
|
||||||
"Expected initial environment to be equal to _environ\n" );
|
"Expected initial environment to be equal to _environ\n" );
|
||||||
|
|
||||||
|
@ -224,7 +223,6 @@ static void test__wenviron(void)
|
||||||
|
|
||||||
__wgetmainargs(&argc, &wargv, &wenvp, 0, &mode);
|
__wgetmainargs(&argc, &wargv, &wenvp, 0, &mode);
|
||||||
ok( wenvp != NULL, "Expected initial environment block pointer to be non-NULL\n" );
|
ok( wenvp != NULL, "Expected initial environment block pointer to be non-NULL\n" );
|
||||||
todo_wine
|
|
||||||
ok( wenvp == *p_wenviron, "Expected initial environment to be _wenviron[]\n" );
|
ok( wenvp == *p_wenviron, "Expected initial environment to be _wenviron[]\n" );
|
||||||
|
|
||||||
if (p__p___winitenv)
|
if (p__p___winitenv)
|
||||||
|
|
Loading…
Reference in a new issue