Code health: Stop using timeb.h / ftime() (VMS only)
authorRichard Levitte <levitte@openssl.org>
Tue, 28 Feb 2017 13:07:08 +0000 (14:07 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 28 Feb 2017 14:32:01 +0000 (15:32 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2775)

crypto/bio/bss_dgram.c
ssl/d1_lib.c

index 0b1ab94b0d0ee9832fb21885baeb07907b7c4538..b14d03666a10b17c4eaac520ec34db5a2c5556e4 100644 (file)
 #include "bio_lcl.h"
 #ifndef OPENSSL_NO_DGRAM
 
-# if !(defined(_WIN32) || defined(OPENSSL_SYS_VMS))
+# if !defined(_WIN32)
 #  include <sys/time.h>
 # endif
-# if defined(OPENSSL_SYS_VMS)
-#  include <sys/timeb.h>
-# endif
 
 # ifndef OPENSSL_NO_SCTP
 #  include <netinet/sctp.h>
@@ -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
index 213fad5a8ded074730b8be42ca6da5180b83fee0..eb6a0f8295f1d46fa0e20de531b8fdd5ef7ecbbe 100644 (file)
@@ -13,9 +13,7 @@
 #include <openssl/rand.h>
 #include "ssl_locl.h"
 
-#if defined(OPENSSL_SYS_VMS)
-# include <sys/timeb.h>
-#elif defined(OPENSSL_SYS_VXWORKS)
+#if defined(OPENSSL_SYS_VXWORKS)
 # include <sys/times.h>
 #elif !defined(OPENSSL_SYS_WIN32)
 # include <sys/time.h>
@@ -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