Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* changes for expect to build on IRIX 6
@ 2003-01-15 11:15 Alexandre Oliva
  2003-01-15 12:42 ` Ben Elliston
  0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Oliva @ 2003-01-15 11:15 UTC (permalink / raw)
  To: gdb-patches

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

I needed these changes in order for the copy of expect in srcware to
build on IRIX 6.  Some of the changes were needed by GCC, some by the
native cc.  Ok to install?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: expect-irix.patch --]
[-- Type: text/x-patch, Size: 2937 bytes --]

Index: expect/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* exp_trap.c (NSIG): Define to SIGRTMAX if needed and possible.
	* exp_command.c (NSIG): Likewise.
	(Exp_SpawnCmd): Don't define rfd and wfd as pointers, but
	rather as longs, and only if TCL_MAJOR_VERSION < 8.
	* pty_termios.c (_getpty): Declare if HAVE__GETPTY.

Index: expect/exp_command.c
===================================================================
RCS file: /cvs/src/src/expect/exp_command.c,v
retrieving revision 1.5
diff -u -p -r1.5 exp_command.c
--- expect/exp_command.c 20 Nov 2002 00:28:58 -0000 1.5
+++ expect/exp_command.c 15 Jan 2003 11:11:47 -0000
@@ -56,6 +56,15 @@ would appreciate credit if this program 
 #endif
 #endif
 
+/* IRIX 6 defines NSIG only if _SGI_SOURCE (or something alike) is
+   defined.  But it defines SIGRTMAX to the same value, so use
+   that...  */
+#ifndef NSIG
+#ifdef SIGRTMAX
+#define NSIG SIGRTMAX
+#endif
+#endif
+
 #ifdef HAVE_PTYTRAP
 #include <sys/ptyio.h>
 #endif
@@ -853,12 +862,15 @@ when trapping, see below in child half o
 		int mode;
 #if TCL_MAJOR_VERSION < 8
 		Tcl_File tclReadFile, tclWriteFile;
-#endif /* TCL_MAJOR_VERSION < 8 */
 		/* CYGNUS LOCAL 64bit/law */
-		/* These must be both wide enough and aligned enough for
-		   the TCL code to store a pointer into them!  */
-		void *rfd, *wfd;
+		/* rfd and wfd must be both wide enough and aligned
+		   enough for the <8 TCL code to store a pointer into
+		   them!  The assumption is that long int is as wide
+		   as a pointer.  */
+		long
 		/* END CYGNUS LOCAL */
+#endif /* TCL_MAJOR_VERSION < 8 */
+		int rfd, wfd;
 
 		if (echo) exp_log(0,"%s [open ...]\r\n",argv0);
 
Index: expect/exp_trap.c
===================================================================
RCS file: /cvs/src/src/expect/exp_trap.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 exp_trap.c
--- expect/exp_trap.c 9 Nov 1999 01:28:43 -0000 1.1.1.1
+++ expect/exp_trap.c 15 Jan 2003 11:11:47 -0000
@@ -25,6 +25,15 @@ would appreciate credit if this program 
 #endif
 #endif
 
+/* IRIX 6 defines NSIG only if _SGI_SOURCE (or something alike) is
+   defined.  But it defines SIGRTMAX to the same value, so use
+   that...  */
+#ifndef NSIG
+#ifdef SIGRTMAX
+#define NSIG SIGRTMAX
+#endif
+#endif
+
 #if defined(SIGCLD) && !defined(SIGCHLD)
 #define SIGCHLD SIGCLD
 #endif
Index: expect/pty_termios.c
===================================================================
RCS file: /cvs/src/src/expect/pty_termios.c,v
retrieving revision 1.3
diff -u -p -r1.3 pty_termios.c
--- expect/pty_termios.c 11 Sep 2001 19:24:03 -0000 1.3
+++ expect/pty_termios.c 15 Jan 2003 11:11:48 -0000
@@ -113,6 +113,10 @@ static char	*tty_num;		/* ptr to char [0
 					   which number it is */
 #endif
 
+#ifdef HAVE__GETPTY
+extern char *_getpty();
+#endif
+
 #if defined(_SEQUENT_) && !defined(HAVE_PTMX)
 /* old-style SEQUENT, new-style uses ptmx */
 static char *master_name, *slave_name;

[-- Attachment #3: Type: text/plain, Size: 289 bytes --]


-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

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

* Re: changes for expect to build on IRIX 6
  2003-01-15 11:15 changes for expect to build on IRIX 6 Alexandre Oliva
@ 2003-01-15 12:42 ` Ben Elliston
  2003-01-15 16:02   ` Andrew Cagney
  0 siblings, 1 reply; 7+ messages in thread
From: Ben Elliston @ 2003-01-15 12:42 UTC (permalink / raw)
  To: gdb-patches

>>>>> "Alexandre" == Alexandre Oliva <aoliva@redhat.com> writes:

  Alexandre> I needed these changes in order for the copy of expect in
  Alexandre> srcware to build on IRIX 6.  Some of the changes were
  Alexandre> needed by GCC, some by the native cc.  Ok to install?

If these are approved, consider pushing these upstream, also.

Ben


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

* Re: changes for expect to build on IRIX 6
  2003-01-15 12:42 ` Ben Elliston
