_lrotl and _lrotr are defined in MSVC but nowhere else that we know
[openssl.git] / crypto / rc5 / rc5speed.c
index 54163b85e09157d416857f7755d14ba11de0d9f9..05f5e0fabe8da36f240d95dfcf57c503fb292814 100644 (file)
 /* 11-Sep-92 Andrew Daviel   Support for Silicon Graphics IRIX added */
 /* 06-Apr-92 Luke Brennan    Support for VMS and add extra signal calls */
 
 /* 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(MSDOS) && (!defined(VMS) || defined(__DECC))
 #define TIMES
 #endif
 
 #include <stdio.h>
 #define TIMES
 #endif
 
 #include <stdio.h>
-#ifndef MSDOS
-#include <unistd.h>
-#else
-#include <io.h>
-extern int exit();
-#endif
+
+#include <openssl/e_os2.h>
+#include OPENSSL_UNISTD_IO
+OPENSSL_DECLARE_EXIT
+
 #include <signal.h>
 #include <signal.h>
-#ifndef VMS
 #ifndef _IRIX
 #include <time.h>
 #endif
 #ifndef _IRIX
 #include <time.h>
 #endif
@@ -79,15 +77,15 @@ extern int exit();
 #include <sys/types.h>
 #include <sys/times.h>
 #endif
 #include <sys/types.h>
 #include <sys/times.h>
 #endif
-#else /* VMS */
-#include <types.h>
-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(VMS) && defined(__DECC) && !defined(__TMS)
+#undef TIMES
 #endif
 #endif
+
 #ifndef TIMES
 #include <sys/timeb.h>
 #endif
 #ifndef TIMES
 #include <sys/timeb.h>
 #endif
@@ -98,16 +96,12 @@ struct tms {
 #include <sys/param.h>
 #endif
 
 #include <sys/param.h>
 #endif
 
-#include "rc5.h"
+#include <openssl/rc5.h>
 
 /* The following if from times(3) man page.  It may need to be changed */
 #ifndef HZ
 #ifndef CLK_TCK
 
 /* 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
 #define HZ     100.0
-#endif
 #else /* CLK_TCK */
 #define HZ ((double)CLK_TCK)
 #endif
 #else /* CLK_TCK */
 #define HZ ((double)CLK_TCK)
 #endif
@@ -116,12 +110,7 @@ struct tms {
 #define BUFSIZE        ((long)1024)
 long run=0;
 
 #define BUFSIZE        ((long)1024)
 long run=0;
 
-#ifndef NOPROTO
 double Time_F(int s);
 double Time_F(int s);
-#else
-double Time_F();
-#endif
-
 #ifdef SIGALRM
 #if defined(__STDC__) || defined(sgi) || defined(_AIX)
 #define SIGRETTYPE void
 #ifdef SIGALRM
 #if defined(__STDC__) || defined(sgi) || defined(_AIX)
 #define SIGRETTYPE void
@@ -129,12 +118,7 @@ double Time_F();
 #define SIGRETTYPE int
 #endif
 
 #define SIGRETTYPE int
 #endif
 
-#ifndef NOPROTO
 SIGRETTYPE sig_done(int sig);
 SIGRETTYPE sig_done(int sig);
-#else
-SIGRETTYPE sig_done();
-#endif
-
 SIGRETTYPE sig_done(int sig)
        {
        signal(SIGALRM,sig_done);
 SIGRETTYPE sig_done(int sig)
        {
        signal(SIGALRM,sig_done);
@@ -199,7 +183,7 @@ int main(int argc, char **argv)
 #endif
 
 #ifndef TIMES
 #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
 
        printf("program when this computer is idle.\n");
 #endif