diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-02-26 03:57:14 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-02-26 03:57:14 +0000 |
commit | 9921832fa13cef31006cfa69bc5574636c36ac0f (patch) | |
tree | 4faa87a1fbc9842126d3bdc61c0d64285ebcc849 /libc/stdio/gets.c | |
parent | 292e2d7a707449b531422d37cec4608d304da24e (diff) | |
download | uClibc-alpine-9921832fa13cef31006cfa69bc5574636c36ac0f.tar.bz2 uClibc-alpine-9921832fa13cef31006cfa69bc5574636c36ac0f.tar.xz |
Merge from trunk.
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)) { |