projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update documentation
[musl]
/
src
/
stdio
/
fputc.c
diff --git
a/src/stdio/fputc.c
b/src/stdio/fputc.c
index
ec85938
..
9953296
100644
(file)
--- a/
src/stdio/fputc.c
+++ b/
src/stdio/fputc.c
@@
-2,9
+2,12
@@
int fputc(int c, FILE *f)
{
int fputc(int c, FILE *f)
{
- FLOCK(f);
-
if (c != f->lbf && f->wpos + 1 < f->wend) *f->wpos++ = c
;
-
else c = __overflow(f, c
);
-
FUNLOCK
(f);
+ if (f->lock < 0 || !__lockfile(f))
+
return putc_unlocked(c, f)
;
+
c = putc_unlocked(c, f
);
+
__unlockfile
(f);
return c;
}
return c;
}
+
+weak_alias(fputc, putc);
+weak_alias(fputc, _IO_putc);