While trying to reproduce Sergey's recent bug report I discovered that
--without-tty builds fail on MacOS X and possibly other BSD systems as well.
The cause is that the body of stuff_buffered_input() is compiled when BSD is
defined but it calls stuff_char() that is only defined with HAVE_TTY. This
patch requires HAVE_TTY for stuff_buffered_input()'s body as well.
Can anyone with a BSD system confirm that this fixes the problem there as
well?
Thanks,
Malcolm
src/ChangeLog addition:
2005-12-14 Malcolm Purvis <malcolmp(a)xemacs.org>
* console.c (stuff_buffered_input): Compile body only if
HAVE_TTY.
xemacs-21.5-micro-patches source patch:
Diff command: cvs -q diff -u
Files affected: src/console.c
Index: src/console.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/console.c,v
retrieving revision 1.45
diff -u -r1.45 console.c
--- src/console.c 2005/11/25 01:41:58 1.45
+++ src/console.c 2005/12/14 12:05:16
@@ -990,7 +990,7 @@
void
stuff_buffered_input (
-#ifdef BSD
+#if defined(BSD) && defined(HAVE_TTY)
Lisp_Object stuffstring
#else
Lisp_Object UNUSED (stuffstring)
@@ -998,7 +998,7 @@
)
{
/* stuff_char works only in BSD, versions 4.2 and up. */
-#if defined (BSD)
+#if defined(BSD) && defined(HAVE_TTY)
if (!CONSOLEP (Vcontrolling_terminal) ||
!CONSOLE_LIVE_P (XCONSOLE (Vcontrolling_terminal)))
return;
@@ -1024,7 +1024,7 @@
stuff_char (XCONSOLE (Vcontrolling_terminal), *kbd_fetch_ptr++);
}
# endif
-#endif /* BSD */
+#endif /* BSD && HAVE_TTY */
}
DEFUN ("suspend-console", Fsuspend_console, 0, 1, "", /*
cvs server: I know nothing about src/console.c~
--
Malcolm Purvis <malcolmp(a)xemacs.org>