Index: misc/ssh/.cvsignore
diff -c /dev/null misc/ssh/.cvsignore:1.2
*** /dev/null	Mon May 19 02:40:16 1997
--- misc/ssh/.cvsignore	Sun May 18 20:44:39 1997
***************
*** 0 ****
--- 1,19 ----
+ Makefile
+ confdefs.h
+ config.cache
+ config.h
+ config.h.in
+ config.log
+ config.status
+ configure
+ make-ssh-known-hosts
+ make-ssh-known-hosts.1
+ scp
+ ssh
+ ssh-add
+ ssh-agent
+ ssh-askpass
+ ssh-keygen
+ ssh.1
+ sshd
+ sshd.8
Index: misc/ssh/ChangeLog
diff -c misc/ssh/ChangeLog:1.1.1.2 misc/ssh/ChangeLog:1.3
*** misc/ssh/ChangeLog:1.1.1.2	Thu May  1 13:29:51 1997
--- misc/ssh/ChangeLog	Sun May 18 20:44:41 1997
***************
*** 1,3 ****
--- 1,30 ----
+ Sun Dec  8 17:33:04 1996  Greg A. Woods  <woods@most.weird.com>
+ 
+ 	* newchannels.c (auth_input_request_forwarding): don't take the
+ 	address of a function.
+ 
+ 	* includes.h: declare strerror(), getenv(), and strtok() if
+ 	!STDC_HEADERS.
+ 	- turn off HAVE_SYS_IOCTL_H for all sun's.
+ 	- handle HAVE_MEMORY_H and HAVE_MALLOC_H.
+ 
+ 	* configure config.h.in: regenerated with autoconf-2.12.
+ 
+ 	* configure.in (host): support m68k.*-*-sunos4* by adding the
+ 	correct floating point flags to CFLAGS and LDFLAGS.
+ 	(--with-unproto): add support for setting the right CFLAGS to use
+ 	unproto.
+ 	(AC_PREREQ): use autoconf-2.12.
+ 	(CFLAGS): force -I/usr/local/include ala what's done with LIBS.
+ 	(--with-libwrap): add "-I`dirname $withval`/../include" to CFLAGS
+ 	[though this should probably be a prefix now ala unproto].
+ 	(AC_REPLACE_FUNCS): need strtok().
+ 	(AC_CHECK_HEADERS): memory.h and malloc.h.
+ 
+ 	* config.sub (basic_machine): add support for various varieties of
+ 	floating support on Sun3s (for when X11 libraries are compiled
+ 	with -f68881, for example).
+ 
  Wed Apr 23 02:56:20 1997  Tero Kivinen  <kivinen@ssh.fi>
  
  	* scp: added -S flag. It can be used to specify path to ssh
Index: misc/ssh/Makefile.in
diff -c misc/ssh/Makefile.in:1.1.1.2 misc/ssh/Makefile.in:1.2
*** misc/ssh/Makefile.in:1.1.1.2	Thu May  1 13:28:42 1997
--- misc/ssh/Makefile.in	Sun May 18 20:44:44 1997
***************
*** 8,15 ****
  #
  # Created: Wed Mar 22 17:37:49 1995 ylo
  #
! # $Id: Makefile.in,v 1.33 1997/04/22 23:56:10 kivinen Exp $
! # $Log: Makefile.in,v $
  # Revision 1.33  1997/04/22 23:56:10  kivinen
  # 	Added WARPLIBS.
  #
--- 8,19 ----
  #
  # Created: Wed Mar 22 17:37:49 1995 ylo
  #
! # Makefile.in,v 1.2 1997/05/19 00:44:44 woods Exp
! # Makefile.in,v
! # Revision 1.2  1997/05/19 00:44:44  woods
! # - merge local fixes with 1.2.20.
! # - remove all intermediate files of automake and autoconf et al.
! #
  # Revision 1.33  1997/04/22 23:56:10  kivinen
  # 	Added WARPLIBS.
  #
***************
*** 224,229 ****
--- 228,234 ----
  RSAREFDEP	= @RSAREFDEP@
  
  WRAPLIBS	= @WRAPLIBS@
+ WRAPINCL	= @WRAPINCL@
  
  SSH_INSTALL_MODE= @SSHINSTALLMODE@
  
***************
*** 336,372 ****
  	$(CC) -o rfc-pg rfc-pg.o
  
  .c.o:
! 	$(CC) -c -I. $(KERBEROS_INCS) -I$(srcdir)/$(GMPDIR) -I$(srcdir)/$(ZLIBDIR) $(DEFS) -DHOST_KEY_FILE=\"$(HOST_KEY_FILE)\" -DHOST_CONFIG_FILE=\"$(HOST_CONFIG_FILE)\" -DSERVER_CONFIG_FILE=\"$(SERVER_CONFIG_FILE)\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DETCDIR=\"$(etcdir)\" -DPIDDIR=\"$(piddir)\" -DSSH_BINDIR=\"$(bindir)\" -DTIS_MAP_FILE=\"$(TIS_MAP_FILE)\" $(CFLAGS) $(X_CFLAGS) $<
  
  sshd: $(SSHD_OBJS) $(GMPDEP) $(RSAREFDEP) $(ZLIBDEP)
  	-rm -f sshd
! 	$(CC) $(LDFLAGS) -o sshd $(SSHD_OBJS) \
  		$(KERBEROS_LIBS) $(GMPLIBS) $(ZLIBLIBS) $(WRAPLIBS) $(LIBS)
  
  ssh: $(SSH_OBJS) $(GMPDEP) $(RSAREFDEP) $(ZLIBDEP)
  	-rm -f ssh
