mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-30 02:50:25 +08:00
b0f271d1db
Add internal inline functions _getchar_unlocked() and _putchar_unlocked() if __CUSTOM_FILE_IO__ is not defined. These functions get _REENT only once. Use them for getchar_unlocked() and putchar_unlocked(). Define getchar() and putchar() to these unlocked internal functions if __SINGLE_THREAD__ is defined, otherwise use the external functions to use proper locking of the FILE object. Assumes that __SINGLE_THREAD__ is not defined if __CYGWIN__ is defined. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>