Author: tfaber Date: Sat Jul 13 18:03:16 2013 New Revision: 59472
URL: http://svn.reactos.org/svn/reactos?rev=59472&view=rev Log: [INCLUDE] - Make our test/debug headers C++-compatible
Modified: trunk/reactos/include/reactos/debug.h trunk/reactos/include/reactos/wine/test.h
Modified: trunk/reactos/include/reactos/debug.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/debug.h?rev... ============================================================================== --- trunk/reactos/include/reactos/debug.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/debug.h [iso-8859-1] Sat Jul 13 18:03:16 2013 @@ -23,6 +23,10 @@ #error Please include SDK first. #endif
+#ifdef __cplusplus +extern "C" { +#endif + ULONG __cdecl DbgPrint( @@ -36,7 +40,7 @@ DbgPrintEx( _In_ ULONG ComponentId, _In_ ULONG Level, - _In_z_ _Printf_format_string_ PCCH Format, + _In_z_ _Printf_format_string_ PCSTR Format, ... );
@@ -45,11 +49,15 @@ 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_) */
Modified: trunk/reactos/include/reactos/wine/test.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/test.h... ============================================================================== --- trunk/reactos/include/reactos/wine/test.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/wine/test.h [iso-8859-1] Sat Jul 13 18:03:16 2013 @@ -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,13 +78,21 @@ }
#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 @@ -669,4 +681,8 @@ #define ok_ntstatus(status, expected) ok_hex(status, expected) #define ok_hdl ok_ptr
+#ifdef __cplusplus +} /* extern "C" */ +#endif + #endif /* __WINE_WINE_TEST_H */