summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bf/bf_opts.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bf/bf_opts.c')
-rw-r--r--src/lib/libcrypto/bf/bf_opts.c61
1 files changed, 21 insertions, 40 deletions
diff --git a/src/lib/libcrypto/bf/bf_opts.c b/src/lib/libcrypto/bf/bf_opts.c
index 5cfa60c537..5f330cc53c 100644
--- a/src/lib/libcrypto/bf/bf_opts.c
+++ b/src/lib/libcrypto/bf/bf_opts.c
@@ -59,19 +59,17 @@
59/* define PART1, PART2, PART3 or PART4 to build only with a few of the options. 59/* define PART1, PART2, PART3 or PART4 to build only with a few of the options.
60 * This is for machines with 64k code segment size restrictions. */ 60 * This is for machines with 64k code segment size restrictions. */
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> 70OPENSSL_DECLARE_EXIT
71extern void 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,25 +77,26 @@ extern void 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.
84struct 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#define BF_DEFAULT_OPTIONS 101#define BF_DEFAULT_OPTIONS
103 102
@@ -126,11 +125,7 @@ struct tms {
126#ifndef HZ 125#ifndef HZ
127# ifndef CLK_TCK 126# ifndef CLK_TCK
128# ifndef _BSD_CLK_TCK_ /* FreeBSD fix */ 127# ifndef _BSD_CLK_TCK_ /* FreeBSD fix */
129# ifndef VMS 128# define HZ 100.0
130# define HZ 100.0
131# else /* VMS */
132# define HZ 100.0
133# endif
134# else /* _BSD_CLK_TCK_ */ 129# else /* _BSD_CLK_TCK_ */
135# define HZ ((double)_BSD_CLK_TCK_) 130# define HZ ((double)_BSD_CLK_TCK_)
136# endif 131# endif
@@ -142,12 +137,7 @@ struct tms {
142#define BUFSIZE ((long)1024) 137#define BUFSIZE ((long)1024)
143long run=0; 138long run=0;
144 139
145#ifndef NOPROTO
146double Time_F(int s); 140double Time_F(int s);
147#else
148double Time_F();
149#endif
150
151#ifdef SIGALRM 141#ifdef SIGALRM
152#if defined(__STDC__) || defined(sgi) 142#if defined(__STDC__) || defined(sgi)
153#define SIGRETTYPE void 143#define SIGRETTYPE void
@@ -155,14 +145,8 @@ double Time_F();
155#define SIGRETTYPE int 145#define SIGRETTYPE int
156#endif 146#endif
157 147
158#ifndef NOPROTO
159SIGRETTYPE sig_done(int sig); 148SIGRETTYPE sig_done(int sig);
160#else 149SIGRETTYPE sig_done(int sig)
161SIGRETTYPE sig_done();
162#endif
163
164SIGRETTYPE sig_done(sig)
165int sig;
166 { 150 {
167 signal(SIGALRM,sig_done); 151 signal(SIGALRM,sig_done);
168 run=0; 152 run=0;
@@ -175,8 +159,7 @@ int sig;
175#define START 0 159#define START 0
176#define STOP 1 160#define STOP 1
177 161
178double Time_F(s) 162double Time_F(int s)
179int s;
180 { 163 {
181 double ret; 164 double ret;
182#ifdef TIMES 165#ifdef TIMES
@@ -237,9 +220,7 @@ int s;
237 fprintf(stderr,"%s bytes per sec = %12.2f (%5.1fuS)\n",name, \ 220 fprintf(stderr,"%s bytes per sec = %12.2f (%5.1fuS)\n",name, \
238 tm[index]*8,1.0e6/tm[index]); 221 tm[index]*8,1.0e6/tm[index]);
239 222
240int main(argc,argv) 223int main(int argc, char **argv)
241int argc;
242char **argv;
243 { 224 {
244 long count; 225 long count;
245 static unsigned char buf[BUFSIZE]; 226 static unsigned char buf[BUFSIZE];