From b7f7eba5cf0ad5584fbc3756fa80d9cea0396a0e Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Thu, 22 Oct 2015 11:01:09 +0200 Subject: [PATCH] bc_tester: fix INLINE macro for win32 --- mediastreamer2 | 2 +- tester/common/bc_tester_utils.h | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mediastreamer2 b/mediastreamer2 index af9a3f7f9..e5a58ca1d 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit af9a3f7f992fa4fbb7f889c96607b48cccf1a8e4 +Subproject commit e5a58ca1dc68618dc0e7d33ba3226bbc6121629e diff --git a/tester/common/bc_tester_utils.h b/tester/common/bc_tester_utils.h index c82607cc6..796b1919c 100644 --- a/tester/common/bc_tester_utils.h +++ b/tester/common/bc_tester_utils.h @@ -114,7 +114,7 @@ char * bc_tester_res(const char *name); char * bc_tester_file(const char *name); -/*Redefine the CU_... macros WITHOUT final ';' semicolon, to allow IF conditions and with smarter error message */ +/*Redefine the CU_... macros WITHOUT final ';' semicolon, to allow IF conditions and smarter error message */ extern int CU_assertImplementation(int bValue, unsigned int uiLine, const char *strCondition, @@ -122,7 +122,13 @@ extern int CU_assertImplementation(int bValue, const char *strFunction, int bFatal); -static inline int _BC_ASSERT(const char* file, int line, int predicate, const char* format, int fatal) { +#ifdef _WIN32 +#define BC_INLINE __inline +#else +#define BC_INLINE inline +#endif + +static BC_INLINE int _BC_ASSERT(const char* file, int line, int predicate, const char* format, int fatal) { if (!predicate) bc_tester_printf(bc_printf_verbosity_info, format, NULL); return CU_assertImplementation(predicate, line, format, file, "", fatal); }