From: sjoerd@cwi.nl (Sjoerd Mullender)
Newsgroups: alt.lucid-emacs.bug
Subject: fixes for SGI Irix 4.X (long)
Keywords: patch
Date: 16 Nov 92 11:38:53 GMT

When I compiled Lucid Emacs 19.3 on an SGI Indigo, I found that I
could compile all files except gmalloc.c using the compiler switches
that were defined in s/s-irix4-0.h.  I had to compile gmalloc.c using
the -ansi switch.  I decided that I would try to compile all of emacs
using this switch.  To do this I had to change a few things in the
source.  The patches are included below.

Here is first a list of what I had to change and why.

In quite a few files I had to add a (char *) cast to various system
calls. 	The problem is that the type of the argument was (unsigned
char *), but POSIX requires (char *).  This was usually the case when
something like XSTRING(xxx)->data was used.

ScreenWidget.c:
	Of two entries in emacsScreenClassRec the types didn't match.
	I added dummy arguments to the functions EmacsScreenInitialize
	and EmacsScreenSetValues.

callproc.c:
	_exit was called without argument.  I added one.

event-Xt.c:
	According to the definition, the third argument of
	XtAppAddInput is of type XtPointer, so I added a cast.

filelock.c:
	The declaration of getpwuid clashed with the one in the
	include file, so I put #ifndef __STDC__ around it.  The
	declaration in the include file is required by ANSI.

floatfns.c:
	Qarith_error was defined twice, so I added "extern" in this
	file.

sysdep.c:
	According to ANSI, the buffer argument to setvbuf is a (char
	*), so I made _sobuf a char array.
	The SGI has a sys_siglist[], so use it.
	According to POSIX, getpgrp does not take any arguments.
	Also, the System V version doesn't take arguments, so I
	removed the argument in the non-BSD case.
	According to POSIX, the second argument of read and write are
	of type void *, so I changed the definition of sys_read and
	sys_write.

unexmips.c:
	Added (void *) casts to calls to WRITE.

xdisp.c:
	The variables Voverlay_arrow_position and
	Voverlay_arrow_string were multiply defined, so I added
	externs here.

xfns.c:
	The variable Xatom_CLIPBOARD was multiply defined and not used
	in this file, so I removed it.
	The second argument to XmuCvtStringToCursor is of type
	Cardinal *, so I changed the type of nargs.

xterm.c:
	The variable in_display was multiply defined and not used in
	this file, so I removed it.

s/s-irix4-0.h:
	Don't use the System V IPC mechanism.
	Use sys_siglist (new #ifdef in sysdep.c).
	Make sure that alloca.h is not defined when generating the
	xmakefile.
	Include <unistd.h> for the declaration of _getpty.
	Use the PTY code with sigblock/sigsetmask added (as in
	emacs-18.59).
	Use different compiler flags.

diff -rc src.orig/ScreenWidget.c src/ScreenWidget.c
*** src.orig/ScreenWidget.c	Mon Aug  3 01:38:00 1992
--- src/ScreenWidget.c	Fri Nov 13 10:44:00 1992
***************
*** 36,45 ****
  
  void emacs_Xt_focus_event_handler ();
  
! static void EmacsScreenInitialize (Widget, Widget);
  static void EmacsScreenRealize (Widget, XtValueMask*, XSetWindowAttributes*);
  void EmacsScreenResize (Widget widget);
! static Boolean EmacsScreenSetValues (Widget, Widget, Widget);
  static XtGeometryResult EmacsScreenQueryGeometry (Widget, XtWidgetGeometry*,
  						  XtWidgetGeometry*);
  
--- 36,45 ----
  
  void emacs_Xt_focus_event_handler ();
  
! static void EmacsScreenInitialize (Widget, Widget, ArgList, Cardinal *);
  static void EmacsScreenRealize (Widget, XtValueMask*, XSetWindowAttributes*);
  void EmacsScreenResize (Widget widget);
! static Boolean EmacsScreenSetValues (Widget, Widget, Widget, ArgList, Cardinal *);
  static XtGeometryResult EmacsScreenQueryGeometry (Widget, XtWidgetGeometry*,
  						  XtWidgetGeometry*);
  
***************
*** 376,382 ****
  }
  
  static void 
! EmacsScreenInitialize (Widget request, Widget new)
  {
    EmacsScreenWidget ew = (EmacsScreenWidget)new;
  
--- 376,382 ----
  }
  
  static void 
