1 /* Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org>
3 * GNU Library General Public License (LGPL) version 2 or later.
5 * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details.
10 /* UNSAFE FUNCTION -- do not bother optimizing */
12 /* disable macro, force actual function call */
13 #undef getchar_unlocked
19 __STDIO_AUTO_THREADLOCK_VAR
;
21 __STDIO_AUTO_THREADLOCK(stdin
);
23 /* Note: don't worry about performance here... this shouldn't be used!
24 * Therefore, force actual function call. */
25 while (((c
= getchar_unlocked()) != EOF
) && ((*p
= c
) != '\n')) {
28 if ((c
== EOF
) || (s
== p
)) {
34 __STDIO_AUTO_THREADUNLOCK(stdin
);