From: dgreen@sti.com (Dan R. Greening)
Newsgroups: comp.unix.sysv386,comp.unix.sys5.r4
Subject: GNU Emacs on SVR 4.2 (UnixWare) Beta.  Patch.
Date: 14 Oct 92 17:49:47 GMT
Organization: Software Transformation, Inc.

I asked last week if someone has compiled GNU emacs for SVR 4.2 UnixWare.  
No one responded, but many asked me to post the solution.  So I worked on it 
myself.

Here are the diffs.  I hope they help you.

____
\  /Dan Greening    Software Transformation   1601 Saratoga-Sunnyvale Rd, #100
 \/dgreen@sti.com   (408) 973-8081 x313       Cupertino, CA 95014

--------------------------- cut here -----------------------------

The following patch file will fix GNU emacs 18.58 to compile and run on
UnixWare v1.0-Beta.  Before using, you should

  cd emacs-18.58/src
  cp config.h-dist config.h
  cp paths.h-dist paths.h

then apply patch.

  Read all of the INSTALL file before doing anything.  The INSTALL says stuff
  like "do this" and then a page later says "but if you want <> you have to
  do that"...so reading the whole thing first is a good idea.

  Follow the instructions and it should work.

  If you have never installed GNU emacs, please do not ask me for help.
  My contribution is provided with the best of intentions: to help you to 
  avoid spending the time I had to spend.  However, I don't have time to 
  help individuals, unless they are paying me.  Thanks.

  A company in Northern California, Cygnus Support, provides assistence to
  installers, for a fee.  You can contact Cygnus Support at 1-415-322-3811.

  Enjoy emacs!


diff -rc ../orig/emacs-18.58/src/Makefile ./src/Makefile
*** ../orig/emacs-18.58/src/Makefile	Fri Jan 31 21:43:01 1992
--- ./src/Makefile	Wed Sep 23 23:34:57 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 = /lib/cpp
  MAKE = make  # BSD doesn't have it as a default.
  #Note: an alternative is  CPP = /lib/cpp
  
Only in ./src: config.h
Only in ./src: paths.h
diff -rc ../orig/emacs-18.58/src/s-usg5-4.h ./src/s-usg5-4.h
*** ../orig/emacs-18.58/src/s-usg5-4.h	Mon Feb  3 15:35:56 1992
--- ./src/s-usg5-4.h	Tue Oct 13 16:48:36 1992
***************
*** 157,159 ****
--- 157,162 ----
  #undef LIBX11_SYSTEM
  
  /* ??? For next release, suggest adding HAVE_SOCKETS */
+ 
+ #define BROKEN_FIONREAD
+ #define SYSV_STREAMS
diff -rc ../orig/emacs-18.58/src/sink11.h ./src/sink11.h
*** ../orig/emacs-18.58/src/sink11.h	Wed Mar 23 19:43:57 1988
--- ./src/sink11.h	Wed Sep 23 23:39:34 1992
***************
*** 1,6 ****
  #define sink_width 48
  #define sink_height 48
! static char sink_bits[] = {
     0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
     0xff, 0xff, 0xff, 0xff, 0x80, 0x9f, 
     0xff, 0xff, 0xff, 0xff, 0x9f, 0x9f, 
--- 1,6 ----
  #define sink_width 48
  #define sink_height 48
! static unsigned char sink_bits[] = {
     0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
     0xff, 0xff, 0xff, 0xff, 0x80, 0x9f, 
     0xff, 0xff, 0xff, 0xff, 0x9f, 0x9f, 
diff -rc ../orig/emacs-18.58/src/sink11mask.h ./src/sink11mask.h
*** ../orig/emacs-18.58/src/sink11mask.h	Wed Mar 23 19:45:11 1988
--- ./src/sink11mask.h	Wed Sep 23 23:38:42 1992
***************
*** 1,6 ****
  #define sink_mask_width 48
  #define sink_mask_height 48
! static char sink_mask_bits[] = {
     0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
     0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
     0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
--- 1,6 ----
  #define sink_mask_width 48
  #define sink_mask_height 48
! static unsigned char sink_mask_bits[] = {
     0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
     0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
     0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
diff -rc ../orig/emacs-18.58/src/syntax.c ./src/syntax.c
*** ../orig/emacs-18.58/src/syntax.c	Tue Jan  8 11:07:59 1991
--- ./src/syntax.c	Wed Sep 23 23:46:49 1992
***************
*** 106,112 ****
   into the code it signifies.
   This is used by modify-syntax-entry, and other things. */
  
! char syntax_spec_code[0400] =
    { 0377, 0377, 0377, 0377, 0377, 0377, 0377, 0377,
      0377, 0377, 0377, 0377, 0377, 0377, 0377, 0377,
      0377, 0377, 0377, 0377, 0377, 0377, 0377, 0377,
--- 106,112 ----
   into the code it signifies.
   This is used by modify-syntax-entry, and other things. */
  
! unsigned char syntax_spec_code[0400] =
    { 0377, 0377, 0377, 0377, 0377, 0377, 0377, 0377,
      0377, 0377, 0377, 0377, 0377, 0377, 0377, 0377,
      0377, 0377, 0377, 0377, 0377, 0377, 0377, 0377,
diff -rc ../orig/emacs-18.58/src/syntax.h ./src/syntax.h
*** ../orig/emacs-18.58/src/syntax.h	Tue Jan  8 11:08:08 1991
--- ./src/syntax.h	Wed Sep 23 23:47:41 1992
***************
*** 81,84 ****
   character signifies (as a char).  For example,
   (enum syntaxcode) syntax_spec_code['w'] is Sword. */
  
! extern char syntax_spec_code[0400];
--- 81,84 ----
   character signifies (as a char).  For example,
   (enum syntaxcode) syntax_spec_code['w'] is Sword. */
  
! extern unsigned char syntax_spec_code[0400];
diff -rc ../orig/emacs-18.58/src/config.h-dist ./src/config.h
*** ../orig/emacs-18.58/src/config.h-dist	Tue Nov 19 21:21:37 1991
--- src/config.h	Wed Sep 23 23:24:20 1992
***************
*** 23,29 ****
     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-bsd4-2.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
--- 23,29 ----
     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-usg5-4.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
***************
*** 30,36 ****
     the names of the m- files to use for them.
     See m-template.h for info on what m- files should define.
     */
! #include "m-vax.h"
  
  /* Load in the conversion definitions if this system
     needs them and the source file being compiled has not
--- 30,36 ----
     the names of the m- files to use for them.
     See m-template.h for info on what m- files should define.
     */
! #include "m-intel386.h"
  
  /* Load in the conversion definitions if this system
     needs them and the source file being compiled has not
***************
*** 45,51 ****
  
  /* Define HAVE_X_WINDOWS if you want to use the X window system.  */
  
! /* #define HAVE_X_WINDOWS */
  
  /* Define X11 if you want to use version 11 of X windows.
     Otherwise, Emacs expects to use version 10.  */
--- 45,51 ----
  
  /* Define HAVE_X_WINDOWS if you want to use the X window system.  */
  
! #define HAVE_X_WINDOWS
  
  /* Define X11 if you want to use version 11 of X windows.
     Otherwise, Emacs expects to use version 10.  */
-- 
____
\  /Dan Greening    Software Transformation   1601 Saratoga-Sunnyvale Rd, #100
 \/dgreen@sti.com   (408) 973-8081 x313       Cupertino, CA 95014