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
bdb624ff
Commit
bdb624ff
authored
Nov 21, 2023
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Allocate environment variables in separate allocation chunks.
parent
a45ca342
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
8 deletions
+0
-8
environ.c
dlls/msvcrt/environ.c
+0
-0
environ.c
dlls/msvcrt/tests/environ.c
+0
-4
environ.c
dlls/ucrtbase/tests/environ.c
+0
-4
No files found.
dlls/msvcrt/environ.c
View file @
bdb624ff
This diff is collapsed.
Click to expand it.
dlls/msvcrt/tests/environ.c
View file @
bdb624ff
...
...
@@ -342,7 +342,6 @@ static void test_environment_manipulation(void)
ok
(
_putenv
(
"__winetest_dog=bark"
)
==
0
,
"Couldn't set env var
\n
"
);
ok
(
!
strcmp
(
(
*
p_environ
)[
count
+
1
],
"__winetest_dog=bark"
),
"Unexpected env var value
\n
"
);
ok
(
getenv
(
"__winetest_dog"
)
==
strchr
(
(
*
p_environ
)[
count
+
1
],
'='
)
+
1
,
"Expected getenv() to return pointer inside _environ[] entry
\n
"
);
todo_wine
ok
(
first
==
(
*
p_environ
)[
count
],
"Expected stability of _environ[count] pointer
\n
"
);
second
=
(
*
p_environ
)[
count
+
1
];
ok
(
count
+
2
==
env_get_entry_countA
(
*
p_environ
),
"Unexpected count
\n
"
);
...
...
@@ -350,13 +349,11 @@ static void test_environment_manipulation(void)
ok
(
_putenv
(
"__winetest_cat=purr"
)
==
0
,
"Couldn't set env var
\n
"
);
ok
(
!
strcmp
(
(
*
p_environ
)[
count
],
"__winetest_cat=purr"
),
"Unexpected env var value
\n
"
);
ok
(
getenv
(
"__winetest_cat"
)
==
strchr
(
(
*
p_environ
)[
count
],
'='
)
+
1
,
"Expected getenv() to return pointer inside _environ[] entry
\n
"
);
todo_wine
ok
(
second
==
(
*
p_environ
)[
count
+
1
],
"Expected stability of _environ[count] pointer
\n
"
);
ok
(
!
strcmp
(
(
*
p_environ
)[
count
+
1
],
"__winetest_dog=bark"
),
"Couldn't get env var value
\n
"
);
ok
(
getenv
(
"__winetest_dog"
)
==
strchr
(
(
*
p_environ
)[
count
+
1
],
'='
)
+
1
,
"Expected getenv() to return pointer inside _environ[] entry
\n
"
);
ok
(
count
+
2
==
env_get_entry_countA
(
*
p_environ
),
"Unexpected count
\n
"
);
ok
(
_putenv
(
"__winetest_cat="
)
==
0
,
"Couldn't reset env vat
\n
"
);
todo_wine
ok
(
second
==
(
*
p_environ
)[
count
],
"Expected _environ[count] to be second
\n
"
);
ok
(
!
strcmp
(
(
*
p_environ
)[
count
],
"__winetest_dog=bark"
),
"Unexpected env var value
\n
"
);
ok
(
count
+
1
==
env_get_entry_countA
(
*
p_environ
),
"Unexpected count
\n
"
);
...
...
@@ -367,7 +364,6 @@ static void test_environment_manipulation(void)
ret
=
SetEnvironmentVariableA
(
"__winetest_cat"
,
"meow"
);
ok
(
ret
,
"SetEnvironmentVariableA failed: %lu
\n
"
,
GetLastError
()
);
ok
(
_putenv
(
"__winetest_dog=bark"
)
==
0
,
"Couldn't set env var
\n
"
);
todo_wine
ok
(
getenv
(
"__winetest_cat"
)
==
NULL
,
"msvcrt env cache shouldn't have been updated
\n
"
);
ok
(
_putenv
(
"__winetest_cat="
)
==
0
,
"Couldn't reset env var
\n
"
);
ok
(
_putenv
(
"__winetest_dog="
)
==
0
,
"Couldn't reset env var
\n
"
);
...
...
dlls/ucrtbase/tests/environ.c
View file @
bdb624ff
...
...
@@ -240,7 +240,6 @@ static void test_environment_manipulation(void)
ok
(
_putenv
(
"__winetest_dog=bark"
)
==
0
,
"Couldn't set env var
\n
"
);
ok
(
!
strcmp
(
(
*
p_environ
)[
count
+
1
],
"__winetest_dog=bark"
),
"Unexpected env var value
\n
"
);
ok
(
getenv
(
"__winetest_dog"
)
==
strchr
(
(
*
p_environ
)[
count
+
1
],
'='
)
+
1
,
"Expected getenv() to return pointer inside _environ[] entry
\n
"
);
todo_wine
ok
(
first
==
(
*
p_environ
)[
count
],
"Expected stability of _environ[count] pointer
\n
"
);
second
=
(
*
p_environ
)[
count
+
1
];
ok
(
count
+
2
==
env_get_entry_countA
(
*
p_environ
),
"Unexpected count
\n
"
);
...
...
@@ -248,13 +247,11 @@ static void test_environment_manipulation(void)
ok
(
_putenv
(
"__winetest_cat=purr"
)
==
0
,
"Couldn't set env var
\n
"
);
ok
(
!
strcmp
(
(
*
p_environ
)[
count
],
"__winetest_cat=purr"
),
"Unexpected env var value
\n
"
);
ok
(
getenv
(
"__winetest_cat"
)
==
strchr
(
(
*
p_environ
)[
count
],
'='
)
+
1
,
"Expected getenv() to return pointer inside _environ[] entry
\n
"
);
todo_wine
ok
(
second
==
(
*
p_environ
)[
count
+
1
],
"Expected stability of _environ[count] pointer
\n
"
);
ok
(
!
strcmp
(
(
*
p_environ
)[
count
+
1
],
"__winetest_dog=bark"
),
"Couldn't get env var value
\n
"
);
ok
(
getenv
(
"__winetest_dog"
)
==
strchr
(
(
*
p_environ
)[
count
+
1
],
'='
)
+
1
,
"Expected getenv() to return pointer inside _environ[] entry
\n
"
);
ok
(
count
+
2
==
env_get_entry_countA
(
*
p_environ
),
"Unexpected count
\n
"
);
ok
(
_putenv
(
"__winetest_cat="
)
==
0
,
"Couldn't reset env vat
\n
"
);
todo_wine
ok
(
second
==
(
*
p_environ
)[
count
],
"Expected _environ[count] to be second
\n
"
);
ok
(
!
strcmp
(
(
*
p_environ
)[
count
],
"__winetest_dog=bark"
),
"Unexpected env var value
\n
"
);
ok
(
count
+
1
==
env_get_entry_countA
(
*
p_environ
),
"Unexpected count
\n
"
);
...
...
@@ -265,7 +262,6 @@ static void test_environment_manipulation(void)
ret
=
SetEnvironmentVariableA
(
"__winetest_cat"
,
"meow"
);
ok
(
ret
,
"SetEnvironmentVariableA failed: %lu
\n
"
,
GetLastError
()
);
ok
(
_putenv
(
"__winetest_dog=bark"
)
==
0
,
"Couldn't set env var
\n
"
);
todo_wine
ok
(
getenv
(
"__winetest_cat"
)
==
NULL
,
"msvcrt env cache shouldn't have been updated
\n
"
);
ok
(
_putenv
(
"__winetest_cat="
)
==
0
,
"Couldn't reset env var
\n
"
);
ok
(
_putenv
(
"__winetest_dog="
)
==
0
,
"Couldn't reset env var
\n
"
);
...
...
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