diff options
author | Andy Polyakov <appro@openssl.org> | 2013-01-19 21:23:13 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2014-02-01 22:48:56 +0100 |
commit | 2cc5142fb13e00e4c11179b156fdcec7cd4cde77 (patch) | |
tree | a8139bbecbffdc23c2b0abbc940265667b05d7ed /crypto/bio | |
parent | d451ece4e7edce8c954daa084c83686647dcda0f (diff) |
Improve WINCE support.
Submitted by: Pierre Delaage
(cherry picked from commit a006fef78e56b078549a80f4bb4518b6a02eba84)
Resolved conflicts:
crypto/bio/bss_dgram.c
ssl/d1_lib.c
util/pl/VC-32.pl
Diffstat (limited to 'crypto/bio')
-rw-r--r-- | crypto/bio/bss_dgram.c | 16 | ||||
-rw-r--r-- | crypto/bio/bss_fd.c | 20 |
2 files changed, 28 insertions, 8 deletions
diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c index a20f264bfc..6912aa1278 100644 --- a/crypto/bio/bss_dgram.c +++ b/crypto/bio/bss_dgram.c @@ -66,7 +66,7 @@ #include <openssl/bio.h> #ifndef OPENSSL_NO_DGRAM -#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) +#if defined(OPENSSL_SYS_VMS) #include <sys/timeb.h> #endif @@ -1895,11 +1895,15 @@ int BIO_dgram_non_fatal_error(int err) static void get_current_time(struct timeval *t) { -#ifdef OPENSSL_SYS_WIN32 - struct _timeb tb; - _ftime(&tb); - t->tv_sec = (long)tb.time; - t->tv_usec = (long)tb.millitm * 1000; +#if defined(_WIN32) + SYSTEMTIME st; + union { unsigned __int64 ul; FILETIME ft; } now; + + GetSystemTime(&st); + SystemTimeToFileTime(&st,&now.ft); + now.ul -= 116444736000000000UI64; /* re-bias to 1/1/1970 */ + 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); diff --git a/crypto/bio/bss_fd.c b/crypto/bio/bss_fd.c index d1bf85aae1..c274877c13 100644 --- a/crypto/bio/bss_fd.c +++ b/crypto/bio/bss_fd.c @@ -63,9 +63,25 @@ #if defined(OPENSSL_NO_POSIX_IO) /* - * One can argue that one should implement dummy placeholder for - * BIO_s_fd here... + * Dummy placeholder for BIO_s_fd... */ +BIO *BIO_new_fd(int fd,int close_flag) + { + return NULL; + } +int BIO_fd_non_fatal_error(int err) + { + return 0; + } +int BIO_fd_should_retry(int i) + { + return 0; + } + +BIO_METHOD *BIO_s_fd(void) + { + return NULL; + } #else /* * As for unconditional usage of "UPLINK" interface in this module. |