diff options
| author | Daniel Eischen <deischen@FreeBSD.org> | 2001-01-24 13:01:12 +0000 |
|---|---|---|
| committer | Daniel Eischen <deischen@FreeBSD.org> | 2001-01-24 13:01:12 +0000 |
| commit | d201fe46e355212750b727061e6a7ac005267852 (patch) | |
| tree | d949d903e602687ee53252807dc4281a27c4f0c4 /lib/libc/stdio/wbuf.c | |
| parent | e0aa5ab7184d7449e4c2e2e65107898ad23b31f7 (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdio/wbuf.c')
| -rw-r--r-- | lib/libc/stdio/wbuf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/stdio/wbuf.c b/lib/libc/stdio/wbuf.c index 847699ad7cf4..54da709e77f2 100644 --- a/lib/libc/stdio/wbuf.c +++ b/lib/libc/stdio/wbuf.c @@ -49,6 +49,8 @@ static const char rcsid[] = * Write the given character into the (probably full) buffer for * the given file. Flush the buffer out if it is or becomes full, * or if c=='\n' and the file is line buffered. + * + * Non-MT-safe */ int __swbuf(c, fp) @@ -80,14 +82,14 @@ __swbuf(c, fp) */ n = fp->_p - fp->_bf._base; if (n >= fp->_bf._size) { - if (fflush(fp)) + if (__fflush(fp)) return (EOF); n = 0; } fp->_w--; *fp->_p++ = c; if (++n == fp->_bf._size || (fp->_flags & __SLBF && c == '\n')) - if (fflush(fp)) + if (__fflush(fp)) return (EOF); return (c); } |
