--- openssl-0.9.6/Configure	Sun Sep 24 08:27:38 2000
+++ openssl-0.9.6/Configure.new	Mon Jan 15 19:47:54 2001
@@ -390,6 +390,9 @@
 # CygWin32
 "CygWin32", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
 
+# DJGPP
+"DJGPP", "gcc:-I/dev/env/DJDIR/watt/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall -W:::-L/dev/env/DJDIR/watt/lib -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::",
+
 # Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at>
 "ultrix-cc","cc:-std1 -O -Olimit 1000 -DL_ENDIAN::(unknown)::::::",
 "ultrix-gcc","gcc:-O3 -DL_ENDIAN::(unknown)::::::",
@@ -415,6 +418,7 @@
 
 my $prefix="";
 my $openssldir="";
+my $exeext="";
 my $install_prefix="";
 my $no_threads=0;
 my $no_shared=1;
@@ -619,6 +623,8 @@
 
 my $IsWindows=scalar grep /^$target$/,@WinTargets;
 
+$exeext=".exe" if ($target eq "DJGPP");
+$exeext=".exe" if ($target eq "CygWin32");
 $openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq "");
 $prefix=$openssldir if $prefix eq "";
 
@@ -626,7 +632,7 @@
 chop $prefix if $prefix =~ /\/$/;
 
 $openssldir=$prefix . "/ssl" if $openssldir eq "";
-$openssldir=$prefix . "/" . $openssldir if $openssldir !~ /^\//;
+$openssldir=$prefix . "/" . $openssldir if $openssldir !~ /(^\/|^[a-zA-Z]:\/)/;
 
 
 print "IsWindows=$IsWindows\n";
@@ -810,6 +816,7 @@
 	s/^CFLAG=.*$/CFLAG= $cflags/;
 	s/^DEPFLAG=.*$/DEPFLAG= $depflags/;
 	s/^EX_LIBS=.*$/EX_LIBS= $lflags/;
+	s/^EXEEXT=.*$/EXEEXT=$exeext/;
 	s/^BN_ASM=.*$/BN_ASM= $bn_obj/;
 	s/^DES_ENC=.*$/DES_ENC= $des_obj/;
 	s/^BF_ENC=.*$/BF_ENC= $bf_obj/;
--- openssl-0.9.6/crypto/bio/bss_file.c	Mon Sep 11 04:42:16 2000
+++ openssl-0.9.6/crypto/bio/bss_file.c.new	Sat Oct 28 14:11:40 2000
@@ -205,11 +205,19 @@
 		b->ptr=(char *)ptr;
 		b->init=1;
 #if defined(MSDOS) || defined(WINDOWS)
+#ifdef __DJGPP__
+		/* Set correct text/binary mode */
+		if (num & BIO_FP_TEXT)
+			setmode(fileno((FILE *)ptr),O_TEXT);
+		else
+			setmode(fileno((FILE *)ptr),O_BINARY);
+#else
 		/* Set correct text/binary mode */
 		if (num & BIO_FP_TEXT)
 			_setmode(fileno((FILE *)ptr),_O_TEXT);
 		else
 			_setmode(fileno((FILE *)ptr),_O_BINARY);
+#endif /* __DJGPP__ */
 #endif
 		break;
 	case BIO_C_SET_FILENAME:
--- openssl-0.9.6/tools/c_rehash.in	Mon Sep 11 04:43:06 2000
+++ openssl-0.9.6/tools/c_rehash.in.new	Sat Nov 18 00:49:56 2000
@@ -117,7 +117,13 @@
 		}
 		$hash .= ".$suffix";
 		print "$fname => $hash\n";
+               $symlink_exists=eval {symlink("",""); 1};
+		if ($symlink_exists eq '1') {
 		symlink $fname, $hash;
+		} else {
+		@args= ("cp", "$fname", "$hash");
+		system {$args[0]} @args;
+		}
 		$hashlist{$hash} = $fprint;
 }
 
