projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
change uid_t, gid_t, and id_t to unsigned types
[musl]
/
src
/
stdio
/
getc.c
diff --git
a/src/stdio/getc.c
b/src/stdio/getc.c
index
b739b0a
..
b3f351d
100644
(file)
--- a/
src/stdio/getc.c
+++ b/
src/stdio/getc.c
@@
-2,5
+2,12
@@
int getc(FILE *f)
{
- return fgetc(f);
+ int c;
+ if (f->lock < 0 || !__lockfile(f))
+ return getc_unlocked(f);
+ c = getc_unlocked(f);
+ __unlockfile(f);
+ return c;
}
+
+weak_alias(getc, _IO_getc);