Make gcc 2.95.2 happy again, even under ``-Wall -Wshadow -Wpointer-arith -Wcast-align
-Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline''.
diff --git a/apps/asn1pars.c b/apps/asn1pars.c
index ac1e20d..f104ebc 100644
--- a/apps/asn1pars.c
+++ b/apps/asn1pars.c
@@ -80,6 +80,8 @@
 #undef PROG
 #define PROG	asn1parse_main
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	int i,badops=0,offset=0,ret=1,j;
diff --git a/apps/ca.c b/apps/ca.c
index 8696b41..6a27a6d 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -213,6 +213,8 @@
 static int preserve=0;
 static int msie_hack=0;
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	char *key=NULL;
diff --git a/apps/ciphers.c b/apps/ciphers.c
index 4baa0c3..f8e9e7b 100644
--- a/apps/ciphers.c
+++ b/apps/ciphers.c
@@ -77,6 +77,8 @@
 NULL
 };
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	int ret=1,i;
diff --git a/apps/crl.c b/apps/crl.c
index d91eb7f..338f46d 100644
--- a/apps/crl.c
+++ b/apps/crl.c
@@ -93,6 +93,8 @@
 static X509_CRL *load_crl(char *file, int format);
 static BIO *bio_out=NULL;
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	X509_CRL *x=NULL;
diff --git a/apps/crl2p7.c b/apps/crl2p7.c
index 8514be2..4056591 100644
--- a/apps/crl2p7.c
+++ b/apps/crl2p7.c
@@ -82,6 +82,8 @@
  * -out arg	- output file - default stdout
  */
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	int i,badops=0;
diff --git a/apps/dgst.c b/apps/dgst.c
index 5f0506e..1b56d6e 100644
--- a/apps/dgst.c
+++ b/apps/dgst.c
@@ -74,6 +74,9 @@
 #define PROG	dgst_main
 
 void do_fp(unsigned char *buf,BIO *f,int sep);
+
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	unsigned char *buf=NULL;
diff --git a/apps/dh.c b/apps/dh.c
index becbdb6..b3c20e2 100644
--- a/apps/dh.c
+++ b/apps/dh.c
@@ -82,6 +82,8 @@
  * -C
  */
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	DH *dh=NULL;
diff --git a/apps/dhparam.c b/apps/dhparam.c
index 5b769b7..293a400 100644
--- a/apps/dhparam.c
+++ b/apps/dhparam.c
@@ -86,6 +86,8 @@
 
 static void MS_CALLBACK dh_cb(int p, int n, void *arg);
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	DH *dh=NULL;
diff --git a/apps/dsa.c b/apps/dsa.c
index 6198ea9..a94bc95 100644
--- a/apps/dsa.c
+++ b/apps/dsa.c
@@ -83,6 +83,8 @@
  * -modulus	- print the DSA public key
  */
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	int ret=1;
diff --git a/apps/dsaparam.c b/apps/dsaparam.c
index 9fc5697..4d4e1ad 100644
--- a/apps/dsaparam.c
+++ b/apps/dsaparam.c
@@ -85,6 +85,9 @@
  */
 
 static void MS_CALLBACK dsa_cb(int p, int n, void *arg);
+
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	DSA *dsa=NULL;
diff --git a/apps/enc.c b/apps/enc.c
index 0beb637..387cfe2 100644
--- a/apps/enc.c
+++ b/apps/enc.c
@@ -80,6 +80,8 @@
 #define BSIZE	(8*1024)
 #define	PROG	enc_main
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	static const char magic[]="Salted__";
diff --git a/apps/errstr.c b/apps/errstr.c
index c86b5d9..4650379 100644
--- a/apps/errstr.c
+++ b/apps/errstr.c
@@ -68,6 +68,8 @@
 #undef PROG
 #define PROG	errstr_main
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	int i,ret=0;
diff --git a/apps/gendh.c b/apps/gendh.c
index 3986117..1f6be96 100644
--- a/apps/gendh.c
+++ b/apps/gendh.c
@@ -75,6 +75,9 @@
 #define PROG gendh_main
 
 static void MS_CALLBACK dh_cb(int p, int n, void *arg);
+
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	DH *dh=NULL;
diff --git a/apps/gendsa.c b/apps/gendsa.c
index 0c56b14..805f114 100644
--- a/apps/gendsa.c
+++ b/apps/gendsa.c
@@ -73,6 +73,8 @@
 #undef PROG
 #define PROG gendsa_main
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	DSA *dsa=NULL;
diff --git a/apps/genrsa.c b/apps/genrsa.c
index 63fd45e..a20cd30 100644
--- a/apps/genrsa.c
+++ b/apps/genrsa.c
@@ -75,6 +75,9 @@
 #define PROG genrsa_main
 
 static void MS_CALLBACK genrsa_cb(int p, int n, void *arg);
