mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #3949 from andresag01/dirent-from-c
Fix C declaration of dir functions and typespull/4020/head
commit
2fb65e7bd9
|
@ -50,8 +50,13 @@ typedef int mode_t; ///< Mode for opening files
|
||||||
#if __cplusplus
|
#if __cplusplus
|
||||||
namespace mbed { class Dir; }
|
namespace mbed { class Dir; }
|
||||||
typedef mbed::Dir DIR;
|
typedef mbed::Dir DIR;
|
||||||
|
#else
|
||||||
|
typedef struct Dir DIR;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
#endif
|
||||||
DIR *opendir(const char*);
|
DIR *opendir(const char*);
|
||||||
struct dirent *readdir(DIR *);
|
struct dirent *readdir(DIR *);
|
||||||
int closedir(DIR*);
|
int closedir(DIR*);
|
||||||
|
@ -59,6 +64,7 @@ extern "C" {
|
||||||
long telldir(DIR*);
|
long telldir(DIR*);
|
||||||
void seekdir(DIR*, long);
|
void seekdir(DIR*, long);
|
||||||
int mkdir(const char *name, mode_t n);
|
int mkdir(const char *name, mode_t n);
|
||||||
|
#if __cplusplus
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue