summaryrefslogtreecommitdiff
path: root/src/stdio/getchar_unlocked.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/getchar_unlocked.c')
-rw-r--r--src/stdio/getchar_unlocked.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/stdio/getchar_unlocked.c b/src/stdio/getchar_unlocked.c
new file mode 100644
index 00000000..299cb958
--- /dev/null
+++ b/src/stdio/getchar_unlocked.c
@@ -0,0 +1,6 @@
+#include "stdio_impl.h"
+
+int getchar_unlocked(void)
+{
+ return stdin->rpos < stdin->rstop ? *stdin->rpos++ : __uflow(stdin);
+}