RT-Thread / rt-thread

RT-Thread is an open source IoT real-time operating system (RTOS).
https://www.rt-thread.io
Apache License 2.0
10.03k stars 4.9k forks source link

[libc] dirent.h 包含非 POSIX 定义内容 #8371

Open polarvid opened 6 months ago

polarvid commented 6 months ago

这部分宏定义并不是 POSIX 的内容,而是 DFS 内部使用的定义。

https://github.com/RT-Thread/rt-thread/blob/a1df90dcf0b9fbb30953e6f93bc557b1a28e5647/components/libc/compilers/common/include/dirent.h#L19-L31

其主要使用在 dfs 内部。

https://github.com/RT-Thread/rt-thread/blob/a1df90dcf0b9fbb30953e6f93bc557b1a28e5647/components/dfs/dfs_v2/filesystems/cromfs/dfs_cromfs.c#L1233

且第一次出现应该也是 dfsv1/dfs.h 中。

https://github.com/RT-Thread/rt-thread/blob/a1df90dcf0b9fbb30953e6f93bc557b1a28e5647/components/dfs/dfs_v1/include/dfs.h#L59-L64

基于以上原因,是否考虑移除并整理到 dfsv2/dfs.h 呢?

BernardXiong commented 6 months ago

可以考虑的