unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Undefined symbols: cfmakeraw and cfsetspeed
@ 2008-06-18 15:08 Angelo Graziosi
  2008-06-19 13:59 ` Stefan Monnier
  0 siblings, 1 reply; 14+ messages in thread
From: Angelo Graziosi @ 2008-06-18 15:08 UTC (permalink / raw)
  To: emacs-devel; +Cc: kzeitler, Stefan Monnier

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




^ permalink raw reply	[flat|nested] 14+ messages in thread
* Re: Undefined symbols: cfmakeraw and cfsetspeed
@ 2008-06-20 21:25 Daniel Engeler
  0 siblings, 0 replies; 14+ messages in thread
From: Daniel Engeler @ 2008-06-20 21:25 UTC (permalink / raw)
  To: angelo.graziosi; +Cc: emacs-devel

Hi Angelo

Thanks for fixing my bug!

Regards,
Daniel




^ permalink raw reply	[flat|nested] 14+ messages in thread
* Undefined symbols: cfmakeraw and cfsetspeed
@ 2008-06-18  7:23 Klaus Zeitler
  2008-06-18  7:30 ` dhruva
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Klaus Zeitler @ 2008-06-18  7:23 UTC (permalink / raw)
  To: emacs-devel

Production under Solaris 5.8 fails with:

Undefined                       first referenced
 symbol                             in file
cfmakeraw                           sysdep.o
cfsetspeed                          sysdep.o

I compared termios.h with the version in GNU/Linux and obviously the Solaris
5.8 termios.h only provides a subset of the GNU/Linux version, e.g. there's
no cfmakeraw and cfsetspeed.

Is serial_open and serial_configure new code? I also observed that they
are used in process.c (enclosed in HAVE_SERIAL).

Klaus


-- 
 --------------------------------------------------
|  Klaus Zeitler      Alcatel-Lucent               |
|  Email:             kzeitler@alcatel-lucent.com  |
 --------------------------------------------------
---
"Would you tell me, please, which way I ought to go from here?"
"That depends a good deal on where you want to get to," said the Cat
                                                     -- Lewis Carrol




^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-06-20 21:25 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-18 15:08 Undefined symbols: cfmakeraw and cfsetspeed Angelo Graziosi
2008-06-19 13:59 ` Stefan Monnier
2008-06-19 16:09   ` Angelo Graziosi
2008-06-19 17:17     ` Stefan Monnier
2008-06-19 23:02       ` Angelo Graziosi
2008-06-20  1:01         ` Stefan Monnier
2008-06-20  7:34           ` Angelo Graziosi
2008-06-20 14:51             ` Stefan Monnier
2008-06-19 17:29   ` Emanuele Giaquinta
  -- strict thread matches above, loose matches on Subject: below --
2008-06-20 21:25 Daniel Engeler
2008-06-18  7:23 Klaus Zeitler
2008-06-18  7:30 ` dhruva
2008-06-18  7:47 ` David Kastrup
2008-06-18 13:01 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).