GNU bug report logs - #440
Build error on Solaris

Previous Next

Package: emacs;

Reported by: NAKAJI Hiroyuki <nakaji <at> jp.freebsd.org>

Date: Wed, 18 Jun 2008 07:30:03 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 440 in the body.
You can then email your comments to 440 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#440; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to NAKAJI Hiroyuki <nakaji <at> jp.freebsd.org>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: NAKAJI Hiroyuki <nakaji <at> jp.freebsd.org>
To: emacs-pretest-bug <at> gnu.org
Subject: Build error on Solaris
Date: Wed, 18 Jun 2008 16:20:16 +0900
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




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#440; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #10 received at 440 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: 440 <at> debbugs.gnu.org
Subject: Re: bug#440: Build error on Solaris
Date: Fri, 20 Jun 2008 11:07:39 -0400
> 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




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#440; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to NAKAJI Hiroyuki <nakaji <at> jp.freebsd.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #15 received at 440 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: NAKAJI Hiroyuki <nakaji <at> jp.freebsd.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 440 <at> debbugs.gnu.org
Subject: Re: bug#440: Build error on Solaris
Date: Tue, 24 Jun 2008 14:14:09 +0900
>>>>> In <mailman.13613.1213975636.18990.bug-gnu-emacs <at> gnu.org> 
>>>>>	Stefan Monnier <monnier <at> 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




Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to NAKAJI Hiroyuki <nakaji <at> jp.freebsd.org>:
bug acknowledged by developer. Full text and rfc822 format available.

Message #20 received at 440-close <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: NAKAJI Hiroyuki <nakaji <at> jp.freebsd.org>
Cc: 440-close <at> debbugs.gnu.org
Subject: Re: bug#440: Build error on Solaris
Date: Tue, 24 Jun 2008 08:17:41 -0400
>> 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




bug archived. Request was from Debbugs Internal Request <don <at> donarmstrong.com> to internal_control <at> emacsbugs.donarmstrong.com. (Tue, 22 Jul 2008 14:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 336 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.