diff options
Diffstat (limited to 'libc/stdio/gets.c')
-rw-r--r-- | libc/stdio/gets.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libc/stdio/gets.c b/libc/stdio/gets.c index 1badd8152..5ff7869dc 100644 --- a/libc/stdio/gets.c +++ b/libc/stdio/gets.c @@ -11,6 +11,14 @@ link_warning(gets, "the 'gets' function is dangerous and should not be used.") /* UNSAFE FUNCTION -- do not bother optimizing */ +libc_hidden_proto(getchar_unlocked) +libc_hidden_proto(__fgetc_unlocked) +#ifdef __STDIO_GETC_MACRO +libc_hidden_proto(__stdin) +#else +#define __stdin stdin +#endif + char *gets(char *s) { register char *p = s; @@ -21,7 +29,7 @@ char *gets(char *s) /* Note: don't worry about performance here... this shouldn't be used! * Therefore, force actual function call. */ - while (((c = __getchar_unlocked()) != EOF) && ((*p = c) != '\n')) { + while (((c = getchar_unlocked()) != EOF) && ((*p = c) != '\n')) { ++p; } if ((c == EOF) || (s == p)) { |