summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgkostka <kostka.grzegorz@gmail.com>2015-11-19 23:27:44 +0100
committergkostka <kostka.grzegorz@gmail.com>2015-11-19 23:27:44 +0100
commit4f4561a7faea00a960804169fda2d03c0a1e24d4 (patch)
tree666daa6bfa7b9b7b601259c0e37ce1f70e8d205f
parent8e75911fee8589de164b7c6c96e80aaf9256403b (diff)
Add #ifdef __cplusplus to all header files
-rw-r--r--lwext4/ext4.h8
-rw-r--r--lwext4/ext4_balloc.h8
-rw-r--r--lwext4/ext4_bcache.h8
-rw-r--r--lwext4/ext4_bitmap.h8
-rw-r--r--lwext4/ext4_block_group.h4
-rw-r--r--lwext4/ext4_blockdev.h14
-rw-r--r--lwext4/ext4_config.h8
-rw-r--r--lwext4/ext4_crc32c.h8
-rw-r--r--lwext4/ext4_debug.h8
-rw-r--r--lwext4/ext4_dir.h8
-rw-r--r--lwext4/ext4_dir_idx.h8
-rw-r--r--lwext4/ext4_errno.h8
-rw-r--r--lwext4/ext4_extent.h8
-rw-r--r--lwext4/ext4_fs.h8
-rw-r--r--lwext4/ext4_hash.h8
-rw-r--r--lwext4/ext4_ialloc.h1
-rw-r--r--lwext4/ext4_inode.h8
-rw-r--r--lwext4/ext4_mkfs.h8
-rw-r--r--lwext4/ext4_super.h8
-rw-r--r--lwext4/ext4_types.h8
-rw-r--r--lwext4/ext4_xattr.h8
-rw-r--r--lwext4/tree.h8
22 files changed, 168 insertions, 3 deletions
diff --git a/lwext4/ext4.h b/lwext4/ext4.h
index 5ac3eb1..40f0f30 100644
--- a/lwext4/ext4.h
+++ b/lwext4/ext4.h
@@ -38,6 +38,10 @@
#ifndef EXT4_H_
#define EXT4_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdint.h>
#include <stddef.h>
@@ -404,6 +408,10 @@ const ext4_direntry *ext4_dir_entry_next(ext4_dir *d);
* @param d directory handle*/
void ext4_dir_entry_rewind(ext4_dir *d);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EXT4_H_ */
/**
diff --git a/lwext4/ext4_balloc.h b/lwext4/ext4_balloc.h
index 48542da..c25b259 100644
--- a/lwext4/ext4_balloc.h
+++ b/lwext4/ext4_balloc.h
@@ -42,6 +42,10 @@
#ifndef EXT4_BALLOC_H_
#define EXT4_BALLOC_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "ext4_config.h"
#include "ext4_types.h"
@@ -103,6 +107,10 @@ int ext4_balloc_alloc_block(struct ext4_inode_ref *inode_ref,
int ext4_balloc_try_alloc_block(struct ext4_inode_ref *inode_ref,
ext4_fsblk_t baddr, bool *free);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EXT4_BALLOC_H_ */
/**
diff --git a/lwext4/ext4_bcache.h b/lwext4/ext4_bcache.h
index 679cd69..3fc722a 100644
--- a/lwext4/ext4_bcache.h
+++ b/lwext4/ext4_bcache.h
@@ -37,6 +37,10 @@
#ifndef EXT4_BCACHE_H_
#define EXT4_BCACHE_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "ext4_config.h"
#include <stdint.h>
@@ -160,6 +164,10 @@ int ext4_bcache_free(struct ext4_bcache *bc, struct ext4_block *b,
* @return full status*/
bool ext4_bcache_is_full(struct ext4_bcache *bc);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EXT4_BCACHE_H_ */
/**
diff --git a/lwext4/ext4_bitmap.h b/lwext4/ext4_bitmap.h
index 1299b70..cb73b76 100644
--- a/lwext4/ext4_bitmap.h
+++ b/lwext4/ext4_bitmap.h
@@ -37,6 +37,10 @@
#ifndef EXT4_BITMAP_H_
#define EXT4_BITMAP_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "ext4_config.h"
#include <stdint.h>
@@ -88,6 +92,10 @@ void ext4_bmap_bits_free(uint8_t *bmap, uint32_t sbit, uint32_t bcnt);
int ext4_bmap_bit_find_clr(uint8_t *bmap, uint32_t sbit, uint32_t ebit,
uint32_t *bit_id);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EXT4_BITMAP_H_ */
/**
diff --git a/lwext4/ext4_block_group.h b/lwext4/ext4_block_group.h
index e96989b..92d57df 100644
--- a/lwext4/ext4_block_group.h
+++ b/lwext4/ext4_block_group.h
@@ -42,6 +42,10 @@
#ifndef EXT4_BLOCK_GROUP_H_
#define EXT4_BLOCK_GROUP_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "ext4_config.h"
#include "ext4_types.h"
#include "ext4_super.h"
diff --git a/lwext4/ext4_blockdev.h b/lwext4/ext4_blockdev.h
index 39514a4..0b22052 100644
--- a/lwext4/ext4_blockdev.h
+++ b/lwext4/ext4_blockdev.h
@@ -25,9 +25,6 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef EXT4_BLOCKDEV_H_
-#define EXT4_BLOCKDEV_H_
-
/** @addtogroup lwext4
* @{
*/
@@ -36,6 +33,13 @@
* @brief Block device module.
*/
+#ifndef EXT4_BLOCKDEV_H_
+#define EXT4_BLOCKDEV_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "ext4_config.h"
#include "ext4_bcache.h"
#include "ext4_debug.h"
@@ -205,6 +209,10 @@ int ext4_block_readbytes(struct ext4_blockdev *bdev, uint64_t off, void *buf,
* @return standard error code*/
int ext4_block_cache_write_back(struct ext4_blockdev *bdev, uint8_t on_off);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EXT4_BLOCKDEV_H_ */
/**
diff --git a/lwext4/ext4_config.h b/lwext4/ext4_config.h
index 72100dd..bbf4f5e 100644
--- a/lwext4/ext4_config.h
+++ b/lwext4/ext4_config.h
@@ -37,6 +37,10 @@
#ifndef EXT4_CONFIG_H_
#define EXT4_CONFIG_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifdef CONFIG_HAVE_OWN_CFG
#include <config.h>
#endif
@@ -140,6 +144,10 @@
#define CONFIG_EXTENT_FULL 1
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EXT4_CONFIG_H_ */
/**
diff --git a/lwext4/ext4_crc32c.h b/lwext4/ext4_crc32c.h
index 659699e..24d7a41 100644
--- a/lwext4/ext4_crc32c.h
+++ b/lwext4/ext4_crc32c.h
@@ -39,6 +39,10 @@
#ifndef LWEXT4_EXT4_CRC32C_H_
#define LWEXT4_EXT4_CRC32C_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "ext4_config.h"
#include <stdint.h>
@@ -50,6 +54,10 @@
* @return updated crc32c value*/
uint32_t ext4_crc32c(uint32_t crc, const void *buffer, uint32_t length);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* LWEXT4_EXT4_CRC32C_H_ */
/**
diff --git a/lwext4/ext4_debug.h b/lwext4/ext4_debug.h
index a923b47..c02a2aa 100644
--- a/lwext4/ext4_debug.h
+++ b/lwext4/ext4_debug.h
@@ -37,6 +37,10 @@
#ifndef EXT4_DEBUG_H_
#define EXT4_DEBUG_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "ext4_config.h"
#include "ext4_errno.h"
@@ -167,6 +171,10 @@ uint32_t ext4_dmask_get(void);
#define ext4_assert(_v)
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EXT4_DEBUG_H_ */
/**
diff --git a/lwext4/ext4_dir.h b/lwext4/ext4_dir.h
index bb1ffe0..5bdbef3 100644
--- a/lwext4/ext4_dir.h
+++ b/lwext4/ext4_dir.h
@@ -42,6 +42,10 @@
#ifndef EXT4_DIR_H_
#define EXT4_DIR_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "ext4_config.h"
#include "ext4_types.h"
#include "ext4_blockdev.h"
@@ -278,6 +282,10 @@ void ext4_dir_set_checksum(struct ext4_inode_ref *inode_ref,
/* checksumming functions */
void initialize_dir_tail(struct ext4_dir_entry_tail *t);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EXT4_DIR_H_ */
/**
diff --git a/lwext4/ext4_dir_idx.h b/lwext4/ext4_dir_idx.h
index 5a864cc..f47caec 100644
--- a/lwext4/ext4_dir_idx.h
+++ b/lwext4/ext4_dir_idx.h
@@ -42,6 +42,10 @@
#ifndef EXT4_DIR_IDX_H_
#define EXT4_DIR_IDX_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "ext4_config.h"
#include "ext4_types.h"
@@ -85,6 +89,10 @@ int ext4_dir_dx_add_entry(struct ext4_inode_ref *parent,
int ext4_dir_dx_reset_parent_inode(struct ext4_inode_ref *dir,
uint32_t parent_inode);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EXT4_DIR_IDX_H_ */
/**
diff --git a/lwext4/ext4_errno.h b/lwext4/ext4_errno.h
index bf3852a..ce5784c 100644
--- a/lwext4/ext4_errno.h
+++ b/lwext4/ext4_errno.h
@@ -36,6 +36,10 @@
#ifndef EXT4_ERRNO_H_
#define EXT4_ERRNO_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "ext4_config.h"
#if !CONFIG_HAVE_OWN_ERRNO
@@ -96,6 +100,10 @@
#define EOK 0
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EXT4_ERRNO_H_ */
/**
diff --git a/lwext4/ext4_extent.h b/lwext4/ext4_extent.h
index 2684e3b..2577b24 100644
--- a/lwext4/ext4_extent.h
+++ b/lwext4/ext4_extent.h
@@ -41,6 +41,10 @@
#ifndef EXT4_EXTENT_H_
#define EXT4_EXTENT_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "ext4_config.h"
#include "ext4_types.h"
#include "ext4_inode.h"
@@ -274,6 +278,10 @@ int ext4_extent_remove_space(struct ext4_inode_ref *inode_ref, ext4_lblk_t from,
ext4_lblk_t to);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EXT4_EXTENT_H_ */
/**
* @}
diff --git a/lwext4/ext4_fs.h b/lwext4/ext4_fs.h
index 085ff27..17019e5 100644
--- a/lwext4/ext4_fs.h
+++ b/lwext4/ext4_fs.h
@@ -42,6 +42,10 @@
#ifndef EXT4_FS_H_
#define EXT4_FS_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "ext4_config.h"
#include "ext4_types.h"
@@ -228,6 +232,10 @@ void ext4_fs_inode_links_count_inc(struct ext4_inode_ref *inode_ref);
*/
void ext4_fs_inode_links_count_dec(struct ext4_inode_ref *inode_ref);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EXT4_FS_H_ */
/**
diff --git a/lwext4/ext4_hash.h b/lwext4/ext4_hash.h
index 71d8940..b7a9ac5 100644
--- a/lwext4/ext4_hash.h
+++ b/lwext4/ext4_hash.h
@@ -37,6 +37,10 @@
#ifndef EXT4_HASH_H_
#define EXT4_HASH_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "ext4_config.h"
#include <stdint.h>
@@ -53,6 +57,10 @@ int ext2_htree_hash(const char *name, int len, const uint32_t *hash_seed,
int hash_version, uint32_t *hash_major,
uint32_t *hash_minor);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EXT4_HASH_H_ */
/**
diff --git a/lwext4/ext4_ialloc.h b/lwext4/ext4_ialloc.h
index 3b518a7..cea3fe6 100644
--- a/lwext4/ext4_ialloc.h
+++ b/lwext4/ext4_ialloc.h
@@ -77,6 +77,7 @@ int ext4_ialloc_alloc_inode(struct ext4_fs *fs, uint32_t *index, bool is_dir);
#ifdef __cplusplus
}
#endif
+
#endif /* EXT4_IALLOC_H_ */
/**
diff --git a/lwext4/ext4_inode.h b/lwext4/ext4_inode.h
index 1da4b2c..cabbe94 100644
--- a/lwext4/ext4_inode.h
+++ b/lwext4/ext4_inode.h
@@ -42,6 +42,10 @@
#ifndef EXT4_INODE_H_
#define EXT4_INODE_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "ext4_config.h"
#include <stdint.h>
@@ -321,6 +325,10 @@ bool ext4_inode_can_truncate(struct ext4_sblock *sb, struct ext4_inode *inode);
struct ext4_extent_header *
ext4_inode_get_extent_header(struct ext4_inode *inode);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EXT4_INODE_H_ */
/**
diff --git a/lwext4/ext4_mkfs.h b/lwext4/ext4_mkfs.h
index 3b97e9f..497bf3b 100644
--- a/lwext4/ext4_mkfs.h
+++ b/lwext4/ext4_mkfs.h
@@ -37,6 +37,10 @@
#ifndef EXT4_MKFS_H_
#define EXT4_MKFS_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "ext4_config.h"
#include "ext4_types.h"
#include "ext4_blockdev.h"
@@ -67,6 +71,10 @@ int ext4_mkfs_read_info(struct ext4_blockdev *bd, struct ext4_mkfs_info *info);
int ext4_mkfs(struct ext4_fs *fs, struct ext4_blockdev *bd,
struct ext4_mkfs_info *info, int fs_type);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EXT4_MKFS_H_ */
/**
diff --git a/lwext4/ext4_super.h b/lwext4/ext4_super.h
index 5b7b5a0..2172698 100644
--- a/lwext4/ext4_super.h
+++ b/lwext4/ext4_super.h
@@ -42,6 +42,10 @@
#ifndef EXT4_SUPER_H_
#define EXT4_SUPER_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "ext4_config.h"
#include "ext4_types.h"
@@ -222,6 +226,10 @@ uint32_t ext4_bg_num_gdb(struct ext4_sblock *s, uint32_t group);
uint32_t ext4_num_base_meta_clusters(struct ext4_sblock *s,
uint32_t block_group);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EXT4_SUPER_H_ */
/**
diff --git a/lwext4/ext4_types.h b/lwext4/ext4_types.h
index a6bdcb5..dfdd19f 100644
--- a/lwext4/ext4_types.h
+++ b/lwext4/ext4_types.h
@@ -42,6 +42,10 @@
#ifndef EXT4_TYPES_H_
#define EXT4_TYPES_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "ext4_config.h"
#include "ext4_blockdev.h"
#include "tree.h"
@@ -949,6 +953,10 @@ static inline uint16_t to_le16(uint16_t n)
((size_t)(&(((type *)0)->field)))
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* EXT4_TYPES_H_ */
/**
diff --git a/lwext4/ext4_xattr.h b/lwext4/ext4_xattr.h
index 46df6f5..5b2f155 100644
--- a/lwext4/ext4_xattr.h
+++ b/lwext4/ext4_xattr.h
@@ -37,6 +37,10 @@
#ifndef EXT4_XATTR_H_
#define EXT4_XATTR_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "ext4_config.h"
#include "ext4_types.h"
@@ -68,6 +72,10 @@ const char *ext4_extract_xattr_name(const char *full_name, size_t full_name_len,
const char *ext4_get_xattr_name_prefix(uint8_t name_index,
size_t *ret_prefix_len);
+#ifdef __cplusplus
+}
+#endif
+
#endif
/**
* @}
diff --git a/lwext4/tree.h b/lwext4/tree.h
index fb89465..abde2d3 100644
--- a/lwext4/tree.h
+++ b/lwext4/tree.h
@@ -30,6 +30,10 @@
#ifndef _SYS_TREE_H_
#define _SYS_TREE_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "ext4_config.h"
/*
@@ -798,4 +802,8 @@ name##_RB_MINMAX(struct name *head, int val) \
((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \
(x) = (y))
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _SYS_TREE_H_ */