Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/littlefs-project/littlefs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Haster <chaster@utexas.edu>2018-07-13 18:55:16 +0300
committerGitHub <noreply@github.com>2018-07-13 18:55:16 +0300
commitf94d233deb494bbe1cb5488d69539607d354b2ac (patch)
tree2ed1674baf2315f8cde7798a2379bf6bd3840b6b
parentc72d25203c1c1de8ffee62915cde07899edf73a6 (diff)
parent577d777c20095b6030a3e0227d144081d5c4fe5c (diff)
Merge pull request #74 from FreddieChopin/cxx-guardsv1.4
Add C++ guards to public headers
-rw-r--r--emubd/lfs_emubd.h9
-rw-r--r--lfs.h9
-rw-r--r--lfs_util.h9
3 files changed, 27 insertions, 0 deletions
diff --git a/emubd/lfs_emubd.h b/emubd/lfs_emubd.h
index 85718de..0fd4387 100644
--- a/emubd/lfs_emubd.h
+++ b/emubd/lfs_emubd.h
@@ -10,6 +10,11 @@
#include "lfs.h"
#include "lfs_util.h"
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
// Config options
#ifndef LFS_EMUBD_READ_SIZE
@@ -75,4 +80,8 @@ int lfs_emubd_erase(const struct lfs_config *cfg, lfs_block_t block);
int lfs_emubd_sync(const struct lfs_config *cfg);
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif
diff --git a/lfs.h b/lfs.h
index 3683d32..1b1be19 100644
--- a/lfs.h
+++ b/lfs.h
@@ -10,6 +10,11 @@
#include <stdint.h>
#include <stdbool.h>
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
/// Version info ///
@@ -460,4 +465,8 @@ int lfs_traverse(lfs_t *lfs, int (*cb)(void*, lfs_block_t), void *data);
int lfs_deorphan(lfs_t *lfs);
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif
diff --git a/lfs_util.h b/lfs_util.h
index d61c545..b2dc237 100644
--- a/lfs_util.h
+++ b/lfs_util.h
@@ -34,6 +34,11 @@
#include <stdio.h>
#endif
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
// Macros, may be replaced by system specific wrappers. Arguments to these
// macros must not have side-effects as the macros can be removed for a smaller
@@ -173,5 +178,9 @@ static inline void lfs_free(void *p) {
}
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif
#endif