From 5e5623c2e275008293a8fec76d55d1fba967ceae Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 31 Dec 1993 10:42:30 +0000 Subject: [PATCH] (PENDING_OUTPUT_COUNT): Two alternate definitions for different versions of stdio.h. --- src/s/gnu-linux.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h index 3b06c712fc0..87156991c50 100644 --- a/src/s/gnu-linux.h +++ b/src/s/gnu-linux.h @@ -155,7 +155,18 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* This is needed for disknew.c:update_frame() */ -#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_pptr - (FILE)->_pbase) +#ifdef emacs +#include +#ifdef _IO_STDIO_H +/* new C libio names */ +#define PENDING_OUTPUT_COUNT(FILE) \ + ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base) +#else /* !_IO_STDIO_H */ +/* old C++ iostream names */ +#define PENDING_OUTPUT_COUNT(FILE) \ + ((FILE)->_pptr - (FILE)->_pbase) +#endif /* !_IO_STDIO_H */ +#endif /* emacs */ /* Linux has crt0.o in a non-standard place */ #define START_FILES pre-crt0.o /usr/lib/crt0.o -- 2.39.5