unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#440: Build error on Solaris
@ 2008-06-18  7:20 ` NAKAJI Hiroyuki
  2008-06-20 15:07   ` Stefan Monnier
                     ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: NAKAJI Hiroyuki @ 2008-06-18  7:20 UTC (permalink / raw)
  To: emacs-pretest-bug

Solaris does not have the functions cfmakeraw() and cfsetspeed() which are
used in src/sysdep.c. I added these functions into sysdep.c but I'm not
sure these must be necessary.

Here is a patch. Thanks.

Index: sysdep.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/sysdep.c,v
retrieving revision 1.300
diff -u -r1.300 sysdep.c
--- sysdep.c	14 Jun 2008 19:14:01 -0000	1.300
+++ sysdep.c	17 Jun 2008 10:03:21 -0000
@@ -231,6 +231,27 @@
 #endif
 #endif
 
+#ifdef SOLARIS2
+void cfmakeraw(struct termios *t)
+{
+  t->c_iflag &= ~(IMAXBEL|IXOFF|INPCK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON|IGNPAR);
+  t->c_iflag |= IGNBRK;
+  t->c_oflag &= ~OPOST;
+  t->c_lflag &= ~(ECHO|ECHOE|ECHOK|ECHONL|ICANON|ISIG|IEXTEN|NOFLSH|TOSTOP|PENDIN);
+  t->c_cflag &= ~(CSIZE|PARENB);
+  t->c_cflag |= CS8|CREAD;
+  t->c_cc[VMIN] = 1;
+  t->c_cc[VTIME] = 0;
+}
+
+int cfsetspeed(struct termios *t, speed_t speed)
+{
+  cfsetispeed(t, speed);
+  cfsetospeed(t, speed);
+  return (0);
+}
+#endif
+
 int emacs_ospeed;
 
 void croak P_ ((char *)) NO_RETURN;

-- 
NAKAJI Hiroyuki






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

* bug#440: Build error on Solaris
  2008-06-18  7:20 ` bug#440: Build error on Solaris NAKAJI Hiroyuki
@ 2008-06-20 15:07   ` Stefan Monnier
       [not found]   ` <mailman.13613.1213975636.18990.bug-gnu-emacs@gnu.org>
  2008-06-24 12:25   ` bug#440: marked as done (Build error on Solaris) Emacs bug Tracking System
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2008-06-20 15:07 UTC (permalink / raw)
  To: 440

> Solaris does not have the functions cfmakeraw() and cfsetspeed() which are
> used in src/sysdep.c. I added these functions into sysdep.c but I'm not
> sure these must be necessary.

A similar problem appeared under Cygwin.  I've installed a change
(provided by Angelo Graziosi) which should hopefully fix the problem,
but it's slightly different from your code (mostly your cfmakeraw sets
things up a bit differently, e.g. your code sets IGNBRK on iflag,
whereas the code I installed clears it).  Can you try the new code to
see if it now builds right, and could you also tell me where you got
your cfmakeraw code, to try and understand the reason for
the differences?


        Stefan






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

* bug#440: Build error on Solaris
       [not found]   ` <mailman.13613.1213975636.18990.bug-gnu-emacs@gnu.org>
@ 2008-06-24  5:14     ` NAKAJI Hiroyuki
  0 siblings, 0 replies; 4+ messages in thread
From: NAKAJI Hiroyuki @ 2008-06-24  5:14 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 440

>>>>> In <mailman.13613.1213975636.18990.bug-gnu-emacs@gnu.org> 
>>>>>	Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> > Solaris does not have the functions cfmakeraw() and cfsetspeed() which are
> > used in src/sysdep.c. I added these functions into sysdep.c but I'm not
> > sure these must be necessary.

> A similar problem appeared under Cygwin.  I've installed a change
> (provided by Angelo Graziosi) which should hopefully fix the problem,
> but it's slightly different from your code (mostly your cfmakeraw sets
> things up a bit differently, e.g. your code sets IGNBRK on iflag,
> whereas the code I installed clears it).  Can you try the new code to
> see if it now builds right, and could you also tell me where you got
> your cfmakeraw code, to try and understand the reason for
> the differences?

I tried your code. It works well. Thanks.

I only googled "solaris cfmakeraw" and copied some code from
somewhere. But, I'm sorry, I've forgotten where I found that code.

Anyway, your code is much better than mine, because I do not understand
teroios functions well and my copied code may not be freely
redistributable.

