From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3197 invoked by alias); 15 Jan 2003 11:15:27 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 3187 invoked from network); 15 Jan 2003 11:15:24 -0000 Received: from unknown (HELO lacrosse.corp.redhat.com) (66.187.233.200) by 209.249.29.67 with SMTP; 15 Jan 2003 11:15:24 -0000 Received: from free.redhat.lsd.ic.unicamp.br (aoliva.cipe.redhat.com [10.0.1.10]) by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id h0FBFBg13089 for ; Wed, 15 Jan 2003 06:15:11 -0500 Received: from free.redhat.lsd.ic.unicamp.br (localhost.localdomain [127.0.0.1]) by free.redhat.lsd.ic.unicamp.br (8.12.6/8.12.6) with ESMTP id h0FBFA4d019545 for ; Wed, 15 Jan 2003 09:15:10 -0200 Received: (from aoliva@localhost) by free.redhat.lsd.ic.unicamp.br (8.12.6/8.12.6/Submit) id h0FBFAhJ019541; Wed, 15 Jan 2003 09:15:10 -0200 To: gdb-patches@sources.redhat.com Subject: changes for expect to build on IRIX 6 From: Alexandre Oliva Organization: GCC Team, Red Hat Date: Wed, 15 Jan 2003 11:15:00 -0000 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2003-01/txt/msg00553.txt.bz2 --=-=-= Content-length: 167 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? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=expect-irix.patch Content-length: 2937 Index: expect/ChangeLog from Alexandre Oliva * 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 #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; --=-=-= Content-length: 289 -- 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 --=-=-=--