This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

changes for expect to build on IRIX 6


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?

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;
-- 
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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]