X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=apps%2Fs_time.c;h=a529e2a1190df6888acc17ad7d1575ec96732e41;hb=7a01a45bc4f067a86df97dcb2bac829de33eba6e;hp=187c09d12e9a33bff5a4b8f9d9a0149089ac4fb5;hpb=ec577822f95a8bca0023c5c77cef1a4916822d4a;p=openssl.git diff --git a/apps/s_time.c b/apps/s_time.c index 187c09d12e..a529e2a119 100644 --- a/apps/s_time.c +++ b/apps/s_time.c @@ -67,13 +67,17 @@ #include #include +#if defined(NO_RSA) && !defined(NO_SSL2) +#define NO_SSL2 +#endif + #ifdef NO_STDIO #define APPS_WIN16 #endif +#define USE_SOCKETS #include #include #include -#define USE_SOCKETS #include "apps.h" #include "s_apps.h" #include @@ -82,11 +86,10 @@ #include "wintext.h" #endif -#ifndef MSDOS +#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC)) #define TIMES #endif -#ifndef VMS #ifndef _IRIX #include #endif @@ -94,15 +97,15 @@ #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 @@ -121,11 +124,7 @@ struct tms { */ #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 @@ -134,6 +133,7 @@ struct tms { #undef PROG #define PROG s_time_main +#undef ioctl #define ioctl ioctlsocket #define SSL_CONNECT_NAME "localhost:4433" @@ -151,18 +151,10 @@ struct tms { extern int verify_depth; extern int verify_error; -#ifndef NOPROTO static void s_time_usage(void); static int parseArgs( int argc, char **argv ); static SSL *doConnection( SSL *scon ); static void s_time_init(void); -#else -static void s_time_usage(); -static int parseArgs(); -static SSL *doConnection(); -static void s_time_init(); -#endif - /*********************************************************************** * Static data declarations @@ -672,7 +664,13 @@ static SSL *doConnection(SSL *scon) width=i+1; FD_ZERO(&readfds); FD_SET(i,&readfds); - select(width,&readfds,NULL,NULL,NULL); + /* Note: under VMS with SOCKETSHR the 2nd parameter + * is currently of type (int *) whereas under other + * systems it is (void *) if you don't have a cast it + * will choke the compiler: if you do have a cast then + * you can either go for (int *) or (void *). + */ + select(width,(void *)&readfds,NULL,NULL,NULL); continue; } break;