blob: 5a38a49b975adcad3192eda3148ef1acf55ad0df [file] [log] [blame]
Rich Felker0b44a032011-02-12 00:22:29 -05001#include "stdio_impl.h"
2
3int puts(const char *s)
4{
Rich Felker8ae2fa62011-03-24 22:58:21 -04005 int r;
6 FLOCK(stdout);
Rich Felkerd02c50d2011-05-01 20:12:51 -04007 r = -(fputs(s, stdout) < 0 || putc_unlocked('\n', stdout) < 0);
Rich Felker8ae2fa62011-03-24 22:58:21 -04008 FUNLOCK(stdout);
9 return r;
Rich Felker0b44a032011-02-12 00:22:29 -050010}