Dmitry Timoshkov dmitry@baikal.ru writes:
@@ -89,7 +91,7 @@ struct test void (*func)(void); };
-static const struct test winetest_testlist[]; +static const struct test winetest_testlist[2];
This isn't correct, the size is 2 only for standalone tests. Does something like this work for MSVC too?
Index: include/wine/test.h =================================================================== RCS file: /opt/cvs-commit/wine/include/wine/test.h,v retrieving revision 1.17 diff -u -p -r1.17 test.h --- include/wine/test.h 13 Jun 2005 12:10:54 -0000 1.17 +++ include/wine/test.h 13 Jun 2005 13:08:46 -0000 @@ -22,6 +22,7 @@ #define __WINE_TEST_H
#include <stdarg.h> +#include <stdlib.h> #include <windef.h> #include <winbase.h>
@@ -43,7 +44,7 @@ extern int winetest_get_mainargs( char** #ifdef STANDALONE #define START_TEST(name) \ static void func_##name(void); \ - static const struct test winetest_testlist[] = { { #name, func_##name }, { 0, 0 } }; \ + const struct test winetest_testlist[] = { { #name, func_##name }, { 0, 0 } }; \ static void func_##name(void) #else #define START_TEST(name) void func_##name(void) @@ -129,7 +130,7 @@ struct test void (*func)(void); };
-static const struct test winetest_testlist[]; +extern const struct test winetest_testlist[];
/* debug level */ int winetest_debug = 1;
"Alexandre Julliard" julliard@winehq.org wrote:
@@ -89,7 +91,7 @@ struct test void (*func)(void); };
-static const struct test winetest_testlist[]; +static const struct test winetest_testlist[2];
This isn't correct, the size is 2 only for standalone tests.
The case above is protected by #ifdef STANDALONE so that shouldn't be an issue.
Does something like this work for MSVC too?
Yes, it works. Thanks.
"Dmitry Timoshkov" dmitry@baikal.ru writes:
"Alexandre Julliard" julliard@winehq.org wrote:
This isn't correct, the size is 2 only for standalone tests.
The case above is protected by #ifdef STANDALONE so that shouldn't be an issue.
testlist.c defines STANDALONE too (yes it's a bit confusing...)
Does something like this work for MSVC too?
Yes, it works. Thanks.
OK thanks I'll put that in.