! 	$(CC) $(LDFLAGS) -o ssh $(SSH_OBJS) \
  		$(KERBEROS_LIBS) $(GMPLIBS) $(ZLIBLIBS) $(WRAPLIBS) $(LIBS)
  
  ssh-keygen: $(KEYGEN_OBJS) $(GMPDEP) $(RSAREFDEP)
  	-rm -f ssh-keygen
! 	$(CC) $(LDFLAGS) -o ssh-keygen $(KEYGEN_OBJS) $(GMPLIBS) $(LIBS)
  
  ssh-agent: $(AGENT_OBJS) $(GMPDEP) $(RSAREFDEP)
  	-rm -f ssh-agent
! 	$(CC) $(LDFLAGS) -o ssh-agent $(AGENT_OBJS) $(GMPLIBS) $(LIBS)
  
  ssh-add: $(ADD_OBJS) $(GMPDEP) $(RSAREFDEP)
  	-rm -f ssh-add
! 	$(CC) $(LDFLAGS) -o ssh-add $(ADD_OBJS) $(GMPLIBS) $(LIBS)
  
  scp: $(SCP_OBJS) $(LIBOBJS) $(RSAREFDEP)
  	-rm -f scp
! 	$(CC) $(LDFLAGS) -o scp $(SCP_OBJS) $(LIBOBJS) $(LIBS)
  
  ssh-askpass: $(SSH_ASKPASS_OBJS)
  	-rm -f ssh-askpass
! 	$(CC) $(LDFLAGS) -o ssh-askpass $(SSH_ASKPASS_OBJS) $(XLIBS)
  
  make-ssh-known-hosts: make-ssh-known-hosts.pl
  	-rm -f make-ssh-known-hosts
--- 341,377 ----
  	$(CC) -o rfc-pg rfc-pg.o
  
  .c.o:
! 	$(CC) -c -I. $(KERBEROS_INCS) $(WRAPINCL) -I$(srcdir)/$(GMPDIR) -I$(srcdir)/$(ZLIBDIR) $(DEFS) -DHOST_KEY_FILE=\"$(HOST_KEY_FILE)\" -DHOST_CONFIG_FILE=\"$(HOST_CONFIG_FILE)\" -DSERVER_CONFIG_FILE=\"$(SERVER_CONFIG_FILE)\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DETCDIR=\"$(etcdir)\" -DPIDDIR=\"$(piddir)\" -DSSH_BINDIR=\"$(bindir)\" -DTIS_MAP_FILE=\"$(TIS_MAP_FILE)\" $(CFLAGS) $(X_CFLAGS) $(OPTIM) $(DEBUG) $<
  
  sshd: $(SSHD_OBJS) $(GMPDEP) $(RSAREFDEP) $(ZLIBDEP)
  	-rm -f sshd
! 	$(CC) $(LDFLAGS) $(OPTIM) -o sshd $(SSHD_OBJS) \
  		$(KERBEROS_LIBS) $(GMPLIBS) $(ZLIBLIBS) $(WRAPLIBS) $(LIBS)
  
  ssh: $(SSH_OBJS) $(GMPDEP) $(RSAREFDEP) $(ZLIBDEP)
  	-rm -f ssh
! 	$(CC) $(LDFLAGS) $(OPTIM) -o ssh $(SSH_OBJS) \
  		$(KERBEROS_LIBS) $(GMPLIBS) $(ZLIBLIBS) $(WRAPLIBS) $(LIBS)
  
  ssh-keygen: $(KEYGEN_OBJS) $(GMPDEP) $(RSAREFDEP)
  	-rm -f ssh-keygen
! 	$(CC) $(LDFLAGS) $(OPTIM) -o ssh-keygen $(KEYGEN_OBJS) $(GMPLIBS) $(LIBS)
  
  ssh-agent: $(AGENT_OBJS) $(GMPDEP) $(RSAREFDEP)
  	-rm -f ssh-agent
! 	$(CC) $(LDFLAGS) $(OPTIM) -o ssh-agent $(AGENT_OBJS) $(GMPLIBS) $(LIBS)
  
  ssh-add: $(ADD_OBJS) $(GMPDEP) $(RSAREFDEP)
  	-rm -f ssh-add
! 	$(CC) $(LDFLAGS) $(OPTIM) -o ssh-add $(ADD_OBJS) $(GMPLIBS) $(LIBS)
  
  scp: $(SCP_OBJS) $(LIBOBJS) $(RSAREFDEP)
  	-rm -f scp
! 	$(CC) $(LDFLAGS) $(OPTIM) -o scp $(SCP_OBJS) $(LIBOBJS) $(LIBS)
  
  ssh-askpass: $(SSH_ASKPASS_OBJS)
  	-rm -f ssh-askpass
! 	$(CC) $(LDFLAGS) $(OPTIM) -o ssh-askpass $(SSH_ASKPASS_OBJS) $(XLIBS)
  
  make-ssh-known-hosts: make-ssh-known-hosts.pl
  	-rm -f make-ssh-known-hosts
***************
*** 376,382 ****
  GMP_COPY_SOURCES = mpz_gcd.c mpz_powm.c mpz_pow_ui.c mpz_add.c mpz_sub.c \
  		mpz_mul.c mpz_cmp.c mpz_sqrtrem.c
  $(GMPDIR)/libgmp.a:
! 	cd $(GMPDIR); $(MAKE)
  
  $(ZLIBDEP):
  	-if test '!' -d $(ZLIBDIR); then \