! EmacsScreenInitialize (Widget request, Widget new, ArgList dum1, Cardinal *dum2)
  {
    EmacsScreenWidget ew = (EmacsScreenWidget)new;
  
***************
*** 481,487 ****
  }
  
  static Boolean
! EmacsScreenSetValues (Widget cur_widget, Widget req_widget, Widget new_widget)
  {
    EmacsScreenWidget cur = (EmacsScreenWidget)cur_widget;
    EmacsScreenWidget new = (EmacsScreenWidget)new_widget;
--- 481,487 ----
  }
  
  static Boolean
! EmacsScreenSetValues (Widget cur_widget, Widget req_widget, Widget new_widget, ArgList dum1, Cardinal *dum2)
  {
    EmacsScreenWidget cur = (EmacsScreenWidget)cur_widget;
    EmacsScreenWidget new = (EmacsScreenWidget)new_widget;
diff -rc src.orig/buffer.c src/buffer.c
*** src.orig/buffer.c	Fri Sep  4 11:43:24 1992
--- src/buffer.c	Fri Nov 13 13:44:19 1992
***************
*** 865,871 ****
        Lisp_Object tem;
        tem = Fsymbol_value (intern ("delete-auto-save-files"));
        if (! NILP (tem))
! 	unlink (XSTRING (b->auto_save_file_name)->data);
      }
  
    /* Unchain all markers of this buffer
--- 865,871 ----
        Lisp_Object tem;
        tem = Fsymbol_value (intern ("delete-auto-save-files"));
        if (! NILP (tem))
! 	unlink ((char *) XSTRING (b->auto_save_file_name)->data);
      }
  
    /* Unchain all markers of this buffer
diff -rc src.orig/callproc.c src/callproc.c
*** src.orig/callproc.c	Sun Aug 30 04:08:55 1992
--- src/callproc.c	Thu Nov 12 23:45:29 1992
***************
*** 113,119 ****
    fork_error = Fcons (build_string (string), Fcons (errstring, data));
  
    /* terminate this branch of the fork, without closing stdin/out/etc. */
!   _exit();
  }
  
  #ifdef VMS
--- 113,119 ----
    fork_error = Fcons (build_string (string), Fcons (errstring, data));
  
    /* terminate this branch of the fork, without closing stdin/out/etc. */
!   _exit(1);
  }
  
  #ifdef VMS
***************
*** 340,346 ****
  delete_temp_file (name)
       Lisp_Object name;
  {
!   unlink (XSTRING (name)->data);
  }
  
  DEFUN ("call-process-region", Fcall_process_region, Scall_process_region,
--- 340,346 ----
  delete_temp_file (name)
       Lisp_Object name;
  {
!   unlink ((char *) XSTRING (name)->data);
  }
  
  DEFUN ("call-process-region", Fcall_process_region, Scall_process_region,
***************
*** 433,439 ****
  	report_fork_error ("In chdir",
  			   Fcons (current_buffer->directory, Qnil));
  #else
!       chdir (temp);
  #endif
  
      }
--- 433,439 ----
  	report_fork_error ("In chdir",
  			   Fcons (current_buffer->directory, Qnil));
  #else
!       chdir ((char *) temp);
  #endif
  
      }
diff -rc src.orig/dired.c src/dired.c
*** src.orig/dired.c	Sat Aug 29 22:27:42 1992
--- src/dired.c	Thu Nov 12 10:18:34 1992
***************
*** 106,112 ****
      }
  
    dirname = Fexpand_file_name (dirname, Qnil);
!   if (!(d = opendir (XSTRING (Fdirectory_file_name (dirname))->data)))
      report_file_error ("Opening directory", Fcons (dirname, Qnil));
  
    name_as_dir = Ffile_name_as_directory (dirname);
--- 106,112 ----
      }
  
    dirname = Fexpand_file_name (dirname, Qnil);
!   if (!(d = opendir ((char *) XSTRING (Fdirectory_file_name (dirname))->data)))
      report_file_error ("Opening directory", Fcons (dirname, Qnil));
  
    name_as_dir = Ffile_name_as_directory (dirname);