@@ -142,7 +148,13 @@
 		}
 		$hash .= ".r$suffix";
 		print "$fname => $hash\n";
+               $symlink_exists=eval {symlink("",""); 1};
+		if ($symlink_exists eq '1') {
 		symlink $fname, $hash;
+		} else {
+		@args= ("cp", "$fname", "$hash");
+		system {$args[0]} @args;
+		}
 		$hashlist{$hash} = $fprint;
 }
 
--- openssl-0.9.6/e_os.h	Thu Sep 21 01:23:14 2000
+++ openssl-0.9.6/e_os.h.new	Sun Nov 19 09:40:58 2000
@@ -172,6 +172,11 @@
 
 #if (defined(WINDOWS) || defined(MSDOS)) && !defined(__CYGWIN32__)
 
+#  ifdef __DJGPP__
+#  include <unistd.h>
+#  include <sys/stat.h>
+#  endif /* __DJGPP__ */
+
 #  ifndef S_IFDIR
 #    define S_IFDIR	_S_IFDIR
 #  endif
@@ -317,7 +322,7 @@
 /*************/
 
 #ifdef USE_SOCKETS
-#  if defined(WINDOWS) || defined(MSDOS)
+#  if (defined(WINDOWS) || defined(MSDOS)) && !defined(__DJGPP__)
       /* windows world */
 
 #    ifdef NO_SOCK
@@ -400,7 +405,9 @@
 #    define SSLeay_Write(a,b,c)    write((a),(b),(c))
 #    define SHUTDOWN(fd)    { shutdown((fd),0); closesocket((fd)); }
 #    define SHUTDOWN2(fd)   { shutdown((fd),2); closesocket((fd)); }
+#    ifndef INVALID_SOCKET
 #    define INVALID_SOCKET	(-1)
+#    endif /* INVALID_SOCKET */
 #  endif
 #endif
 
--- openssl-0.9.6/util/mklink.pl	Mon Sep 11 04:43:08 2000
+++ openssl-0.9.6/util/mklink.pl.new	Sat Nov 18 18:12:38 2000
@@ -48,8 +48,18 @@
 my $to = join('/', @to_path);
 
 my $file;
+$symlink_exists=eval {symlink("",""); 1};
+if ($symlink_exists eq '1') {
 foreach $file (@files) {
     my $err = "";
     symlink("$to/$file", "$from/$file") or $err = " [$!]";
+    print $file . " => $from/$file$err\n";
+}
+} else {
+foreach $file (@files) {
+    my $err = "";
+    @args= ("cp", "$file", "$from/$file");
+    system {$args[0]} @args or $err = " [$!]";
+    }
     print $file . " => $from/$file$err\n";
 }
--- openssl-0.9.6/crypto/rand/rand_egd.c	Mon Sep 11 04:42:38 2000
+++ openssl-0.9.6/crypto/rand/rand_egd.c.new	Sat Oct 28 13:44:04 2000
@@ -59,7 +59,7 @@
 /* Query the EGD <URL: http://www.lothar.com/tech/crypto/>.
  */
 
