stdio.h: Don't define unlocked macros using static inline on C++
In C++, the usage of static inline functions for getchar_unlocked and putchar_unlocked may result in error messages like error: ‘_putchar_unlocked’ was not declared in this scope Fix this by not using the _getchar_unlocked and _putchar_unlocked macros in C++. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
ff53f489fa
commit
e18b7ffa48
|
@ -762,12 +762,12 @@ _putchar_unlocked(int _c)
|
|||
#define getchar() _getchar_unlocked()
|
||||
#define putchar(_c) _putchar_unlocked(_c)
|
||||
#endif /* __SINGLE_THREAD__ */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#if __MISC_VISIBLE || __POSIX_VISIBLE
|
||||
#define getchar_unlocked() _getchar_unlocked()
|
||||
#define putchar_unlocked(_c) _putchar_unlocked(_c)
|
||||
#endif
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#if __MISC_VISIBLE
|
||||
/* fast always-buffered version, true iff error */
|
||||
|
|
Loading…
Reference in New Issue