未验证 提交 a68bdc94 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #2250 from gztss/master

实现_sys_flen()函数并解决了unistd.h和dirent.h不能同时包含的问题。
......@@ -265,7 +265,17 @@ void _sys_exit(int return_code)
*/
long _sys_flen(FILEHANDLE fh)
{
struct stat stat;
if (fh < STDERR)
return -1;
#ifndef RT_USING_DFS
return -1;
#else
fstat(fh, &stat);
return stat.st_size;
#endif
}
int _sys_istty(FILEHANDLE fh)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册