Win32 fixes.
authorDr. Stephen Henson <steve@openssl.org>
Tue, 6 Nov 2001 13:40:27 +0000 (13:40 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 6 Nov 2001 13:40:27 +0000 (13:40 +0000)
apps/speed.c
crypto/evp/evp_test.c

index 5a882041fedb3722468c23f9b25c07520c4d2a49..2b083aa80c7baf7a164b886b5e855e2f2fc51816 100644 (file)
@@ -218,12 +218,6 @@ static void print_result(int alg,int run_no,int count,double time_used);
 #ifdef HAVE_FORK
 static int do_multi(int multi);
 #endif
-#ifdef SIGALRM
-#if defined(__STDC__) || defined(sgi) || defined(_AIX)
-#define SIGRETTYPE void
-#else
-#define SIGRETTYPE int
-#endif 
 
 #define ALGOR_NUM      16
 #define SIZE_NUM       5
@@ -238,6 +232,13 @@ static int lengths[SIZE_NUM]={8,64,256,1024,8*1024};
 static double rsa_results[RSA_NUM][2];
 static double dsa_results[DSA_NUM][2];
 
+#ifdef SIGALRM
+#if defined(__STDC__) || defined(sgi) || defined(_AIX)
+#define SIGRETTYPE void
+#else
+#define SIGRETTYPE int
+#endif 
+
 static SIGRETTYPE sig_done(int sig);
 static SIGRETTYPE sig_done(int sig)
        {
@@ -893,9 +894,9 @@ int MAIN(int argc, char **argv)
        do      {
                long i;
                count*=2;
-               Time_F(START,usertime);
+               Time_F(START);
                for (i=count; i; i--)
-                       des_ecb_encrypt(buf_as_des_cblock,buf_as_des_cblock,
+                       DES_ecb_encrypt(buf_as_des_cblock,buf_as_des_cblock,
                                &sch,DES_ENCRYPT);
                d=Time_F(STOP);
                } while (d <3);
@@ -1441,7 +1442,9 @@ int MAIN(int argc, char **argv)
                }
        if (rnd_fake) RAND_cleanup();
 #endif
+#ifdef HAVE_FORK
 show_res:
+#endif
        if(!mr)
                {
                fprintf(stdout,"%s\n",SSLeay_version(SSLEAY_VERSION));
index e312672ba2d66d7239969396d4784a135687a149..5ef67699dd8c86925a3b85dcd60e640b33adb17a 100644 (file)
@@ -229,7 +229,7 @@ static int test_cipher(const char *cipher,const unsigned char *key,int kn,
 
 static int test_digest(const char *digest,
                       const unsigned char *plaintext,int pn,
-                      const unsigned char *ciphertext, int cn)
+                      const unsigned char *ciphertext, unsigned int cn)
     {
     const EVP_MD *d;
     EVP_MD_CTX ctx;