From: john.furlani@East.Sun.COM (John L. Furlani)
Newsgroups: comp.emacs,gnu.emacs.sources,gnu.emacs.help,sun.emacs,comp.unix.solaris,gnu.epoch.misc
Subject: Lucid Emacs Patch for Solaris 2
Date: 14 Oct 92 22:29:18 GMT
Organization: Sun Microsystems, RTP, NC
Distribution: world
NNTP-Posting-Host: quixote.east.sun.com


I've completed porting Lucid Emacs 19.3 to Solaris 2.  Below is a patch that
can be applied to the distributed 19.3 source code that will allow Lucid Emacs
to be built under Solaris 2.  Be in the actual lucid-19.3 directory and apply
the patch there.

The only known problem is a small pty inconsistency that's still being looked
into.  I'm not sure if all the Toolkits work.  It should compile without any
modification.

j.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
John L. Furlani                                    XIL Video Software
MaBell:		(919)460-8383                      SunSoft, Inc.
Internet:	john.furlani@East.Sun.COM          P.O. Box 13447
Uucp:		sun!sunpix!furlani@uunet.uu.net    RTP, NC 27709

 "Mars is essentially in the same orbit ... somewhat the same
   distance from the Sun, which is very important.  We have seen
   pictures where there are canals, we believe, and water.  If
   there is water, that means there is oxygen.  If oxygen, that
   means we can breathe." -- Vice Pres. Dan Quayle on Mars
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

------- Included Patch -- Cut Here -------
diff -c -N -p -r etc/b2m.c etc/b2m.c
*** etc/b2m.c	Mon Jun 29 18:28:08 1992
--- etc/b2m.c	Thu Sep 10 22:13:24 1992
***************
*** 17,23 ****
--- 17,31 ----
  
  #include <stdio.h>
  #include <time.h>
+ 
+ #define NO_SHORTNAMES
+ #include "../src/config.h"
+ 
+ #ifndef USG
  #include <strings.h>
+ #else
+ #include <string.h>
+ #endif
  
  /* Why can't Sun learn to write libraries and include files? */
  extern char *strtok ();
diff -c -N -p -r etc/etags.c etc/etags.c
*** etc/etags.c	Mon Jun 29 18:28:13 1992
--- etc/etags.c	Thu Sep 10 22:12:20 1992
*************** the Free Software Foundation, 675 Mass A
*** 31,36 ****
--- 31,39 ----
  #include <sys/types.h>
  #include <sys/stat.h>
  
+ #define NO_SHORTNAMES
+ #include "../src/config.h"
+ 
  extern char *malloc (), *realloc ();
  extern char *getenv ();
  extern char *index (), *rindex ();
*************** extern char *index (), *rindex ();
*** 37,43 ****
  extern char *strcpy (), *strncpy ();
  extern int strcmp ();
  
! #ifdef hpux
  #define notdef
  #endif
  
--- 40,46 ----
  extern char *strcpy (), *strncpy ();
  extern int strcmp ();
  
! #if defined(hpux) || defined(USG5_4)
  #define notdef
  #endif
  
diff -c -N -p -r src/Makefile src/Makefile
*** src/Makefile	Wed Sep  9 04:10:01 1992
--- src/Makefile	Thu Sep 10 22:20:40 1992
***************
*** 1,4 ****
! CPP = $(CC) -E
  MAKE = make  # BSD doesn't have it as a default.
  #Note: an alternative is  CPP = /lib/cpp
  
--- 1,4 ----
! CPP = /usr/ccs/lib/cpp
  MAKE = make  # BSD doesn't have it as a default.
  #Note: an alternative is  CPP = /lib/cpp
  
*************** dorelease:
*** 40,46 ****
  xmakefile: ymakefile config.h
  	rm -f xmakefile
  	cp ymakefile junk.c
! 	$(CPP) junk.c | sed -e 's/^#.*//' -e 's/^[ \f\t][ \f\t]*$$//' -e 's/^ /	/' | \
  	sed -n -e '/^..*$$/p' > xmakefile
  	rm -f junk.c
  
--- 40,46 ----
  xmakefile: ymakefile config.h
  	rm -f xmakefile
  	cp ymakefile junk.c
! 	$(CPP) junk.c | sed -e 's/^#.*//' -e 's/^[ \f\t][ \f\t]*$$//' -e 's/^ /	/' -e 's/\//' | \
  	sed -n -e '/^..*$$/p' > xmakefile
  	rm -f junk.c
  
diff -c -N -p -r src/bitmaps.h src/bitmaps.h
*** src/bitmaps.h	Mon Jun 29 18:26:04 1992
--- src/bitmaps.h	Mon Oct 12 11:13:37 1992
***************
*** 1,7 ****
  /* A gnu, like on the back of the emacs manual, for icons. */
  #define gnu_width 50
  #define gnu_height 50
