+Mon Nov 26 12:12:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
+
+ * configure.in, src/console.c: Replace cfmakeraw if not in
+ standard library.
+
Mon Nov 26 12:03:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* tests/Makefile.am, tests/nodeinfotest.c, tests/qemuxml2argvtest.c,
LIBVIRT_COMPILE_WARNINGS(maximum)
dnl Availability of various common functions (non-fatal if missing).
-AC_CHECK_FUNCS([regexec])
+AC_CHECK_FUNCS([regexec cfmakeraw])
dnl Availability of various common headers (non-fatal if missing).
AC_CHECK_HEADERS([paths.h sys/syslimits.h])
* Daniel Berrange <berrange@redhat.com>
*/
+#include "config.h"
+
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
got_signal = 1;
}
+#ifndef HAVE_CFMAKERAW
+static void
+cfmakeraw (struct termios *attr)
+{
+ attr->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
+ | INLCR | IGNCR | ICRNL | IXON);
+ attr->c_oflag &= ~OPOST;
+ attr->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
+ attr->c_cflag &= ~(CSIZE | PARENB);
+ attr->c_cflag |= CS8;
+}
+#endif /* !HAVE_CFMAKERAW */
+
int vshRunConsole(const char *tty) {
int ttyfd, ret = -1;
struct termios ttyattr, rawattr;