Best Regards,
-- 
NAKAJI Hiroyuki






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

* bug#440: marked as done (Build error on Solaris)
  2008-06-18  7:20 ` bug#440: Build error on Solaris NAKAJI Hiroyuki
  2008-06-20 15:07   ` Stefan Monnier
       [not found]   ` <mailman.13613.1213975636.18990.bug-gnu-emacs@gnu.org>
@ 2008-06-24 12:25   ` Emacs bug Tracking System
  2 siblings, 0 replies; 4+ messages in thread
From: Emacs bug Tracking System @ 2008-06-24 12:25 UTC (permalink / raw)
  To: Stefan Monnier

[-- Attachment #1: Type: text/plain, Size: 833 bytes --]


Your message dated Tue, 24 Jun 2008 08:17:41 -0400
with message-id <jwvzlpbni2d.fsf-monnier+emacsbugreports@gnu.org>
and subject line Re: bug#440: Build error on Solaris
has caused the Emacs bug report #440,
regarding Build error on Solaris
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact don@donarmstrong.com
immediately.)


-- 
440: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=440
Emacs Bug Tracking System
Contact don@donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 3424 bytes --]

From: NAKAJI Hiroyuki <nakaji@jp.freebsd.org>
To: emacs-pretest-bug@gnu.org
Subject: Build error on Solaris
Date: Wed, 18 Jun 2008 16:20:16 +0900
Message-ID: <87y753w6of.fsf@roddy.4407.kankyo-u.ac.jp>

Solaris does not have the functions cfmakeraw() and cfsetspeed() which are
used in src/sysdep.c. I added these functions into sysdep.c but I'm not
sure these must be necessary.

Here is a patch. Thanks.

Index: sysdep.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/sysdep.c,v
retrieving revision 1.300
diff -u -r1.300 sysdep.c
--- sysdep.c	14 Jun 2008 19:14:01 -0000	1.300
+++ sysdep.c	17 Jun 2008 10:03:21 -0000
@@ -231,6 +231,27 @@
 #endif
 #endif
 
+#ifdef SOLARIS2
+void cfmakeraw(struct termios *t)
+{
+  t->c_iflag &= ~(IMAXBEL|IXOFF|INPCK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON|IGNPAR);
+  t->c_iflag |= IGNBRK;
+  t->c_oflag &= ~OPOST;
+  t->c_lflag &= ~(ECHO|ECHOE|ECHOK|ECHONL|ICANON|ISIG|IEXTEN|NOFLSH|TOSTOP|PENDIN);
+  t->c_cflag &= ~(CSIZE|PARENB);
+  t->c_cflag |= CS8|CREAD;
+  t->c_cc[VMIN] = 1;
+  t->c_cc[VTIME] = 0;
+}
+
+int cfsetspeed(struct termios *t, speed_t speed)
+{
+  cfsetispeed(t, speed);
+  cfsetospeed(t, speed);
+  return (0);
+}
+#endif
+
 int emacs_ospeed;
 
 void croak P_ ((char *)) NO_RETURN;

-- 
NAKAJI Hiroyuki



[-- Attachment #3: Type: message/rfc822, Size: 2059 bytes --]

From: Stefan Monnier <monnier@iro.umontreal.ca>
To: NAKAJI Hiroyuki <nakaji@jp.freebsd.org>
Cc: 440-close@emacsbugs.donarmstrong.com
Subject: Re: bug#440: Build error on Solaris
Date: Tue, 24 Jun 2008 08:17:41 -0400
Message-ID: <jwvzlpbni2d.fsf-monnier+emacsbugreports@gnu.org>

>> A similar problem appeared under Cygwin.  I've installed a change
>> (provided by Angelo Graziosi) which should hopefully fix the problem,
[...]
> I tried your code. It works well. Thanks.

Thank you,


        Stefan


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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <jwvzlpbni2d.fsf-monnier+emacsbugreports@gnu.org>
2008-06-18  7:20 ` bug#440: Build error on Solaris NAKAJI Hiroyuki
2008-06-20 15:07   ` Stefan Monnier
     [not found]   ` <mailman.13613.1213975636.18990.bug-gnu-emacs@gnu.org>
2008-06-24  5:14     ` NAKAJI Hiroyuki
2008-06-24 12:25   ` bug#440: marked as done (Build error on Solaris) Emacs bug Tracking System

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).