]> git.eshelyaron.com Git - emacs.git/commitdiff
(PENDING_OUTPUT_COUNT): Two alternate definitions
authorRichard M. Stallman <rms@gnu.org>
Fri, 31 Dec 1993 10:42:30 +0000 (10:42 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 31 Dec 1993 10:42:30 +0000 (10:42 +0000)
for different versions of stdio.h.

src/s/gnu-linux.h

index 3b06c712fc0691669e541ae87b723816ca1cd54b..87156991c501ec181295380a13562d1328066e8d 100644 (file)
@@ -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 <stdio.h>
+#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