--- 381,387 ----
  GMP_COPY_SOURCES = mpz_gcd.c mpz_powm.c mpz_pow_ui.c mpz_add.c mpz_sub.c \
  		mpz_mul.c mpz_cmp.c mpz_sqrtrem.c
  $(GMPDIR)/libgmp.a:
! 	cd $(GMPDIR); $(MAKE) CFLAGS="$(OPTIM) $(DEBUG)" LDFLAGS="$(OPTIM)"
  
  $(ZLIBDEP):
  	-if test '!' -d $(ZLIBDIR); then \
***************
*** 384,390 ****
  	  cp $(srcdir)/$(ZLIBDIR)/Makefile $(ZLIBDIR); \
  	fi
  	cd $(ZLIBDIR); $(MAKE) VPATH=$(srcdir)/$(ZLIBDIR):../$(srcdir)/$(ZLIBDIR) \
! 	  CC="$(CC)" CFLAGS="$(CFLAGS) -I. -I$(srcdir)/$(ZLIBDIR) \
  	    -I../$(srcdir)/$(GMPDIR)" RANLIB="$(RANLIB)" libz.a
  
  $(RSAREFSRCDIR)/librsaref.a:
--- 389,395 ----
  	  cp $(srcdir)/$(ZLIBDIR)/Makefile $(ZLIBDIR); \
  	fi
  	cd $(ZLIBDIR); $(MAKE) VPATH=$(srcdir)/$(ZLIBDIR):../$(srcdir)/$(ZLIBDIR) \
! 	  CC="$(CC)" CFLAGS="$(CFLAGS) $(OPTIM) $(DEBUG) -I. -I$(srcdir)/$(ZLIBDIR) \
  	    -I../$(srcdir)/$(GMPDIR)" RANLIB="$(RANLIB)" libz.a
  
  $(RSAREFSRCDIR)/librsaref.a:
***************
*** 397,403 ****
  
  # Note: this target is used in a recursive make, with VPATH pointing to source
  librsaref.a:
! 	for i in $(RSAREFSRCS); do $(CC) $(CFLAGS) -c $$i; done
  	$(AR) rc librsaref.a $(RSAREFSRCS:.c=.o)
  	$(RANLIB) librsaref.a
  
--- 402,408 ----
  
  # Note: this target is used in a recursive make, with VPATH pointing to source
  librsaref.a:
! 	for i in $(RSAREFSRCS); do $(CC) $(CFLAGS) $(OPTIM) $(DEBUG) -c $$i; done
  	$(AR) rc librsaref.a $(RSAREFSRCS:.c=.o)
  	$(RANLIB) librsaref.a
  
Index: misc/ssh/config.sub
diff -c misc/ssh/config.sub:1.1.1.1 misc/ssh/config.sub:1.2
*** misc/ssh/config.sub:1.1.1.1	Fri Nov  1 14:43:50 1996
--- misc/ssh/config.sub	Sun Dec  8 22:02:49 1996
***************
*** 661,666 ****
--- 661,675 ----
  	sun3 | sun3-*)
  		basic_machine=m68k-sun
  		;;
+ 	sun3.68881 | sun3.68881-*)
+ 		basic_machine=m68k.68881-sun
+ 		;;
+ 	sun3.soft | sun3.soft-*)
+ 		basic_machine=m68k.soft-sun
+ 		;;
+ 	sun3.fpa | sun3.fpa-*)
+ 		basic_machine=m68k.fpa-sun
+ 		;;
  	sun4)
  		basic_machine=sparc-sun
  		;;
Index: misc/ssh/configure.in
diff -c misc/ssh/configure.in:1.1.1.2 misc/ssh/configure.in:1.3
*** misc/ssh/configure.in:1.1.1.2	Thu May  1 13:28:50 1997
--- misc/ssh/configure.in	Sun May 18 20:44:49 1997
***************
*** 8,15 ****
  #
  # Created: Wed Mar 22 18:02:48 1995 ylo
  #
! # $Id: configure.in,v 1.46 1997/04/22 23:59:59 kivinen Exp $
! # $Log: configure.in,v $
  # Revision 1.46  1997/04/22 23:59:59  kivinen
  # 	Fixed SIGINFO check.
  # 	Added check that getpseudotty function exists before using.
--- 8,19 ----
  #
  # Created: Wed Mar 22 18:02:48 1995 ylo
  #
! # configure.in,v 1.3 1997/05/19 00:44:49 woods Exp
! # configure.in,v
! # Revision 1.3  1997/05/19 00:44:49  woods
! # - merge local fixes with 1.2.20.
! # - remove all intermediate files of automake and autoconf et al.
! #
  # Revision 1.46  1997/04/22 23:59:59  kivinen
  # 	Fixed SIGINFO check.
  # 	Added check that getpseudotty function exists before using.
***************
*** 332,341 ****
  
  AC_INIT(sshd.c)
  AC_CONFIG_HEADER(config.h)
! AC_PREREQ(2.10)
  
! # So many systems seem to need this that it is better do it here automatically.
  LIBS="-L/usr/local/lib $LIBS"
  
  AC_CANONICAL_HOST
  AC_MSG_CHECKING(cached information)
--- 336,346 ----
  
  AC_INIT(sshd.c)
  AC_CONFIG_HEADER(config.h)
! AC_PREREQ(2.12)
  
! # So many systems seem to need these that it is better do them here automatically.
  LIBS="-L/usr/local/lib $LIBS"
