Fix various stuff: that VC++ 5.0 chokes on:
1. Add *lots* of missing prototypes for static ssl functions.
2. VC++ doesn't understand the 'LL' suffix for 64 bits constants: change bn.org
3. Add a few missing prototypes in pem.org
Fix mk1mf.pl so it outputs a Makefile that doesn't choke Win95.
Fix mkdef.pl so it doesn't truncate longer names.
diff --git a/crypto/bn/bn.org b/crypto/bn/bn.org
index d8904d7..2de26c2 100644
--- a/crypto/bn/bn.org
+++ b/crypto/bn/bn.org
@@ -169,7 +169,12 @@
 #define BN_BYTES	4
 #define BN_BITS2	32
 #define BN_BITS4	16
+#ifdef WIN32
+/* VC++ doesn't like the LL suffix */
+#define BN_MASK		(0xffffffffffffffffL)
+#else
 #define BN_MASK		(0xffffffffffffffffLL)
+#endif
 #define BN_MASK2	(0xffffffffL)
 #define BN_MASK2l	(0xffff)
 #define BN_MASK2h1	(0xffff8000L)
diff --git a/crypto/pem/pem.org b/crypto/pem/pem.org
index 3d78699..f1baa20 100644
--- a/crypto/pem/pem.org
+++ b/crypto/pem/pem.org
@@ -501,6 +501,7 @@
 PKCS7 *PEM_read_PKCS7();
 DH *PEM_read_DHparams();
 DSA *PEM_read_DSAparams();
+NETSCAPE_CERT_SEQUENCE *PEM_read_NETSCAPE_CERT_SEQUENCE();
 int PEM_write_X509();
 int PEM_write_X509_REQ();
 int PEM_write_X509_CRL();
@@ -511,6 +512,7 @@
 int PEM_write_PKCS7();
 int PEM_write_DHparams();
 int PEM_write_DSAparams();
+int PEM_write_NETSCAPE_CERT_SEQUENCE();
 #endif
 
 X509 *PEM_read_bio_X509();
@@ -523,6 +525,7 @@
 PKCS7 *PEM_read_bio_PKCS7();
 DH *PEM_read_bio_DHparams();
 DSA *PEM_read_bio_DSAparams();
+NETSCAPE_CERT_SEQUENCE *PEM_read_bio_NETSCAPE_CERT_SEQUENCE();
 int PEM_write_bio_X509();
 int PEM_write_bio_X509_REQ();
 int PEM_write_bio_X509_CRL();
@@ -533,6 +536,7 @@
 int PEM_write_bio_PKCS7();
 int PEM_write_bio_DHparams();
 int PEM_write_bio_DSAparams();
+int PEM_write_bio_NETSCAPE_CERT_SEQUENCE();
 
 #endif /* SSLEAY_MACROS */
 
diff --git a/ssl/s23_clnt.c b/ssl/s23_clnt.c
index 597cc87..b607f62 100644
--- a/ssl/s23_clnt.c
+++ b/ssl/s23_clnt.c
@@ -66,9 +66,11 @@
 #define BREAK break
 
 #ifndef NOPROTO
+static SSL_METHOD *ssl23_get_client_method(int ver);
 static int ssl23_client_hello(SSL *s);
 static int ssl23_get_server_hello(SSL *s);
 #else
+static SSL_METHOD *ssl23_get_client_method();
 static int ssl23_client_hello();
 static int ssl23_get_server_hello();
 #endif
diff --git a/ssl/s23_lib.c b/ssl/s23_lib.c
index 9222bf8..24b884f 100644
--- a/ssl/s23_lib.c
+++ b/ssl/s23_lib.c
@@ -88,7 +88,7 @@
 	ssl_undefined_function,
 	ssl_undefined_function,
 	ssl23_read,
-	(int (*)())ssl_undefined_function,
+        (int (*)(struct ssl_st *, char *, int))ssl_undefined_function,
 	ssl23_write,
 	ssl_undefined_function,
 	ssl_undefined_function,
diff --git a/ssl/s23_meth.c b/ssl/s23_meth.c
index 1eed7a5..bbda4ff 100644
--- a/ssl/s23_meth.c
+++ b/ssl/s23_meth.c
@@ -60,6 +60,12 @@
 #include "objects.h"
 #include "ssl_locl.h"
 
