diff options
author | Rich Salz <rsalz@akamai.com> | 2016-01-31 13:08:23 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-02-09 20:13:29 -0500 |
commit | effaf4dee90beff07bb40f21d81352304a5e8152 (patch) | |
tree | 4bc77d1b1998e6fac62b3a5967a223376cb47111 /apps | |
parent | 1ffa8a9685e22a5a0ff1b1322df4d1720b05ce4c (diff) | |
download | openssl-effaf4dee90beff07bb40f21d81352304a5e8152.tar.gz |
Use NON_EMPTY_TRANSLATION_UNIT, consistently.
This also closes RT 4123
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dhparam.c | 14 | ||||
-rw-r--r-- | apps/dsa.c | 13 | ||||
-rw-r--r-- | apps/dsaparam.c | 12 | ||||
-rw-r--r-- | apps/ec.c | 11 | ||||
-rw-r--r-- | apps/ecparam.c | 11 | ||||
-rw-r--r-- | apps/engine.c | 22 | ||||
-rw-r--r-- | apps/gendsa.c | 13 | ||||
-rw-r--r-- | apps/genrsa.c | 10 | ||||
-rw-r--r-- | apps/rsa.c | 11 | ||||
-rw-r--r-- | apps/rsautl.c | 11 | ||||
-rw-r--r-- | apps/srp.c | 32 |
11 files changed, 61 insertions, 99 deletions
diff --git a/apps/dhparam.c b/apps/dhparam.c index e794dacd1d..f7fd8c0c35 100644 --- a/apps/dhparam.c +++ b/apps/dhparam.c @@ -108,8 +108,11 @@ * */ -#include <openssl/opensslconf.h> /* for OPENSSL_NO_DH */ -#ifndef OPENSSL_NO_DH +#include <openssl/opensslconf.h> +#ifdef OPENSSL_NO_DH +NON_EMPTY_TRANSLATION_UNIT +#else + # include <stdio.h> # include <stdlib.h> # include <time.h> @@ -443,11 +446,4 @@ static int dh_cb(int p, int n, BN_GENCB *cb) (void)BIO_flush(BN_GENCB_get_arg(cb)); return 1; } - -#else /* !OPENSSL_NO_DH */ - -# if PEDANTIC -static void *dummy = &dummy; -# endif - #endif diff --git a/apps/dsa.c b/apps/dsa.c index ebb5775a8b..5ee97cf66b 100644 --- a/apps/dsa.c +++ b/apps/dsa.c @@ -55,8 +55,11 @@ * [including the GNU Public Licence.] */ -#include <openssl/opensslconf.h> /* for OPENSSL_NO_DSA */ -#ifndef OPENSSL_NO_DSA +#include <openssl/opensslconf.h> +#ifdef OPENSSL_NO_DSA +NON_EMPTY_TRANSLATION_UNIT +#else + # include <stdio.h> # include <stdlib.h> # include <string.h> @@ -299,10 +302,4 @@ int dsa_main(int argc, char **argv) OPENSSL_free(passout); return (ret); } -#else /* !OPENSSL_NO_DSA */ - -# if PEDANTIC -static void *dummy = &dummy; -# endif - #endif diff --git a/apps/dsaparam.c b/apps/dsaparam.c index c8c383faeb..7b9ca631a7 100644 --- a/apps/dsaparam.c +++ b/apps/dsaparam.c @@ -55,9 +55,11 @@ * [including the GNU Public Licence.] */ -#include <openssl/opensslconf.h> /* for OPENSSL_NO_DSA */ +#include <openssl/opensslconf.h> +#ifdef OPENSSL_NO_DSA +NON_EMPTY_TRANSLATION_UNIT +#else -#ifndef OPENSSL_NO_DSA # include <stdio.h> # include <stdlib.h> # include <time.h> @@ -347,10 +349,4 @@ static int dsa_cb(int p, int n, BN_GENCB *cb) # endif return 1; } -#else /* !OPENSSL_NO_DSA */ - -# if PEDANTIC -static void *dummy = &dummy; -# endif - #endif @@ -56,7 +56,10 @@ */ #include <openssl/opensslconf.h> -#ifndef OPENSSL_NO_EC +#ifdef OPENSSL_NO_EC +NON_EMPTY_TRANSLATION_UNIT +#else + # include <stdio.h> # include <stdlib.h> # include <string.h> @@ -307,10 +310,4 @@ int ec_main(int argc, char **argv) OPENSSL_free(passout); return (ret); } -#else /* !OPENSSL_NO_EC */ - -# if PEDANTIC -static void *dummy = &dummy; -# endif - #endif diff --git a/apps/ecparam.c b/apps/ecparam.c index b90247cc80..7889caccef 100644 --- a/apps/ecparam.c +++ b/apps/ecparam.c @@ -69,7 +69,10 @@ */ #include <openssl/opensslconf.h> -#ifndef OPENSSL_NO_EC +#ifdef OPENSSL_NO_EC +NON_EMPTY_TRANSLATION_UNIT +#else + # include <stdio.h> # include <stdlib.h> # include <time.h> @@ -502,10 +505,4 @@ int ecparam_main(int argc, char **argv) return (ret); } -#else /* !OPENSSL_NO_EC */ - -# if PEDANTIC -static void *dummy = &dummy; -# endif - #endif diff --git a/apps/engine.c b/apps/engine.c index b10f61631d..b60bfbc294 100644 --- a/apps/engine.c +++ b/apps/engine.c @@ -56,12 +56,16 @@ * */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include "apps.h" -#include <openssl/err.h> -#ifndef OPENSSL_NO_ENGINE +#include <openssl/opensslconf.h> +#ifdef OPENSSL_NO_ENGINE +NON_EMPTY_TRANSLATION_UNIT +#else + +# include "apps.h" +# include <stdio.h> +# include <stdlib.h> +# include <string.h> +# include <openssl/err.h> # include <openssl/engine.h> # include <openssl/ssl.h> @@ -483,10 +487,4 @@ int engine_main(int argc, char **argv) BIO_free_all(out); return (ret); } -#else - -# if PEDANTIC -static void *dummy = &dummy; -# endif - #endif diff --git a/apps/gendsa.c b/apps/gendsa.c index 9259c6ccaa..6769968cdf 100644 --- a/apps/gendsa.c +++ b/apps/gendsa.c @@ -55,8 +55,11 @@ * [including the GNU Public Licence.] */ -#include <openssl/opensslconf.h> /* for OPENSSL_NO_DSA */ -#ifndef OPENSSL_NO_DSA +#include <openssl/opensslconf.h> +#ifdef OPENSSL_NO_DSA +NON_EMPTY_TRANSLATION_UNIT +#else + # include <stdio.h> # include <string.h> # include <sys/types.h> @@ -185,10 +188,4 @@ int gendsa_main(int argc, char **argv) OPENSSL_free(passout); return (ret); } -#else /* !OPENSSL_NO_DSA */ - -# if PEDANTIC -static void *dummy = &dummy; -# endif - #endif diff --git a/apps/genrsa.c b/apps/genrsa.c index 33a1567711..0b0123fa1d 100644 --- a/apps/genrsa.c +++ b/apps/genrsa.c @@ -56,8 +56,10 @@ */ #include <openssl/opensslconf.h> +#ifdef OPENSSL_NO_RSA +NON_EMPTY_TRANSLATION_UNIT +#else -#ifndef OPENSSL_NO_RSA # include <stdio.h> # include <string.h> # include <sys/types.h> @@ -232,10 +234,4 @@ static int genrsa_cb(int p, int n, BN_GENCB *cb) (void)BIO_flush(BN_GENCB_get_arg(cb)); return 1; } -#else /* !OPENSSL_NO_RSA */ - -# if PEDANTIC -static void *dummy = &dummy; -# endif - #endif diff --git a/apps/rsa.c b/apps/rsa.c index 810713faa8..23383d93de 100644 --- a/apps/rsa.c +++ b/apps/rsa.c @@ -104,7 +104,10 @@ */ #include <openssl/opensslconf.h> -#ifndef OPENSSL_NO_RSA +#ifdef OPENSSL_NO_RSA +NON_EMPTY_TRANSLATION_UNIT +#else + # include <stdio.h> # include <stdlib.h> # include <string.h> @@ -396,10 +399,4 @@ int rsa_main(int argc, char **argv) OPENSSL_free(passout); return (ret); } -#else /* !OPENSSL_NO_RSA */ - -# if PEDANTIC -static void *dummy = &dummy; -# endif - #endif diff --git a/apps/rsautl.c b/apps/rsautl.c index beb03eb8dc..f3c90b77c6 100644 --- a/apps/rsautl.c +++ b/apps/rsautl.c @@ -57,7 +57,9 @@ */ #include <openssl/opensslconf.h> -#ifndef OPENSSL_NO_RSA +#ifdef OPENSSL_NO_RSA +NON_EMPTY_TRANSLATION_UNIT +#else # include "apps.h" # include <string.h> @@ -319,11 +321,4 @@ int rsautl_main(int argc, char **argv) OPENSSL_free(passin); return ret; } - -#else /* !OPENSSL_NO_RSA */ - -# if PEDANTIC -static void *dummy = &dummy; -# endif - #endif diff --git a/apps/srp.c b/apps/srp.c index c3e4f439fb..2c4d746f88 100644 --- a/apps/srp.c +++ b/apps/srp.c @@ -55,19 +55,22 @@ * Hudson (tjh@cryptsoft.com). * */ + #include <openssl/opensslconf.h> +#ifdef OPENSSL_NO_SRP +NON_EMPTY_TRANSLATION_UNIT +#else -#ifndef OPENSSL_NO_SRP -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <openssl/conf.h> -#include <openssl/bio.h> -#include <openssl/err.h> -#include <openssl/txt_db.h> -#include <openssl/buffer.h> -#include <openssl/srp.h> -#include "apps.h" +# include <stdio.h> +# include <stdlib.h> +# include <string.h> +# include <openssl/conf.h> +# include <openssl/bio.h> +# include <openssl/err.h> +# include <openssl/txt_db.h> +# include <openssl/buffer.h> +# include <openssl/srp.h> +# include "apps.h" # define BASE_SECTION "srp" # define CONFIG_FILE "openssl.cnf" @@ -653,11 +656,4 @@ int srp_main(int argc, char **argv) OBJ_cleanup(); return (ret); } - -#else - -# if PEDANTIC -static void *dummy = &dummy; -# endif - #endif |