+ CFLAGS="$CFLAGS -I/usr/local/include"
  
  AC_CANONICAL_HOST
  AC_MSG_CHECKING(cached information)
***************
*** 355,361 ****
  AC_DEFINE_UNQUOTED(HOSTTYPE, "$host")
  
  case "$host" in
!   *-*-sunos4.1.1*)
      os_sunos=yes
      # Tim Adam <tma@osa.com.au> says speed_t is defined in stdtypes.h
      AC_DEFINE(SPEED_T_IN_STDTYPES_H)
--- 360,384 ----
  AC_DEFINE_UNQUOTED(HOSTTYPE, "$host")
  
  case "$host" in
!   m68k.68881-*-sunos4*)
!     os_sunos=yes
!     CFLAGS="$CFLAGS -f68881"
!     LDFLAGS="$LDFLAGS -f68881"
!     AC_DEFINE(SPEED_T_IN_STDTYPES_H)
!     ;;
!   m68k.soft-*-sunos4*)
!     os_sunos=yes
!     CFLAGS="$CFLAGS -fsoft"
!     LDFLAGS="$LDFLAGS -fsoft"
!     AC_DEFINE(SPEED_T_IN_STDTYPES_H)
!     ;;
!   m68k.fpa-*-sunos4*)
!     os_sunos=yes
!     CFLAGS="$CFLAGS -ffpa"
!     LDFLAGS="$LDFLAGS -ffpa"
!     AC_DEFINE(SPEED_T_IN_STDTYPES_H)
!     ;;
!   *-*-sunos4*)
      os_sunos=yes
      # Tim Adam <tma@osa.com.au> says speed_t is defined in stdtypes.h
      AC_DEFINE(SPEED_T_IN_STDTYPES_H)
***************
*** 614,631 ****
      ;;
  esac
  
! export CFLAGS CC
  
  # Socket pairs appear to be broken on several systems.  I don't know exactly
  # where, so I'll use pipes everywhere for now.
  AC_DEFINE(USE_PIPES)
  
  AC_MSG_CHECKING([that the compiler works])
  AC_TRY_RUN([ main(int ac, char **av) { return 0; } ],
      AC_MSG_RESULT(yes),
      AC_MSG_RESULT(no)
!     AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.),
!     AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.))
  
  if test -z "$no_pipe"; then
  if test -n "$GCC"; then
--- 637,712 ----
      ;;
  esac
  
! export CFLAGS CC LDFLAGS
  
  # Socket pairs appear to be broken on several systems.  I don't know exactly
  # where, so I'll use pipes everywhere for now.
  AC_DEFINE(USE_PIPES)
  
+ # We assume a full install of unproto was done with the custom cpp.
+ #
+ #    SunOS 4.x:  cc -Qpath directory_with_alternate_cpp ...
+ #
+ #    Ultrix 4.x: cc -tp -hdirectory_with_alternate_cpp -B ...
+ #
+ #    M88 SysV.3: cc -Yp,directory_with_alternate_cpp ...
+ #
+ AC_MSG_CHECKING(if we are to use unproto)
+ AC_ARG_WITH(unproto,
+ [  --with-unproto[=prefix] Use unproto to compile with a K&R C Compiler.],
+ [  case "$withval" in
+   no)
+     AC_MSG_RESULT(no)
+     ;;
+   yes)
+     AC_MSG_RESULT(yes)
+     AC_MSG_RESULT(Assuming unproto is in /usr/local/.)
+     case "$host" in
+     *-*-sunos4*)
+       CFLAGS="$CFLAGS -Qpath /usr/local/lib/unproto -I/usr/local/include/unproto -Dconst= -Dvolatile="
+       ;;
+     *-dec-ultrix4*)
+       CFLAGS="$CFLAGS -tp -h/usr/local/lib/unproto -B -I/usr/local/include/unproto -Dconst= -Dvolatile="
+       ;;
+     *)
+       CFLAGS="$CFLAGS -Yp,/usr/local/lib/unproto -B -I/usr/local/include/unproto -Dconst= -Dvolatile="
+       ;;
+     esac
+     ;;
+   *)
+     AC_MSG_RESULT(yes)
+     if test '!' -f $withval/lib/unproto/cpp; then
+       AC_ERROR(Unproto cpp not found in $withval/lib/unproto: please supply the correct path prefix.)
+     fi
+     if test '!' -f $withval/include/unproto/stdarg.h; then
+       AC_ERROR(Unproto headers not found in $withval/include/unproto: please supply the correct path prefix.)
+     fi
+     case "$host" in
+     *-*-sunos4*)
+       CFLAGS="$CFLAGS -Qpath $withval/lib/unproto -I$withval/include/unproto -Dconst= -Dvolatile="
+       ;;
+     *-dec-ultrix4*)
+       CFLAGS="$CFLAGS -tp -h$withval/lib/unproto -B -I$withval/include/unproto -Dconst= -Dvolatile="
+       ;;
+     *)
+       CFLAGS="$CFLAGS -Yp,$withval/lib/unproto -B -I$withval/include/unproto -Dconst= -Dvolatile="
+       ;;
+     esac
+     ;;
+   esac ],
+   AC_MSG_RESULT(no)
+ )
+ 
+ 
  AC_MSG_CHECKING([that the compiler works])
+ 
+ AC_PROG_CC
+ 
  AC_TRY_RUN([ main(int ac, char **av) { return 0; } ],
      AC_MSG_RESULT(yes),
      AC_MSG_RESULT(no)
!     AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC or supply --with-unproto.),
!     AC_MSG_ERROR(Could not cross-compile even a trivial ANSI C program - check CC or supply --with-unproto.))
  
  if test -z "$no_pipe"; then
  if test -n "$GCC"; then
