[INCLUDE]

- Make our test/debug headers C++-compatible

svn path=/trunk/; revision=59472
This commit is contained in:
Thomas Faber 2013-07-13 18:03:16 +00:00
parent a7d3ecfbb8
commit be425939ed
2 changed files with 29 additions and 5 deletions

View file

@ -23,6 +23,10 @@
#error Please include SDK first.
#endif
#ifdef __cplusplus
extern "C" {
#endif
ULONG
__cdecl
DbgPrint(
@ -36,7 +40,7 @@ __cdecl
DbgPrintEx(
_In_ ULONG ComponentId,
_In_ ULONG Level,
_In_z_ _Printf_format_string_ PCCH Format,
_In_z_ _Printf_format_string_ PCSTR Format,
...
);
@ -45,12 +49,16 @@ NTSYSAPI
VOID
NTAPI
RtlAssert(
PVOID FailedAssertion,
PVOID FileName,
ULONG LineNumber,
PCHAR Message
_In_ PVOID FailedAssertion,
_In_ PVOID FileName,
_In_ ULONG LineNumber,
_In_opt_z_ PCHAR Message
);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* !defined(_RTLFUNCS_H) && !defined(_NTDDK_) */
#ifndef assert

View file

@ -39,6 +39,10 @@
#error wine/debug.h should not be used in Wine tests
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifndef INVALID_FILE_ATTRIBUTES
#define INVALID_FILE_ATTRIBUTES (~0u)
#endif
@ -74,14 +78,22 @@ static inline int winetest_strcmpW( const WCHAR *str1, const WCHAR *str2 )
}
#ifdef STANDALONE
#define START_TEST(name) \
static void func_##name(void); \
const struct test winetest_testlist[] = { { #name, func_##name }, { 0, 0 } }; \
static void func_##name(void)
#else /* STANDALONE */
#ifdef __cplusplus
#define START_TEST(name) extern "C" void func_##name(void)
#else
#define START_TEST(name) void func_##name(void)
#endif
#endif /* STANDALONE */
#if defined(__x86_64__) && defined(__GNUC__) && defined(__WINE_USE_MSVCRT)
#define __winetest_cdecl __cdecl
#define __winetest_va_list __builtin_ms_va_list
@ -669,4 +681,8 @@ int main( int argc, char **argv )
#define ok_ntstatus(status, expected) ok_hex(status, expected)
#define ok_hdl ok_ptr
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* __WINE_WINE_TEST_H */