X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Frc4%2Frc4speed.c;h=ced98c52df948b8065f4ee5cd858b261bc13be18;hp=f76262dd72b9172b49993aae32e6d049c3622233;hb=17085b022caf5975d3288cfdcd071826a7140735;hpb=ec577822f95a8bca0023c5c77cef1a4916822d4a diff --git a/crypto/rc4/rc4speed.c b/crypto/rc4/rc4speed.c index f76262dd72..ced98c52df 100644 --- a/crypto/rc4/rc4speed.c +++ b/crypto/rc4/rc4speed.c @@ -59,19 +59,17 @@ /* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */ /* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */ -#ifndef MSDOS +#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) && !defined(OPENSSL_SYS_MACOSX) #define TIMES #endif #include -#ifndef MSDOS -#include -#else -#include -extern int exit(); -#endif + +#include +#include OPENSSL_UNISTD_IO +OPENSSL_DECLARE_EXIT + #include -#ifndef VMS #ifndef _IRIX #include #endif @@ -79,15 +77,15 @@ extern int exit(); #include #include #endif -#else /* VMS */ -#include -struct tms { - time_t tms_utime; - time_t tms_stime; - time_t tms_uchild; /* I dunno... */ - time_t tms_uchildsys; /* so these names are a guess :-) */ - } + +/* Depending on the VMS version, the tms structure is perhaps defined. + The __TMS macro will show if it was. If it wasn't defined, we should + undefine TIMES, since that tells the rest of the program how things + should be handled. -- Richard Levitte */ +#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS) +#undef TIMES #endif + #ifndef TIMES #include #endif @@ -103,11 +101,7 @@ struct tms { /* The following if from times(3) man page. It may need to be changed */ #ifndef HZ #ifndef CLK_TCK -#ifndef VMS -#define HZ 100.0 -#else /* VMS */ #define HZ 100.0 -#endif #else /* CLK_TCK */ #define HZ ((double)CLK_TCK) #endif @@ -116,12 +110,7 @@ struct tms { #define BUFSIZE ((long)1024) long run=0; -#ifndef NOPROTO double Time_F(int s); -#else -double Time_F(); -#endif - #ifdef SIGALRM #if defined(__STDC__) || defined(sgi) || defined(_AIX) #define SIGRETTYPE void @@ -129,12 +118,7 @@ double Time_F(); #define SIGRETTYPE int #endif -#ifndef NOPROTO SIGRETTYPE sig_done(int sig); -#else -SIGRETTYPE sig_done(); -#endif - SIGRETTYPE sig_done(int sig) { signal(SIGALRM,sig_done); @@ -199,7 +183,7 @@ int main(int argc, char **argv) #endif #ifndef TIMES - printf("To get the most acurate results, try to run this\n"); + printf("To get the most accurate results, try to run this\n"); printf("program when this computer is idle.\n"); #endif @@ -259,7 +243,7 @@ int main(int argc, char **argv) printf("RC4 set_key per sec = %12.2f (%9.3fuS)\n",a,1.0e6/a); printf("RC4 bytes per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c); exit(0); -#if defined(LINT) || defined(MSDOS) +#if defined(LINT) || defined(OPENSSL_SYS_MSDOS) return(0); #endif }