1 /* Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org>
3 * GNU Library General Public License (LGPL) version 2 or later.
5 * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details.
11 /* Solaris function --
12 * Returns the number of bytes in the buffer for a writing stream.
14 * NOTE: GLIBC DIFFERENCE!!!
16 * glibc will return the number of wide chars pending for wide oriented
17 * streams. We always return the number of bytes in the buffer, as we
18 * convert wide chars to their multibyte encodings and buffer _those_.
21 size_t __fpending(register FILE * __restrict stream
)
23 __STDIO_STREAM_VALIDATE(stream
);
25 return (__STDIO_STREAM_IS_WRITING(stream
))
26 ? __STDIO_STREAM_BUFFER_WUSED(stream
)