Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 1 | #include "stdio_impl.h" |
2 | |||||
3 | int puts(const char *s) | ||||
4 | { | ||||
Rich Felker | 8ae2fa6 | 2011-03-24 22:58:21 -0400 | [diff] [blame] | 5 | int r; |
6 | FLOCK(stdout); | ||||
Rich Felker | d02c50d | 2011-05-01 20:12:51 -0400 | [diff] [blame] | 7 | r = -(fputs(s, stdout) < 0 || putc_unlocked('\n', stdout) < 0); |
Rich Felker | 8ae2fa6 | 2011-03-24 22:58:21 -0400 | [diff] [blame] | 8 | FUNLOCK(stdout); |
9 | return r; | ||||
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 10 | } |