@ 2003-01-15 16:02   ` Andrew Cagney
  2003-01-15 20:25     ` Ben Elliston
  2003-01-17  5:31     ` Alexandre Oliva
  0 siblings, 2 replies; 7+ messages in thread
From: Andrew Cagney @ 2003-01-15 16:02 UTC (permalink / raw)
  To: Ben Elliston, Alexandre Oliva; +Cc: gdb-patches

>>>>>> "Alexandre" == Alexandre Oliva <aoliva@redhat.com> writes:
> 
> 
>   Alexandre> I needed these changes in order for the copy of expect in
>   Alexandre> srcware to build on IRIX 6.  Some of the changes were
>   Alexandre> needed by GCC, some by the native cc.  Ok to install?
> 
> If these are approved, consider pushing these upstream, also.

Er, first thing to do is try to push them up stream.  At that point, 
approval in src is a no-brainer.

Andrew



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

* Re: changes for expect to build on IRIX 6
  2003-01-15 16:02   ` Andrew Cagney
@ 2003-01-15 20:25     ` Ben Elliston
  2003-01-17  5:31     ` Alexandre Oliva
  1 sibling, 0 replies; 7+ messages in thread
From: Ben Elliston @ 2003-01-15 20:25 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Alexandre Oliva, gdb-patches

>>>>> "Andrew" == Andrew Cagney <ac131313@redhat.com> writes:

  >> If these are approved, consider pushing these upstream, also.

  Andrew> Er, first thing to do is try to push them up stream.  At
  Andrew> that point, approval in src is a no-brainer.

Can the MAINTAINERS file be updated to include the Expect maintainers'
address?  I think it's libes at nist.gov?

Ben


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

* Re: changes for expect to build on IRIX 6
  2003-01-15 16:02   ` Andrew Cagney
  2003-01-15 20:25     ` Ben Elliston
@ 2003-01-17  5:31     ` Alexandre Oliva
  2003-01-17 16:07       ` Andrew Cagney
  1 sibling, 1 reply; 7+ messages in thread
From: Alexandre Oliva @ 2003-01-17  5:31 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Ben Elliston, gdb-patches

On Jan 15, 2003, Andrew Cagney <ac131313@redhat.com> wrote:

> Er, first thing to do is try to push them up stream.

Except for the one marked as CYGNUS LOCAL, of course.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


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

* Re: changes for expect to build on IRIX 6
  2003-01-17  5:31     ` Alexandre Oliva
@ 2003-01-17 16:07       ` Andrew Cagney
  2003-01-19 15:15         ` Alexandre Oliva
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Cagney @ 2003-01-17 16:07 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: Ben Elliston, gdb-patches

> On Jan 15, 2003, Andrew Cagney <ac131313@redhat.com> wrote:
> 
> 
>> Er, first thing to do is try to push them up stream.
> 
> 
> Except for the one marked as CYGNUS LOCAL, of course.

Even that.  It it doesn't get accepted then it should probably be yanked.

Andrew



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

* Re: changes for expect to build on IRIX 6
  2003-01-17 16:07       ` Andrew Cagney
@ 2003-01-19 15:15         ` Alexandre Oliva
  0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Oliva @ 2003-01-19 15:15 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Ben Elliston, gdb-patches

On Jan 17, 2003, Andrew Cagney <ac131313@redhat.com> wrote:

>> On Jan 15, 2003, Andrew Cagney <ac131313@redhat.com> wrote:
>> 
>>> Er, first thing to do is try to push them up stream.
>> Except for the one marked as CYGNUS LOCAL, of course.

> Even that.  It it doesn't get accepted then it should probably be yanked.

Well, we certainly no longer care about the old version of TCL that is
covered by that chunk, so we might as well just go ahead and take it
out.  I just didn't want to break what might still possibly work.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


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

end of thread, other threads:[~2003-01-19 15:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-15 11:15 changes for expect to build on IRIX 6 Alexandre Oliva
2003-01-15 12:42 ` Ben Elliston
2003-01-15 16:02   ` Andrew Cagney
2003-01-15 20:25     ` Ben Elliston
2003-01-17  5:31     ` Alexandre Oliva
2003-01-17 16:07       ` Andrew Cagney
2003-01-19 15:15         ` Alexandre Oliva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox