提交 2917180c 编写于 作者: F FragrantRye 提交者: mysterywolf
上级 b08d8672
...@@ -47,6 +47,8 @@ INIT_ENV_EXPORT(rt_posix_stdio_init); ...@@ -47,6 +47,8 @@ INIT_ENV_EXPORT(rt_posix_stdio_init);
#if defined(RT_USING_NEWLIBC) #if defined(RT_USING_NEWLIBC)
#define NEWLIB_VERSION_NUM (__NEWLIB__ * 10000U + __NEWLIB_MINOR__ * 100U + __NEWLIB_PATCHLEVEL__)
static FILE* std_console = NULL; static FILE* std_console = NULL;
int rt_posix_stdio_set_console(const char* device_name, int mode) int rt_posix_stdio_set_console(const char* device_name, int mode)
{ {
...@@ -102,7 +104,9 @@ int rt_posix_stdio_set_console(const char* device_name, int mode) ...@@ -102,7 +104,9 @@ int rt_posix_stdio_set_console(const char* device_name, int mode)
_GLOBAL_REENT->_stderr = std_console; _GLOBAL_REENT->_stderr = std_console;
} }
_GLOBAL_REENT->__sdidinit = 1; #if (NEWLIB_VERSION_NUM < 30400U) || (NEWLIB_VERSION_NUM >= 40000U && NEWLIB_VERSION_NUM < 40300U)
_GLOBAL_REENT->__sdidinit = 1; /* __sdidinit is obselete */
#endif
} }
if (std_console) if (std_console)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册