***************
*** 263,269 ****
  
    for (passcount = !!all_flag; NILP (bestmatch) && passcount < 2; passcount++)
      {
!       if (!(d = opendir (XSTRING (Fdirectory_file_name (dirname))->data)))
  	report_file_error ("Opening directory", Fcons (dirname, Qnil));
  
        /* Loop reading blocks */
--- 263,269 ----
  
    for (passcount = !!all_flag; NILP (bestmatch) && passcount < 2; passcount++)
      {
!       if (!(d = opendir ((char *) XSTRING (Fdirectory_file_name (dirname))->data)))
  	report_file_error ("Opening directory", Fcons (dirname, Qnil));
  
        /* Loop reading blocks */
diff -rc src.orig/event-Xt.c src/event-Xt.c
*** src.orig/event-Xt.c	Fri Sep  4 11:43:28 1992
--- src/event-Xt.c	Wed Nov 11 15:11:47 1992
***************
*** 1286,1292 ****
    BLOCK_INPUT;
    process_fds_to_input_ids[XFASTINT (process->infd)] = 
      XtAppAddInput (Xt_app_con, XFASTINT (process->infd),
! 		   XtInputReadMask /* | XtInputExceptMask */,
  		   Xt_process_callback, process);
    UNBLOCK_INPUT;
  }
--- 1286,1292 ----
    BLOCK_INPUT;
    process_fds_to_input_ids[XFASTINT (process->infd)] = 
      XtAppAddInput (Xt_app_con, XFASTINT (process->infd),
! 		   (XtPointer) (XtInputReadMask /* | XtInputExceptMask */),
  		   Xt_process_callback, process);
    UNBLOCK_INPUT;
  }
diff -rc src.orig/fileio.c src/fileio.c
*** src.orig/fileio.c	Sat Aug 29 22:27:55 1992
--- src/fileio.c	Fri Nov 13 13:56:43 1992
***************
*** 1375,1381 ****
    register Lisp_Object tem;
    struct gcpro gcpro1;
  
