提交 14097b6a 编写于 作者: R Richard Levitte

Code health: Stop using timeb.h / ftime() (VMS only)

Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2775)
上级 e627a13c
...@@ -13,12 +13,9 @@ ...@@ -13,12 +13,9 @@
#include "bio_lcl.h" #include "bio_lcl.h"
#ifndef OPENSSL_NO_DGRAM #ifndef OPENSSL_NO_DGRAM
# if !(defined(_WIN32) || defined(OPENSSL_SYS_VMS)) # if !defined(_WIN32)
# include <sys/time.h> # include <sys/time.h>
# endif # endif
# if defined(OPENSSL_SYS_VMS)
# include <sys/timeb.h>
# endif
# ifndef OPENSSL_NO_SCTP # ifndef OPENSSL_NO_SCTP
# include <netinet/sctp.h> # include <netinet/sctp.h>
...@@ -1939,11 +1936,6 @@ static void get_current_time(struct timeval *t) ...@@ -1939,11 +1936,6 @@ static void get_current_time(struct timeval *t)
# endif # endif
t->tv_sec = (long)(now.ul / 10000000); t->tv_sec = (long)(now.ul / 10000000);
t->tv_usec = ((int)(now.ul % 10000000)) / 10; 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 # else
gettimeofday(t, NULL); gettimeofday(t, NULL);
# endif # endif
......
...@@ -13,9 +13,7 @@ ...@@ -13,9 +13,7 @@
#include <openssl/rand.h> #include <openssl/rand.h>
#include "ssl_locl.h" #include "ssl_locl.h"
#if defined(OPENSSL_SYS_VMS) #if defined(OPENSSL_SYS_VXWORKS)
# include <sys/timeb.h>
#elif defined(OPENSSL_SYS_VXWORKS)
# include <sys/times.h> # include <sys/times.h>
#elif !defined(OPENSSL_SYS_WIN32) #elif !defined(OPENSSL_SYS_WIN32)
# include <sys/time.h> # include <sys/time.h>
...@@ -404,11 +402,6 @@ static void get_current_time(struct timeval *t) ...@@ -404,11 +402,6 @@ static void get_current_time(struct timeval *t)
# endif # endif
t->tv_sec = (long)(now.ul / 10000000); t->tv_sec = (long)(now.ul / 10000000);
t->tv_usec = ((int)(now.ul % 10000000)) / 10; 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 #else
gettimeofday(t, NULL); gettimeofday(t, NULL);
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册