diff options
Diffstat (limited to 'crypto/openssl/apps/speed.c')
-rw-r--r-- | crypto/openssl/apps/speed.c | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/crypto/openssl/apps/speed.c b/crypto/openssl/apps/speed.c index f73deba..554169c 100644 --- a/crypto/openssl/apps/speed.c +++ b/crypto/openssl/apps/speed.c @@ -54,6 +54,8 @@ * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] + * + * $FreeBSD$ */ /* most of this code has been pilfered from my libdes speed.c program */ @@ -82,12 +84,12 @@ #include <openssl/rand.h> #include <openssl/err.h> -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(_DARWIN) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) # define USE_TOD -#elif !defined(MSDOS) && !defined(VXWORKS) && (!defined(VMS) || defined(__DECC)) +#elif !defined(MSDOS) && (!defined(VMS) || defined(__DECC)) # define TIMES #endif -#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(MPE) && !defined(__NetBSD__) && !defined(_DARWIN) && !defined(VXWORKS) +#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(MPE) && !defined(__NetBSD__) # define TIMEB #endif @@ -115,7 +117,7 @@ #include <sys/timeb.h> #endif -#if !defined(TIMES) && !defined(TIMEB) && !defined(USE_TOD) && !defined(VXWORKS) +#if !defined(TIMES) && !defined(TIMEB) && !defined(USE_TOD) #error "It seems neither struct tms nor struct timeb is supported in this platform!" #endif @@ -224,7 +226,7 @@ static double Time_F(int s, int usertime) #ifdef USE_TOD if(usertime) - { + { static struct rusage tstart,tend; if (s == START) @@ -284,23 +286,7 @@ static double Time_F(int s, int usertime) # if defined(TIMES) && defined(TIMEB) else # endif -# ifdef VXWORKS - { - static unsigned long tick_start, tick_end; - - if( s == START ) - { - tick_start = tickGet(); - return 0; - } - else - { - tick_end = tickGet(); - ret = (double)(tick_end - tick_start) / (double)sysClkRateGet(); - return((ret < 0.001)?0.001:ret); - } - } -# elif defined(TIMEB) +# ifdef TIMEB { static struct timeb tstart,tend; long i; @@ -319,7 +305,6 @@ static double Time_F(int s, int usertime) } } # endif - #endif } @@ -335,9 +320,7 @@ int MAIN(int argc, char **argv) #define DSA_NUM 3 long count,rsa_count; int i,j,k; -#ifndef NO_RSA unsigned rsa_num; -#endif #ifndef NO_MD2 unsigned char md2[MD2_DIGEST_LENGTH]; #endif |