diff options
author | Mitya Selivanov <0x7fffff@guattari.ru> | 2022-08-07 01:54:01 +0400 |
---|---|---|
committer | Mitya Selivanov <0x7fffff@guattari.ru> | 2022-08-07 01:54:01 +0400 |
commit | 47f9cc0158920327ee5eb1a1a9b4318027dead0d (patch) | |
tree | 1a1afc6f367e4398632bf26bafaf08ba3b5998d7 /source | |
parent | 46fcabecec6682c8ba1248ea071574325fff7486 (diff) | |
download | kit-47f9cc0158920327ee5eb1a1a9b4318027dead0d.zip |
[msvc] Add extern C
Diffstat (limited to 'source')
-rw-r--r-- | source/kit_test/test.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/kit_test/test.h b/source/kit_test/test.h index 365c43c..bf1bf15 100644 --- a/source/kit_test/test.h +++ b/source/kit_test/test.h @@ -44,9 +44,15 @@ struct kit_tests_list { extern struct kit_tests_list kit_tests_list; #ifdef _MSC_VER +# ifdef __cplusplus +# define KIT_EXTERN_C_ extern "C" +# else +# define KIT_EXTERN_C_ +# endif + # pragma section(".CRT$XCU", read) # define KIT_TEST_ON_START_2_(f, p) \ - static void f(void); \ + KIT_EXTERN_C_ static void f(void); \ __declspec(allocate(".CRT$XCU")) void (*f##_)(void) = f; \ __pragma(comment(linker, "/include:" p #f "_")) static void f( \ void) |