*** ./include/unixconf.h-	Wed Aug  1 15:03:11 1990
--- ./include/unixconf.h	Thu Aug  2 11:22:32 1990
***************
*** 49,57 ****
  
  /* #define RANDOM	/* if neither random/srandom nor lrand48/srand48
  			   is available from your system */
  /* #define TEXTCOLOR	/* Use System V r3.2 terminfo color support */
  
  /*
   * The next two defines are intended mainly for the Andrew File System,
   * which does not allow hard links.  If NO_FILE_LINKS is defined, lock files
--- 49,57 ----
  
  /* #define RANDOM	/* if neither random/srandom nor lrand48/srand48
  			   is available from your system */
  /* #define TEXTCOLOR	/* Use System V r3.2 terminfo color support */
+ #define SVR4		/* use for System V Release 4.0 or higher */
  
  /*
   * The next two defines are intended mainly for the Andrew File System,
   * which does not allow hard links.  If NO_FILE_LINKS is defined, lock files
***************
*** 151,157 ****
   * that have SIGTSTP.  Currently the only such system known to work is HPUX;
   * other systems will probably require tweaks to unixtty.c and ioctl.c.
   */
! #if defined(BSD) || defined(ULTRIX) || defined (HPUX)
  #define	SUSPEND		/* let ^Z suspend the game */
  #endif
  
--- 151,157 ----
   * that have SIGTSTP.  Currently the only such system known to work is HPUX;
   * other systems will probably require tweaks to unixtty.c and ioctl.c.
   */
! #if defined(BSD) || defined(ULTRIX) || defined (HPUX) || defined(SVR4)
  #define	SUSPEND		/* let ^Z suspend the game */
  #endif
  
***************
*** 204,209 ****
--- 204,210 ----
  
  #ifdef SVR4
  #define getdate getdate_
+ #define HAVE_RENAME
  #endif
  
  #endif /* UNIXCONF_H /* */
*** ./include/system.h-	Wed Aug  1 15:15:33 1990
--- ./include/system.h	Wed Aug  1 16:42:14 1990
***************
*** 126,132 ****
  E long FDECL(fork, (void));
  #endif
  
! #ifdef SYSV
  E char *memcpy();
  #endif
  #ifdef HPUX
--- 126,132 ----
  E long FDECL(fork, (void));
  #endif
  
! #if defined(SYSV) && !defined(SVR4)
  E char *memcpy();
  #endif
  #ifdef HPUX
***************
*** 200,206 ****
  #  ifdef THINKC4
  E size_t	FDECL(strlen, (char *));
  #  else
! E int	FDECL(strlen, (char *));
  #  endif /* THINKC4 */
  # endif /* HPUX */
  #endif /* MSDOS */
--- 200,206 ----
  #  ifdef THINKC4
  E size_t	FDECL(strlen, (char *));
  #  else
! E int	FDECL(strlen, (const char *));
  #  endif /* THINKC4 */
  # endif /* HPUX */
  #endif /* MSDOS */
***************
*** 222,229 ****
--- 222,231 ----
  
  #ifdef NEED_VARARGS
  # if defined(USE_STDARG) || defined(USE_VARARGS)
+ #  if !defined(SVR4)
  E int FDECL(vsprintf, (char *, const char *, va_list));
  E int FDECL(vprintf, (const char *, va_list));
+ #  endif /* SVR4 */
  # else
  #  define vprintf	printf
  #  define vsprintf	sprintf
*** ./src/makedefs.c-	Wed Aug  1 15:18:02 1990
--- ./src/makedefs.c	Wed Aug  1 15:20:55 1990
***************
*** 103,109 ****
  
  char * FDECL(tmpdup, (const char *));
  
! #if defined(SYSV) || defined(GENIX) || defined(UNIXDEBUG)
  void FDECL(rename, (char *, char *));
  #endif
  
--- 103,109 ----
  
  char * FDECL(tmpdup, (const char *));
  
! #if !defined(HAVE_RENAME) && (defined(SYSV) || defined(GENIX) || defined(UNIXDEBUG))
  void FDECL(rename, (char *, char *));
  #endif
  
***************
*** 600,606 ****
  	return buf;
  }
  
! #if defined(SYSV) || defined(GENIX) || defined(UNIXDEBUG)
  void
  rename(oldname, newname)
  char	*oldname, *newname;
--- 600,606 ----
  	return buf;
  }
  
! #if !defined(HAVE_RENAME) && (defined(SYSV) || defined(GENIX) || defined(UNIXDEBUG))
  void
  rename(oldname, newname)
  char	*oldname, *newname;
*** ./src/lev_comp.l-	Wed Aug  1 17:14:47 1990
--- ./src/lev_comp.l	Wed Aug  1 17:14:59 1990
***************
*** 22,29 ****
  int NDECL (yyinput);
  int NDECL (yywrap);
  int NDECL (yylex);
! int FDECL (yyunput, (int));
! int FDECL (yyoutput, (int));
  #endif
  
  #ifdef MSDOS
--- 22,39 ----
  int NDECL (yyinput);
  int NDECL (yywrap);
  int NDECL (yylex);
! #if defined(__cplusplus) || defined(__STDC__)
! void
! #else
! int
! #endif
!  FDECL (yyunput, (int));
! #if defined(__cplusplus) || defined(__STDC__)
! void
! #else
! int
! #endif
!  FDECL (yyoutput, (int));
  #endif
  
  #ifdef MSDOS
*** ./src/ioctl.c-	Thu Aug  2 11:25:04 1990
--- ./src/ioctl.c	Tue Aug  7 16:50:57 1990
***************
*** 23,31 ****
  #else
  #include	<termio.h>	/* also includes part of <sgtty.h> */
  struct termio termio;
- # ifdef AMIX
- #include <sys/ioctl.h>
- # endif /* AMIX */
  #endif
  
  void
--- 23,28 ----
***************
*** 36,42 ****
  #else
  	(void) ioctl(fileno(stdin), (int) TCGETA, &termio);
  #endif
! #if defined(TIOCGWINSZ) && (defined(BSD) || defined(ULTRIX))
  	{
  		/*
  		 * ttysize is found on Suns and BSD
--- 33,39 ----
  #else
  	(void) ioctl(fileno(stdin), (int) TCGETA, &termio);
  #endif
! #if defined(TIOCGWINSZ) && (defined(BSD) || defined(ULTRIX) || defined(SVR4))
  	{
  		/*
  		 * ttysize is found on Suns and BSD