***************
*** 671,677 ****
  
  AC_HEADER_STDC
  AC_HEADER_SYS_WAIT
! AC_CHECK_HEADERS(unistd.h rusage.h sys/time.h lastlog.h utmp.h shadow.h)
  AC_CHECK_HEADERS(sgtty.h sys/select.h sys/ioctl.h machine/endian.h)
  AC_CHECK_HEADERS(paths.h usersec.h utime.h netinet/in_systm.h netinet/in_system.h netinet/ip.h netinet/tcp.h ulimit.h)
  AC_HEADER_TIME
--- 752,758 ----
  
  AC_HEADER_STDC
  AC_HEADER_SYS_WAIT
! AC_CHECK_HEADERS(unistd.h memory.h malloc.h rusage.h sys/time.h lastlog.h utmp.h shadow.h)
  AC_CHECK_HEADERS(sgtty.h sys/select.h sys/ioctl.h machine/endian.h)
  AC_CHECK_HEADERS(paths.h usersec.h utime.h netinet/in_systm.h netinet/in_system.h netinet/ip.h netinet/tcp.h ulimit.h)
  AC_HEADER_TIME
***************
*** 733,739 ****
  AC_CHECK_FUNCS(gethostname getdtablesize umask innetgr initgroups setpgrp)
  AC_CHECK_FUNCS(setpgid daemon waitpid)
  
! AC_REPLACE_FUNCS(strerror memmove remove random putenv crypt socketpair)
  
  AC_PROG_LN_S
  AC_PROG_INSTALL
--- 814,820 ----
  AC_CHECK_FUNCS(gethostname getdtablesize umask innetgr initgroups setpgrp)
  AC_CHECK_FUNCS(setpgid daemon waitpid)
  
! AC_REPLACE_FUNCS(strerror memmove strtok remove random putenv crypt socketpair)
  
  AC_PROG_LN_S
  AC_PROG_INSTALL
***************
*** 1248,1270 ****
      AC_MSG_RESULT(yes)
      AC_DEFINE(LIBWRAP)
      if test -d "$withval"; then
!     	WRAPLIBS="-L$withval -lwrap"
      else
  	WRAPLIBS="$withval"
      fi
      OLDLIBS="$LIBS"
      LIBS="$WRAPLIBS $LIBS"
!     AC_TRY_LINK([ int allow_severity; int deny_severity; ],
!                 [ hosts_access(); ],
  		[],
  		[ AC_MSG_ERROR(Could not find the $withval library.  You must first install tcp_wrappers.) ])
      LIBS="$OLDLIBS"
      ;;
    esac ],
    AC_MSG_RESULT(no)
  )
  
  AC_SUBST(WRAPLIBS)
  
  AC_MSG_CHECKING(whether to support SOCKS)
  AC_ARG_WITH(socks,
--- 1329,1360 ----
      AC_MSG_RESULT(yes)
      AC_DEFINE(LIBWRAP)
      if test -d "$withval"; then
! 	WRAPLIBS="-L$withval -lwrap"
! 	WRAPINCL="-I`dirname $withval`/include"
      else
  	WRAPLIBS="$withval"
+ 	WRAPINCL="-I`dirname $withval`"
      fi
      OLDLIBS="$LIBS"
      LIBS="$WRAPLIBS $LIBS"
!     OLDCFLAGS="$CFLAGS"
!     CFLAGS="$CFLAGS $WRAPINCL"
!     AC_CHECK_HEADER(tcpd.h,
! 		    [],
! 		    [ AC_MSG_ERROR(Could not find tcpd.h for $withval library.  You must first install tcp_wrappers.) ])
!     AC_TRY_LINK([#include <tcpd.h>],
!                 [ extern int allow_severity; extern int deny_severity; hosts_access(); ],
  		[],
  		[ AC_MSG_ERROR(Could not find the $withval library.  You must first install tcp_wrappers.) ])
      LIBS="$OLDLIBS"
+     CFLAGS="$OLDCFLAGS"
      ;;
    esac ],
    AC_MSG_RESULT(no)
  )
  
  AC_SUBST(WRAPLIBS)
