mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
fixed Visual Studio 2010 compilation
This commit is contained in:
parent
076e1fa348
commit
7c0cbcf2f6
@ -98,13 +98,13 @@ int test(char *URL)
|
|||||||
abort_on_test_timeout();
|
abort_on_test_timeout();
|
||||||
|
|
||||||
fprintf(stderr, "ping\n");
|
fprintf(stderr, "ping\n");
|
||||||
gettimeofday(&before, 0);
|
before = tutil_tvnow();
|
||||||
|
|
||||||
multi_perform(mhandle, &still_running);
|
multi_perform(mhandle, &still_running);
|
||||||
|
|
||||||
abort_on_test_timeout();
|
abort_on_test_timeout();
|
||||||
|
|
||||||
gettimeofday(&after, 0);
|
after = tutil_tvnow();
|
||||||
e = elapsed(&before, &after);
|
e = elapsed(&before, &after);
|
||||||
fprintf(stderr, "pong = %d\n", e);
|
fprintf(stderr, "pong = %d\n", e);
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ static int curlTimerCallback(CURLM *multi, long timeout_ms, void *userp)
|
|||||||
|
|
||||||
(void)multi; /* unused */
|
(void)multi; /* unused */
|
||||||
if (timeout_ms != -1) {
|
if (timeout_ms != -1) {
|
||||||
gettimeofday(timeout, 0);
|
*timeout = tutil_tvnow();
|
||||||
timeout->tv_usec += timeout_ms * 1000;
|
timeout->tv_usec += timeout_ms * 1000;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -173,8 +173,7 @@ static int getMicroSecondTimeout(struct timeval* timeout)
|
|||||||
{
|
{
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
ssize_t result;
|
ssize_t result;
|
||||||
|
now = tutil_tvnow();
|
||||||
gettimeofday(&now, 0);
|
|
||||||
result = (timeout->tv_sec - now.tv_sec) * 1000000 +
|
result = (timeout->tv_sec - now.tv_sec) * 1000000 +
|
||||||
timeout->tv_usec - now.tv_usec;
|
timeout->tv_usec - now.tv_usec;
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
#include "strequal.h"
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
|
|
||||||
static int send_request(CURL *curl, const char *url, int seq,
|
static int send_request(CURL *curl, const char *url, int seq,
|
||||||
@ -72,11 +72,11 @@ static long parse_auth_name(const char *arg)
|
|||||||
{
|
{
|
||||||
if (!arg)
|
if (!arg)
|
||||||
return CURLAUTH_NONE;
|
return CURLAUTH_NONE;
|
||||||
if (strcasecmp(arg, "basic") == 0)
|
if (strequal(arg, "basic") == 0)
|
||||||
return CURLAUTH_BASIC;
|
return CURLAUTH_BASIC;
|
||||||
if (strcasecmp(arg, "digest") == 0)
|
if (strequal(arg, "digest") == 0)
|
||||||
return CURLAUTH_DIGEST;
|
return CURLAUTH_DIGEST;
|
||||||
if (strcasecmp(arg, "ntlm") == 0)
|
if (strequal(arg, "ntlm") == 0)
|
||||||
return CURLAUTH_NTLM;
|
return CURLAUTH_NTLM;
|
||||||
return CURLAUTH_NONE;
|
return CURLAUTH_NONE;
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
|
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
|
#define _MPRINTF_REPLACE /* use our functions only */
|
||||||
|
#include <curl/mprintf.h>
|
||||||
|
|
||||||
#include "testutil.h"
|
#include "testutil.h"
|
||||||
#include "testtrace.h"
|
#include "testtrace.h"
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user