mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-21 00:27:19 +08:00
[DFS] Update DFS code.
1. Add extern "C" for cplusplus in DFS. 2. Export more symbol in DFS.
This commit is contained in:
parent
7962a5c46c
commit
80eedb8963
@ -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
|
||||
|
@ -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);
|
||||
|
||||
/*@}*/
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user