Merge branch 'bugfix/newlib_putchar_locking_v3.2' into 'release/v3.2'
newlib: don't define non-thread-safe versions of getc, putc (backport v3.2) See merge request espressif/esp-idf!8030
This commit is contained in:
commit
0037a03106
1 changed files with 4 additions and 0 deletions
|
@ -696,8 +696,10 @@ _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) {
|
|||
|
||||
#ifndef __CYGWIN__
|
||||
#ifndef lint
|
||||
#ifdef __SINGLE_THREAD__
|
||||
#define getc(fp) __sgetc_r(_REENT, fp)
|
||||
#define putc(x, fp) __sputc_r(_REENT, x, fp)
|
||||
#endif /* __SINGLE_THREAD__ */
|
||||
#endif /* lint */
|
||||
#endif /* __CYGWIN__ */
|
||||
|
||||
|
@ -714,8 +716,10 @@ _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) {
|
|||
|
||||
#endif /* !__CUSTOM_FILE_IO__ */
|
||||
|
||||
#ifdef __SINGLE_THREAD__
|
||||
#define getchar() getc(stdin)
|
||||
#define putchar(x) putc(x, stdout)
|
||||
#endif /* __SINGLE_THREAD__ */
|
||||
|
||||
#ifndef __STRICT_ANSI__
|
||||
#define getchar_unlocked() getc_unlocked(stdin)
|
||||
|
|
Loading…
Reference in a new issue