summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/wbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/wbuf.c')
-rw-r--r--lib/libc/stdio/wbuf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/stdio/wbuf.c b/lib/libc/stdio/wbuf.c
index 847699a..54da709 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);
}
OpenPOWER on IntegriCloud