diff options
| author | Bernard Xiong <[email protected]> | 2015-05-05 10:14:59 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2015-05-05 10:14:59 +0800 |
| commit | 80eedb89635d313c81a49d23772bd3d9ec7f1475 (patch) | |
| tree | 8e73cd583d77a6d3e3dca8294e8f06fea9e50f15 | |
| parent | 7962a5c46c7b8e17429d1ee10d8e8bf8ac092014 (diff) | |
[DFS] Update DFS code.
1. Add extern "C" for cplusplus in DFS.
2. Export more symbol in DFS.
| -rw-r--r-- | components/dfs/include/dfs_posix.h | 8 | ||||
| -rw-r--r-- | components/dfs/src/dfs.c | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/components/dfs/include/dfs_posix.h b/components/dfs/include/dfs_posix.h index 56a0511422..76d0d1c18d 100644 --- a/components/dfs/include/dfs_posix.h +++ b/components/dfs/include/dfs_posix.h @@ -30,6 +30,10 @@ #include <dfs_file.h> #include <dfs_def.h> +#ifdef __cplusplus +extern "C" { +#endif + #ifndef RT_USING_NEWLIB #define O_RDONLY DFS_O_RDONLY #define O_WRONLY DFS_O_WRONLY @@ -79,6 +83,7 @@ #if defined(__CC_ARM) #include <stdio.h> +#include <stdlib.h> #elif defined(_MSC_VER) #include <stdio.h> #else @@ -126,5 +131,8 @@ int rmdir(const char *path); int chdir(const char *path); char *getcwd(char *buf, size_t size); +#ifdef __cplusplus +} #endif +#endif diff --git a/components/dfs/src/dfs.c b/components/dfs/src/dfs.c index 7e56137aba..f5176b7477 100644 --- a/components/dfs/src/dfs.c +++ b/components/dfs/src/dfs.c @@ -284,6 +284,7 @@ const char *dfs_subdir(const char *directory, const char *filename) return dir; } +RTM_EXPORT(dfs_subdir); /** * this function will normalize a path according to specified parent directory @@ -410,5 +411,7 @@ up_one: return fullpath; } +RTM_EXPORT(dfs_normalize_path); + /*@}*/ |
