summaryrefslogtreecommitdiff
path: root/components/libc/compilers/newlib/sys/dirent.h
diff options
context:
space:
mode:
Diffstat (limited to 'components/libc/compilers/newlib/sys/dirent.h')
-rw-r--r--components/libc/compilers/newlib/sys/dirent.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/components/libc/compilers/newlib/sys/dirent.h b/components/libc/compilers/newlib/sys/dirent.h
index db8c0655a1..bfba586093 100644
--- a/components/libc/compilers/newlib/sys/dirent.h
+++ b/components/libc/compilers/newlib/sys/dirent.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -17,36 +17,36 @@
*/
/* File types */
-#define FT_REGULAR 0 /* regular file */
-#define FT_SOCKET 1 /* socket file */
-#define FT_DIRECTORY 2 /* directory */
-#define FT_USER 3 /* user defined */
+#define FT_REGULAR 0 /* regular file */
+#define FT_SOCKET 1 /* socket file */
+#define FT_DIRECTORY 2 /* directory */
+#define FT_USER 3 /* user defined */
-#define DT_UNKNOWN 0x00
-#define DT_REG 0x01
-#define DT_DIR 0x02
+#define DT_UNKNOWN 0x00
+#define DT_REG 0x01
+#define DT_DIR 0x02
#ifdef __cplusplus
extern "C" {
#endif
#ifndef HAVE_DIR_STRUCTURE
-typedef struct
+typedef struct
{
- int fd; /* directory file */
- char buf[512];
- int num;
- int cur;
+ int fd; /* directory file */
+ char buf[512];
+ int num;
+ int cur;
} DIR;
#endif
#ifndef HAVE_DIRENT_STRUCTURE
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 */
+ 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 */
};
#endif