提交 b318cfb1 编写于 作者: D Dr. Stephen Henson

PR: 1999

Submitted by: "Bayram Kurumahmut" <kbayram@ubicom.com>
Approved by: steve@openssl.org

Don't use HAVE_FORK in apps/speed.c it can conflict with configured version.
上级 e33d2901
...@@ -184,9 +184,13 @@ ...@@ -184,9 +184,13 @@
#include <openssl/ecdh.h> #include <openssl/ecdh.h>
#endif #endif
#if !defined(OPENSSL_SYS_VMS) && !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MACINTOSH_CLASSIC) && !defined(OPENSSL_SYS_OS2) && !defined(OPENSSL_SYS_NETWARE) #if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_NETWARE)
# define HAVE_FORK 1 # define NO_FORK 1
#endif #elif HAVE_FORK
# undef NO_FORK
#else
# define NO_FORK 1
#endef
#undef BUFSIZE #undef BUFSIZE
#define BUFSIZE ((long)1024*8+1) #define BUFSIZE ((long)1024*8+1)
...@@ -200,7 +204,7 @@ static void print_message(const char *s,long num,int length); ...@@ -200,7 +204,7 @@ static void print_message(const char *s,long num,int length);
static void pkey_print_message(const char *str, const char *str2, static void pkey_print_message(const char *str, const char *str2,
long num, int bits, int sec); long num, int bits, int sec);
static void print_result(int alg,int run_no,int count,double time_used); static void print_result(int alg,int run_no,int count,double time_used);
#ifdef HAVE_FORK #ifndef NO_FORK
static int do_multi(int multi); static int do_multi(int multi);
#endif #endif
...@@ -587,7 +591,7 @@ int MAIN(int argc, char **argv) ...@@ -587,7 +591,7 @@ int MAIN(int argc, char **argv)
const EVP_CIPHER *evp_cipher=NULL; const EVP_CIPHER *evp_cipher=NULL;
const EVP_MD *evp_md=NULL; const EVP_MD *evp_md=NULL;
int decrypt=0; int decrypt=0;
#ifdef HAVE_FORK #ifndef NO_FORK
int multi=0; int multi=0;
#endif #endif
...@@ -715,7 +719,7 @@ int MAIN(int argc, char **argv) ...@@ -715,7 +719,7 @@ int MAIN(int argc, char **argv)
j--; j--;
} }
#endif #endif
#ifdef HAVE_FORK #ifndef NO_FORK
else if ((argc > 0) && (strcmp(*argv,"-multi") == 0)) else if ((argc > 0) && (strcmp(*argv,"-multi") == 0))
{ {
argc--; argc--;
...@@ -1103,7 +1107,7 @@ int MAIN(int argc, char **argv) ...@@ -1103,7 +1107,7 @@ int MAIN(int argc, char **argv)
BIO_printf(bio_err,"-evp e use EVP e.\n"); BIO_printf(bio_err,"-evp e use EVP e.\n");
BIO_printf(bio_err,"-decrypt time decryption instead of encryption (only EVP).\n"); BIO_printf(bio_err,"-decrypt time decryption instead of encryption (only EVP).\n");
BIO_printf(bio_err,"-mr produce machine readable output.\n"); BIO_printf(bio_err,"-mr produce machine readable output.\n");
#ifdef HAVE_FORK #ifndef NO_FORK
BIO_printf(bio_err,"-multi n run n benchmarks in parallel.\n"); BIO_printf(bio_err,"-multi n run n benchmarks in parallel.\n");
#endif #endif
goto end; goto end;
...@@ -1113,7 +1117,7 @@ int MAIN(int argc, char **argv) ...@@ -1113,7 +1117,7 @@ int MAIN(int argc, char **argv)
j++; j++;
} }
#ifdef HAVE_FORK #ifndef NO_FORK
if(multi && do_multi(multi)) if(multi && do_multi(multi))
goto show_res; goto show_res;
#endif #endif
...@@ -2332,7 +2336,7 @@ int MAIN(int argc, char **argv) ...@@ -2332,7 +2336,7 @@ int MAIN(int argc, char **argv)
} }
if (rnd_fake) RAND_cleanup(); if (rnd_fake) RAND_cleanup();
#endif #endif
#ifdef HAVE_FORK #ifndef NO_FORK
show_res: show_res:
#endif #endif
if(!mr) if(!mr)
...@@ -2558,7 +2562,7 @@ static void print_result(int alg,int run_no,int count,double time_used) ...@@ -2558,7 +2562,7 @@ static void print_result(int alg,int run_no,int count,double time_used)
results[alg][run_no]=((double)count)/time_used*lengths[run_no]; results[alg][run_no]=((double)count)/time_used*lengths[run_no];
} }
#ifdef HAVE_FORK #ifndef NO_FORK
static char *sstrsep(char **string, const char *delim) static char *sstrsep(char **string, const char *delim)
{ {
char isdelim[256]; char isdelim[256];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册