Skip to content

Commit f41e38d

Browse files
committed
modified stdio.c by adding comment.
1 parent ae299c3 commit f41e38d

File tree

1 file changed

+3
-1
lines changed
  • components/libc/posix/io/stdio

1 file changed

+3
-1
lines changed

components/libc/posix/io/stdio/stdio.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,10 @@ int rt_posix_stdio_set_console(const char* device_name, int mode)
105105
}
106106

107107
#if defined(_REENT_SMALL) || !defined(__sdidinit)
108-
// newlib 新版本没有 __sdidinit
108+
// Newlib >= 3.4.0 or small reent version: no __sdidinit field
109+
// Do nothing
109110
#else
111+
// Older newlib versions (typically < 3.4.0) still define __sdidinit
110112
_GLOBAL_REENT->__sdidinit = 1;
111113
#endif
112114

0 commit comments

Comments
 (0)