!   if (access (XSTRING (absname)->data, 4) >= 0)
      {
        if (! interactive)
  	Fsignal (Qfile_already_exists,
--- 1375,1381 ----
    register Lisp_Object tem;
    struct gcpro gcpro1;
  
!   if (access ((char *) XSTRING (absname)->data, 4) >= 0)
      {
        if (! interactive)
  	Fsignal (Qfile_already_exists,
***************
*** 1524,1534 ****
    (dirname)
       Lisp_Object dirname;
  {
!   unsigned char *dir;
  
    CHECK_STRING (dirname, 0);
    dirname = Fexpand_file_name (dirname, Qnil);
!   dir = XSTRING (dirname)->data;
  
    if (rmdir (dir) != 0)
      report_file_error ("Removing directory", Flist (1, &dirname));
--- 1524,1534 ----
    (dirname)
       Lisp_Object dirname;
  {
!   char *dir;
  
    CHECK_STRING (dirname, 0);
    dirname = Fexpand_file_name (dirname, Qnil);
!   dir = (char *) XSTRING (dirname)->data;
  
    if (rmdir (dir) != 0)
      report_file_error ("Removing directory", Flist (1, &dirname));
***************
*** 1544,1550 ****
  {
    CHECK_STRING (filename, 0);
    filename = Fexpand_file_name (filename, Qnil);
!   if (0 > unlink (XSTRING (filename)->data))
      report_file_error ("Removing old name", Flist (1, &filename));
    return Qnil;
  }
--- 1544,1550 ----
  {
    CHECK_STRING (filename, 0);
    filename = Fexpand_file_name (filename, Qnil);
!   if (0 > unlink ((char *) XSTRING (filename)->data))
      report_file_error ("Removing old name", Flist (1, &filename));
    return Qnil;
  }
***************
*** 1576,1583 ****
    if (0 > rename ((char *) XSTRING (filename)->data,
  		  (char *) XSTRING (newname)->data))
  #else
!   if (0 > link (XSTRING (filename)->data, XSTRING (newname)->data)
!       || 0 > unlink (XSTRING (filename)->data))
  #endif
      {
        if (errno == EXDEV)
--- 1576,1583 ----
    if (0 > rename ((char *) XSTRING (filename)->data,
  		  (char *) XSTRING (newname)->data))
  #else
!   if (0 > link ((char *) XSTRING (filename)->data, (char *) XSTRING (newname)->data)
!       || 0 > unlink ((char *) XSTRING (filename)->data))
  #endif
      {
        if (errno == EXDEV)
***************
*** 1622,1629 ****
      barf_or_query_if_file_exists (newname,
  				  (unsigned char *) "make it a new name",
  				  FIXNUMP (ok_if_already_exists));
!   unlink (XSTRING (newname)->data);
!   if (0 > link (XSTRING (filename)->data, XSTRING (newname)->data))
      {
  #ifdef NO_ARG_ARRAY
        args[0] = filename;
--- 1622,1629 ----
      barf_or_query_if_file_exists (newname,
  				  (unsigned char *) "make it a new name",
  				  FIXNUMP (ok_if_already_exists));
!   unlink ((char *) XSTRING (newname)->data);
!   if (0 > link ((char *) XSTRING (filename)->data, (char *) XSTRING (newname)->data))
      {
  #ifdef NO_ARG_ARRAY
        args[0] = filename;
***************
*** 1660,1672 ****
        || FIXNUMP (ok_if_already_exists))
      barf_or_query_if_file_exists (newname, (unsigned char *) "make it a link",
  				  FIXNUMP (ok_if_already_exists));
!   if (0 > symlink (XSTRING (filename)->data, XSTRING (newname)->data))
      {
        /* If we didn't complain already, silently delete existing file.  */
        if (errno == EEXIST)
  	{
! 	  unlink (XSTRING (filename)->data);
! 	  if (0 <= symlink (XSTRING (filename)->data, XSTRING (newname)->data))
  	    return Qnil;
  	}
  
--- 1660,1672 ----
        || FIXNUMP (ok_if_already_exists))
      barf_or_query_if_file_exists (newname, (unsigned char *) "make it a link",
  				  FIXNUMP (ok_if_already_exists));
!   if (0 > symlink ((char *) XSTRING (filename)->data, (char *) XSTRING (newname)->data))
      {
        /* If we didn't complain already, silently delete existing file.  */
        if (errno == EEXIST)
  	{
! 	  unlink ((char *) XSTRING (filename)->data);
! 	  if (0 <= symlink ((char *) XSTRING (filename)->data, (char *) XSTRING (newname)->data))
  	    return Qnil;
  	}
  
***************
*** 1764,1770 ****
  
    CHECK_STRING (filename, 0);
    abspath = Fexpand_file_name (filename, Qnil);
!   return (access (XSTRING (abspath)->data, 0) >= 0) ? Qt : Qnil;
  }
  
  DEFUN ("file-executable-p", Ffile_executable_p, Sfile_executable_p, 1, 1, 0,
--- 1764,1770 ----
  
    CHECK_STRING (filename, 0);
    abspath = Fexpand_file_name (filename, Qnil);
!   return (access ((char *) XSTRING (abspath)->data, 0) >= 0) ? Qt : Qnil;
  }
  
  DEFUN ("file-executable-p", Ffile_executable_p, Sfile_executable_p, 1, 1, 0,
***************
*** 1778,1784 ****
  
    CHECK_STRING (filename, 0);
    abspath = Fexpand_file_name (filename, Qnil);
!   return (access (XSTRING (abspath)->data, 1) >= 0) ? Qt : Qnil;
  }
  
  DEFUN ("file-readable-p", Ffile_readable_p, Sfile_readable_p, 1, 1, 0,
--- 1778,1784 ----
  
    CHECK_STRING (filename, 0);
    abspath = Fexpand_file_name (filename, Qnil);
!   return (access ((char *) XSTRING (abspath)->data, 1) >= 0) ? Qt : Qnil;
  }
  
  DEFUN ("file-readable-p", Ffile_readable_p, Sfile_readable_p, 1, 1, 0,
***************
*** 1791,1797 ****
  
    CHECK_STRING (filename, 0);
    abspath = Fexpand_file_name (filename, Qnil);
!   return (access (XSTRING (abspath)->data, 4) >= 0) ? Qt : Qnil;
  }
  
  DEFUN ("file-symlink-p", Ffile_symlink_p, Sfile_symlink_p, 1, 1, 0,
--- 1791,1797 ----
  
    CHECK_STRING (filename, 0);
    abspath = Fexpand_file_name (filename, Qnil);
!   return (access ((char *) XSTRING (abspath)->data, 4) >= 0) ? Qt : Qnil;
  }
  
  DEFUN ("file-symlink-p", Ffile_symlink_p, Sfile_symlink_p, 1, 1, 0,
***************
*** 1845,1852 ****
  
    CHECK_STRING (filename, 0);
    abspath = Fexpand_file_name (filename, Qnil);
!   if (access (XSTRING (abspath)->data, 0) >= 0)
!     return (access (XSTRING (abspath)->data, 2) >= 0) ? Qt : Qnil;
    dir = Ffile_name_directory (abspath);
  #ifdef VMS
    if (!NILP (dir))
--- 1845,1852 ----
  
    CHECK_STRING (filename, 0);
    abspath = Fexpand_file_name (filename, Qnil);
!   if (access ((char *) XSTRING (abspath)->data, 0) >= 0)
!     return (access ((char *) XSTRING (abspath)->data, 2) >= 0) ? Qt : Qnil;
    dir = Ffile_name_directory (abspath);
  #ifdef VMS
    if (!NILP (dir))
diff -rc src.orig/filelock.c src/filelock.c
*** src.orig/filelock.c	Sat Aug 29 22:27:56 1992
--- src/filelock.c	Fri Nov 13 13:50:46 1992
***************
*** 54,60 ****
--- 54,62 ----
  {
    struct stat s;
    struct passwd *the_pw;
+ #ifndef __STDC__
    extern struct passwd *getpwuid ();
+ #endif
  
    if (lstat (lfname, &s) == 0)
      the_pw = getpwuid (s.st_uid);
***************
*** 123,129 ****
        CHECK_STRING (Vsuperlock_path, 0);
        lock_superlock (lfname);
        lock_file_1 (lfname, O_WRONLY);
!       unlink (XSTRING (Vsuperlock_path)->data);
        return;
      }
    /* User says ignore the lock */
--- 125,131 ----
        CHECK_STRING (Vsuperlock_path, 0);
        lock_superlock (lfname);
        lock_file_1 (lfname, O_WRONLY);
!       unlink ((char *) XSTRING (Vsuperlock_path)->data);
        return;
      }
    /* User says ignore the lock */
***************
*** 261,267 ****
    if (current_lock_owner_1 (lfname) == getpid ())
      unlink (lfname);
  
!   unlink (XSTRING (Vsuperlock_path)->data);
  }
  
  static void
--- 263,269 ----
    if (current_lock_owner_1 (lfname) == getpid ())
      unlink (lfname);
  
!   unlink ((char *) XSTRING (Vsuperlock_path)->data);
  }
  
  static void
***************
*** 283,289 ****
    if (fd >= 0)
      {
  #ifdef USG
!       chmod (XSTRING (Vsuperlock_path)->data, 0666);
  #else
        fchmod (fd, 0666);
  #endif
--- 285,291 ----
    if (fd >= 0)
      {
  #ifdef USG
!       chmod ((char *) XSTRING (Vsuperlock_path)->data, 0666);
  #else
        fchmod (fd, 0666);
  #endif
diff -rc src.orig/floatfns.c src/floatfns.c
*** src.orig/floatfns.c	Sun Aug 30 04:09:00 1992
--- src/floatfns.c	Fri Nov 13 11:11:52 1992
***************
*** 23,29 ****
  #include "config.h"
  #include "lisp.h"
  
! Lisp_Object Qarith_error;
  
  #ifdef LISP_FLOAT_TYPE
  #include <math.h>
--- 23,29 ----
  #include "config.h"
  #include "lisp.h"
  
! extern Lisp_Object Qarith_error;
  
  #ifdef LISP_FLOAT_TYPE
  #include <math.h>
diff -rc src.orig/sysdep.c src/sysdep.c
*** src.orig/sysdep.c	Sat Aug 29 22:28:15 1992
--- src/sysdep.c	Fri Nov 13 13:48:45 1992
***************
*** 686,692 ****
  #ifdef BSD
    killpg (getpgrp (0), SIGTSTP);
  #else
!   kill (-getpgrp (0), SIGTSTP);
  #endif
  
  #else /* No SIGTSTP */
--- 686,692 ----
  #ifdef BSD
    killpg (getpgrp (0), SIGTSTP);
  #else
!   kill (-getpgrp (), SIGTSTP);
  #endif
  
  #else /* No SIGTSTP */
***************
*** 900,906 ****
     and using the same name avoids wasting the other one's space.  */
  
  #if defined (USG) || defined (DGUX)
! unsigned char _sobuf[BUFSIZ+8];
  #else
  char _sobuf[BUFSIZ];
  #endif
--- 900,909 ----
     and using the same name avoids wasting the other one's space.  */
  
  #if defined (USG) || defined (DGUX)
! #ifndef __STDC__
! unsigned
! #endif
! char _sobuf[BUFSIZ+8];
  #else
  char _sobuf[BUFSIZ];
  #endif
***************
*** 2380,2386 ****
  int
  sys_read (fildes, buf, nbyte)
       int fildes;
!      char *buf;
       unsigned int nbyte;
  {
    register int rtnval;
--- 2383,2389 ----
  int
  sys_read (fildes, buf, nbyte)
       int fildes;
!      void *buf;
       unsigned int nbyte;
  {
    register int rtnval;
***************
*** 2393,2399 ****
  int
  sys_write (fildes, buf, nbyte)
       int fildes;
!      char *buf;
       unsigned int nbyte;
  {
    register int rtnval;
--- 2396,2402 ----
  int
  sys_write (fildes, buf, nbyte)
       int fildes;
!      void *buf;
       unsigned int nbyte;
  {
    register int rtnval;
***************
*** 2421,2426 ****
--- 2424,2430 ----
   *	always negligible.   Fred Fish, Unisoft Systems Inc.
   */
  
+ #ifndef HAVE_SIGLIST
  char *sys_siglist[NSIG + 1] =
  {
  #ifdef AIX
***************
*** 2481,2486 ****
--- 2485,2491 ----
  #endif /* not AIX */
    0
    };
+ #endif /* HAVE_SIGLIST */
  
  /*
   *	Warning, this function may not duplicate 4.2 action properly
diff -rc src.orig/unexmips.c src/unexmips.c
*** src.orig/unexmips.c	Wed Jul  1 04:13:27 1992
--- src/unexmips.c	Fri Nov 13 14:08:53 1992
***************
*** 231,239 ****
        bss_section->s_scnptr = scnptr;
      }
  
!   WRITE(new, TEXT_START, hdr.aout.tsize,
  	"writing text section to %s", new_name);
!   WRITE(new, DATA_START, hdr.aout.dsize,
  	"writing text section to %s", new_name);
  
    SEEK(old, hdr.fhdr.f_symptr, "seeking to start of symbols in %s", a_name);
--- 231,239 ----
        bss_section->s_scnptr = scnptr;
      }
  
!   WRITE(new, (void *) TEXT_START, hdr.aout.tsize,
  	"writing text section to %s", new_name);
!   WRITE(new, (void *) DATA_START, hdr.aout.dsize,
  	"writing text section to %s", new_name);
  
    SEEK(old, hdr.fhdr.f_symptr, "seeking to start of symbols in %s", a_name);
diff -rc src.orig/xdisp.c src/xdisp.c
*** src.orig/xdisp.c	Sun Aug 30 04:36:40 1992
--- src/xdisp.c	Fri Nov 13 11:11:55 1992
***************
*** 76,85 ****
  Lisp_Object Vglobal_mode_string;
  
  /* Marker for where to display an arrow on top of the buffer text.  */
! Lisp_Object Voverlay_arrow_position;
  
  /* String to display for the arrow.  */
! Lisp_Object Voverlay_arrow_string;
  
  /* Values of those variables at last redisplay.  */
  Lisp_Object last_arrow_position, last_arrow_string;
--- 76,85 ----
  Lisp_Object Vglobal_mode_string;
  
  /* Marker for where to display an arrow on top of the buffer text.  */
! extern Lisp_Object Voverlay_arrow_position;
  
  /* String to display for the arrow.  */
! extern Lisp_Object Voverlay_arrow_string;
  
  /* Values of those variables at last redisplay.  */
  Lisp_Object last_arrow_position, last_arrow_string;
diff -rc src.orig/xfns.c src/xfns.c
*** src.orig/xfns.c	Sat Aug 29 22:28:21 1992
--- src/xfns.c	Fri Nov 13 11:11:59 1992
***************
*** 122,128 ****
  Lisp_Object Vx_bitmap_file_path;
  
  Atom Xatom_WM_TAKE_FOCUS, Xatom_WM_SAVE_YOURSELF, Xatom_WM_DELETE_WINDOW,
!  Xatom_WM_PROTOCOLS, Xatom_CLIPBOARD;
  
  static char *x_visual_strings[] =
    {
--- 122,128 ----
  Lisp_Object Vx_bitmap_file_path;
  
  Atom Xatom_WM_TAKE_FOCUS, Xatom_WM_SAVE_YOURSELF, Xatom_WM_DELETE_WINDOW,
!  Xatom_WM_PROTOCOLS;
  
  static char *x_visual_strings[] =
    {
***************
*** 1722,1728 ****
      {
        int (*old_handler) ();
        XrmValue arg, from, to;
!       int nargs = 1;
        Screen *screen = XtScreen (s->display.x->widget);
        arg.addr = (XtPointer) &screen;
        arg.size = sizeof (Screen *);
--- 1722,1728 ----
      {
        int (*old_handler) ();
        XrmValue arg, from, to;
!       Cardinal nargs = 1;
        Screen *screen = XtScreen (s->display.x->widget);
        arg.addr = (XtPointer) &screen;
        arg.size = sizeof (Screen *);
diff -rc src.orig/xterm.c src/xterm.c
*** src.orig/xterm.c	Fri Sep  4 11:43:44 1992
--- src/xterm.c	Fri Nov 13 11:11:57 1992
***************
*** 121,129 ****
  #endif
  
  
- /* Nonzero if in redisplay ();  prevents us from calling it recursively */
- int in_display;
- 
  /* Stuff for dealing with the title. */
  extern Lisp_Object Vinvocation_name;
  char *hostname, *id_name;
--- 121,126 ----
diff -rc src.orig/s/s-irix4-0.h src/s/s-irix4-0.h
*** src.orig/s/s-irix4-0.h	Thu Jul 30 01:44:37 1992
--- src/s/s-irix4-0.h	Fri Nov 13 15:57:17 1992
***************
*** 8,28 ****
  #define HAVE_GETWD
  #define HAVE_RENAME
  #define HAVE_SETPRIORITY
  #undef HAVE_VFORK
  #undef IRIS_UTIME
  #define HAVE_DUP2
  #define HAVE_GETTIMEOFDAY
  #define HAVE_DREM
  
  /* Define HAVE_ALLOCA to say that the system provides a properly
     working alloca function and it should be used. */
  #define HAVE_ALLOCA
  #include <alloca.h>
  
  /* use K&R C */
! #define C_SWITCH_MACHINE -cckr
  
- #if 0 /* This has been suggested, but does not currently work..  */
  /* No need to use sprintf to get the tty name--we get that from _getpty.  */
  #define PTY_TTY_NAME_SPRINTF
  /* No need to get the pty name at all.  */
--- 8,32 ----
  #define HAVE_GETWD
  #define HAVE_RENAME
  #define HAVE_SETPRIORITY
+ #undef HAVE_SYSVIPC
  #undef HAVE_VFORK
  #undef IRIS_UTIME
  #define HAVE_DUP2
  #define HAVE_GETTIMEOFDAY
  #define HAVE_DREM
+ #define HAVE_SIGLIST
  
  /* Define HAVE_ALLOCA to say that the system provides a properly
     working alloca function and it should be used. */
  #define HAVE_ALLOCA
+ #ifdef emacs
  #include <alloca.h>
+ #include <unistd.h>
+ #endif
  
  /* use K&R C */
! #define C_SWITCH_MACHINE -ansi -D__EXTENSIONS__ -Dmips=__mips
  
  /* No need to use sprintf to get the tty name--we get that from _getpty.  */
  #define PTY_TTY_NAME_SPRINTF
  /* No need to get the pty name at all.  */
***************
*** 34,40 ****
--- 38,46 ----
     The right way is probably to block them.  Someone should try it.  */
  #define PTY_OPEN						\
  {								\
+   int mask = sigblock (sigmask (SIGCHLD));			\
    char *name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0);	\
+   sigsetmask(mask);						\
    if (name == 0)						\
      return -1;							\
    if (fd < 0)							\
***************
*** 43,49 ****
      return -1;							\
    strcpy (pty_name, name);					\
  }
- #endif /* 0 */
  
  /* IRIX 4.0 has sound support. */
  #define USE_SOUND
--- 49,54 ----
-- 
Sjoerd Mullender
CWI, dept. CST, Kruislaan 413, 1098 SJ Amsterdam, Netherlands
email: sjoerd@cwi.nl			fax:   +31 20 592 4199
phone: +31 20 592 4127			telex: 12571 mactr nl
x-gateway: rodan.UU.NET from help-lucid-emacs to alt.lucid-emacs.help; Fri, 20 Nov 1992 17:01:18 EST
Date: Fri, 20 Nov 1992 14:01:04 PST
X-Windows: No hardware is safe.
From: jwz@lucid.com (Jamie Zawinski)
Subject: Re: A few questions.
Newsgroups: alt.lucid-emacs.help