! static char gnu_bits[] = {
     0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
     0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff,
     0xff, 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff,
--- 1,7 ----
  /* A gnu, like on the back of the emacs manual, for icons. */
  #define gnu_width 50
  #define gnu_height 50
! static unsigned char gnu_bits[] = {
     0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
     0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff,
     0xff, 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff,
*************** static char gnu_bits[] = {
*** 37,43 ****
  /* Vertical bars */
  #define compress_width 16
  #define compress_height 10
! static char compress_bits[] = {
     0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
     0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66};
  
--- 37,43 ----
  /* Vertical bars */
  #define compress_width 16
  #define compress_height 10
! static unsigned char compress_bits[] = {
     0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
     0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66};
  
*************** static char compress_bits[] = {
*** 44,50 ****
  /* Bracketed dash */
  #define compress_width 15
  #define compress_height 10
! static char compress_bits[] = {
     0x1f, 0x7c, 0x1f, 0x7c, 0x03, 0x60, 0x03, 0x60, 0xe3, 0x63, 0xe3, 0x63,
     0x03, 0x60, 0x03, 0x60, 0x1f, 0x7c, 0x1f, 0x7c};
  #endif
--- 44,50 ----
  /* Bracketed dash */
  #define compress_width 15
  #define compress_height 10
! static unsigned char compress_bits[] = {
     0x1f, 0x7c, 0x1f, 0x7c, 0x03, 0x60, 0x03, 0x60, 0xe3, 0x63, 0xe3, 0x63,
     0x03, 0x60, 0x03, 0x60, 0x1f, 0x7c, 0x1f, 0x7c};
  #endif
*************** static char compress_bits[] = {
*** 52,64 ****
  /* Rectangled dash */
  #define compress_width 15
  #define compress_height 10
! static char compress_bits[] = {
     0xff, 0x7f, 0xff, 0x7f, 0x03, 0x60, 0x03, 0x60, 0xe3, 0x63, 0xe3, 0x63,
     0x03, 0x60, 0x03, 0x60, 0xff, 0x7f, 0xff, 0x7f};
  
  #define extent_begin_width 18
  #define extent_begin_height 10
! static char extent_begin_bits[] = {
     0x0c, 0x00, 0x00, 0xcc, 0x00, 0x00, 0xcc, 0x0c, 0x00, 0xcc, 0xcc, 0x00,
     0xcc, 0xcc, 0x00, 0xcc, 0xcc, 0x00, 0xcc, 0xcc, 0x00, 0xcc, 0x0c, 0x00,
     0xcc, 0x00, 0x00, 0x0c, 0x00, 0x00};
--- 52,64 ----
  /* Rectangled dash */
  #define compress_width 15
  #define compress_height 10
! static unsigned char compress_bits[] = {
     0xff, 0x7f, 0xff, 0x7f, 0x03, 0x60, 0x03, 0x60, 0xe3, 0x63, 0xe3, 0x63,
     0x03, 0x60, 0x03, 0x60, 0xff, 0x7f, 0xff, 0x7f};
  
  #define extent_begin_width 18
  #define extent_begin_height 10
! static unsigned char extent_begin_bits[] = {
     0x0c, 0x00, 0x00, 0xcc, 0x00, 0x00, 0xcc, 0x0c, 0x00, 0xcc, 0xcc, 0x00,
     0xcc, 0xcc, 0x00, 0xcc, 0xcc, 0x00, 0xcc, 0xcc, 0x00, 0xcc, 0x0c, 0x00,
     0xcc, 0x00, 0x00, 0x0c, 0x00, 0x00};
*************** static char extent_begin_bits[] = {
*** 65,71 ****
  
  #define extent_end_width 18
  #define extent_end_height 10
! static char extent_end_bits[] = {
     0x00, 0xc0, 0x00, 0x00, 0xcc, 0x00, 0xc0, 0xcc, 0x00, 0xcc, 0xcc, 0x00,
     0xcc, 0xcc, 0x00, 0xcc, 0xcc, 0x00, 0xcc, 0xcc, 0x00, 0xc0, 0xcc, 0x00,
     0x00, 0xcc, 0x00, 0x00, 0xc0, 0x00};
--- 65,71 ----
  
  #define extent_end_width 18
  #define extent_end_height 10
! static unsigned char extent_end_bits[] = {
     0x00, 0xc0, 0x00, 0x00, 0xcc, 0x00, 0xc0, 0xcc, 0x00, 0xcc, 0xcc, 0x00,
     0xcc, 0xcc, 0x00, 0xcc, 0xcc, 0x00, 0xcc, 0xcc, 0x00, 0xc0, 0xcc, 0x00,
     0x00, 0xcc, 0x00, 0x00, 0xc0, 0x00};
*************** static char extent_end_bits[] = {
*** 74,86 ****
  /* A diamond. */
  #define continuer_width 8
  #define continuer_height 10
! static char continuer_bits[] = {
     0x18, 0x18, 0x34, 0x34, 0x62, 0x62, 0x34, 0x34, 0x18, 0x18};
  
  /* A left-pointing triangle. */
  #define truncator_width 8
  #define truncator_height 10
! static char truncator_bits[] = {
     0x40, 0x60, 0x70, 0x78, 0x7c, 0x7c, 0x78, 0x70, 0x60, 0x40};
  #endif
  
--- 74,86 ----
  /* A diamond. */
  #define continuer_width 8
  #define continuer_height 10
! static unsigned char continuer_bits[] = {
     0x18, 0x18, 0x34, 0x34, 0x62, 0x62, 0x34, 0x34, 0x18, 0x18};
  
  /* A left-pointing triangle. */
  #define truncator_width 8
  #define truncator_height 10
! static unsigned char truncator_bits[] = {
     0x40, 0x60, 0x70, 0x78, 0x7c, 0x7c, 0x78, 0x70, 0x60, 0x40};
  #endif
  
*************** static char truncator_bits[] = {
*** 87,104 ****
  /* An arrow pointing to the next line */
  #define continuer_width 7
  #define continuer_height 10
! static char continuer_bits[] = {
     0x00, 0xbc, 0xfc, 0xe0, 0xe0, 0x72, 0x3e, 0x1e, 0x1e, 0x3e};
  
  /* Three dots indicating truncation */
  #define truncator_width 7
  #define truncator_height 8
! static char truncator_bits[] = {
     0x06, 0x06, 0x00, 0x18, 0x18, 0x00, 0x60, 0x60};
  
  #define rarrow_width 12
  #define rarrow_height 10
! static char rarrow_bits[] = {
     0x40, 0x00, 0xc0, 0x00, 0x80, 0x01, 0x80, 0x03, 0xfe, 0x07, 0xfe, 0x07,
     0x80, 0x03, 0x80, 0x01, 0xc0, 0x00, 0x40, 0x00};
  
--- 87,104 ----
  /* An arrow pointing to the next line */
  #define continuer_width 7
  #define continuer_height 10
! static unsigned char continuer_bits[] = {
     0x00, 0xbc, 0xfc, 0xe0, 0xe0, 0x72, 0x3e, 0x1e, 0x1e, 0x3e};
  
  /* Three dots indicating truncation */
  #define truncator_width 7
  #define truncator_height 8
! static unsigned char truncator_bits[] = {
     0x06, 0x06, 0x00, 0x18, 0x18, 0x00, 0x60, 0x60};
  
  #define rarrow_width 12
  #define rarrow_height 10
! static unsigned char rarrow_bits[] = {
     0x40, 0x00, 0xc0, 0x00, 0x80, 0x01, 0x80, 0x03, 0xfe, 0x07, 0xfe, 0x07,
     0x80, 0x03, 0x80, 0x01, 0xc0, 0x00, 0x40, 0x00};
  
*************** static char rarrow_bits[] = {
*** 107,113 ****
  /* A stipple for hilighting. */
  #define selection_width 16
  #define selection_height 16
! static char selection_bits[] = {
     0x04, 0x84, 0x80, 0x00, 0x00, 0x20, 0x02, 0x04, 0x40, 0x00, 0x08, 0x82,
     0x00, 0x10, 0x40, 0x00, 0x02, 0x40, 0x00, 0x02, 0x10, 0x00, 0x80, 0x80,
     0x00, 0x08, 0x08, 0x00, 0x01, 0x02, 0x40, 0x20};
--- 107,113 ----
  /* A stipple for hilighting. */
  #define selection_width 16
  #define selection_height 16
! static unsigned char selection_bits[] = {
     0x04, 0x84, 0x80, 0x00, 0x00, 0x20, 0x02, 0x04, 0x40, 0x00, 0x08, 0x82,
     0x00, 0x10, 0x40, 0x00, 0x02, 0x40, 0x00, 0x02, 0x10, 0x00, 0x80, 0x80,
     0x00, 0x08, 0x08, 0x00, 0x01, 0x02, 0x40, 0x20};
*************** static char selection_bits[] = {
*** 114,120 ****
  
  #define secondary_selection_width 16
  #define secondary_selection_height 16
! static char secondary_selection_bits[] = {
     0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x80, 0x80, 0x40, 0x40,
     0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01,
     0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10};
--- 114,120 ----
  
  #define secondary_selection_width 16
  #define secondary_selection_height 16
! static unsigned char secondary_selection_bits[] = {
     0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x80, 0x80, 0x40, 0x40,
     0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01,
     0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10};
*************** static char secondary_selection_bits[] =
*** 121,127 ****
  
  #define overlap_selection_width 16
  #define overlap_selection_height 16
! static char overlap_selection_bits[] = {
     0x09, 0x88, 0x84, 0x04, 0x02, 0x22, 0x01, 0x05, 0x80, 0x80, 0x48, 0x42,
     0x20, 0x20, 0x50, 0x10, 0x0a, 0x48, 0x04, 0x04, 0x12, 0x02, 0x01, 0x01,
     0x80, 0x88, 0x48, 0x40, 0x21, 0xa2, 0x50, 0x10};
--- 121,127 ----
  
  #define overlap_selection_width 16
  #define overlap_selection_height 16
! static unsigned char overlap_selection_bits[] = {
     0x09, 0x88, 0x84, 0x04, 0x02, 0x22, 0x01, 0x05, 0x80, 0x80, 0x48, 0x42,
     0x20, 0x20, 0x50, 0x10, 0x0a, 0x48, 0x04, 0x04, 0x12, 0x02, 0x01, 0x01,
     0x80, 0x88, 0x48, 0x40, 0x21, 0xa2, 0x50, 0x10};
*************** static char overlap_selection_bits[] = {
*** 128,134 ****
  
  #define default0_stipple_width 16
  #define default0_stipple_height 16
! static char default0_stipple_bits[] = {
     0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66,
     0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00,
     0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00};
--- 128,134 ----
  
  #define default0_stipple_width 16
  #define default0_stipple_height 16
! static unsigned char default0_stipple_bits[] = {
     0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66,
     0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00,
     0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00};
*************** static char default0_stipple_bits[] = {
*** 135,141 ****
  
  #define default1_stipple_width 16
  #define default1_stipple_height 16
! static char default1_stipple_bits[] = {
     0x00, 0x00, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22,
     0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00,
     0x00, 0x00, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00};
--- 135,141 ----
  
  #define default1_stipple_width 16
  #define default1_stipple_height 16
! static unsigned char default1_stipple_bits[] = {
     0x00, 0x00, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22,
     0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00,
     0x00, 0x00, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00};
diff -c -N -p -r src/config.h src/config.h
*** src/config.h	Sun Aug 30 17:46:56 1992
--- src/config.h	Mon Oct 12 11:31:32 1992
*************** the Free Software Foundation, 675 Mass A
*** 32,47 ****
     This has to come before include the m- file.
   */
  
! #define USE_GCC
  /* #define USE_LCC */
  
- /* Include here a s- file that describes the system type you are using.
-    See the file ../etc/MACHINES for a list of systems and the names of
-    the s- files to use for them.  See s-template.h for documentation on 
-    writing s- files.
-  */
- #include "s/s-sunos4.h"
- 
  /* Include here a m- file that describes the machine and system you use.
     See the file ../etc/MACHINES for a list of machines and the names of 
     the m- files to use for them.   See m-template.h for info on what m- 
--- 32,40 ----
     This has to come before include the m- file.
   */
  
! /* #define USE_GCC */
  /* #define USE_LCC */
  
  /* Include here a m- file that describes the machine and system you use.
     See the file ../etc/MACHINES for a list of machines and the names of 
     the m- files to use for them.   See m-template.h for info on what m- 
*************** the Free Software Foundation, 675 Mass A
*** 49,54 ****
--- 42,54 ----
   */
  #include "m/m-sparc.h"
  
+ /* Include here a s- file that describes the system type you are using.
+    See the file ../etc/MACHINES for a list of systems and the names of
+    the s- files to use for them.  See s-template.h for documentation on 
+    writing s- files.
+  */
+ #include "s/s-solaris2.h"
+ 
  /* Load in the conversion definitions if this system
     needs them and the source file being compiled has not
     said to inhibit this.  There should be no need for you
*************** the Free Software Foundation, 675 Mass A
*** 115,129 ****
     If you have trouble with _malloc being multiply-defined, or if you're
     on a NeXT (or possibly MACH in general) comment out the next four lines.
   */
  #ifdef SYSTEM_MALLOC
  #undef SYSTEM_MALLOC
  #endif
  #define GNU_MALLOC
  
  /* Define NEED_STRDUP if your system doesn't have a strdup() function.
     Define NEED_REALPATH if your system does not include a realpath() function.
     If you system doesn't have the fmod() function, then you need to define
!    either HAVE_DREM or HAVE_REMAINDER, as appropriate.
  
     These flags really should be in the appropriate s- file, so if you need 
     to do this, let us know and we'll put them there in the next release.
--- 115,131 ----
     If you have trouble with _malloc being multiply-defined, or if you're
     on a NeXT (or possibly MACH in general) comment out the next four lines.
   */
+ 
  #ifdef SYSTEM_MALLOC
  #undef SYSTEM_MALLOC
  #endif
+ /* #define SYSTEM_MALLOC */
  #define GNU_MALLOC
  
  /* Define NEED_STRDUP if your system doesn't have a strdup() function.
     Define NEED_REALPATH if your system does not include a realpath() function.
     If you system doesn't have the fmod() function, then you need to define
! o   either HAVE_DREM or HAVE_REMAINDER, as appropriate.
  
     These flags really should be in the appropriate s- file, so if you need 
     to do this, let us know and we'll put them there in the next release.
*************** the Free Software Foundation, 675 Mass A
*** 183,189 ****
     X libraries aren't in a place that your loader can find on its own,
     you might want to add "-L/..." or something similar.  */
  
! /* #define LD_SWITCH_SITE -L/x11r4/usr.`arch`/lib */
  
  /* Define C_SWITCH_SITE to contain any special flags your compiler may
     need.  For instance, if you've defined HAVE_X_WINDOWS above and your
--- 185,191 ----
     X libraries aren't in a place that your loader can find on its own,
     you might want to add "-L/..." or something similar.  */
  
! #define LD_SWITCH_SITE 
  
  /* Define C_SWITCH_SITE to contain any special flags your compiler may
     need.  For instance, if you've defined HAVE_X_WINDOWS above and your
*************** the Free Software Foundation, 675 Mass A
*** 190,196 ****
     X include files aren't in a place that your compiler can find on its
     own, you might want to add "-I/..." or something similar.  */
  
! /* #define C_SWITCH_SITE -I/cadillacgnu/gcc-include -I/x11r4/usr/include */
  
  #ifdef USE_GCC
  /* Depending on how GCC is installed, you may need to add the gcc library
--- 192,198 ----
     X include files aren't in a place that your compiler can find on its
     own, you might want to add "-I/..." or something similar.  */
  
! #define C_SWITCH_SITE 
  
  #ifdef USE_GCC
  /* Depending on how GCC is installed, you may need to add the gcc library
*************** the Free Software Foundation, 675 Mass A
*** 201,207 ****
  
  #endif /* USE_GCC */
  
- 
  /* If you are using SunOS 4.1.1 and X11r5, then you need this patch.
     There is a stupid bug in the SunOS libc.a: two functions which X11r5
     uses, mbstowcs() and wcstombs(), are unusable when programs are
--- 203,208 ----
*************** the Free Software Foundation, 675 Mass A
*** 215,221 ****
     Also, SunOS 4.1.1 contains buggy versions of strcmp and strcpy that
     sometimes reference memory past the end of the string, which can segv.
   */
! #ifdef sparc
  #define OBJECTS_SYSTEM sunOS-fix.o strcmp.o strcpy.o
  #endif
  
--- 216,222 ----
     Also, SunOS 4.1.1 contains buggy versions of strcmp and strcpy that
     sometimes reference memory past the end of the string, which can segv.
   */
! #if defined(sparc) && !defined(SOLARIS2)
  #define OBJECTS_SYSTEM sunOS-fix.o strcmp.o strcpy.o
  #endif
  
diff -c -N -p -r src/dispnew.c src/dispnew.c
*** src/dispnew.c	Sat Aug 29 22:36:36 1992
--- src/dispnew.c	Mon Sep 14 14:25:22 1992
*************** For types not defined in VMS, use  defin
*** 2301,2308 ****
    }	
  #endif
  
-   term_init (terminal_type);
- 
  #ifndef MULTI_SCREEN
    highlight_face.hilited = 1;
    if (term_does_underline)
--- 2301,2306 ----
*************** For types not defined in VMS, use  defin
*** 2333,2340 ****
  
        /* Don't handle SIGWINCH if using X.  */
        return;
!     }
  #endif /* HAVE_X_WINDOWS */
  
  #ifdef SIGWINCH
  #ifndef CANNOT_DUMP
--- 2331,2339 ----
  
        /* Don't handle SIGWINCH if using X.  */
        return;
!     } else
  #endif /* HAVE_X_WINDOWS */
+   term_init (terminal_type);
  
  #ifdef SIGWINCH
  #ifndef CANNOT_DUMP
diff -c -N -p -r src/emacs.c src/emacs.c
*** src/emacs.c	Wed Sep  2 03:59:16 1992
--- src/emacs.c	Fri Sep 11 01:04:58 1992
*************** char *stack_bottom;
*** 82,87 ****
--- 82,94 ----
  extern Lisp_Object Vwindow_system;
  #endif /* HAVE_X_WINDOWS */
  
+ #ifdef USG_SHARED_LIBRARIES
+ /* If nonzero, this is the place to put the end of the writable segment
+    at startup.  */
+  
+ unsigned int bss_end = 0;
+ #endif
+  
  /* Nonzero means running Emacs without interactive terminal.  */
  
  int noninteractive;
*************** main (argc, argv, envp)
*** 481,486 ****
--- 488,498 ----
  #ifdef RUN_TIME_REMAP
    if (initialized)
      run_time_remap (argv[0]);
+ #endif
+  
+ #ifdef USG_SHARED_LIBRARIES
+   if (bss_end)
+     brk (bss_end);
  #endif
  
    clearerr (stdin);
diff -c -N -p -r src/fileio.c src/fileio.c
*** src/fileio.c	Sat Aug 29 16:27:55 1992
--- src/fileio.c	Thu Sep 10 23:04:23 1992
*************** the Free Software Foundation, 675 Mass A
*** 22,28 ****
  #include <sys/stat.h>
  #include <pwd.h>
  #include <ctype.h>
- #include <sys/dir.h>
  #include <errno.h>
  #include <sys/param.h>
  
--- 22,27 ----
*************** extern int sys_nerr;
*** 40,45 ****
--- 39,50 ----
  #include "lisp.h"
  #include "buffer.h"
  #include "window.h"
+ 
+ #ifdef USG5_4
+ #include <sys/dirent.h>
+ #else
+ #include <sys/dir.h>
+ #endif
  
  #ifdef VMS
  #include <perror.h>
diff -c -N -p -r src/floatfns.c src/floatfns.c
*** src/floatfns.c	Sat Aug 29 22:09:00 1992
--- src/floatfns.c	Thu Sep 10 23:17:46 1992
*************** Rounds the value toward zero.")
*** 469,475 ****
    return num;
  }
  
! #if defined (BSD) || defined (IRIX) || defined (IRIS) || defined (__hpux) || defined(AIX)
  static void
  float_error (signo)
       int signo;
--- 469,475 ----
    return num;
  }
  
! #if defined (BSD) || defined (IRIX) || defined (IRIS) || defined (__hpux) || defined(AIX) || defined(USG5_4)
  static void
  float_error (signo)
       int signo;
diff -c -N -p -r src/getpagesize.h src/getpagesize.h
*** src/getpagesize.h	Wed Jul 29 19:44:04 1992
--- src/getpagesize.h	Fri Sep 11 00:09:32 1992
*************** static size_t getpagesize() { return( 40
*** 10,15 ****
--- 10,22 ----
  #define HAVE_GETPAGESIZE
  #endif
    
+ #ifdef HAVE_SYSCONF
+ #include <sys/unistd.h>
+ 
+ #define getpagesize() sysconf(_SC_PAGESIZE)
+ 
+ #else
+ 
  #ifndef HAVE_GETPAGESIZE
  
  #include <sys/param.h>
*************** static size_t getpagesize() { return( 40
*** 29,31 ****
--- 36,39 ----
  
  #endif /* not HAVE_GETPAGESIZE */
  
+ #endif /* HAVE_SYSCONF */
diff -c -N -p -r src/gmalloc.c src/gmalloc.c
*** src/gmalloc.c	Wed Sep  2 03:59:17 1992
--- src/gmalloc.c	Mon Sep 14 11:45:45 1992
*************** extern size_t __getpagesize ();
*** 982,987 ****
--- 982,994 ----
  #endif
  #endif
  
+ #ifdef USG5_4
+ #include <sys/unistd.h>
+ 
+ #define __getpagesize() sysconf(_SC_PAGESIZE);
+ 
+ #else
+ 
  #ifdef HAVE_GETPAGESIZE
  #define __getpagesize() getpagesize()
  #else
*************** extern size_t __getpagesize ();
*** 1004,1009 ****
--- 1011,1017 ----
  #endif /* not HAVE_GETPAGESIZE */
  
  #endif
+ #endif /* HAVE_SYSCONF */
  
  static size_t pagesize;
  
diff -c -N -p -r src/lread.c src/lread.c
*** src/lread.c	Fri Sep  4 05:43:35 1992
--- src/lread.c	Thu Sep 10 23:23:12 1992
*************** the Free Software Foundation, 675 Mass A
*** 26,31 ****
--- 26,35 ----
  #include "config.h"
  #include "lisp.h"
  
+ #ifdef USG5_4
+ #include <unistd.h>
+ #endif
+ 
  #ifndef standalone
  #include "buffer.h"
  #include "paths.h"
diff -c -N -p -r src/lwlib/lwlib-Xol.c src/lwlib/lwlib-Xol.c
*** src/lwlib/lwlib-Xol.c	Tue Jul  7 18:30:05 1992
--- src/lwlib/lwlib-Xol.c	Mon Oct 12 10:56:50 1992
*************** make_menu_in_widget (widget_instance* in
*** 157,163 ****
        XtSetArg (al [ac], XtNuserData, instance); ac++;
        XtSetArg (al [ac], XtNacceleratorText, cur->key); ac++;
        
!       label = (char *) resource_string (widget, cur->name);
        if (label)
  	{
  	  XtSetArg (al [ac], XtNlabel, label); ac++;
--- 157,165 ----
        XtSetArg (al [ac], XtNuserData, instance); ac++;
        XtSetArg (al [ac], XtNacceleratorText, cur->key); ac++;
        
!       label = cur->name;
! 
!       label = NULL;
        if (label)
  	{
  	  XtSetArg (al [ac], XtNlabel, label); ac++;
*************** xol_update_one_value (widget_instance* i
*** 297,303 ****
  }
  
  void
! xlw_pop_instance (widget_instance* instance, Boolean up)
  {
  }
  
--- 299,305 ----
  }
  
  void
! xol_pop_instance (widget_instance* instance, Boolean up)
  {
  }
  
diff -c -N -p -r src/lwlib/lwlib-Xol.h src/lwlib/lwlib-Xol.h
*** src/lwlib/lwlib-Xol.h	Tue Jul  7 18:30:06 1992
--- src/lwlib/lwlib-Xol.h	Mon Sep 14 13:45:04 1992
***************
*** 4,10 ****
  #include "lwlib-internal.h"
  
  extern widget_creation_entry xol_creation_table [];
! extern widget_creation_function xol_create_dialog;
  
  Boolean
  lw_olit_widget_p (Widget widget);
--- 4,10 ----
  #include "lwlib-internal.h"
  
  extern widget_creation_entry xol_creation_table [];
! extern Widget xol_create_dialog(widget_instance*);
  
  Boolean
  lw_olit_widget_p (Widget widget);
diff -c -N -p -r src/s/s-solaris2.h src/s/s-solaris2.h
*** src/s/s-solaris2.h
--- src/s/s-solaris2.h	Mon Oct 12 11:09:50 1992
***************
*** 0 ****
--- 1,69 ----
+ /* Definitions file for GNU Emacs running on AT&T's System V Release 4
+    Copyright (C) 1987, 1990 Free Software Foundation, Inc.
+ 
+ This file is part of GNU Emacs.
+ 
+ GNU Emacs is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 1, or (at your option)
+ any later version.
+ 
+ GNU Emacs is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GNU Emacs; see the file COPYING.  If not, write to
+ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+ 
+ /* 
+  * For Solaris2 by John Furlani, Sun Microsystems Computer Corporation 
+  *            <john.furlani@East.Sun.COM> 
+  */
+ 
+ /* Use basic SVR4 config for starters */
+ #include "s-usg5-4.h"
+ 
+ /* For Solaris2 specific stuff*/
+ #define SOLARIS2
+ 
+ /* Solaris2 is not BSD */
+ #undef BSD
+ 
+ /* Solaris2 is cool with subprocesses and TIOCGETC */
+ #define subprocesses
+ #undef	BROKEN_TIOCGETC
+ 
+ /* We've got sockets, so we'll use them */
+ #define HAVE_SOCKETS
+ 
+ /* Solaris2 can use SIGPOLL as SIGIO  */
+ #define SIGIO SIGPOLL
+ 
+ /* Flags for OpenWindows */
+ #if 1
+ #undef LD_SWITCH_SYSTEM
+ #define LD_SWITCH_SYSTEM -L/depot/openwin-v3/lib
+ #undef C_SWITCH_SYSTEM
+ #define C_SWITCH_SYSTEM -I/depot/openwin-v3/include
+ #endif 
+ 
+ /* Don't need any of the start files */
+ #undef START_FILES
+ #define START_FILES
+ 
+ #undef LIB_STANDARD
+ #define LIB_STANDARD -lkvm -lsocket -lnsl -lelf -lintl -ldl
+ 
+ /* DATA_SEG_BITS not needed */
+ #undef DATA_SEG_BITS
+ 
+ /* Use cc to link */
+ #define LD_CMD cc
+ 
+ /* TIOCSIGSEND is ok for Solaris2 */
+ #undef TIOCSIGSEND
+ 
+ /* Xos.h doesn't define __TIMEVAL__ correctly */
+ #define __TIMEVAL__
diff -c -N -p -r src/s/s-usg5-4.h src/s/s-usg5-4.h
*** src/s/s-usg5-4.h
--- src/s/s-usg5-4.h	Tue Sep 15 22:25:53 1992
***************
*** 0 ****
--- 1,163 ----
+ /* Definitions file for GNU Emacs running on AT&T's System V Release 4
+    Copyright (C) 1987, 1990 Free Software Foundation, Inc.
+ 
+ This file is part of GNU Emacs.
+ 
+ GNU Emacs is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 1, or (at your option)
+ any later version.
+ 
+ GNU Emacs is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GNU Emacs; see the file COPYING.  If not, write to
+ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+ 
+ /* This file written by James Van Artsdalen of Dell Computer Corporation.
+  * james@bigtex.cactus.org.
+  */
+ 
+ /* Use the SysVr3 file for at least base configuration. */
+ 
+ #include "s-usg5-3.h"
+ 
+ #define USG5_4
+ 
+ /* We do have multiple jobs.  Handle ^Z. */
+ 
+ #undef NOMULTIPLEJOBS
+ 
+ #define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o
+ 
+ #define LIB_STANDARD -lsocket -lnsl -lelf -lc /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o
+ 
+ /* No <sioctl.h> */
+ 
+ #define NO_SIOCTL_H
+ 
+ /* Undump with ELF */
+ 
+ #undef COFF
+ 
+ #define UNEXEC unexelf.o
+ 
+ /* Get FIONREAD from <sys/filio.h>.  Get <sys/ttold.h> to get struct
+  * tchars. But get <termio.h> first to make sure ttold.h doesn't
+  * interfere.  And don't try to use SIGIO yet.
+  */
+ 
+ #ifdef emacs
+ #include <sys/filio.h>
+ #include <termio.h>
+ #include <sys/ttold.h>
+ #include <signal.h>
+ #include <sys/wait.h>
+ #include <sys/stream.h>
+ #include <sys/stropts.h>
+ #include <sys/termios.h>
+ #undef SIGIO
+ #endif
+ 
+ /* libc has this stuff, but not utimes. */
+ 
+ #define HAVE_RENAME
+ #define HAVE_SELECT
+ #define HAVE_TIMEVAL
+ #define HAVE_CLOSEDIR
+ #define HAVE_GETTIMEOFDAY
+ #define HAVE_DUP2
+ 
+ #define USE_UTIME
+ 
+ /* <sys/stat.h> *defines* stat(2) as a static function.  If "static"
+  * is blank, then many files will have a public definition for stat(2).
+  */
+ 
+ #undef static
+ 
+ /* We need bss_end from emacs.c for undumping */
+ 
+ #ifndef USG_SHARED_LIBRARIES
+ #define USG_SHARED_LIBRARIES
+ #endif
+ 
+ /* We can support this */
+ 
+ #define CLASH_DETECTION
+ 
+ #define HAVE_PTYS
+ #define HAVE_SETSID
+ #define HAVE_TCATTR
+ 
+ /* It is possible to receive SIGCHLD when there are no children
+    waiting, because a previous waitsys(2) cleaned up the carcass of child
+    without clearing the SIGCHLD pending info.  So, use a non-blocking
+    wait3 instead, which maps to waitpid(2) in SysVr4. */
+ 
+ #define HAVE_WAIT_HEADER
+ #define WAITTYPE int
+ #define wait3(status, options, rusage) \
+   waitpid((pid_t) -1, (status), (options))
+ #define WRETCODE(w) (w >> 8)
+ 
+ /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY
+    subprocesses the usual way.  But TIOCSIGNAL does work for PTYs, and
+    this is all we need.  */
+ 
+ #define TIOCSIGSEND TIOCSIGNAL
+ 
+ /* This change means that we don't loop through allocate_pty too many
+    times in the (rare) event of a failure. */
+ 
+ #undef FIRST_PTY_LETTER
+ #define FIRST_PTY_LETTER 'z'
+ 
+ /* This sets the name of the master side of the PTY. */
+ 
+ #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
+ 
+ /* This sets the name of the slave side of the PTY.  On SysVr4,
+    grantpt(3) forks a subprocess, so keep sigchld_handler() from
+    intercepting that death.  If any child but grantpt's should die
+    within, it should be caught after sigrelse(2). */
+ 
+ #define PTY_TTY_NAME_SPRINTF			\
+   {						\
+     char *ptsname(), *ptyname;			\
+     int trc;					\
+ 						\
+     pty_name[0] = '\0';				\
+     sighold(SIGCLD);				\
+     trc = grantpt(fd);				\
+     sigrelse(SIGCLD);				\
+     if (trc == -1)				\
+       error("could not grant slave pty");	\
+     else if (unlockpt(fd) == -1)		\
+       error("could not unlock slave pty");	\
+     else if (!(ptyname = ptsname(fd)))		\
+       error ("could not enable slave pty");	\
+     else {					\
+       strncpy(pty_name, ptyname, sizeof(pty_name)); \
+       pty_name[sizeof(pty_name) - 1] = 0;	\
+     }						\
+   }
+ 
+ /* Push various streams modules onto a PTY channel. */
+ #define SETUP_SLAVE_PTY \
+   if (ioctl (xforkin, I_PUSH, "ptem") == -1)	\
+     fatal ("ioctl I_PUSH ptem", errno);		\
+   if (ioctl (xforkin, I_PUSH, "ldterm") == -1)	\
+     fatal ("ioctl I_PUSH ldterm", errno);	\
+   if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
+     fatal ("ioctl I_PUSH ttcompat", errno);
+ 
+ /* The definition of this in s-usg5-3.h is not needed in 5.4.  */
+ 
+ #undef LIBX10_SYSTEM
+ #undef LIBX11_SYSTEM
+ 
+ /* ??? For next release, suggest adding HAVE_SOCKETS */
diff -c -N -p -r src/sysdep.c src/sysdep.c
*** src/sysdep.c	Sat Aug 29 16:28:15 1992
--- src/sysdep.c	Fri Sep 18 14:28:18 1992
*************** extern char *sys_errlist[];
*** 91,96 ****
--- 91,101 ----
  #endif
  #ifdef USG
  #include <fcntl.h>
+ #ifdef USG5_4
+ #undef FASYNC
+ #include <sys/file.h>
+ #include <sys/filio.h>
+ #endif /* USG5_4 */
  #endif
  #endif /* not 4.1 bsd */
  
*************** reset_sigio ()
*** 813,819 ****
  
  request_sigio ()
  {
! #ifdef SIGWINCH
    sigunblock (sigmask (SIGWINCH));
  #endif
  #ifdef HAVE_X_WINDOWS
--- 818,824 ----
  
  request_sigio ()
  {
! #if defined(SIGWINCH) && defined(SIGIO) && !defined(titan) && !defined(USG5_4)
    sigunblock (sigmask (SIGWINCH));
  #endif
  #ifdef HAVE_X_WINDOWS
*************** request_sigio ()
*** 828,834 ****
  
  unrequest_sigio ()
  {
! #ifdef SIGWINCH
    sigblock (sigmask (SIGWINCH));
  #endif
  #ifdef HAVE_X_WINDOWS
--- 833,839 ----
  
  unrequest_sigio ()
  {
! #if defined(SIGWINCH) && defined(SIGIO) && !defined(titan) && !defined(USG5_4)
    sigblock (sigmask (SIGWINCH));
  #endif
  #ifdef HAVE_X_WINDOWS
*************** unrequest_sigio ()
*** 842,848 ****
  }
  
  #else /* no FASYNC */
! #ifdef STRIDE		/* Stride doesn't have FASYNC - use FIOASYNC */
  
  request_sigio ()
  {
--- 847,853 ----
  }
  
  #else /* no FASYNC */
! #if defined(STRIDE)	/* Stride doesn't have FASYNC - use FIOASYNC */
  
  request_sigio ()
  {
*************** start_of_data ()
*** 1656,1663 ****
--- 1661,1673 ----
  #ifdef DATA_START
    return ((char *) DATA_START);
  #else
+ #ifdef USG5_4
+   extern etext;
+   return &etext;
+ #else
    extern int data_start;
    return ((char *) &data_start);
+ #endif
  #endif
  }
  #endif /* NEED_STARTS (not CANNOT_DUMP or not SYSTEM_MALLOC) */
diff -c -N -p -r src/unexelf.c src/unexelf.c
*** src/unexelf.c	Mon Jun 29 18:27:09 1992
--- src/unexelf.c	Fri Sep 11 01:01:57 1992
*************** In other words, you are welcome to use, 
*** 18,23 ****
--- 18,32 ----
  You are forbidden to forbid anyone else to use, share and improve
  what you give them.   Help stamp out software-hoarding!  */
  
+ /*
+  * $Revision: 1.2 $
+  * $Source: /import/kaplan/stable/distrib/epoch-4.0p2/src/RCS/unexelf.c,v $
+  * $Author: love $
+  * $Date: 92/02/21 16:46:31 $
+  */
+ #ifndef LINT
+ static char rcsid[] = "$Author: love $ $Date: 92/02/21 16:46:31 $ $Source: /import/kaplan/stable/distrib/epoch-4.0p2/src/RCS/unexelf.c,v $ $Revision: 1.2 $";
+ #endif
  
  /*
   * unexec.c - Convert a running program into an a.out file.
*************** extern void fatal(char *, ...);
*** 347,352 ****
--- 356,373 ----
  
  typedef unsigned char byte;
  
+ /* Round X up to a multiple of Y.  */
+ 
+ int
+ round_up (x, y)
+      int x, y;
+ {
+   int rem = x % y;
+   if (rem == 0)
+     return x;
+   return x - rem + y;
+ }
+ 
  /* ****************************************************************
   * unexec
   *
*************** unexec (new_name, old_name, data_start, 
*** 361,371 ****
       char *new_name, *old_name;
       unsigned data_start, bss_start, entry_address;
  {
- /*
-   Made this local -- couldn't find the actual definition -- DAE 
    extern unsigned int bss_end;
- */
-   unsigned int bss_end;
    int new_file, old_file, new_file_size;
  
    /* Pointers to the base of the image of the two files. */
--- 382,388 ----
*************** unexec (new_name, old_name, data_start, 
*** 421,428 ****
     * data2 and bss sections.
     */
  
!   for (old_bss_index = 1; old_bss_index < (int) old_file_h->e_shnum; 
!        old_bss_index++)                    /* added cast -- DAE */
      {
  #ifdef DEBUG
        fprintf (stderr, "Looking for .bss - found %s\n",
--- 438,444 ----
     * data2 and bss sections.
     */
  
!   for (old_bss_index = 1; old_bss_index < old_file_h->e_shnum; old_bss_index++)
      {
  #ifdef DEBUG
        fprintf (stderr, "Looking for .bss - found %s\n",
*************** unexec (new_name, old_name, data_start, 
*** 519,530 ****
  
    for (n = new_file_h->e_phnum - 1; n >= 0; n--)
      {
        if (NEW_PROGRAM_H(n).p_vaddr + NEW_PROGRAM_H(n).p_filesz > old_bss_addr)
  	fatal ("Program segment above .bss in %s\n", old_name, 0);
  
        if (NEW_PROGRAM_H(n).p_type == PT_LOAD
! 	  && (NEW_PROGRAM_H(n).p_vaddr + NEW_PROGRAM_H(n).p_filesz
! 	      == old_bss_addr))
  	break;
      }
    if (n < 0)
--- 535,553 ----
  
    for (n = new_file_h->e_phnum - 1; n >= 0; n--)
      {
+       /* Compute maximum of all requirements for alignment of section.  */
+       int alignment = (NEW_PROGRAM_H (n)).p_align;
+       if ((OLD_SECTION_H (old_bss_index)).sh_addralign > alignment)
+ 	alignment = OLD_SECTION_H (old_bss_index).sh_addralign;
+ 
        if (NEW_PROGRAM_H(n).p_vaddr + NEW_PROGRAM_H(n).p_filesz > old_bss_addr)
  	fatal ("Program segment above .bss in %s\n", old_name, 0);
  
        if (NEW_PROGRAM_H(n).p_type == PT_LOAD
! 	  && (round_up ((NEW_PROGRAM_H (n)).p_vaddr
! 			+ (NEW_PROGRAM_H (n)).p_filesz,
! 			alignment)
! 	      == round_up (old_bss_addr, alignment)))
  	break;
      }
    if (n < 0)
*************** unexec (new_name, old_name, data_start, 
*** 552,558 ****
     * .data header and modifying the offset, address and size.
     */
  
!   for (n = 1; n < (int) new_file_h->e_shnum; n++)    /* added cast -- DAE */
      {
        if (NEW_SECTION_H(n).sh_offset >= new_data2_offset)
  	NEW_SECTION_H(n).sh_offset += new_data2_size;
--- 575,581 ----
     * .data header and modifying the offset, address and size.
     */
  
!   for (n = 1; n < new_file_h->e_shnum; n++)
      {
        if (NEW_SECTION_H(n).sh_offset >= new_data2_offset)
  	NEW_SECTION_H(n).sh_offset += new_data2_size;
*************** unexec (new_name, old_name, data_start, 
*** 564,571 ****
  
    new_data2_index = old_file_h->e_shnum;
  
!   for (old_data_index = 1; old_data_index < (int) old_file_h->e_shnum;
!        old_data_index++)                    /* added cast -- DAE */
      if (!strcmp (old_section_names + OLD_SECTION_H(old_data_index).sh_name,
  		 ".data"))
        break;
--- 587,594 ----
  
    new_data2_index = old_file_h->e_shnum;
  
!   for (old_data_index = 1; old_data_index < old_file_h->e_shnum;
!        old_data_index++)
      if (!strcmp (old_section_names + OLD_SECTION_H(old_data_index).sh_name,
  		 ".data"))
        break;
diff -c -N -p -r src/x11term.h src/x11term.h
*** src/x11term.h	Mon Jun 29 18:26:43 1992
--- src/x11term.h	Mon Sep 14 10:53:09 1992
***************
*** 13,18 ****
--- 13,22 ----
  
  #define BLOCK_INPUT_DECLARE() int BLOCK_INPUT_mask
  #ifdef SIGIO
+ #ifdef USG5_4
+ #define BLOCK_INPUT()   sighold(SIGIO)
+ #define UNBLOCK_INPUT() sigrelse(SIGIO)
+ #else
  #define BLOCK_INPUT() BLOCK_INPUT_mask = sigblock (sigmask (SIGIO))
  #define UNBLOCK_INPUT() sigsetmask (BLOCK_INPUT_mask)
  #else /* not SIGIO */
--
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
John L. Furlani                                    XIL Video Software
MaBell:		(919)460-8383                      SunSoft, Inc.
Internet:	john.furlani@East.Sun.COM          P.O. Box 13447
Uucp:		sun!sunpix!furlani@uunet.uu.net    RTP, NC 27709

 "Mars is essentially in the same orbit ... somewhat the same
   distance from the Sun, which is very important.  We have seen
   pictures where there are canals, we believe, and water.  If
   there is water, that means there is oxygen.  If oxygen, that
   means we can breathe." -- Vice Pres. Dan Quayle on Mars
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Newsgroups: comp.emacs