projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use inline syscalls for powerpc (32-bit)
[musl]
/
src
/
stdio
/
__uflow.c
diff --git
a/src/stdio/__uflow.c
b/src/stdio/__uflow.c
index
5a51d61
..
2a88bca
100644
(file)
--- a/
src/stdio/__uflow.c
+++ b/
src/stdio/__uflow.c
@@
-1,7
+1,11
@@
#include "stdio_impl.h"
#include "stdio_impl.h"
+/* This function assumes it will never be called if there is already
+ * data buffered for reading. */
+
int __uflow(FILE *f)
{
int __uflow(FILE *f)
{
- if (__underflow(f) < 0) return EOF;
- else return *f->rpos++;
+ unsigned char c;
+ if (!__toread(f) && f->read(f, &c, 1)==1) return c;
+ return EOF;
}
}