1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #17001 from kaspar030/support_picolibc_stdio_globals

sys/picolibc_syscalls_default: support new picolibc stdio globals
This commit is contained in:
Kaspar Schleiser 2021-10-20 12:17:14 +03:00 committed by GitHub
commit 0486c0dba7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -235,11 +235,17 @@ static int picolibc_get(FILE *file)
FILE picolibc_stdio =
FDEV_SETUP_STREAM(picolibc_put, picolibc_get, picolibc_flush, _FDEV_SETUP_RW);
#ifdef PICOLIBC_STDIO_GLOBALS
FILE *const stdout = &picolibc_stdio;
FILE *const stdin = &picolibc_stdio;
FILE *const stderr = &picolibc_stdio;
#else
FILE *const __iob[] = {
&picolibc_stdio, /* stdin */
&picolibc_stdio, /* stdout */
&picolibc_stdio, /* stderr */
&picolibc_stdio, /* stdin */
&picolibc_stdio, /* stdout */
&picolibc_stdio, /* stderr */
};
#endif
#include <thread.h>
/**