Viet-Trung Luu | 96b05c1 | 2016-01-11 11:26:36 -0800 | [diff] [blame] | 1 | #include "stdio_impl.h" |
2 | |||||
George Kulakowski | 17e3b04 | 2016-02-18 15:59:50 -0800 | [diff] [blame] | 3 | int putc(int c, FILE* f) { |
4 | if (f->lock < 0 || !__lockfile(f)) | ||||
5 | return putc_unlocked(c, f); | ||||
6 | c = putc_unlocked(c, f); | ||||
7 | __unlockfile(f); | ||||
8 | return c; | ||||
Viet-Trung Luu | 96b05c1 | 2016-01-11 11:26:36 -0800 | [diff] [blame] | 9 | } |
10 | |||||
11 | weak_alias(putc, _IO_putc); |