From: jsing Date: Fri, 18 Apr 2014 04:17:16 +0000 (+0000) Subject: Remove MAIN and PROG defines now that we do not compile non-monolithic. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=547460e7547149c588cbee11ea18fd8ee2536d54;p=openbsd Remove MAIN and PROG defines now that we do not compile non-monolithic. ok tedu@ --- diff --git a/lib/libssl/src/apps/apps.h b/lib/libssl/src/apps/apps.h index ad8ae9d146b..9c32447606e 100644 --- a/lib/libssl/src/apps/apps.h +++ b/lib/libssl/src/apps/apps.h @@ -137,7 +137,6 @@ long app_RAND_load_files(char *file); /* `file' is a list of files to read, * (see e_os.h). The string is * destroyed! */ -#define MAIN(a,v) PROG(a,v) extern CONF *config; extern char *default_config_file; extern BIO *bio_err; diff --git a/lib/libssl/src/apps/asn1pars.c b/lib/libssl/src/apps/asn1pars.c index f11f1676f0d..c52748c2aae 100644 --- a/lib/libssl/src/apps/asn1pars.c +++ b/lib/libssl/src/apps/asn1pars.c @@ -77,15 +77,13 @@ * -oid file - extra oid description file */ -#undef PROG -#define PROG asn1parse_main -int MAIN(int, char **); +int asn1parse_main(int, char **); static int do_generate(BIO * bio, char *genstr, char *genconf, BUF_MEM * buf); int -MAIN(int argc, char **argv) +asn1parse_main(int argc, char **argv) { int i, badops = 0, offset = 0, ret = 1, j; unsigned int length = 0; diff --git a/lib/libssl/src/apps/ca.c b/lib/libssl/src/apps/ca.c index 6396249673c..22eade73638 100644 --- a/lib/libssl/src/apps/ca.c +++ b/lib/libssl/src/apps/ca.c @@ -89,8 +89,6 @@ #define R_OK 4 #endif -#undef PROG -#define PROG ca_main #define BASE_SECTION "ca" #define CONFIG_FILE "openssl.cnf" @@ -235,10 +233,10 @@ certify(X509 ** xret, char *infile, EVP_PKEY * pkey, X509 * x509, static int msie_hack = 0; - int MAIN(int, char **); + int ca_main(int, char **); int - MAIN(int argc, char **argv) + ca_main(int argc, char **argv) { ENGINE *e = NULL; char *key = NULL, *passargin = NULL; diff --git a/lib/libssl/src/apps/ciphers.c b/lib/libssl/src/apps/ciphers.c index 8e6427582cb..d7ee87aa269 100644 --- a/lib/libssl/src/apps/ciphers.c +++ b/lib/libssl/src/apps/ciphers.c @@ -66,8 +66,6 @@ #include #include -#undef PROG -#define PROG ciphers_main static const char *ciphers_usage[] = { "usage: ciphers args\n", @@ -79,10 +77,10 @@ static const char *ciphers_usage[] = { NULL }; -int MAIN(int, char **); +int ciphers_main(int, char **); int -MAIN(int argc, char **argv) +ciphers_main(int argc, char **argv) { int ret = 1, i; int verbose = 0, Verbose = 0; diff --git a/lib/libssl/src/apps/cms.c b/lib/libssl/src/apps/cms.c index 7948e4c09ff..b1ed9c392ea 100644 --- a/lib/libssl/src/apps/cms.c +++ b/lib/libssl/src/apps/cms.c @@ -66,8 +66,6 @@ #include #include -#undef PROG -#define PROG cms_main static int save_certs(char *signerfile, STACK_OF(X509) * signers); static int cms_cb(int ok, X509_STORE_CTX * ctx); static void receipt_request_print(BIO * out, CMS_ContentInfo * cms); @@ -98,10 +96,10 @@ make_receipt_request(STACK_OF(OPENSSL_STRING) * rr_to, int verify_err = 0; - int MAIN(int, char **); + int cms_main(int, char **); int - MAIN(int argc, char **argv) + cms_main(int argc, char **argv) { ENGINE *e = NULL; int operation = 0; diff --git a/lib/libssl/src/apps/crl.c b/lib/libssl/src/apps/crl.c index 914426df455..07fb1fbcdc2 100644 --- a/lib/libssl/src/apps/crl.c +++ b/lib/libssl/src/apps/crl.c @@ -66,8 +66,6 @@ #include #include -#undef PROG -#define PROG crl_main #undef POSTFIX #define POSTFIX ".rvk" @@ -99,10 +97,10 @@ static const char *crl_usage[] = { static X509_CRL *load_crl(char *file, int format); static BIO *bio_out = NULL; -int MAIN(int, char **); +int crl_main(int, char **); int -MAIN(int argc, char **argv) +crl_main(int argc, char **argv) { unsigned long nmflag = 0; X509_CRL *x = NULL; diff --git a/lib/libssl/src/apps/crl2p7.c b/lib/libssl/src/apps/crl2p7.c index b98260d1724..b994c0ce3a4 100644 --- a/lib/libssl/src/apps/crl2p7.c +++ b/lib/libssl/src/apps/crl2p7.c @@ -72,8 +72,6 @@ #include static int add_certs_from_file(STACK_OF(X509) * stack, char *certfile); -#undef PROG -#define PROG crl2pkcs7_main /* -inform arg - input format - default PEM (DER or PEM) * -outform arg - output format - default PEM @@ -81,10 +79,10 @@ static int add_certs_from_file(STACK_OF(X509) * stack, char *certfile); * -out arg - output file - default stdout */ -int MAIN(int, char **); +int crl2pkcs7_main(int, char **); int -MAIN(int argc, char **argv) +crl2pkcs7_main(int argc, char **argv) { int i, badops = 0; BIO *in = NULL, *out = NULL; diff --git a/lib/libssl/src/apps/dgst.c b/lib/libssl/src/apps/dgst.c index a68e3ce562b..09105399ff2 100644 --- a/lib/libssl/src/apps/dgst.c +++ b/lib/libssl/src/apps/dgst.c @@ -71,8 +71,6 @@ #undef BUFSIZE #define BUFSIZE 1024*8 -#undef PROG -#define PROG dgst_main int do_fp(BIO * out, unsigned char *buf, BIO * bp, int sep, int binout, @@ -100,10 +98,10 @@ list_md_fn(const EVP_MD * m, const char *from, const char *to, void *arg) mname, mname); } -int MAIN(int, char **); +int dgst_main(int, char **); int -MAIN(int argc, char **argv) +dgst_main(int argc, char **argv) { ENGINE *e = NULL; unsigned char *buf = NULL; diff --git a/lib/libssl/src/apps/dh.c b/lib/libssl/src/apps/dh.c index 1fc536d9097..af326a73404 100644 --- a/lib/libssl/src/apps/dh.c +++ b/lib/libssl/src/apps/dh.c @@ -71,8 +71,6 @@ #include #include -#undef PROG -#define PROG dh_main /* -inform arg - input format - default PEM (DER or PEM) * -outform arg - output format - default PEM @@ -84,10 +82,10 @@ * -C */ -int MAIN(int, char **); +int dh_main(int, char **); int -MAIN(int argc, char **argv) +dh_main(int argc, char **argv) { DH *dh = NULL; int i, badops = 0, text = 0; diff --git a/lib/libssl/src/apps/dhparam.c b/lib/libssl/src/apps/dhparam.c index 8585f8f419b..b7a81968605 100644 --- a/lib/libssl/src/apps/dhparam.c +++ b/lib/libssl/src/apps/dhparam.c @@ -127,8 +127,6 @@ #include #endif -#undef PROG -#define PROG dhparam_main #define DEFBITS 512 @@ -145,10 +143,10 @@ static int dh_cb(int p, int n, BN_GENCB * cb); -int MAIN(int, char **); +int dhparam_main(int, char **); int -MAIN(int argc, char **argv) +dhparam_main(int argc, char **argv) { DH *dh = NULL; int i, badops = 0, text = 0; diff --git a/lib/libssl/src/apps/dsa.c b/lib/libssl/src/apps/dsa.c index a4132de0ea1..6df8c25596d 100644 --- a/lib/libssl/src/apps/dsa.c +++ b/lib/libssl/src/apps/dsa.c @@ -71,8 +71,6 @@ #include #include -#undef PROG -#define PROG dsa_main /* -inform arg - input format - default PEM (one of DER, NET or PEM) * -outform arg - output format - default PEM @@ -92,10 +90,10 @@ * -modulus - print the DSA public key */ -int MAIN(int, char **); +int dsa_main(int, char **); int -MAIN(int argc, char **argv) +dsa_main(int argc, char **argv) { ENGINE *e = NULL; int ret = 1; diff --git a/lib/libssl/src/apps/dsaparam.c b/lib/libssl/src/apps/dsaparam.c index e2ae9bec190..4b4f98fec66 100644 --- a/lib/libssl/src/apps/dsaparam.c +++ b/lib/libssl/src/apps/dsaparam.c @@ -77,8 +77,6 @@ #include #include -#undef PROG -#define PROG dsaparam_main /* -inform arg - input format - default PEM (DER or PEM) * -outform arg - output format - default PEM @@ -108,10 +106,10 @@ timebomb_sigalarm(int foo) static int dsa_cb(int p, int n, BN_GENCB * cb); -int MAIN(int, char **); +int dsaparam_main(int, char **); int -MAIN(int argc, char **argv) +dsaparam_main(int argc, char **argv) { DSA *dsa = NULL; int i, badops = 0, text = 0; diff --git a/lib/libssl/src/apps/ec.c b/lib/libssl/src/apps/ec.c index 2d5525d508f..561b6847aab 100644 --- a/lib/libssl/src/apps/ec.c +++ b/lib/libssl/src/apps/ec.c @@ -67,8 +67,6 @@ #include #include -#undef PROG -#define PROG ec_main /* -inform arg - input format - default PEM (one of DER, NET or PEM) * -outform arg - output format - default PEM @@ -81,10 +79,10 @@ * -param_enc arg - specifies the parameter encoding */ -int MAIN(int, char **); +int ec_main(int, char **); int -MAIN(int argc, char **argv) +ec_main(int argc, char **argv) { int ret = 1; EC_KEY *eckey = NULL; diff --git a/lib/libssl/src/apps/ecparam.c b/lib/libssl/src/apps/ecparam.c index e4b7790f18b..fee53257a9b 100644 --- a/lib/libssl/src/apps/ecparam.c +++ b/lib/libssl/src/apps/ecparam.c @@ -84,8 +84,6 @@ #include #include -#undef PROG -#define PROG ecparam_main /* -inform arg - input format - default PEM (DER or PEM) * -outform arg - output format - default PEM @@ -114,10 +112,10 @@ static int ecparam_print_var(BIO *, BIGNUM *, const char *, int, unsigned char *); -int MAIN(int, char **); +int ecparam_main(int, char **); int -MAIN(int argc, char **argv) +ecparam_main(int argc, char **argv) { EC_GROUP *group = NULL; point_conversion_form_t form = POINT_CONVERSION_UNCOMPRESSED; diff --git a/lib/libssl/src/apps/enc.c b/lib/libssl/src/apps/enc.c index ce54c39e3fe..18760113c12 100644 --- a/lib/libssl/src/apps/enc.c +++ b/lib/libssl/src/apps/enc.c @@ -73,7 +73,6 @@ int set_hex(char *in, unsigned char *out, int size); #undef SIZE #undef BSIZE -#undef PROG #define SIZE (512) #define BSIZE (8*1024) @@ -96,10 +95,10 @@ show_ciphers(const OBJ_NAME * name, void *bio_) BIO_printf(bio, " "); } -int MAIN(int, char **); +int enc_main(int, char **); int -MAIN(int argc, char **argv) +enc_main(int argc, char **argv) { static const char magic[] = "Salted__"; char mbuf[sizeof magic - 1]; diff --git a/lib/libssl/src/apps/engine.c b/lib/libssl/src/apps/engine.c index 5cfd3e7677d..5ed33d0d399 100644 --- a/lib/libssl/src/apps/engine.c +++ b/lib/libssl/src/apps/engine.c @@ -69,8 +69,6 @@ #include #include -#undef PROG -#define PROG engine_main static const char *engine_usage[] = { "usage: engine opts [engine ...]\n", @@ -325,10 +323,10 @@ util_do_cmds(ENGINE * e, STACK_OF(OPENSSL_STRING) * cmds, } } -int MAIN(int, char **); +int engine_main(int, char **); int -MAIN(int argc, char **argv) +engine_main(int argc, char **argv) { int ret = 1, i; const char **pp; diff --git a/lib/libssl/src/apps/errstr.c b/lib/libssl/src/apps/errstr.c index 77d2ea6a7c5..71470847043 100644 --- a/lib/libssl/src/apps/errstr.c +++ b/lib/libssl/src/apps/errstr.c @@ -65,13 +65,11 @@ #include #include -#undef PROG -#define PROG errstr_main -int MAIN(int, char **); +int errstr_main(int, char **); int -MAIN(int argc, char **argv) +errstr_main(int argc, char **argv) { int i, ret = 0; char buf[256]; diff --git a/lib/libssl/src/apps/gendh.c b/lib/libssl/src/apps/gendh.c index 644ef87bd25..6e03c8ab167 100644 --- a/lib/libssl/src/apps/gendh.c +++ b/lib/libssl/src/apps/gendh.c @@ -79,15 +79,13 @@ #include #define DEFBITS 512 -#undef PROG -#define PROG gendh_main static int dh_cb(int p, int n, BN_GENCB * cb); -int MAIN(int, char **); +int gendh_main(int, char **); int -MAIN(int argc, char **argv) +gendh_main(int argc, char **argv) { BN_GENCB cb; DH *dh = NULL; diff --git a/lib/libssl/src/apps/gendsa.c b/lib/libssl/src/apps/gendsa.c index 2042f69f68c..9d89cd07cb9 100644 --- a/lib/libssl/src/apps/gendsa.c +++ b/lib/libssl/src/apps/gendsa.c @@ -71,13 +71,11 @@ #include #define DEFBITS 512 -#undef PROG -#define PROG gendsa_main -int MAIN(int, char **); +int gendsa_main(int, char **); int -MAIN(int argc, char **argv) +gendsa_main(int argc, char **argv) { DSA *dsa = NULL; int ret = 1; diff --git a/lib/libssl/src/apps/genpkey.c b/lib/libssl/src/apps/genpkey.c index ec7e5b2f256..242da0e0aad 100644 --- a/lib/libssl/src/apps/genpkey.c +++ b/lib/libssl/src/apps/genpkey.c @@ -70,12 +70,11 @@ init_keygen_file(BIO * err, EVP_PKEY_CTX ** pctx, const char *file, ENGINE * e); static int genpkey_cb(EVP_PKEY_CTX * ctx); -#define PROG genpkey_main -int MAIN(int, char **); +int genpkey_main(int, char **); int -MAIN(int argc, char **argv) +genpkey_main(int argc, char **argv) { ENGINE *e = NULL; char **args, *outfile = NULL; diff --git a/lib/libssl/src/apps/genrsa.c b/lib/libssl/src/apps/genrsa.c index 67e68fc20a6..98ab23a571a 100644 --- a/lib/libssl/src/apps/genrsa.c +++ b/lib/libssl/src/apps/genrsa.c @@ -79,15 +79,13 @@ #include #define DEFBITS 1024 -#undef PROG -#define PROG genrsa_main static int genrsa_cb(int p, int n, BN_GENCB * cb); -int MAIN(int, char **); +int genrsa_main(int, char **); int -MAIN(int argc, char **argv) +genrsa_main(int argc, char **argv) { BN_GENCB cb; #ifndef OPENSSL_NO_ENGINE diff --git a/lib/libssl/src/apps/nseq.c b/lib/libssl/src/apps/nseq.c index 43f3073635a..120792edbce 100644 --- a/lib/libssl/src/apps/nseq.c +++ b/lib/libssl/src/apps/nseq.c @@ -62,13 +62,11 @@ #include #include -#undef PROG -#define PROG nseq_main -int MAIN(int, char **); +int nseq_main(int, char **); int -MAIN(int argc, char **argv) +nseq_main(int argc, char **argv) { char **args, *infile = NULL, *outfile = NULL; BIO *in = NULL, *out = NULL; diff --git a/lib/libssl/src/apps/ocsp.c b/lib/libssl/src/apps/ocsp.c index fa964b8125d..a16237c1f81 100644 --- a/lib/libssl/src/apps/ocsp.c +++ b/lib/libssl/src/apps/ocsp.c @@ -97,12 +97,10 @@ add_ocsp_cert(OCSP_REQUEST ** req, X509 * cert, const EVP_MD * cert_id_md, X509 STACK_OF(CONF_VALUE) * headers, OCSP_REQUEST * req, int req_timeout); -#undef PROG -#define PROG ocsp_main - int MAIN(int, char **); + int ocsp_main(int, char **); - int MAIN(int argc, char **argv) + int ocsp_main(int argc, char **argv) { ENGINE *e = NULL; char **args; diff --git a/lib/libssl/src/apps/passwd.c b/lib/libssl/src/apps/passwd.c index 92f6b776b69..09c427065ad 100644 --- a/lib/libssl/src/apps/passwd.c +++ b/lib/libssl/src/apps/passwd.c @@ -23,8 +23,6 @@ #endif -#undef PROG -#define PROG passwd_main static unsigned const char cov_2char[64] = { @@ -56,10 +54,10 @@ do_passwd(int passed_salt, char **salt_p, char **salt_malloc_p, * -reverse - switch table columns */ -int MAIN(int, char **); +int passwd_main(int, char **); int -MAIN(int argc, char **argv) +passwd_main(int argc, char **argv) { int ret = 1; char *infile = NULL; @@ -466,7 +464,7 @@ err: #else int -MAIN(int argc, char **argv) +passwd_main(int argc, char **argv) { fputs("Program not available.\n", stderr) return (1); diff --git a/lib/libssl/src/apps/pkcs12.c b/lib/libssl/src/apps/pkcs12.c index 783abe277e5..58a7224c652 100644 --- a/lib/libssl/src/apps/pkcs12.c +++ b/lib/libssl/src/apps/pkcs12.c @@ -68,7 +68,6 @@ #include #include -#define PROG pkcs12_main const EVP_CIPHER *enc; @@ -91,9 +90,9 @@ dump_certs_pkeys_bags(BIO * out, STACK_OF(PKCS12_SAFEBAG) * bags, char *pass, int cert_load(BIO * in, STACK_OF(X509) * sk); static int set_pbe(BIO * err, int *ppbe, const char *str); - int MAIN(int, char **); + int pkcs12_main(int, char **); - int MAIN(int argc, char **argv) + int pkcs12_main(int argc, char **argv) { ENGINE *e = NULL; char *infile = NULL, *outfile = NULL, *keyname = NULL; diff --git a/lib/libssl/src/apps/pkcs7.c b/lib/libssl/src/apps/pkcs7.c index 3c5cf09680b..41c9689cc7d 100644 --- a/lib/libssl/src/apps/pkcs7.c +++ b/lib/libssl/src/apps/pkcs7.c @@ -68,8 +68,6 @@ #include #include -#undef PROG -#define PROG pkcs7_main /* -inform arg - input format - default PEM (DER or PEM) * -outform arg - output format - default PEM @@ -78,10 +76,10 @@ * -print_certs */ -int MAIN(int, char **); +int pkcs7_main(int, char **); int -MAIN(int argc, char **argv) +pkcs7_main(int argc, char **argv) { PKCS7 *p7 = NULL; int i, badops = 0; diff --git a/lib/libssl/src/apps/pkcs8.c b/lib/libssl/src/apps/pkcs8.c index 089511ee2ad..a0f0ef9b57b 100644 --- a/lib/libssl/src/apps/pkcs8.c +++ b/lib/libssl/src/apps/pkcs8.c @@ -63,12 +63,11 @@ #include #include -#define PROG pkcs8_main -int MAIN(int, char **); +int pkcs8_main(int, char **); int -MAIN(int argc, char **argv) +pkcs8_main(int argc, char **argv) { ENGINE *e = NULL; char **args, *infile = NULL, *outfile = NULL; diff --git a/lib/libssl/src/apps/pkey.c b/lib/libssl/src/apps/pkey.c index 963ab92368c..bd439cbf791 100644 --- a/lib/libssl/src/apps/pkey.c +++ b/lib/libssl/src/apps/pkey.c @@ -62,12 +62,11 @@ #include #include -#define PROG pkey_main -int MAIN(int, char **); +int pkey_main(int, char **); int -MAIN(int argc, char **argv) +pkey_main(int argc, char **argv) { ENGINE *e = NULL; char **args, *infile = NULL, *outfile = NULL; diff --git a/lib/libssl/src/apps/pkeyparam.c b/lib/libssl/src/apps/pkeyparam.c index 06c295dfe87..b653dee7940 100644 --- a/lib/libssl/src/apps/pkeyparam.c +++ b/lib/libssl/src/apps/pkeyparam.c @@ -62,12 +62,11 @@ #include #include -#define PROG pkeyparam_main -int MAIN(int, char **); +int pkeyparam_main(int, char **); int -MAIN(int argc, char **argv) +pkeyparam_main(int argc, char **argv) { char **args, *infile = NULL, *outfile = NULL; BIO *in = NULL, *out = NULL; diff --git a/lib/libssl/src/apps/pkeyutl.c b/lib/libssl/src/apps/pkeyutl.c index 226bb25220e..7bac41c3a88 100644 --- a/lib/libssl/src/apps/pkeyutl.c +++ b/lib/libssl/src/apps/pkeyutl.c @@ -68,9 +68,7 @@ static void usage(void); -#undef PROG -#define PROG pkeyutl_main static EVP_PKEY_CTX * init_ctx(int *pkeysize, @@ -86,10 +84,10 @@ do_keyop(EVP_PKEY_CTX * ctx, int pkey_op, unsigned char *out, size_t * poutlen, unsigned char *in, size_t inlen); -int MAIN(int argc, char **); +int pkeyutl_main(int argc, char **); int -MAIN(int argc, char **argv) +pkeyutl_main(int argc, char **argv) { BIO *in = NULL, *out = NULL; char *infile = NULL, *outfile = NULL, *sigfile = NULL; diff --git a/lib/libssl/src/apps/prime.c b/lib/libssl/src/apps/prime.c index 4bd53a69bf9..44998cde0fe 100644 --- a/lib/libssl/src/apps/prime.c +++ b/lib/libssl/src/apps/prime.c @@ -53,13 +53,11 @@ #include -#undef PROG -#define PROG prime_main -int MAIN(int, char **); +int prime_main(int, char **); int -MAIN(int argc, char **argv) +prime_main(int argc, char **argv) { int hex = 0; int checks = 20; diff --git a/lib/libssl/src/apps/rand.c b/lib/libssl/src/apps/rand.c index 443a64d848d..6bb8bfb45dd 100644 --- a/lib/libssl/src/apps/rand.c +++ b/lib/libssl/src/apps/rand.c @@ -63,8 +63,6 @@ #include #include -#undef PROG -#define PROG rand_main /* -out file - write to file * -rand file:file - PRNG seed files @@ -73,10 +71,10 @@ * num - write 'num' bytes */ -int MAIN(int, char **); +int rand_main(int, char **); int -MAIN(int argc, char **argv) +rand_main(int argc, char **argv) { int i, r, ret = 1; int badopt; diff --git a/lib/libssl/src/apps/req.c b/lib/libssl/src/apps/req.c index 923837c4f91..fc4dc790908 100644 --- a/lib/libssl/src/apps/req.c +++ b/lib/libssl/src/apps/req.c @@ -102,8 +102,6 @@ #define DEFAULT_KEY_LENGTH 512 #define MIN_KEY_LENGTH 384 -#undef PROG -#define PROG req_main /* -inform arg - input format - default PEM (DER or PEM) * -outform arg - output format - default PEM @@ -153,9 +151,9 @@ prompt_info(X509_REQ * req, static CONF *req_conf = NULL; static int batch = 0; - int MAIN(int, char **); + int req_main(int, char **); - int MAIN(int argc, char **argv) + int req_main(int argc, char **argv) { ENGINE *e = NULL, *gen_eng = NULL; unsigned long nmflag = 0, reqflag = 0; diff --git a/lib/libssl/src/apps/rsa.c b/lib/libssl/src/apps/rsa.c index e3f4989aeb2..0e08d929ba7 100644 --- a/lib/libssl/src/apps/rsa.c +++ b/lib/libssl/src/apps/rsa.c @@ -71,8 +71,6 @@ #include #include -#undef PROG -#define PROG rsa_main /* -inform arg - input format - default PEM (one of DER, NET or PEM) * -outform arg - output format - default PEM @@ -95,10 +93,10 @@ * -pubout - Output a public key. */ -int MAIN(int, char **); +int rsa_main(int, char **); int -MAIN(int argc, char **argv) +rsa_main(int argc, char **argv) { ENGINE *e = NULL; int ret = 1; diff --git a/lib/libssl/src/apps/rsautl.c b/lib/libssl/src/apps/rsautl.c index 9b8a040853e..8848a4ac4b3 100644 --- a/lib/libssl/src/apps/rsautl.c +++ b/lib/libssl/src/apps/rsautl.c @@ -76,14 +76,12 @@ static void usage(void); -#undef PROG -#define PROG rsautl_main -int MAIN(int argc, char **); +int rsautl_main(int argc, char **); int -MAIN(int argc, char **argv) +rsautl_main(int argc, char **argv) { ENGINE *e = NULL; BIO *in = NULL, *out = NULL; diff --git a/lib/libssl/src/apps/s_client.c b/lib/libssl/src/apps/s_client.c index 20b0ace5830..41911bcd246 100644 --- a/lib/libssl/src/apps/s_client.c +++ b/lib/libssl/src/apps/s_client.c @@ -167,8 +167,6 @@ #include "timeouts.h" -#undef PROG -#define PROG s_client_main /*#define SSL_HOST_NAME "www.netscape.com" */ /*#define SSL_HOST_NAME "193.118.187.102" */ @@ -543,10 +541,10 @@ enum { PROTO_XMPP }; -int MAIN(int, char **); +int s_client_main(int, char **); int -MAIN(int argc, char **argv) +s_client_main(int argc, char **argv) { unsigned int off = 0, clr = 0; SSL *con = NULL; diff --git a/lib/libssl/src/apps/s_server.c b/lib/libssl/src/apps/s_server.c index fb445738546..ebe205c4ab1 100644 --- a/lib/libssl/src/apps/s_server.c +++ b/lib/libssl/src/apps/s_server.c @@ -242,8 +242,6 @@ static int accept_socket = -1; #ifndef OPENSSL_NO_TLSEXT #define TEST_CERT2 "server2.pem" #endif -#undef PROG -#define PROG s_server_main extern int verify_depth, verify_return_error; @@ -733,7 +731,7 @@ next_proto_cb(SSL * s, const unsigned char **data, unsigned int *len, void *arg) #endif -int MAIN(int, char **); +int s_server_main(int, char **); #ifndef OPENSSL_NO_JPAKE static char *jpake_secret = NULL; @@ -746,7 +744,7 @@ static char *srtp_profiles = NULL; #endif int -MAIN(int argc, char *argv[]) +s_server_main(int argc, char *argv[]) { X509_VERIFY_PARAM *vpm = NULL; int badarg = 0; diff --git a/lib/libssl/src/apps/s_time.c b/lib/libssl/src/apps/s_time.c index bb680c6c9a2..f74c9b9c7f9 100644 --- a/lib/libssl/src/apps/s_time.c +++ b/lib/libssl/src/apps/s_time.c @@ -83,8 +83,6 @@ #endif #include -#undef PROG -#define PROG s_time_main #define SSL_CONNECT_NAME "localhost:4433" @@ -321,10 +319,10 @@ tm_Time_F(int s) * MAIN - main processing area for client * real name depends on MONOLITH */ -int MAIN(int, char **); +int s_time_main(int, char **); int -MAIN(int argc, char **argv) +s_time_main(int argc, char **argv) { double totalTime = 0.0; int nConn = 0; diff --git a/lib/libssl/src/apps/sess_id.c b/lib/libssl/src/apps/sess_id.c index b9750ab3561..5ea5c979727 100644 --- a/lib/libssl/src/apps/sess_id.c +++ b/lib/libssl/src/apps/sess_id.c @@ -66,8 +66,6 @@ #include #include -#undef PROG -#define PROG sess_id_main static const char *sess_id_usage[] = { "usage: sess_id args\n", @@ -85,10 +83,10 @@ static const char *sess_id_usage[] = { static SSL_SESSION *load_sess_id(char *file, int format); -int MAIN(int, char **); +int sess_id_main(int, char **); int -MAIN(int argc, char **argv) +sess_id_main(int argc, char **argv) { SSL_SESSION *x = NULL; X509 *peer = NULL; diff --git a/lib/libssl/src/apps/smime.c b/lib/libssl/src/apps/smime.c index 9332ae90951..22b28ce4b31 100644 --- a/lib/libssl/src/apps/smime.c +++ b/lib/libssl/src/apps/smime.c @@ -67,8 +67,6 @@ #include #include -#undef PROG -#define PROG smime_main static int save_certs(char *signerfile, STACK_OF(X509) * signers); static int smime_cb(int ok, X509_STORE_CTX * ctx); @@ -82,10 +80,10 @@ static int smime_cb(int ok, X509_STORE_CTX * ctx); #define SMIME_PK7OUT (5 | SMIME_IP | SMIME_OP) #define SMIME_RESIGN (6 | SMIME_IP | SMIME_OP | SMIME_SIGNERS) -int MAIN(int, char **); +int smime_main(int, char **); int -MAIN(int argc, char **argv) +smime_main(int argc, char **argv) { ENGINE *e = NULL; int operation = 0; diff --git a/lib/libssl/src/apps/speed.c b/lib/libssl/src/apps/speed.c index 6b8610aa702..9ff417c9935 100644 --- a/lib/libssl/src/apps/speed.c +++ b/lib/libssl/src/apps/speed.c @@ -83,8 +83,6 @@ /* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */ /* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */ -#undef PROG -#define PROG speed_main #include #include @@ -301,10 +299,10 @@ KDF1_SHA1(const void *in, size_t inlen, void *out, size_t * outlen) #endif /* OPENSSL_NO_ECDH */ -int MAIN(int, char **); +int speed_main(int, char **); int -MAIN(int argc, char **argv) +speed_main(int argc, char **argv) { unsigned char *buf = NULL, *buf2 = NULL; int mret = 1; diff --git a/lib/libssl/src/apps/spkac.c b/lib/libssl/src/apps/spkac.c index 33ca9933617..aa6be24361c 100644 --- a/lib/libssl/src/apps/spkac.c +++ b/lib/libssl/src/apps/spkac.c @@ -70,17 +70,15 @@ #include #include -#undef PROG -#define PROG spkac_main /* -in arg - input file - default stdin * -out arg - output file - default stdout */ -int MAIN(int, char **); +int spkac_main(int, char **); int -MAIN(int argc, char **argv) +spkac_main(int argc, char **argv) { ENGINE *e = NULL; int i, badops = 0, ret = 1; diff --git a/lib/libssl/src/apps/srp.c b/lib/libssl/src/apps/srp.c index 1a874fbd6c1..d68dc6c03ab 100644 --- a/lib/libssl/src/apps/srp.c +++ b/lib/libssl/src/apps/srp.c @@ -70,8 +70,6 @@ #include "apps.h" -#undef PROG -#define PROG srp_main #define BASE_SECTION "srp" #define CONFIG_FILE "openssl.cnf" @@ -115,7 +113,7 @@ static char *section = NULL; #define VVERBOSE if (verbose>1) -int MAIN(int, char **); +int srp_main(int, char **); static int get_index(CA_DB * db, char *id, char type) @@ -258,7 +256,7 @@ srp_create_user(char *user, char **srp_verifier, } int -MAIN(int argc, char **argv) +srp_main(int argc, char **argv) { int add_user = 0; int list_user = 0; diff --git a/lib/libssl/src/apps/ts.c b/lib/libssl/src/apps/ts.c index 627e37549d5..bac4b048f86 100644 --- a/lib/libssl/src/apps/ts.c +++ b/lib/libssl/src/apps/ts.c @@ -67,8 +67,6 @@ #include #include -#undef PROG -#define PROG ts_main /* Length of the nonce of the request in bits (must be a multiple of 8). */ #define NONCE_LENGTH 64 @@ -127,10 +125,10 @@ static X509_STORE *create_cert_store(char *ca_path, char *ca_file); static int verify_cb(int ok, X509_STORE_CTX * ctx); /* Main function definition. */ -int MAIN(int, char **); +int ts_main(int, char **); int -MAIN(int argc, char **argv) +ts_main(int argc, char **argv) { int ret = 1; char *configfile = NULL; diff --git a/lib/libssl/src/apps/verify.c b/lib/libssl/src/apps/verify.c index 3bb746a25e9..0bfc0f40381 100644 --- a/lib/libssl/src/apps/verify.c +++ b/lib/libssl/src/apps/verify.c @@ -66,8 +66,6 @@ #include #include -#undef PROG -#define PROG verify_main static int cb(int ok, X509_STORE_CTX * ctx); static int @@ -76,9 +74,9 @@ check(X509_STORE * ctx, char *file, STACK_OF(X509_CRL) * crls, ENGINE * e); static int v_verbose = 0, vflags = 0; - int MAIN(int, char **); + int verify_main(int, char **); - int MAIN(int argc, char **argv) + int verify_main(int argc, char **argv) { ENGINE *e = NULL; int i, ret = 1, badarg = 0; diff --git a/lib/libssl/src/apps/version.c b/lib/libssl/src/apps/version.c index 42920fc9f1c..41fb22bc8cc 100644 --- a/lib/libssl/src/apps/version.c +++ b/lib/libssl/src/apps/version.c @@ -132,13 +132,11 @@ #include #endif -#undef PROG -#define PROG version_main -int MAIN(int, char **); +int version_main(int, char **); int -MAIN(int argc, char **argv) +version_main(int argc, char **argv) { int i, ret = 0; int cflags = 0, version = 0, date = 0, options = 0, platform = 0, diff --git a/lib/libssl/src/apps/x509.c b/lib/libssl/src/apps/x509.c index cdeff651098..b9585da4e6d 100644 --- a/lib/libssl/src/apps/x509.c +++ b/lib/libssl/src/apps/x509.c @@ -80,8 +80,6 @@ #include #endif -#undef PROG -#define PROG x509_main #undef POSTFIX #define POSTFIX ".srl" @@ -166,9 +164,9 @@ x509_certify(X509_STORE * ctx, char *CAfile, const EVP_MD * digest, static int purpose_print(BIO * bio, X509 * cert, X509_PURPOSE * pt); static int reqfile = 0; - int MAIN(int, char **); + int x509_main(int, char **); - int MAIN(int argc, char **argv) + int x509_main(int argc, char **argv) { ENGINE *e = NULL; int ret = 1;