From: Sergei Nikulov Date: Mon, 2 Mar 2015 12:58:27 +0000 (+0300) Subject: libtest: fixed linker errors on msvc X-Git-Tag: curl-7_42_0~202 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=43eb8b28748b71931299ab31d0baa909dbab44a0;p=thirdparty%2Fcurl.git libtest: fixed linker errors on msvc Bug: https://github.com/bagder/curl/pull/144 --- diff --git a/tests/libtest/lib1515.c b/tests/libtest/lib1515.c index 4ac9fcfdcf..d5c8f7d088 100644 --- a/tests/libtest/lib1515.c +++ b/tests/libtest/lib1515.c @@ -39,9 +39,6 @@ #define sleep(s) Sleep(s * 1000) #endif -#define _MPRINTF_REPLACE -#include - static int debug_callback(CURL *curl, curl_infotype info, char *msg, size_t len, void *ptr) { (void)curl; diff --git a/tests/libtest/lib506.c b/tests/libtest/lib506.c index 4dad0d98a0..6dcc36d3c1 100644 --- a/tests/libtest/lib506.c +++ b/tests/libtest/lib506.c @@ -20,9 +20,6 @@ * ***************************************************************************/ #include "test.h" - -#include - #include "memdebug.h" static const char *HOSTHEADER = "Host: www.host.foo.com"; diff --git a/tests/libtest/lib557.c b/tests/libtest/lib557.c index 7e5f9e94fd..b88285217c 100644 --- a/tests/libtest/lib557.c +++ b/tests/libtest/lib557.c @@ -26,9 +26,6 @@ */ #include "test.h" - -#include - #include "memdebug.h" diff --git a/tests/libtest/lib568.c b/tests/libtest/lib568.c index 4b15821f28..12fc5e5d9c 100644 --- a/tests/libtest/lib568.c +++ b/tests/libtest/lib568.c @@ -28,8 +28,6 @@ #include #endif -#include - #include "memdebug.h" /* build request url */ diff --git a/tests/libtest/lib569.c b/tests/libtest/lib569.c index a434d7459e..222f1e024b 100644 --- a/tests/libtest/lib569.c +++ b/tests/libtest/lib569.c @@ -20,9 +20,6 @@ * ***************************************************************************/ #include "test.h" - -#include - #include "memdebug.h" /* build request url */ diff --git a/tests/libtest/lib570.c b/tests/libtest/lib570.c index fe10de54ae..93ccab8eaf 100644 --- a/tests/libtest/lib570.c +++ b/tests/libtest/lib570.c @@ -20,9 +20,6 @@ * ***************************************************************************/ #include "test.h" - -#include - #include "memdebug.h" /* build request url */ diff --git a/tests/libtest/lib571.c b/tests/libtest/lib571.c index 78c1c95a38..3270300dea 100644 --- a/tests/libtest/lib571.c +++ b/tests/libtest/lib571.c @@ -37,8 +37,6 @@ # include #endif -#include - #include "warnless.h" #include "memdebug.h" diff --git a/tests/libtest/lib572.c b/tests/libtest/lib572.c index 3df4d036ac..9b23c01a23 100644 --- a/tests/libtest/lib572.c +++ b/tests/libtest/lib572.c @@ -28,8 +28,6 @@ #include #endif -#include - #include "memdebug.h" /* build request url */ diff --git a/tests/libtest/lib586.c b/tests/libtest/lib586.c index 4ee0ad31c4..a1412b5f3b 100644 --- a/tests/libtest/lib586.c +++ b/tests/libtest/lib586.c @@ -20,9 +20,6 @@ * ***************************************************************************/ #include "test.h" - -#include - #include "memdebug.h" #define THREADS 2 diff --git a/tests/libtest/test.h b/tests/libtest/test.h index fb95996aaa..468eda98a0 100644 --- a/tests/libtest/test.h +++ b/tests/libtest/test.h @@ -40,6 +40,10 @@ # include "select.h" #endif +#define _MPRINTF_REPLACE +#include + + #define test_setopt(A,B,C) \ if((res = curl_easy_setopt((A),(B),(C))) != CURLE_OK) goto test_cleanup diff --git a/tests/libtest/testtrace.c b/tests/libtest/testtrace.c index c977d21053..8d9c6b814d 100644 --- a/tests/libtest/testtrace.c +++ b/tests/libtest/testtrace.c @@ -21,10 +21,6 @@ ***************************************************************************/ #include "test.h" - -#define _MPRINTF_REPLACE /* use our functions only */ -#include - #include "testutil.h" #include "testtrace.h" #include "memdebug.h" @@ -34,7 +30,7 @@ struct libtest_trace_cfg libtest_debug_config; static time_t epoch_offset; /* for test time tracing */ static int known_offset; /* for test time tracing */ -static +static void libtest_debug_dump(const char *timebuf, const char *text, FILE *stream, const unsigned char *ptr, size_t size, int nohex) {