X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fbf%2Fbfspeed.c;h=bc6cd8df5f21859324b092d041ce2a30cf81a0b6;hb=5d818c30515a4a8a59b97d737c9a4858ab0d4538;hp=983eba52f0b31c6e562325c46a07c531b9353ab9;hpb=6b691a5c85ddc4e407e32781841fee5c029506cd;p=oweals%2Fopenssl.git diff --git a/crypto/bf/bfspeed.c b/crypto/bf/bfspeed.c index 983eba52f0..bc6cd8df5f 100644 --- a/crypto/bf/bfspeed.c +++ b/crypto/bf/bfspeed.c @@ -59,7 +59,7 @@ /* 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 @@ -71,7 +71,6 @@ extern int exit(); #endif #include -#ifndef VMS #ifndef _IRIX #include #endif @@ -79,15 +78,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(VMS) && defined(__DECC) && !defined(__TMS) +#undef TIMES #endif + #ifndef TIMES #include #endif @@ -98,16 +97,12 @@ struct tms { #include #endif -#include "blowfish.h" +#include /* 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 +111,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 +119,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);