+ AC_SUBST(WRAPINCL)
  
  AC_MSG_CHECKING(whether to support SOCKS)
  AC_ARG_WITH(socks,
Index: misc/ssh/includes.h
diff -c misc/ssh/includes.h:1.1.1.2 misc/ssh/includes.h:1.3
*** misc/ssh/includes.h:1.1.1.2	Thu May  1 13:33:12 1997
--- misc/ssh/includes.h	Sun May 18 20:44:52 1997
***************
*** 14,21 ****
  */
  
  /*
!  * $Id: includes.h,v 1.9 1997/03/19 18:02:19 kivinen Exp $
!  * $Log: includes.h,v $
   * Revision 1.9  1997/03/19 18:02:19  kivinen
   * 	Added SECURE_RPC, SECURE_NFS and NIS_PLUS support from Andy
   * 	Polyakov <appro@fy.chalmers.se>.
--- 14,25 ----
  */
  
  /*
!  * includes.h,v 1.3 1997/05/19 00:44:52 woods Exp
!  * includes.h,v
!  * Revision 1.3  1997/05/19 00:44:52  woods
!  * - merge local fixes with 1.2.20.
!  * - remove all intermediate files of automake and autoconf et al.
!  *
   * Revision 1.9  1997/03/19 18:02:19  kivinen
   * 	Added SECURE_RPC, SECURE_NFS and NIS_PLUS support from Andy
   * 	Polyakov <appro@fy.chalmers.se>.
***************
*** 149,160 ****
  #include <assert.h>
  #include <signal.h>
  
! #ifdef sparc
  #undef HAVE_SYS_IOCTL_H
  #endif
  
  #ifdef HAVE_SYS_IOCTL_H
! #include <sys/ioctl.h>
  #endif /* HAVE_SYS_IOCTL_H */
  
  #ifdef HAVE_TERMIOS_H
--- 153,164 ----
  #include <assert.h>
  #include <signal.h>
  
! #ifdef sun
  #undef HAVE_SYS_IOCTL_H
  #endif
  
  #ifdef HAVE_SYS_IOCTL_H
! # include <sys/ioctl.h>
  #endif /* HAVE_SYS_IOCTL_H */
  
  #ifdef HAVE_TERMIOS_H
***************
*** 173,189 ****
  
  #ifdef STDC_HEADERS
  #include <stdlib.h>
- #include <string.h>
  #include <stdarg.h>
  #else /* STDC_HEADERS */
  /* stdarg.h is present almost everywhere, and comes with gcc; I am too lazy
     to make things work with both it and varargs. */
  #include <stdarg.h>
  #ifndef HAVE_STRCHR
  #define strchr index
  #define strrchr rindex
  #endif
! char *strchr(), *strrchr();
  #ifndef HAVE_MEMCPY
  #define memcpy(d, s, n) bcopy((s), (d), (n))
  #define memmove(d, s, n) bcopy((s), (d), (n))
--- 177,196 ----
  
  #ifdef STDC_HEADERS
  #include <stdlib.h>
  #include <stdarg.h>
  #else /* STDC_HEADERS */
  /* stdarg.h is present almost everywhere, and comes with gcc; I am too lazy
     to make things work with both it and varargs. */
  #include <stdarg.h>
+ /* STDC_HEADERS now implies float.h, which is not supplied by the default
+    unproto distribution, but we need at least these stdlib.h declarations */
+ char *strerror();
+ char *getenv();
  #ifndef HAVE_STRCHR
  #define strchr index
  #define strrchr rindex
  #endif
! char *strchr(), *strrchr(), *strtok();
  #ifndef HAVE_MEMCPY
  #define memcpy(d, s, n) bcopy((s), (d), (n))
  #define memmove(d, s, n) bcopy((s), (d), (n))
***************
*** 191,196 ****
--- 198,211 ----
  #define memcmp(a, b, n) bcmp((a), (b), (n))
  #endif
  #endif /* STDC_HEADERS */
+ 
+ #ifdef HAVE_MEMORY_H
+ # include <memory.h>
+ #endif
+ 
+ #ifdef HAVE_MALLOC_H
+ # include <malloc.h>
+ #endif
  
  #include <sys/socket.h>
  #include <netinet/in.h>
Index: misc/ssh/newchannels.c
diff -c misc/ssh/newchannels.c:1.1.1.2 misc/ssh/newchannels.c:1.3
*** misc/ssh/newchannels.c:1.1.1.2	Thu May  1 13:31:24 1997
--- misc/ssh/newchannels.c	Sun May 18 20:44:55 1997
***************
*** 16,23 ****
  */
  
  /*
!  * $Id: newchannels.c,v 1.37 1997/04/17 04:01:22 kivinen Exp $
!  * $Log: newchannels.c,v $
   * Revision 1.37  1997/04/17 04:01:22  kivinen
   * 	Removed extra port variable. Added return -1 to
   * 	channel_allocate to get rid of warning.
--- 16,27 ----
  */
  
  /*
!  * newchannels.c,v 1.3 1997/05/19 00:44:55 woods Exp
!  * newchannels.c,v
!  * Revision 1.3  1997/05/19 00:44:55  woods
!  * - merge local fixes with 1.2.20.
!  * - remove all intermediate files of automake and autoconf et al.
!  *
   * Revision 1.37  1997/04/17 04:01:22  kivinen
   * 	Removed extra port variable. Added return -1 to
   * 	channel_allocate to get rid of warning.
***************
*** 2013,2019 ****
  	  SSH_AGENT_SOCKET, (int)getpid());
    
    /* Register the cleanup function before making the directory */
!   fatal_add_cleanup(&auth_delete_socket, NULL);
  
    /* Stat parent dir */
    last_dir = strrchr(channel_forwarded_auth_socket_dir_name, '/');
--- 2017,2023 ----
  	  SSH_AGENT_SOCKET, (int)getpid());
    
    /* Register the cleanup function before making the directory */
!   fatal_add_cleanup(auth_delete_socket, NULL);
  
    /* Stat parent dir */
    last_dir = strrchr(channel_forwarded_auth_socket_dir_name, '/');
