From: Richard Levitte Date: Tue, 28 Feb 2017 13:07:08 +0000 (+0100) Subject: Code health: Stop using timeb.h / ftime() (VMS only) X-Git-Tag: OpenSSL_1_1_1-pre1~2233 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=14097b6a9263a40615a5c4cbf3fe808b1a14ffde;p=oweals%2Fopenssl.git Code health: Stop using timeb.h / ftime() (VMS only) Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/2775) --- diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c index 0b1ab94b0d..b14d03666a 100644 --- a/crypto/bio/bss_dgram.c +++ b/crypto/bio/bss_dgram.c @@ -13,12 +13,9 @@ #include "bio_lcl.h" #ifndef OPENSSL_NO_DGRAM -# if !(defined(_WIN32) || defined(OPENSSL_SYS_VMS)) +# if !defined(_WIN32) # include # endif -# if defined(OPENSSL_SYS_VMS) -# include -# endif # ifndef OPENSSL_NO_SCTP # include @@ -1939,11 +1936,6 @@ static void get_current_time(struct timeval *t) # endif t->tv_sec = (long)(now.ul / 10000000); t->tv_usec = ((int)(now.ul % 10000000)) / 10; -# elif defined(OPENSSL_SYS_VMS) - struct timeb tb; - ftime(&tb); - t->tv_sec = (long)tb.time; - t->tv_usec = (long)tb.millitm * 1000; # else gettimeofday(t, NULL); # endif diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c index 213fad5a8d..eb6a0f8295 100644 --- a/ssl/d1_lib.c +++ b/ssl/d1_lib.c @@ -13,9 +13,7 @@ #include #include "ssl_locl.h" -#if defined(OPENSSL_SYS_VMS) -# include -#elif defined(OPENSSL_SYS_VXWORKS) +#if defined(OPENSSL_SYS_VXWORKS) # include #elif !defined(OPENSSL_SYS_WIN32) # include @@ -404,11 +402,6 @@ static void get_current_time(struct timeval *t) # endif t->tv_sec = (long)(now.ul / 10000000); t->tv_usec = ((int)(now.ul % 10000000)) / 10; -#elif defined(OPENSSL_SYS_VMS) - struct timeb tb; - ftime(&tb); - t->tv_sec = (long)tb.time; - t->tv_usec = (long)tb.millitm * 1000; #else gettimeofday(t, NULL); #endif