From 4dea13e3cd25b6de602ffb53be5e60005b6ba10b Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Mon, 29 Aug 2016 15:33:00 +0200 Subject: Cleaned up cmix libraries, added extern "C" linkage when included from c++ --- libcmix/CMakeLists.txt | 6 +++++- libcmix/cmix.h | 14 +++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) (limited to 'libcmix') diff --git a/libcmix/CMakeLists.txt b/libcmix/CMakeLists.txt index 5d87a56..826a604 100644 --- a/libcmix/CMakeLists.txt +++ b/libcmix/CMakeLists.txt @@ -5,4 +5,8 @@ add_library(cmix target_include_directories(cmix PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} -) \ No newline at end of file +) + +target_compile_options(cmix + PRIVATE -std=c99 +) diff --git a/libcmix/cmix.h b/libcmix/cmix.h index 5fe2e13..517f067 100644 --- a/libcmix/cmix.h +++ b/libcmix/cmix.h @@ -1,11 +1,11 @@ +#ifdef __cplusplus +extern "C" { +#endif + /** * \file */ -struct message { - char buffer[2048/8]; -}; - /** * \struct * \brief The CMixBuffer struct is the temporary storage of messages in each Node. @@ -48,4 +48,8 @@ enum cmix_error get_message(char* message, struct CMixBuffer b, unsigned int ind * \param[in] index The index into the buffer * \return index_out_of_range if \p index is greater than or equal to \p b.nr_messages , otherwise no_error. */ -enum cmix_error set_message(char const* message, struct CMixBuffer b, unsigned int index); \ No newline at end of file +enum cmix_error set_message(char const* message, struct CMixBuffer b, unsigned int index); + +#ifdef __cplusplus +} // extern "C" +#endif -- cgit v1.2.3-70-g09d2