timeval: struct curltime is a struct timeval replacement

... to make all libcurl internals able to use the same data types for
the struct members. The timeval struct differs subtly on several
platforms so it makes it cumbersome to use everywhere.

Ref: #1652
Closes #1693
This commit is contained in:
Daniel Stenberg 2017-07-28 15:49:36 +02:00
parent 7551e55d66
commit 4dee50b9c8
29 changed files with 152 additions and 128 deletions

View file

@ -78,7 +78,7 @@ int Curl_wait_ms(int timeout_ms)
#ifndef HAVE_POLL_FINE
struct timeval pending_tv;
#endif
struct timeval initial_tv;
struct curltime initial_tv;
int pending_ms;
int error;
#endif
@ -158,7 +158,7 @@ int Curl_socket_check(curl_socket_t readfd0, /* two sockets to read from */
fd_set fds_err;
curl_socket_t maxfd;
#endif
struct timeval initial_tv = {0, 0};
struct curltime initial_tv = {0, 0};
int pending_ms = 0;
int error;
int r;
@ -398,7 +398,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
fd_set fds_err;
curl_socket_t maxfd;
#endif
struct timeval initial_tv = {0, 0};
struct curltime initial_tv = {0, 0};
bool fds_none = TRUE;
unsigned int i;
int pending_ms = 0;
@ -571,8 +571,8 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
*
* Return values are the same as select's.
*/
int tpf_select_libcurl(int maxfds, fd_set* reads, fd_set* writes,
fd_set* excepts, struct timeval* tv)
int tpf_select_libcurl(int maxfds, fd_set *reads, fd_set *writes,
fd_set *excepts, struct timeval *tv)
{
int rc;