aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcmix-crypto/message.h9
-rw-r--r--libcmix/CMakeLists.txt6
-rw-r--r--libcmix/cmix.h14
3 files changed, 23 insertions, 6 deletions
diff --git a/libcmix-crypto/message.h b/libcmix-crypto/message.h
index 98cdb9a..2c483e9 100644
--- a/libcmix-crypto/message.h
+++ b/libcmix-crypto/message.h
@@ -1,3 +1,8 @@
+#pragma once
+
+#ifdef __cplusplus
+extern "C" {
+#endif
#include <stddef.h>
#include <stdlib.h>
@@ -83,3 +88,7 @@ struct CmixBufferImpl get_cmix_curve25519_buffer_implementation() {
};
}
*/
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
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