summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2012-07-10 15:04:14 -0400
committerGlenn Morris <rgm@gnu.org>2012-07-10 15:04:14 -0400
commitc59592b32f5b5808c12720bfd37ea73b473fa1db (patch)
treefa7ec1092246364913aa7e54aebfb09c5a48ee85 /src
parent7d7bbefd049fc22cf3bf333592abf57a3bde8766 (diff)
downloademacs-c59592b32f5b5808c12720bfd37ea73b473fa1db.tar.gz
* dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]: Clarify fallback case.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/dispnew.c15
2 files changed, 13 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 677b78ccbfb..84703fcdc2f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2012-07-10 Glenn Morris <rgm@gnu.org>
+
+ * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
+ Clarify fallback case.
+
2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
Use XCAR and XCDR instead of Fcar and Fcdr where possible.
diff --git a/src/dispnew.c b/src/dispnew.c
index 5c6ea0123be..0d34147e035 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -65,28 +65,29 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Get number of chars of output now in the buffer of a stdio stream.
This ought to be built in stdio, but it isn't. Some s- files
override this because their stdio internals differ. */
-
#ifdef __GNU_LIBRARY__
/* The s- file might have overridden the definition with one that
works for the system's C library. But we are using the GNU C
library, so this is the right definition for every system. */
-
#ifdef GNU_LIBRARY_PENDING_OUTPUT_COUNT
#define PENDING_OUTPUT_COUNT GNU_LIBRARY_PENDING_OUTPUT_COUNT
#else
#undef PENDING_OUTPUT_COUNT
#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufp - (FILE)->__buffer)
#endif
-#else /* not __GNU_LIBRARY__ */
-#if !defined (PENDING_OUTPUT_COUNT) && HAVE_STDIO_EXT_H && HAVE___FPENDING
+
+/* not __GNU_LIBRARY__ and no PENDING_OUTPUT_COUNT defined */
+#elif !defined (PENDING_OUTPUT_COUNT)
+
+#if HAVE_STDIO_EXT_H && HAVE___FPENDING
#include <stdio_ext.h>
#define PENDING_OUTPUT_COUNT(FILE) __fpending (FILE)
-#endif
-#ifndef PENDING_OUTPUT_COUNT
+#else
#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base)
#endif
-#endif /* not __GNU_LIBRARY__ */
+
+#endif /* not __GNU_LIBRARY__ and no PENDING_OUTPUT_COUNT defined */
#if defined (HAVE_TERM_H) && defined (GNU_LINUX)
#include <term.h> /* for tgetent */