Skip to content
代码片段 群组 项目
提交 e18b7ffa 编辑于 作者: Corinna Vinschen's avatar Corinna Vinschen
浏览文件

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: default avatarCorinna Vinschen <corinna@vinschen.de>
上级 ff53f489
分支
标签 cygwin-2_9_0-release
无相关合并请求
......@@ -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 */
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
想要评论请 注册