Alexandre Julliard : test.h: Fetch environment variables from the Win32 environment not the Unix one.
Alexandre Julliard
julliard at winehq.org
Fri Aug 1 05:33:49 CDT 2008
Module: wine
Branch: master
Commit: b25eb5542a7411772ab843ec0e27379962fe2980
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b25eb5542a7411772ab843ec0e27379962fe2980
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Aug 1 10:48:45 2008 +0200
test.h: Fetch environment variables from the Win32 environment not the Unix one.
---
include/wine/test.h | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/include/wine/test.h b/include/wine/test.h
index 02fc391..62d8c3a 100644
--- a/include/wine/test.h
+++ b/include/wine/test.h
@@ -476,17 +476,18 @@ static void usage( const char *argv0 )
/* main function */
int main( int argc, char **argv )
{
- char *p;
+ char p[128];
setvbuf (stdout, NULL, _IONBF, 0);
winetest_argc = argc;
winetest_argv = argv;
- if ((p = getenv( "WINETEST_PLATFORM" ))) winetest_platform = strdup(p);
- if ((p = getenv( "WINETEST_DEBUG" ))) winetest_debug = atoi(p);
- if ((p = getenv( "WINETEST_INTERACTIVE" ))) winetest_interactive = atoi(p);
- if ((p = getenv( "WINETEST_REPORT_SUCCESS"))) report_success = atoi(p);
+ if (GetEnvironmentVariableA( "WINETEST_PLATFORM", p, sizeof(p) )) winetest_platform = strdup(p);
+ if (GetEnvironmentVariableA( "WINETEST_DEBUG", p, sizeof(p) )) winetest_debug = atoi(p);
+ if (GetEnvironmentVariableA( "WINETEST_INTERACTIVE", p, sizeof(p) )) winetest_interactive = atoi(p);
+ if (GetEnvironmentVariableA( "WINETEST_REPORT_SUCCESS", p, sizeof(p) )) report_success = atoi(p);
+
if (!argv[1])
{
if (winetest_testlist[0].name && !winetest_testlist[1].name) /* only one test */
More information about the wine-cvs
mailing list