+
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	int ret=1;
diff --git a/apps/nseq.c b/apps/nseq.c
index 4a92139..cc88d50 100644
--- a/apps/nseq.c
+++ b/apps/nseq.c
@@ -65,6 +65,7 @@
 #undef PROG
 #define PROG nseq_main
 
+int MAIN(int, char **);
 
 int MAIN(int argc, char **argv)
 {
diff --git a/apps/pkcs12.c b/apps/pkcs12.c
index dd008c4..a54555b 100644
--- a/apps/pkcs12.c
+++ b/apps/pkcs12.c
@@ -86,6 +86,9 @@
 void hex_prin(BIO *out, unsigned char *buf, int len);
 int alg_print(BIO *x, X509_ALGOR *alg);
 int cert_load(BIO *in, STACK_OF(X509) *sk);
+
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 {
     char *infile=NULL, *outfile=NULL, *keyname = NULL;	
diff --git a/apps/pkcs7.c b/apps/pkcs7.c
index d7feafd..f471cc7 100644
--- a/apps/pkcs7.c
+++ b/apps/pkcs7.c
@@ -78,6 +78,8 @@
  * -print_certs
  */
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	PKCS7 *p7=NULL;
diff --git a/apps/pkcs8.c b/apps/pkcs8.c
index cb55464..e3fa7d4 100644
--- a/apps/pkcs8.c
+++ b/apps/pkcs8.c
@@ -66,6 +66,7 @@
 #include "apps.h"
 #define PROG pkcs8_main
 
+int MAIN(int, char **);
 
 int MAIN(int argc, char **argv)
 {
diff --git a/apps/req.c b/apps/req.c
index ce42611..14e8ef5 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -136,6 +136,8 @@
 #define TYPE_DSA	2
 #define TYPE_DH		3
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 #ifndef NO_DSA
diff --git a/apps/rsa.c b/apps/rsa.c
index 1313ddc..879b7ab 100644
--- a/apps/rsa.c
+++ b/apps/rsa.c
@@ -86,6 +86,8 @@
  * -pubout	- Output a public key.
  */
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	int ret=1;
diff --git a/apps/s_client.c b/apps/s_client.c
index fc3e398..ac19f4e 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -153,6 +153,8 @@
 
 	}
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	int off=0;
diff --git a/apps/s_server.c b/apps/s_server.c
index 044d4c4..a92db5c 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -397,6 +397,8 @@
 }
 #endif
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char *argv[])
 	{
 	short port=PORT;
diff --git a/apps/s_time.c b/apps/s_time.c
index 4f42681..39fd3b8 100644
--- a/apps/s_time.c
+++ b/apps/s_time.c
@@ -388,6 +388,8 @@
  * MAIN - main processing area for client
  *			real name depends on MONOLITH
  */
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	double totalTime = 0.0;
diff --git a/apps/sess_id.c b/apps/sess_id.c
index 3d363d1..71d5aa0 100644
--- a/apps/sess_id.c
+++ b/apps/sess_id.c
@@ -84,6 +84,9 @@
 };
 
 static SSL_SESSION *load_sess_id(char *file, int format);
+
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	SSL_SESSION *x=NULL;
diff --git a/apps/smime.c b/apps/smime.c
index 95bda83..9c84841 100644
--- a/apps/smime.c
+++ b/apps/smime.c
@@ -80,6 +80,8 @@
 #define SMIME_VERIFY	4
 #define SMIME_PK7OUT	5
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 {
 	int operation = 0;
diff --git a/apps/speed.c b/apps/speed.c
index c4fd79f..b3130de 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -238,6 +238,8 @@
 #endif
 	}
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	unsigned char *buf=NULL,*buf2=NULL;
diff --git a/apps/spkac.c b/apps/spkac.c
index e3f434d..e26a95d 100644
--- a/apps/spkac.c
+++ b/apps/spkac.c
@@ -75,6 +75,8 @@
  * -out arg	- output file - default stdout
  */
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	int i,badops=0, ret = 1;
diff --git a/apps/verify.c b/apps/verify.c
index a69c5d8..df596ca 100644
--- a/apps/verify.c
+++ b/apps/verify.c
@@ -74,6 +74,8 @@
 static STACK_OF(X509) *load_untrusted(char *file);
 static int v_verbose=0;
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	int i,ret=1;
diff --git a/apps/version.c b/apps/version.c
index a567f34..f5c9adc 100644
--- a/apps/version.c
+++ b/apps/version.c
@@ -66,6 +66,8 @@
 #undef PROG
 #define PROG	version_main
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	int i,ret=0;
diff --git a/apps/x509.c b/apps/x509.c
index 56e2271..1e90726 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -141,6 +141,8 @@
 static int purpose_print(BIO *bio, X509 *cert, X509_PURPOSE *pt);
 static int reqfile=0;
 
+int MAIN(int, char **);
+
 int MAIN(int argc, char **argv)
 	{
 	int ret=1;