Dropped __cplusplus guards
littlefs is not a C++ project, and it's important to make sure users are
aware of that in case the header file ever breaks C++ (C++ is _not_
compatible with C99).
So dropping these guards.
C++ users should wrap the relevant includes with extern "C":
extern "C" {
#include "lfs.h"
}
This commit is contained in:
@@ -14,11 +14,6 @@
|
|||||||
#include "bd/lfs_rambd.h"
|
#include "bd/lfs_rambd.h"
|
||||||
#include "bd/lfs_filebd.h"
|
#include "bd/lfs_filebd.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// Block device specific tracing
|
// Block device specific tracing
|
||||||
#ifndef LFS_EMUBD_TRACE
|
#ifndef LFS_EMUBD_TRACE
|
||||||
@@ -264,8 +259,4 @@ int lfs_emubd_setpowercycles(const struct lfs_config *cfg,
|
|||||||
int lfs_emubd_cpy(const struct lfs_config *cfg, lfs_emubd_t *copy);
|
int lfs_emubd_cpy(const struct lfs_config *cfg, lfs_emubd_t *copy);
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} /* extern "C" */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -11,11 +11,6 @@
|
|||||||
#include "lfs.h"
|
#include "lfs.h"
|
||||||
#include "lfs_util.h"
|
#include "lfs_util.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// Block device specific tracing
|
// Block device specific tracing
|
||||||
#ifndef LFS_FILEBD_TRACE
|
#ifndef LFS_FILEBD_TRACE
|
||||||
@@ -58,8 +53,4 @@ int lfs_filebd_erase(const struct lfs_config *cfg, lfs_block_t block);
|
|||||||
int lfs_filebd_sync(const struct lfs_config *cfg);
|
int lfs_filebd_sync(const struct lfs_config *cfg);
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} /* extern "C" */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -11,11 +11,6 @@
|
|||||||
#include "lfs.h"
|
#include "lfs.h"
|
||||||
#include "lfs_util.h"
|
#include "lfs_util.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// Block device specific tracing
|
// Block device specific tracing
|
||||||
#ifndef LFS_RAMBD_TRACE
|
#ifndef LFS_RAMBD_TRACE
|
||||||
@@ -67,8 +62,4 @@ int lfs_rambd_erase(const struct lfs_config *cfg, lfs_block_t block);
|
|||||||
int lfs_rambd_sync(const struct lfs_config *cfg);
|
int lfs_rambd_sync(const struct lfs_config *cfg);
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} /* extern "C" */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -10,11 +10,6 @@
|
|||||||
|
|
||||||
#include "lfs_util.h"
|
#include "lfs_util.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/// Version info ///
|
/// Version info ///
|
||||||
|
|
||||||
@@ -1378,8 +1373,4 @@ int lfsr_fs_grow(lfs_t *lfs, lfs_size_t block_count);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} /* extern "C" */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -114,11 +114,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// Macros, may be replaced by system specific wrappers. Arguments to these
|
// 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
|
// macros must not have side-effects as the macros can be removed for a smaller
|
||||||
@@ -776,9 +771,5 @@ static inline void lfs_free(void *p) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
} /* extern "C" */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user