+#ifndef NOPROTO
+static SSL_METHOD *ssl23_get_method(int ver);
+#else
+static SSL_METHOD *ssl23_get_method();
+#endif
+
 static SSL_METHOD *ssl23_get_method(ver)
 int ver;
 	{
diff --git a/ssl/s23_srvr.c b/ssl/s23_srvr.c
index 888ffac..5dd9253 100644
--- a/ssl/s23_srvr.c
+++ b/ssl/s23_srvr.c
@@ -66,8 +66,10 @@
 #define BREAK break
 
 #ifndef NOPROTO
+static SSL_METHOD *ssl23_get_server_method(int ver);
 int ssl23_get_client_hello(SSL *s);
 #else
+static SSL_METHOD *ssl23_get_server_method();
 int ssl23_get_client_hello();
 #endif
 
diff --git a/ssl/s2_clnt.c b/ssl/s2_clnt.c
index 2170e29..91fea92 100644
--- a/ssl/s2_clnt.c
+++ b/ssl/s2_clnt.c
@@ -64,6 +64,7 @@
 #include "evp.h"
 
 #ifndef NOPROTO
+static SSL_METHOD *ssl2_get_client_method(int ver);
 static int get_server_finished(SSL *s);
 static int get_server_verify(SSL *s);
 static int get_server_hello(SSL *s);
@@ -74,6 +75,7 @@
 static int ssl_rsa_public_encrypt(CERT *c, int len, unsigned char *from,
 	unsigned char *to,int padding);
 #else
+static SSL_METHOD *ssl2_get_client_method();
 static int get_server_finished();
 static int get_server_verify();
 static int get_server_hello();
diff --git a/ssl/s2_meth.c b/ssl/s2_meth.c
index cfc8828..f28c916 100644
--- a/ssl/s2_meth.c
+++ b/ssl/s2_meth.c
@@ -60,6 +60,12 @@
 #include "objects.h"
 #include "ssl_locl.h"
 
+#ifndef NOPROTO
+static SSL_METHOD *ssl2_get_method(int ver);
+#else
+static SSL_METHOD *ssl2_get_method();
+#endif
+
 static SSL_METHOD *ssl2_get_method(ver)
 int ver;
 	{
diff --git a/ssl/s2_srvr.c b/ssl/s2_srvr.c
index 5ad8b12..3477d43 100644
--- a/ssl/s2_srvr.c
+++ b/ssl/s2_srvr.c
@@ -64,6 +64,7 @@
 #include "evp.h"
 
 #ifndef NOPROTO
+static SSL_METHOD *ssl2_get_server_method(int ver);
 static int get_client_master_key(SSL *s);
 static int get_client_hello(SSL *s);
 static int server_hello(SSL *s); 
@@ -74,6 +75,7 @@
 static int ssl_rsa_private_decrypt(CERT *c, int len, unsigned char *from,
 	unsigned char *to,int padding);
 #else
+static SSL_METHOD *ssl2_get_server_method();
 static int get_client_master_key();
 static int get_client_hello();
 static int server_hello(); 
diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c
index d4ff1d9..88f33d5 100644
--- a/ssl/s3_clnt.c
+++ b/ssl/s3_clnt.c
@@ -74,6 +74,7 @@
  */
 
 #ifndef NOPROTO
+static SSL_METHOD *ssl3_get_client_method(int ver);
 static int ssl3_client_hello(SSL *s);
 static int ssl3_get_server_hello(SSL *s);
 static int ssl3_get_certificate_request(SSL *s);
@@ -86,6 +87,7 @@
 static int ssl3_get_server_certificate(SSL *s);
 static int ssl3_check_cert_and_algorithm(SSL *s);
 #else
+static SSL_METHOD *ssl3_get_client_method();
 static int ssl3_client_hello();
 static int ssl3_get_server_hello();
 static int ssl3_get_certificate_request();
diff --git a/ssl/s3_meth.c b/ssl/s3_meth.c
index 3d66b46..387b352 100644
--- a/ssl/s3_meth.c
+++ b/ssl/s3_meth.c
@@ -60,6 +60,12 @@
 #include "objects.h"
 #include "ssl_locl.h"
 
+#ifndef NOPROTO
+static SSL_METHOD *ssl3_get_method(int ver);
+#else
+static SSL_METHOD *ssl3_get_method();
+#endif
+
 static SSL_METHOD *ssl3_get_method(ver)
 int ver;
 	{
diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c
index 09041b2..9bb4560 100644
--- a/ssl/s3_srvr.c
+++ b/ssl/s3_srvr.c
@@ -75,6 +75,7 @@
  */
 
 #ifndef NOPROTO
+static SSL_METHOD *ssl3_get_server_method(int ver);
 static int ssl3_get_client_hello(SSL *s);
 static int ssl3_send_server_hello(SSL *s);
 static int ssl3_send_server_key_exchange(SSL *s);
@@ -87,6 +88,7 @@
 
 #else
 
+static SSL_METHOD *ssl3_get_server_method();
 static int ssl3_get_client_hello();
 static int ssl3_send_server_hello();
 static int ssl3_send_server_key_exchange();
diff --git a/ssl/ssl.h b/ssl/ssl.h
index ed41d33..92b7695 100644
--- a/ssl/ssl.h
+++ b/ssl/ssl.h
@@ -844,7 +844,7 @@
 
 int SSL_CTX_get_verify_mode(SSL_CTX *ctx);
 int (*SSL_CTX_get_verify_callback(SSL_CTX *ctx))();
-void SSL_CTX_set_verify(SSL_CTX *ctx,int mode,int (*callback)());
+void SSL_CTX_set_verify(SSL_CTX *ctx,int mode,int (*callback)(int, X509_STORE_CTX *));
 void SSL_CTX_set_cert_verify_cb(SSL_CTX *ctx, int (*cb)(),char *arg);
 int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa);
 int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, unsigned char *d, long len);
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 2bc0e3f..c9a2285 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -1043,7 +1043,11 @@
 void SSL_CTX_set_verify(ctx,mode,cb)
 SSL_CTX *ctx;
 int mode;
+#ifndef NOPROTO
+int (*cb)(int, X509_STORE_CTX *);
+#else
 int (*cb)();
+#endif
 	{
 	ctx->default_verify_mode=mode;
 	ctx->default_verify_callback=cb;
diff --git a/ssl/t1_clnt.c b/ssl/t1_clnt.c
index 986d243..1a17922 100644
--- a/ssl/t1_clnt.c
+++ b/ssl/t1_clnt.c
@@ -63,6 +63,12 @@
 #include "evp.h"
 #include "ssl_locl.h"
 
+#ifndef NOPROTO
+static SSL_METHOD *tls1_get_client_method(int ver);
+#else
+static SSL_METHOD *tls1_get_client_method();
+#endif
+
 static SSL_METHOD *tls1_get_client_method(ver)
 int ver;
 	{
diff --git a/ssl/t1_meth.c b/ssl/t1_meth.c
index 512c207..d64b5f4 100644
--- a/ssl/t1_meth.c
+++ b/ssl/t1_meth.c
@@ -60,6 +60,12 @@
 #include "objects.h"
 #include "ssl_locl.h"
 
+#ifndef NOPROTO
+static SSL_METHOD *tls1_get_method(int ver);
+#else
+static SSL_METHOD *tls1_get_method();
+#endif
+
 static SSL_METHOD *tls1_get_method(ver)
 int ver;
 	{
diff --git a/ssl/t1_srvr.c b/ssl/t1_srvr.c
index 8cf0add..8b18572 100644
--- a/ssl/t1_srvr.c
+++ b/ssl/t1_srvr.c
@@ -64,6 +64,12 @@
 #include "x509.h"
 #include "ssl_locl.h"
 
+#ifndef NOPROTO
+static SSL_METHOD *tls1_get_server_method(int ver);
+#else
+static SSL_METHOD *tls1_get_server_method();
+#endif
+
 static SSL_METHOD *tls1_get_server_method(ver)
 int ver;
 	{
diff --git a/util/mkdef.pl b/util/mkdef.pl
index a62e3ee..5b2f355 100755
--- a/util/mkdef.pl
+++ b/util/mkdef.pl
@@ -231,12 +231,12 @@
 
 	print OUT <<"EOF";
 ;
-; Definition file for the DDL version of the $name library from SSLeay
+; Definition file for the DLL version of the $name library from OpenSSL
 ;
 
 LIBRARY         $name
 
-DESCRIPTION     'SSLeay $name - eay\@cryptsoft.com'
+DESCRIPTION     'OpenSSL $name - http://www.openssl.org/'
 
 EOF
 
@@ -270,7 +270,7 @@
 		else
 			{
 			$n=$nums{$func};
-			printf OUT "    %s%-35s@%d\n",($NT)?"":"_",$func,$n;
+			printf OUT "    %s%-40s@%d\n",($NT)?"":"_",$func,$n;
 			}
 		}
 	printf OUT "\n";
diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl
index 9167abf..c0d5793 100644
--- a/util/pl/VC-32.pl
+++ b/util/pl/VC-32.pl
@@ -7,7 +7,7 @@
 $RSAref="RSAref32";
 
 $o='\\';
-$cp='"copy /b nul+ "';	# Timestamps get stuffed otherwise
+$cp='copy nul+';	# Timestamps get stuffed otherwise
 $rm='del';
 
 # C compiler stuff