Index: misc/ssh/strtok.c
diff -c /dev/null misc/ssh/strtok.c:1.1
*** /dev/null	Mon May 19 02:41:26 1997
--- misc/ssh/strtok.c	Sun Dec  8 22:31:27 1996
***************
*** 0 ****
--- 1,90 ----
+ /*
+  * Copyright (c) 1988 Regents of the University of California.
+  * All rights reserved.
+  *
+  * Redistribution and use in source and binary forms, with or without
+  * modification, are permitted provided that the following conditions
+  * are met:
+  * 1. Redistributions of source code must retain the above copyright
+  *    notice, this list of conditions and the following disclaimer.
+  * 2. Redistributions in binary form must reproduce the above copyright
+  *    notice, this list of conditions and the following disclaimer in the
+  *    documentation and/or other materials provided with the distribution.
+  * 3. All advertising materials mentioning features or use of this software
+  *    must display the following acknowledgement:
+  *	This product includes software developed by the University of
+  *	California, Berkeley and its contributors.
+  * 4. Neither the name of the University nor the names of its contributors
+  *    may be used to endorse or promote products derived from this software
+  *    without specific prior written permission.
+  *
+  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+  * SUCH DAMAGE.
+  */
+ 
+ #if defined(LIBC_SCCS) && !defined(lint)
+ /*static char *sccsid = "from: @(#)strtok.c	5.8 (Berkeley) 2/24/91";*/
+ static char *rcsid = "strtok.c,v 1.1 1996/12/09 03:31:27 woods Exp";
+ #endif /* LIBC_SCCS and not lint */
+ 
+ #include <string.h>
+ 
+ char *
+ strtok(s, delim)
+ 	register char *s;
+ 	register const char *delim;
+ {
+ 	register char *spanp;
+ 	register int c, sc;
+ 	char *tok;
+ 	static char *last;
+ 
+ 
+ 	if (s == NULL && (s = last) == NULL)
+ 		return (NULL);
+ 
+ 	/*
+ 	 * Skip (span) leading delimiters (s += strspn(s, delim), sort of).
+ 	 */
+ cont:
+ 	c = *s++;
+ 	for (spanp = (char *)delim; (sc = *spanp++) != 0;) {
+ 		if (c == sc)
+ 			goto cont;
+ 	}
+ 
+ 	if (c == 0) {		/* no non-delimiter characters */
+ 		last = NULL;
+ 		return (NULL);
+ 	}
+ 	tok = s - 1;
+ 
+ 	/*
+ 	 * Scan token (scan for delimiters: s += strcspn(s, delim), sort of).
+ 	 * Note that delim must have one NUL; we stop if we see that, too.
+ 	 */
+ 	for (;;) {
+ 		c = *s++;
+ 		spanp = (char *)delim;
+ 		do {
+ 			if ((sc = *spanp++) == c) {
+ 				if (c == 0)
+ 					s = NULL;
+ 				else
+ 					s[-1] = 0;
+ 				last = s;
+ 				return (tok);
+ 			}
+ 		} while (sc != 0);
+ 	}
+ 	/* NOTREACHED */
+ }
Index: misc/ssh/gmp-2.0.2-ssh-2/.cvsignore
diff -c /dev/null misc/ssh/gmp-2.0.2-ssh-2/.cvsignore:1.2
*** /dev/null	Mon May 19 02:41:28 1997
--- misc/ssh/gmp-2.0.2-ssh-2/.cvsignore	Sun May 18 20:45:14 1997
***************
*** 0 ****
--- 1,8 ----
+ Makefile
+ Makefile.in
+ aclocal.m4
+ config.h.in
+ config.log
+ config.status
+ configure
+ gmp.info*
Index: misc/ssh/gmp-2.0.2-ssh-2/ChangeLog
diff -c misc/ssh/gmp-2.0.2-ssh-2/ChangeLog:1.1.1.1 misc/ssh/gmp-2.0.2-ssh-2/ChangeLog:1.2
*** misc/ssh/gmp-2.0.2-ssh-2/ChangeLog:1.1.1.1	Fri Nov  1 14:44:03 1996
--- misc/ssh/gmp-2.0.2-ssh-2/ChangeLog	Sun Dec  8 22:19:39 1996
***************
*** 1,3 ****
--- 1,11 ----
+ Sun Dec  8 12:25:47 1996  Greg A. Woods  <woods@most.weird.com>
+ 
+ 	* configure: regenerated with autoconf-2.12.
+ 
+ 	* config.sub (basic_machine): add support for various varieties of
+ 	floating support on Sun3s (for when X11 libraries are compiled
+ 	with -f68881, for example).
+ 
  Thu Jun  6 19:00:53 1996  Torbjorn Granlund  <tege@noisy.tmg.se>
  
  	* Version 2.0.2 released.
Index: misc/ssh/gmp-2.0.2-ssh-2/Makefile.am
diff -c misc/ssh/gmp-2.0.2-ssh-2/Makefile.am:1.1.1.2 misc/ssh/gmp-2.0.2-ssh-2/Makefile.am:1.2
*** misc/ssh/gmp-2.0.2-ssh-2/Makefile.am:1.1.1.2	Thu May  1 13:33:57 1997
--- misc/ssh/gmp-2.0.2-ssh-2/Makefile.am	Sun May 18 20:45:16 1997
***************
*** 23,28 ****
--- 23,35 ----
  
  SUBDIRS = mpn mpz mpf mpq mpbsd demos
  
+ FLAGS_TO_PASS = \
+ 	'CC=$(CC)' \
+ 	'CFLAGS=$(CFLAGS)' \
+ 	'LDFLAGS=$(LDFLAGS)'
+ 
+ MAKE += $(FLAGS_TO_PASS)
+ 
  lib_LIBRARIES = libgmp.a libmp.a
  info_TEXINFOS = gmp.texi
  include_HEADERS = gmp.h mp.h
Index: misc/ssh/gmp-2.0.2-ssh-2/config.sub
diff -c misc/ssh/gmp-2.0.2-ssh-2/config.sub:1.1.1.1 misc/ssh/gmp-2.0.2-ssh-2/config.sub:1.2
*** misc/ssh/gmp-2.0.2-ssh-2/config.sub:1.1.1.1	Fri Nov  1 14:44:05 1996
--- misc/ssh/gmp-2.0.2-ssh-2/config.sub	Sun Dec  8 22:02:10 1996
***************
*** 661,666 ****
--- 661,675 ----
  	sun3 | sun3-*)
  		basic_machine=m68k-sun
  		;;
