[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/sysdep.c,v
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/src/sysdep.c,v |
Date: |
Fri, 20 Jun 2008 14:59:38 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 08/06/20 14:59:38
Index: sysdep.c
===================================================================
RCS file: /sources/emacs/emacs/src/sysdep.c,v
retrieving revision 1.301
retrieving revision 1.302
diff -u -b -r1.301 -r1.302
--- sysdep.c 20 Jun 2008 14:50:20 -0000 1.301
+++ sysdep.c 20 Jun 2008 14:59:37 -0000 1.302
@@ -244,10 +244,6 @@
SIGMASKTYPE sigprocmask_set;
-#if !defined (HAVE_CFMAKERAW)
-void cfmakeraw(struct termios *);
-#endif /* !defined (HAVE_CFMAKERAW */
-
#if !defined (HAVE_GET_CURRENT_DIR_NAME) || defined
(BROKEN_GET_CURRENT_DIR_NAME)
@@ -5420,6 +5416,29 @@
#endif /* TERMIOS */
#ifdef HAVE_TERMIOS
+
+#if !defined (HAVE_CFMAKERAW)
+/* Workaround for targets which are missing cfmakeraw. */
+/* Pasted from man page. */
+static void cfmakeraw (struct termios *termios_p)
+{
+ termios_p->c_iflag &=
~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
+ termios_p->c_oflag &= ~OPOST;
+ termios_p->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
+ termios_p->c_cflag &= ~(CSIZE|PARENB);
+ termios_p->c_cflag |= CS8;
+}
+#endif /* !defined (HAVE_CFMAKERAW */
+
+#if !defined (HAVE_CFSETSPEED)
+/* Workaround for targets which are missing cfsetspeed. */
+static int cfsetspeed (struct termios *termios_p, speed_t vitesse)
+{
+ return (cfsetispeed (termios_p, vitesse)
+ + cfsetospeed (termios_p, vitesse));
+}
+#endif
+
/* For serial-process-configure */
void
serial_configure (struct Lisp_Process *p,
@@ -5451,12 +5470,7 @@
else
tem = Fplist_get (p->childp, QCspeed);
CHECK_NUMBER (tem);
-#ifdef HAVE_CFSETSPEED
err = cfsetspeed (&attr, XINT (tem));
-#else
- err = cfsetispeed(&attr, XINT (tem));
- err = err + cfsetospeed(&attr, XINT (tem));
-#endif
if (err != 0)
error ("cfsetspeed(%d) failed: %s", XINT (tem), emacs_strerror (errno));
childp2 = Fplist_put (childp2, QCspeed, tem);
@@ -5586,18 +5600,6 @@
p->childp = childp2;
}
-#if !defined (HAVE_CFMAKERAW)
-/* Workaround for targets which are missing cfmakeraw */
-/* Pasted from man page; added in serial.c arbitrarily */
-void cfmakeraw(struct termios *termios_p)
-{
- termios_p->c_iflag &=
~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
- termios_p->c_oflag &= ~OPOST;
- termios_p->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
- termios_p->c_cflag &= ~(CSIZE|PARENB);
- termios_p->c_cflag |= CS8;
-}
-#endif /* !defined (HAVE_CFMAKERAW */
#endif /* TERMIOS */
/* arch-tag: edb43589-4e09-4544-b325-978b5b121dcf
- [Emacs-diffs] Changes to emacs/src/sysdep.c,v, Glenn Morris, 2008/06/13
- [Emacs-diffs] Changes to emacs/src/sysdep.c,v, Glenn Morris, 2008/06/14
- [Emacs-diffs] Changes to emacs/src/sysdep.c,v, Stefan Monnier, 2008/06/20
- [Emacs-diffs] Changes to emacs/src/sysdep.c,v,
Stefan Monnier <=
- [Emacs-diffs] Changes to emacs/src/sysdep.c,v, Dan Nicolaescu, 2008/06/26
- [Emacs-diffs] Changes to emacs/src/sysdep.c,v, Glenn Morris, 2008/06/26
- [Emacs-diffs] Changes to emacs/src/sysdep.c,v, Juanma Barranquero, 2008/06/26