From b008b053a94696942878f44d487901f344c98860 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 1 Aug 2008 10:48:58 +0200 Subject: [PATCH] winetest: Set environment variables in the Win32 environment. --- programs/winetest/main.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/programs/winetest/main.c b/programs/winetest/main.c index 04eaae48831..045845a3552 100644 --- a/programs/winetest/main.c +++ b/programs/winetest/main.c @@ -659,25 +659,18 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, cmdLine = strtok (NULL, whitespace); } if (!submit) { - static CHAR platform_windows[] = "WINETEST_PLATFORM=windows", - platform_wine[] = "WINETEST_PLATFORM=wine", - debug_yes[] = "WINETEST_DEBUG=1", - interactive_no[] = "WINETEST_INTERACTIVE=0", - report_success_no[] = "WINETEST_REPORT_SUCCESS=0"; - CHAR *platform; - report (R_STATUS, "Starting up"); if (!running_on_visible_desktop ()) report (R_FATAL, "Tests must be run on a visible desktop"); - platform = running_under_wine () ? platform_wine : platform_windows; - - if (reset_env && (putenv (platform) || - putenv (debug_yes) || - putenv (interactive_no) || - putenv (report_success_no))) - report (R_FATAL, "Could not reset environment"); + if (reset_env) + { + SetEnvironmentVariableA( "WINETEST_PLATFORM", running_under_wine () ? "wine" : "windows" ); + SetEnvironmentVariableA( "WINETEST_DEBUG", "1" ); + SetEnvironmentVariableA( "WINETEST_INTERACTIVE", "0" ); + SetEnvironmentVariableA( "WINETEST_REPORT_SUCCESS", "0" ); + } if (!tag) { if (!interactive) -- 2.11.4.GIT