diff options
author | beck <> | 1999-09-29 04:37:45 +0000 |
---|---|---|
committer | beck <> | 1999-09-29 04:37:45 +0000 |
commit | de8f24ea083384bb66b32ec105dc4743c5663cdf (patch) | |
tree | 1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/bf/bfspeed.c | |
parent | cb929d29896bcb87c2a97417fbd03e50078fc178 (diff) | |
download | openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.gz openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.bz2 openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.zip |
OpenSSL 0.9.4 merge
Diffstat (limited to 'src/lib/libcrypto/bf/bfspeed.c')
-rw-r--r-- | src/lib/libcrypto/bf/bfspeed.c | 59 |
1 files changed, 20 insertions, 39 deletions
diff --git a/src/lib/libcrypto/bf/bfspeed.c b/src/lib/libcrypto/bf/bfspeed.c index 640d820dd3..9b893e92cc 100644 --- a/src/lib/libcrypto/bf/bfspeed.c +++ b/src/lib/libcrypto/bf/bfspeed.c | |||
@@ -59,19 +59,17 @@ | |||
59 | /* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */ | 59 | /* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */ |
60 | /* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */ | 60 | /* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */ |
61 | 61 | ||
62 | #ifndef MSDOS | 62 | #if !defined(MSDOS) && (!defined(VMS) || defined(__DECC)) |
63 | #define TIMES | 63 | #define TIMES |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | #include <stdio.h> | 66 | #include <stdio.h> |
67 | #ifndef MSDOS | 67 | |
68 | #include <unistd.h> | 68 | #include <openssl/e_os2.h> |
69 | #else | 69 | #include OPENSSL_UNISTD_IO |
70 | #include <io.h> | 70 | OPENSSL_DECLARE_EXIT |
71 | extern int exit(); | 71 | |
72 | #endif | ||
73 | #include <signal.h> | 72 | #include <signal.h> |
74 | #ifndef VMS | ||
75 | #ifndef _IRIX | 73 | #ifndef _IRIX |
76 | #include <time.h> | 74 | #include <time.h> |
77 | #endif | 75 | #endif |
@@ -79,34 +77,31 @@ extern int exit(); | |||
79 | #include <sys/types.h> | 77 | #include <sys/types.h> |
80 | #include <sys/times.h> | 78 | #include <sys/times.h> |
81 | #endif | 79 | #endif |
82 | #else /* VMS */ | 80 | |
83 | #include <types.h> | 81 | /* Depending on the VMS version, the tms structure is perhaps defined. |
84 | struct tms { | 82 | The __TMS macro will show if it was. If it wasn't defined, we should |
85 | time_t tms_utime; | 83 | undefine TIMES, since that tells the rest of the program how things |
86 | time_t tms_stime; | 84 | should be handled. -- Richard Levitte */ |
87 | time_t tms_uchild; /* I dunno... */ | 85 | #if defined(VMS) && defined(__DECC) && !defined(__TMS) |
88 | time_t tms_uchildsys; /* so these names are a guess :-) */ | 86 | #undef TIMES |
89 | } | ||
90 | #endif | 87 | #endif |
88 | |||
91 | #ifndef TIMES | 89 | #ifndef TIMES |
92 | #include <sys/timeb.h> | 90 | #include <sys/timeb.h> |
93 | #endif | 91 | #endif |
94 | 92 | ||
95 | #ifdef sun | 93 | #if defined(sun) || defined(__ultrix) |
94 | #define _POSIX_SOURCE | ||
96 | #include <limits.h> | 95 | #include <limits.h> |
97 | #include <sys/param.h> | 96 | #include <sys/param.h> |
98 | #endif | 97 | #endif |
99 | 98 | ||
100 | #include "blowfish.h" | 99 | #include <openssl/blowfish.h> |
101 | 100 | ||
102 | /* The following if from times(3) man page. It may need to be changed */ | 101 | /* The following if from times(3) man page. It may need to be changed */ |
103 | #ifndef HZ | 102 | #ifndef HZ |
104 | #ifndef CLK_TCK | 103 | #ifndef CLK_TCK |
105 | #ifndef VMS | ||
106 | #define HZ 100.0 | ||
107 | #else /* VMS */ | ||
108 | #define HZ 100.0 | 104 | #define HZ 100.0 |
109 | #endif | ||
110 | #else /* CLK_TCK */ | 105 | #else /* CLK_TCK */ |
111 | #define HZ ((double)CLK_TCK) | 106 | #define HZ ((double)CLK_TCK) |
112 | #endif | 107 | #endif |
@@ -115,12 +110,7 @@ struct tms { | |||
115 | #define BUFSIZE ((long)1024) | 110 | #define BUFSIZE ((long)1024) |
116 | long run=0; | 111 | long run=0; |
117 | 112 | ||
118 | #ifndef NOPROTO | ||
119 | double Time_F(int s); | 113 | double Time_F(int s); |
120 | #else | ||
121 | double Time_F(); | ||
122 | #endif | ||
123 | |||
124 | #ifdef SIGALRM | 114 | #ifdef SIGALRM |
125 | #if defined(__STDC__) || defined(sgi) || defined(_AIX) | 115 | #if defined(__STDC__) || defined(sgi) || defined(_AIX) |
126 | #define SIGRETTYPE void | 116 | #define SIGRETTYPE void |
@@ -128,14 +118,8 @@ double Time_F(); | |||
128 | #define SIGRETTYPE int | 118 | #define SIGRETTYPE int |
129 | #endif | 119 | #endif |
130 | 120 | ||
131 | #ifndef NOPROTO | ||
132 | SIGRETTYPE sig_done(int sig); | 121 | SIGRETTYPE sig_done(int sig); |
133 | #else | 122 | SIGRETTYPE sig_done(int sig) |
134 | SIGRETTYPE sig_done(); | ||
135 | #endif | ||
136 | |||
137 | SIGRETTYPE sig_done(sig) | ||
138 | int sig; | ||
139 | { | 123 | { |
140 | signal(SIGALRM,sig_done); | 124 | signal(SIGALRM,sig_done); |
141 | run=0; | 125 | run=0; |
@@ -148,8 +132,7 @@ int sig; | |||
148 | #define START 0 | 132 | #define START 0 |
149 | #define STOP 1 | 133 | #define STOP 1 |
150 | 134 | ||
151 | double Time_F(s) | 135 | double Time_F(int s) |
152 | int s; | ||
153 | { | 136 | { |
154 | double ret; | 137 | double ret; |
155 | #ifdef TIMES | 138 | #ifdef TIMES |
@@ -185,9 +168,7 @@ int s; | |||
185 | #endif | 168 | #endif |
186 | } | 169 | } |
187 | 170 | ||
188 | int main(argc,argv) | 171 | int main(int argc, char **argv) |
189 | int argc; | ||
190 | char **argv; | ||
191 | { | 172 | { |
192 | long count; | 173 | long count; |
193 | static unsigned char buf[BUFSIZE]; | 174 | static unsigned char buf[BUFSIZE]; |