__sdidinit is obselete
This commit is contained in:
@ -34,6 +34,7 @@ int libc_system_init(void)
|
|||||||
INIT_COMPONENT_EXPORT(libc_system_init);
|
INIT_COMPONENT_EXPORT(libc_system_init);
|
||||||
|
|
||||||
#if defined(RT_USING_POSIX_STDIO) && defined(RT_USING_NEWLIB)
|
#if defined(RT_USING_POSIX_STDIO) && defined(RT_USING_NEWLIB)
|
||||||
|
#define NEWLIB_VERSION_NUM (__NEWLIB__ * 10000U + __NEWLIB_MINOR__ * 100U + __NEWLIB_PATCHLEVEL__)
|
||||||
#define STDIO_DEVICE_NAME_MAX 32
|
#define STDIO_DEVICE_NAME_MAX 32
|
||||||
static FILE* std_console = NULL;
|
static FILE* std_console = NULL;
|
||||||
int libc_stdio_set_console(const char* device_name, int mode)
|
int libc_stdio_set_console(const char* device_name, int mode)
|
||||||
@ -89,8 +90,9 @@ int libc_stdio_set_console(const char* device_name, int mode)
|
|||||||
_GLOBAL_REENT->_stdout = std_console;
|
_GLOBAL_REENT->_stdout = std_console;
|
||||||
_GLOBAL_REENT->_stderr = std_console;
|
_GLOBAL_REENT->_stderr = std_console;
|
||||||
}
|
}
|
||||||
|
#if (NEWLIB_VERSION_NUM < 30400U) || (NEWLIB_VERSION_NUM >= 40000U && NEWLIB_VERSION_NUM < 40200U)
|
||||||
_GLOBAL_REENT->__sdidinit = 1;
|
_GLOBAL_REENT->__sdidinit = 1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (std_console)
|
if (std_console)
|
||||||
|
Reference in New Issue
Block a user