emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Undefined symbols: cfmakeraw and cfsetspeed


From: Angelo Graziosi
Subject: Re: Undefined symbols: cfmakeraw and cfsetspeed
Date: Wed, 18 Jun 2008 17:08:07 +0200
User-agent: Thunderbird 2.0.0.14 (Windows/20080421)

This problem has been flagged a few days ago [1].

Following the suggestions in [2], it seems that this patch

===========================================================
$ cat sysdep.c.diff
--- sysdep.c.orig       2008-06-15 01:09:50.000000000 +0200
+++ sysdep.c    2008-06-15 02:13:58.875000000 +0200
@@ -244,6 +244,10 @@

 SIGMASKTYPE sigprocmask_set;

+#if defined(__CYGWIN__)
+void cfmakeraw(struct termios *);
+#endif /* defined(__CYGWIN__) */
+

#if !defined (HAVE_GET_CURRENT_DIR_NAME) || defined (BROKEN_GET_CURRENT_DIR_NAME)

@@ -5447,7 +5451,9 @@
   else
     tem = Fplist_get (p->childp, QCspeed);
   CHECK_NUMBER (tem);
-  err = cfsetspeed (&attr, XINT (tem));
+  err = cfsetispeed(&attr, XINT (tem));
+  err = err +  cfsetospeed(&attr, XINT (tem));
+
   if (err != 0)
error ("cfsetspeed(%d) failed: %s", XINT (tem), emacs_strerror (errno));
   childp2 = Fplist_put (childp2, QCspeed, tem);
@@ -5577,6 +5583,19 @@
   p->childp = childp2;

 }
+
+#if defined(__CYGWIN__)
+/* Workaround for Cygwin, which is 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(__CYGWIN__) */
 #endif /* TERMIOS  */

 /* arch-tag: edb43589-4e09-4544-b325-978b5b121dcf

===========================================================

solves the thing, at least on Cygwin (but perhaps also on Solaris, with little changes).


Cheers,
   Angelo.

---
[1] http://lists.gnu.org/archive/html/emacs-devel/2008-06/msg00980.html

[2] http://lists.gnu.org/archive/html/emacs-devel/2008-06/msg00994.html
    http://lists.gnu.org/archive/html/emacs-devel/2008-06/msg00995.html




reply via email to

[Prev in Thread] Current Thread [Next in Thread]