mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-26 09:08:25 +00:00
[rtlibc] remove libc_dirent.h
This commit is contained in:
@@ -6,10 +6,14 @@
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
*/
|
||||
#ifndef __RTT_DIRENT_H__
|
||||
#define __RTT_DIRENT_H__
|
||||
#ifndef __DIRENT_H__
|
||||
#define __DIRENT_H__
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <rtdef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* dirent.h - format of directory entries
|
||||
@@ -26,27 +30,32 @@
|
||||
#define DT_REG 0x01
|
||||
#define DT_DIR 0x02
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DIR_STRUCTURE
|
||||
#define HAVE_DIR_STRUCTURE
|
||||
typedef struct
|
||||
{
|
||||
int fd; /* directory file */
|
||||
char buf[512];
|
||||
int num;
|
||||
int cur;
|
||||
} DIR;
|
||||
}DIR;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DIRENT_STRUCTURE
|
||||
#define HAVE_DIRENT_STRUCTURE
|
||||
|
||||
#ifdef DFS_PATH_MAX
|
||||
#define DIRENT_NAME_MAX DFS_PATH_MAX
|
||||
#else
|
||||
#define DIRENT_NAME_MAX 256
|
||||
#endif
|
||||
|
||||
struct dirent
|
||||
{
|
||||
rt_uint8_t d_type; /* The type of the file */
|
||||
rt_uint8_t d_namlen; /* The length of the not including the terminating null file name */
|
||||
rt_uint16_t d_reclen; /* length of this record */
|
||||
char d_name[256]; /* The null-terminated file name */
|
||||
char d_name[DIRENT_NAME_MAX]; /* The null-terminated file name */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user