projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
separate getc/putc from fgetc/fputc
[musl]
/
src
/
stdio
/
putc.c
diff --git a/src/stdio/putc.c
b/src/stdio/putc.c
new file mode 100644
(file)
index 0000000..
fa89349
--- /dev/null
+++ b/
src/stdio/putc.c
@@ -0,0
+1,12
@@
+#include "stdio_impl.h"
+
+int putc(int c, FILE *f)
+{
+ if (f->lock < 0 || !__lockfile(f))
+ return putc_unlocked(c, f);
+ c = putc_unlocked(c, f);
+ __unlockfile(f);
+ return c;
+}
+
+weak_alias(putc, _IO_putc);