-#if defined(WIN32) || defined(VMS) || defined(__VMS)
+#if defined(WIN32) || defined(VMS) || defined(__VMS) || defined(__DJGPP__)
 int RAND_egd(const char *path)
 	{
 	return(-1);
--- openssl-0.9.6/crypto/des/read_pwd.c	Thu Sep 21 01:23:34 2000
+++ openssl-0.9.6/crypto/des/read_pwd.c.new	Sat Oct 28 03:15:36 2000
@@ -240,7 +240,7 @@
 	long status;
 	unsigned short channel = 0;
 #else
-#ifndef MSDOS
+#if !defined(MSDOS) || defined(__DJGPP__)
 	TTY_STRUCT tty_orig,tty_new;
 #endif
 #endif
--- openssl-0.9.6/test/tcrl	Sat Oct 28 16:00:20 2000
+++ openssl-0.9.6/test/tcrl.new	Thu Nov 16 23:13:00 2000
@@ -1,6 +1,10 @@
 #!/bin/sh
 
+#ifdef __DJGPP__
+PATH=../apps\;$PATH
+#else
 PATH=../apps:$PATH
+#endif /* __DJGPP__ */
 export PATH
 
 cmd='../apps/openssl crl'
--- openssl-0.9.6/test/testca	Sat Oct 28 16:01:04 2000
+++ openssl-0.9.6/test/testca.new	Thu Nov 16 23:15:34 2000
@@ -1,7 +1,11 @@
 #!/bin/sh
 
 SH="/bin/sh"
+#ifdef __DJGPP__
+PATH=../apps\;$PATH
+#else
 PATH=../apps:$PATH
+#endif /* __DJGPP__ */
 export SH PATH
 
 SSLEAY_CONFIG="-config CAss.cnf"
--- openssl-0.9.6/test/testgen	Sat Oct 28 16:01:38 2000
+++ openssl-0.9.6/test/testgen.new	Thu Nov 16 23:17:32 2000
@@ -6,7 +6,11 @@
 
 /bin/rm -f $T.1 $T.2 $T.key
 
+#ifdef __DJGPP__
+PATH=../apps\;$PATH;
+#else
 PATH=../apps:$PATH;
+#endif /* __DJGPP__ */
 export PATH
 
 echo "generating certificate request"
--- openssl-0.9.6/test/tpkcs7	Sat Oct 28 16:02:02 2000
+++ openssl-0.9.6/test/tpkcs7.new	Thu Nov 16 23:27:14 2000
@@ -1,6 +1,10 @@
 #!/bin/sh
 
+#ifdef __DJGPP__
+PATH=../apps\;$PATH
+#else
 PATH=../apps:$PATH
+#endif /* __DJGPP__ */
 export PATH
 
 cmd='../apps/openssl pkcs7'
--- openssl-0.9.6/test/tpkcs7d	Sat Oct 28 16:03:42 2000
+++ openssl-0.9.6/test/tpkcs7d.new	Thu Nov 16 23:28:48 2000
@@ -1,6 +1,10 @@
 #!/bin/sh
 
+#ifdef __DJGPP__
+PATH=../apps\;$PATH
+#else
 PATH=../apps:$PATH
+#endif /* __DJGPP__ */
 export PATH
 
 cmd='../apps/openssl pkcs7'
--- openssl-0.9.6/test/treq	Sat Oct 28 16:02:36 2000
+++ openssl-0.9.6/test/treq.new	Thu Nov 16 23:19:46 2000
@@ -1,6 +1,10 @@
 #!/bin/sh
 
+#ifdef __DJGPP__
+PATH=../apps\;$PATH
+#else
 PATH=../apps:$PATH
+#endif /* __DJGPP__ */
 export PATH
 
 cmd='../apps/openssl req -config ../apps/openssl.cnf'
--- openssl-0.9.6/test/trsa	Sat Oct 28 17:56:28 2000
+++ openssl-0.9.6/test/trsa.new	Thu Nov 16 23:21:32 2000
@@ -1,6 +1,10 @@
 #!/bin/sh
 
+#ifdef __DJGPP__
+PATH=../apps\;$PATH
+#else
 PATH=../apps:$PATH
+#endif /* __DJGPP__ */
 export PATH
 
 if ../apps/openssl no-rsa; then
--- openssl-0.9.6/test/tsid	Sat Oct 28 16:02:52 2000
+++ openssl-0.9.6/test/tsid.new	Thu Nov 16 23:22:54 2000
@@ -1,6 +1,10 @@
 #!/bin/sh
 
+#ifdef __DJGPP__
+PATH=../apps\;$PATH
+#else
 PATH=../apps:$PATH
+#endif /* __DJGPP__ */
 export PATH
 
 cmd='../apps/openssl sess_id'
--- openssl-0.9.6/test/tx509	Sat Oct 28 15:19:02 2000
+++ openssl-0.9.6/test/tx509.new	Sat Nov 18 14:44:46 2000
@@ -1,6 +1,10 @@
 #!/bin/sh
 
+#ifdef __DJGPP__
+PATH=../apps\;$PATH
+#else
 PATH=../apps:$PATH
+#endif /* __DJGPP__ */
 export PATH
 
 cmd='../apps/openssl x509'
--- openssl-0.9.6/util/point.sh	Sat Mar  6 04:32:06 1999
+++ openssl-0.9.6/util/point.sh.new	Sat Nov 18 20:09:06 2000
@@ -1,6 +1,9 @@
 #!/bin/sh
 
 rm -f $2
-ln -s $1 $2
+if test "$MACHTYPE" = i386-pc-msdosdjgpp;
+then cp $1 $2;
+else ln -s $1 $2;
+fi
 echo "$2 => $1"
 
--- openssl-0.9.6/djcopy.sh	Sat Nov 18 22:33:26 2000
+++ openssl-0.9.6/djcopy.sh.new	Sat Nov 18 18:06:42 2000
@@ -0,0 +1,127 @@
+#!/bin/sh
+cp Makefile.ssl Makefile
+cp apps/Makefile.ssl apps/Makefile
+cp crypto/md4/md4.c apps/md4.c
+cp crypto/md5/md5.c apps/md5.c
+cp crypto/ripemd/rmd160.c apps/rmd160.c
+cp crypto/Makefile.ssl crypto/Makefile
+cp crypto/asn1/Makefile.ssl crypto/asn1/Makefile
+cp crypto/bf/Makefile.ssl crypto/bf/Makefile
+cp crypto/bio/Makefile.ssl crypto/bio/Makefile
+cp crypto/bn/Makefile.ssl crypto/bn/Makefile
+cp crypto/buffer/Makefile.ssl crypto/buffer/Makefile
+cp crypto/cast/Makefile.ssl crypto/cast/Makefile
+cp crypto/comp/Makefile.ssl crypto/comp/Makefile
+cp crypto/conf/Makefile.ssl crypto/conf/Makefile
+cp crypto/des/Makefile.ssl crypto/des/Makefile
+cp -r crypto/perlasm crypto/des/asm/perlasm
+cp crypto/dh/Makefile.ssl crypto/dh/Makefile
+cp crypto/dsa/Makefile.ssl crypto/dsa/Makefile
+cp crypto/dso/Makefile.ssl crypto/dso/Makefile
+cp crypto/err/Makefile.ssl crypto/err/Makefile
+cp crypto/evp/Makefile.ssl crypto/evp/Makefile
+cp crypto/hmac/Makefile.ssl crypto/hmac/Makefile
+cp crypto/idea/Makefile.ssl crypto/idea/Makefile
+cp crypto/lhash/Makefile.ssl crypto/lhash/Makefile
+cp crypto/md2/Makefile.ssl crypto/md2/Makefile
+cp crypto/md4/Makefile.ssl crypto/md4/Makefile
+cp crypto/md5/Makefile.ssl crypto/md5/Makefile
+cp crypto/mdc2/Makefile.ssl crypto/mdc2/Makefile
+cp crypto/objects/Makefile.ssl crypto/objects/Makefile
+cp crypto/pem/Makefile.ssl crypto/pem/Makefile
+cp crypto/pkcs12/Makefile.ssl crypto/pkcs12/Makefile
+cp crypto/pkcs7/Makefile.ssl crypto/pkcs7/Makefile
+cp crypto/rand/Makefile.ssl crypto/rand/Makefile
+cp crypto/rc2/Makefile.ssl crypto/rc2/Makefile
+cp crypto/rc4/Makefile.ssl crypto/rc4/Makefile
+cp crypto/rc5/Makefile.ssl crypto/rc5/Makefile
+cp crypto/ripemd/Makefile.ssl crypto/ripemd/Makefile
+cp crypto/rsa/Makefile.ssl crypto/rsa/Makefile
+cp crypto/sha/Makefile.ssl crypto/sha/Makefile
+cp crypto/stack/Makefile.ssl crypto/stack/Makefile
+cp crypto/txt_db/Makefile.ssl crypto/txt_db/Makefile
+cp crypto/x509/Makefile.ssl crypto/x509/Makefile
+cp crypto/x509v3/Makefile.ssl crypto/x509v3/Makefile
+cp crypto/asn1/asn1.h include/openssl/asn1.h
+cp crypto/asn1/asn1_mac.h include/openssl/asn1_mac.h
+cp crypto/bio/bio.h include/openssl/bio.h
+cp crypto/bf/blowfish.h include/openssl/blowfish.h
+cp crypto/bn/bn.h include/openssl/bn.h
+cp crypto/buffer/buffer.h include/openssl/buffer.h
+cp crypto/cast/cast.h include/openssl/cast.h
+cp crypto/comp/comp.h include/openssl/comp.h
+cp crypto/conf/conf.h include/openssl/conf.h
+cp crypto/conf/conf_api.h include/openssl/conf_api.h
+cp crypto/crypto.h include/openssl/crypto.h
+cp crypto/des/des.h include/openssl/des.h
+cp crypto/dh/dh.h include/openssl/dh.h
+cp crypto/dsa/dsa.h include/openssl/dsa.h
+cp crypto/dso/dso.h include/openssl/dso.h
+cp e_os.h include/openssl/e_os.h
+cp e_os2.h include/openssl/e_os2.h
+cp crypto/ebcdic.h include/openssl/ebcdic.h
+cp crypto/err/err.h include/openssl/err.h
+cp crypto/evp/evp.h include/openssl/evp.h
+cp crypto/hmac/hmac.h include/openssl/hmac.h
+cp crypto/idea/idea.h include/openssl/idea.h
+cp crypto/lhash/lhash.h include/openssl/lhash.h
+cp crypto/md2/md2.h include/openssl/md2.h
+cp crypto/md4/md4.h include/openssl/md4.h
+cp crypto/md5/md5.h include/openssl/md5.h
+cp crypto/mdc2/mdc2.h include/openssl/mdc2.h
+cp crypto/objects/obj_mac.h include/openssl/obj_mac.h
+cp crypto/objects/objects.h include/openssl/objects.h
+cp crypto/opensslconf.h include/openssl/opensslconf.h
+cp crypto/opensslv.h include/openssl/opensslv.h
+cp crypto/pem/pem.h include/openssl/pem.h
+cp crypto/pem/pem2.h include/openssl/pem2.h
+cp crypto/pkcs12/pkcs12.h include/openssl/pkcs12.h
+cp crypto/pkcs7/pkcs7.h include/openssl/pkcs7.h
+cp crypto/rand/rand.h include/openssl/rand.h
+cp crypto/rc2/rc2.h include/openssl/rc2.h
+cp crypto/rc4/rc4.h include/openssl/rc4.h
+cp crypto/rc5/rc5.h include/openssl/rc5.h
+cp crypto/ripemd/ripemd.h include/openssl/ripemd.h
+cp crypto/rsa/rsa.h include/openssl/rsa.h
+cp crypto/rsa/rsa.h include/openssl/rsa.h
+cp rsaref/rsaref.h include/openssl/rsaref.h
+cp crypto/stack/safestack.h include/openssl/safestack.h
+cp crypto/sha/sha.h include/openssl/sha.h
+cp ssl/ssl.h include/openssl/ssl.h
+cp ssl/ssl2.h include/openssl/ssl2.h
+cp ssl/ssl23.h include/openssl/ssl23.h
+cp ssl/ssl3.h include/openssl/ssl3.h
+cp crypto/stack/stack.h include/openssl/stack.h
+cp crypto/symhacks.h include/openssl/symhacks.h
+cp ssl/tls1.h include/openssl/tls1.h
+cp crypto/tmdiff.h include/openssl/tmdiff.h
+cp crypto/txt_db/txt_db.h include/openssl/txt_db.h
+cp crypto/x509/x509.h include/openssl/x509.h
+cp crypto/x509/x509_vfy.h include/openssl/x509_vfy.h
+cp crypto/x509v3/x509v3.h include/openssl/x509v3.h
+cp rsaref/Makefile.ssl rsaref/Makefile
+cp ssl/Makefile.ssl ssl/Makefile
+cp test/Makefile.ssl test/Makefile
+cp crypto/bf/bftest.c test/bftest.c
+cp crypto/bn/bntest.c test/bntest.c
+cp crypto/cast/casttest.c test/casttest.c
+cp crypto/des/destest.c test/destest.c
+cp crypto/dh/dhtest.c test/dhtest.c
+cp crypto/dsa/dsatest.c test/dsatest.c
+cp crypto/bn/exptest.c test/exptest.c
+cp crypto/hmac/hmactest.c test/hmactest.c
+cp crypto/idea/ideatest.c test/ideatest.c
+cp crypto/md2/md2test.c test/md2test.c
+cp crypto/md4/md4test.c test/md4test.c
+cp crypto/md5/md5test.c test/md5test.c
+cp crypto/mdc2/mdc2test.c test/mdc2test.c
+cp crypto/rand/randtest.c test/randtest.c
+cp crypto/rc2/rc2test.c test/rc2test.c
+cp crypto/rc4/rc4test.c test/rc4test.c
+cp crypto/rc5/rc5test.c test/rc5test.c
+cp crypto/ripemd/rmdtest.c test/rmdtest.c
+cp crypto/rsa/rsa_test.c test/rsa_test.c
+cp crypto/sha/shatest.c test/shatest.c
+cp crypto/sha/sha1test.c test/sha1test.c
+cp ssl/ssltest.c test/ssltest.c
+cp tools/Makefile.ssl tools/Makefile 
--- openssl-0.9.6/install.djgpp	Sun Nov 19 11:19:16 2000
+++ openssl-0.9.6/install.djgpp.new	Sun Nov 19 11:18:42 2000
@@ -0,0 +1,33 @@
+
+ 
+ INSTALLATION ON THE DOS PLATFORM WITH DJGPP
+ -------------------------------------------
+
+ Openssl has been ported to DOS, but only with long filename support. If
+ you wish to compile on native DOS with 8+3 filenames, you will have to
+ tweak the installation yourself, including renaming files with illegal
+ or duplicate names.
+
+ You should have a full DJGPP environment installed, including the
+ latest versions of DJGPP, GCC, BINUTILS, BASH, etc. This package
+ requires that PERL and BC also be installed.
+
+ All of these can be obtained from the usual DJGPP mirror sites, such as
+ "http://www.simtel.net/pub/simtelnet/gnu/djgpp/". You also need to have
+ the WATT-32 networking package installed before you try to compile
+ openssl. This can be obtained from "http://www.bgnett.no/~giva/". The
+ Makefile assumes that the WATT-32 code is in directory "watt" under
+ $DJDIR.
+
+ To compile openssl, start your BASH shell. The tar.gz file doesn't
+ unpack properly on DOS because of lack of symbolic links. After you
+ unpack the openssl archive, run "./djcopy.sh" to copy files that
+ couldn't be symbolically linked. Then configure for DOS by running
+ "./Configure" with appropriate arguments. The basic syntax for DOS is:
+ "./Configure no-threads DJGPP". Then run "make" and "make test". You
+ may run out of DPMI selectors when running in a DOS box under
+ Windows. If so, just close the BASH shell, go back to Windows, and
+ restart BASH. Then run "make" again.
+
+ Building openssl under DJGPP has only been tested with DJGPP 2.03,
+ GCC 2.952, and perl 5.005_02.
--- openssl-0.9.6/crypto/bio/b_sock.c	Mon Sep 11 04:42:14 2000
+++ openssl-0.9.6/crypto/bio/b_sock.c.new	Sun Nov 19 10:53:00 2000
@@ -471,7 +471,11 @@
 	{
 	int i;
 
+#ifdef __DJGPP__
+	i=ioctlsocket(fd,type,(char *)arg);
+#else
 	i=ioctlsocket(fd,type,arg);
+#endif /* __DJGPP__ */
 	if (i < 0)
 		SYSerr(SYS_F_IOCTLSOCKET,get_last_socket_error());
 	return(i);
--- openssl-0.9.6/Makefile.org	Thu Sep 21 01:23:12 2000
+++ openssl-0.9.6/Makefile.org.new	Sat Nov 25 14:16:10 2000
@@ -13,6 +13,7 @@
 OPTIONS=
 CONFIGURE_ARGS=
 SHLIB_TARGET=
+EXEEXT=
 
 # INSTALL_PREFIX is for package builders so that they can configure
 # for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
@@ -205,7 +206,7 @@
 		need_shlib=false; \
 	else \
 		(cd $$i && echo "making all in $$i..." && \
-		$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' SDIRS='${SDIRS}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \
+		$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' SDIRS='${SDIRS}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' EXEEXT='${EXEEXT}' all ) || exit 1; \
 	fi; \
 	done; \
 	if $$need_shlib && [ "$(SHLIB_MARK1)" != "" -o "$(SHLIB_MARK1)" != "" ]; then \
@@ -227,7 +228,7 @@
 		need_shlib=false; \
 	else \
 		(cd $$i && echo "making all in $$i..." && \
-		$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \
+		$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' EXEEXT='${EXEEXT}' all ) || exit 1; \
 	fi; \
 	done; \
 	if $$need_shlib && [ "$(SHLIB_MARK1)" != "" -o "$(SHLIB_MARK1)" != "" ]; then \
@@ -454,7 +455,7 @@
 	do \
 	if echo "$$i" | grep -v '^\.'; then \
 		(cd $$i; echo "installing $$i..."; \
-		$(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' install ); \
+		$(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' EXEEXT='${EXEEXT}' install ); \
 	fi; \
 	done
 	@for i in $(LIBS) ;\
--- openssl-0.9.6/apps/Makefile.ssl	Sun Sep 17 12:26:04 2000
+++ openssl-0.9.6/apps/Makefile.ssl.new	Sun Nov 26 12:00:54 2000
@@ -32,7 +32,7 @@
 
 SCRIPTS=CA.sh CA.pl der_chop
 
-EXE= $(PROGRAM)
+EXE= $(PROGRAM)$(EXEEXT)
 
 E_EXE=	verify asn1pars req dgst dh dhparam enc passwd gendh errstr \
 	ca crl rsa rsautl dsa dsaparam \
@@ -77,7 +77,7 @@
 
 all:	exe
 
-exe:	$(EXE)
+exe:	$(PROGRAM)
 
 req: sreq.o $(A_OBJ) $(DLIBCRYPTO)
 	$(CC) -o req $(CFLAG) sreq.o $(A_OBJ) $(RAND_OBJ) $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
@@ -134,8 +134,8 @@
 
 $(PROGRAM): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
 	$(RM) $(PROGRAM)
-	$(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS)
-	-(cd ..; OPENSSL="`pwd`/apps/openssl"; export OPENSSL; $(PERL) tools/c_rehash certs)
+	$(CC) -o $(PROGRAM)$(EXEEXT) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS)
+	-(cd ..; OPENSSL="`pwd`/apps/openssl$(EXEEXT)"; export OPENSSL; $(PERL) tools/c_rehash certs)
 
 progs.h: progs.pl
 	$(PERL) progs.pl $(E_EXE) >progs.h