+ 	sun3.68881 | sun3.68881-*)
+ 		basic_machine=m68k.68881-sun
+ 		;;
+ 	sun3.soft | sun3.soft-*)
+ 		basic_machine=m68k.soft-sun
+ 		;;
+ 	sun3.fpa | sun3.fpa-*)
+ 		basic_machine=m68k.fpa-sun
+ 		;;
  	sun4)
  		basic_machine=sparc-sun
  		;;
Index: misc/ssh/gmp-2.0.2-ssh-2/demos/.cvsignore
diff -c /dev/null misc/ssh/gmp-2.0.2-ssh-2/demos/.cvsignore:1.1
*** /dev/null	Mon May 19 02:41:49 1997
--- misc/ssh/gmp-2.0.2-ssh-2/demos/.cvsignore	Sun Dec  8 21:58:29 1996
***************
*** 0 ****
--- 1 ----
+ Makefile
Index: misc/ssh/gmp-2.0.2-ssh-2/mpbsd/.cvsignore
diff -c /dev/null misc/ssh/gmp-2.0.2-ssh-2/mpbsd/.cvsignore:1.1
*** /dev/null	Mon May 19 02:41:52 1997
--- misc/ssh/gmp-2.0.2-ssh-2/mpbsd/.cvsignore	Sun Dec  8 21:58:38 1996
***************
*** 0 ****
--- 1 ----
+ Makefile
Index: misc/ssh/gmp-2.0.2-ssh-2/mpf/.cvsignore
diff -c /dev/null misc/ssh/gmp-2.0.2-ssh-2/mpf/.cvsignore:1.1
*** /dev/null	Mon May 19 02:41:54 1997
--- misc/ssh/gmp-2.0.2-ssh-2/mpf/.cvsignore	Sun Dec  8 21:58:50 1996
***************
*** 0 ****
--- 1 ----
+ Makefile
Index: misc/ssh/gmp-2.0.2-ssh-2/mpf/tests/.cvsignore
diff -c /dev/null misc/ssh/gmp-2.0.2-ssh-2/mpf/tests/.cvsignore:1.1
*** /dev/null	Mon May 19 02:41:57 1997
--- misc/ssh/gmp-2.0.2-ssh-2/mpf/tests/.cvsignore	Sun Dec  8 21:58:59 1996
***************
*** 0 ****
--- 1 ----
+ Makefile
Index: misc/ssh/gmp-2.0.2-ssh-2/mpn/.cvsignore
diff -c /dev/null misc/ssh/gmp-2.0.2-ssh-2/mpn/.cvsignore:1.1
*** /dev/null	Mon May 19 02:42:00 1997
--- misc/ssh/gmp-2.0.2-ssh-2/mpn/.cvsignore	Sun Dec  8 21:59:08 1996
***************
*** 0 ****
--- 1,2 ----
+ Makefile
+ asm-syntax.h
Index: misc/ssh/gmp-2.0.2-ssh-2/mpn/tests/.cvsignore
diff -c /dev/null misc/ssh/gmp-2.0.2-ssh-2/mpn/tests/.cvsignore:1.1
*** /dev/null	Mon May 19 02:42:15 1997
--- misc/ssh/gmp-2.0.2-ssh-2/mpn/tests/.cvsignore	Sun Dec  8 21:59:17 1996
***************
*** 0 ****
--- 1 ----
+ Makefile
Index: misc/ssh/gmp-2.0.2-ssh-2/mpq/.cvsignore
diff -c /dev/null misc/ssh/gmp-2.0.2-ssh-2/mpq/.cvsignore:1.1
*** /dev/null	Mon May 19 02:42:24 1997
--- misc/ssh/gmp-2.0.2-ssh-2/mpq/.cvsignore	Sun Dec  8 21:59:28 1996
***************
*** 0 ****
--- 1 ----
+ Makefile
Index: misc/ssh/gmp-2.0.2-ssh-2/mpq/tests/.cvsignore
diff -c /dev/null misc/ssh/gmp-2.0.2-ssh-2/mpq/tests/.cvsignore:1.1
*** /dev/null	Mon May 19 02:42:27 1997
--- misc/ssh/gmp-2.0.2-ssh-2/mpq/tests/.cvsignore	Sun Dec  8 21:59:37 1996
***************
*** 0 ****
--- 1 ----
+ Makefile
Index: misc/ssh/gmp-2.0.2-ssh-2/mpz/.cvsignore
diff -c /dev/null misc/ssh/gmp-2.0.2-ssh-2/mpz/.cvsignore:1.1
*** /dev/null	Mon May 19 02:42:30 1997
--- misc/ssh/gmp-2.0.2-ssh-2/mpz/.cvsignore	Sun Dec  8 21:59:48 1996
***************
*** 0 ****
--- 1 ----
+ Makefile
Index: misc/ssh/gmp-2.0.2-ssh-2/mpz/tests/.cvsignore
diff -c /dev/null misc/ssh/gmp-2.0.2-ssh-2/mpz/tests/.cvsignore:1.1
*** /dev/null	Mon May 19 02:42:34 1997
--- misc/ssh/gmp-2.0.2-ssh-2/mpz/tests/.cvsignore	Sun Dec  8 21:59:59 1996
***************
*** 0 ****
--- 1 ----
+ Makefile
