Gijs Vermeulen gijsvrm@gmail.com writes:
From: Vladimir Panteleev git@vladimir.panteleev.md
Avoid clobbering last error with NO_ERROR when GetEnvironmentVariableA succeeds, matching the behavior of GetEnvironmentVariableW and Windows.
Instead of naively saving and restoring the last error, call RtlQueryEnvironmentVariable_U directly to avoid unnecessarily setting it in the first place.
Signed-off-by: Vladimir Panteleev git@vladimir.panteleev.md Signed-off-by: Gijs Vermeulen gijsvrm@gmail.com
dlls/kernel32/tests/environ.c | 8 ++++---- dlls/kernelbase/process.c | 30 +++++++++++++++++++----------- 2 files changed, 23 insertions(+), 15 deletions(-)
This is breaking a number of tests, for instance:
../../../tools/runtest -q -P wine -T ../../.. -M advapi32.dll -p advapi32_test.exe security && touch security.ok security.c:2112: Tests skipped: Well known SID 38 not implemented security.c:2112: Tests skipped: Well known SID 39 not implemented security.c:2112: Tests skipped: Well known SID 40 not implemented security.c:2112: Tests skipped: Well known SID 41 not implemented security.c:2112: Tests skipped: Well known SID 42 not implemented security.c:2112: Tests skipped: Well known SID 43 not implemented security.c:2112: Tests skipped: Well known SID 44 not implemented security.c:2112: Tests skipped: Well known SID 45 not implemented security.c:2112: Tests skipped: Well known SID 46 not implemented security.c:2112: Tests skipped: Well known SID 47 not implemented security.c:2112: Tests skipped: Well known SID 48 not implemented security.c:2112: Tests skipped: Well known SID 49 not implemented security.c:2112: Tests skipped: Well known SID 50 not implemented security.c:2112: Tests skipped: Well known SID 62 not implemented security.c:2112: Tests skipped: Well known SID 63 not implemented security.c:2112: Tests skipped: Well known SID 64 not implemented security.c:2112: Tests skipped: Well known SID 65 not implemented security.c:2112: Tests skipped: Well known SID 70 not implemented security.c:2112: Tests skipped: Well known SID 72 not implemented security.c:2112: Tests skipped: Well known SID 73 not implemented security.c:2112: Tests skipped: Well known SID 74 not implemented security.c:2112: Tests skipped: Well known SID 75 not implemented security.c:2112: Tests skipped: Well known SID 76 not implemented security.c:2112: Tests skipped: Well known SID 77 not implemented security.c:2112: Tests skipped: Well known SID 78 not implemented security.c:2112: Tests skipped: Well known SID 79 not implemented security.c:2112: Tests skipped: Well known SID 81 not implemented security.c:2112: Tests skipped: Well known SID 82 not implemented security.c:5060: Test failed: Last error was 3735928559 security.c:5067: Test failed: Last error was 3735928559 security.c:5091: Test failed: Last error was 3735928559 security.c:5112: Test failed: Last error was 3735928559 make: *** [Makefile:422: security.ok] Error 4