Commit cb5558ff authored by Roland McGrath's avatar Roland McGrath
Browse files

[__GNU_LIBRARY__]: Redefine PENDING_OUTPUT_COUNT even if already defined.

parent a6ee0a2f
...@@ -48,13 +48,14 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ...@@ -48,13 +48,14 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define max(a, b) ((a) > (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b))
#define min(a, b) ((a) < (b) ? (a) : (b)) #define min(a, b) ((a) < (b) ? (a) : (b))
#ifndef PENDING_OUTPUT_COUNT
/* Get number of chars of output now in the buffer of a stdio stream. /* Get number of chars of output now in the buffer of a stdio stream.
This ought to be built in in stdio, but it isn't. This ought to be built in in stdio, but it isn't.
Some s- files override this because their stdio internals differ. */ Some s- files override this because their stdio internals differ. */
#ifdef __GNU_LIBRARY__ #ifdef __GNU_LIBRARY__
#undef PENDING_OUTPUT_COUNT
#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufp - (FILE)->__buffer) #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufp - (FILE)->__buffer)
#else #else
#ifndef PENDING_OUTPUT_COUNT
#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base) #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base)
#endif #endif
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment