From 04fb4ea00058efe2a22a365053d0b5adea6c4caf Mon Sep 17 00:00:00 2001
From: Sergei Nikulov <sergey.nikulov@gmail.com>
Date: Fri, 20 Feb 2015 10:29:22 +0300
Subject: [PATCH] fixed linker error on msvc - no snprintf

---
 tests/libtest/lib1515.c   | 3 ---
 tests/libtest/lib506.c    | 3 ---
 tests/libtest/lib557.c    | 3 ---
 tests/libtest/lib568.c    | 2 --
 tests/libtest/lib569.c    | 3 ---
 tests/libtest/lib570.c    | 3 ---
 tests/libtest/lib571.c    | 2 --
 tests/libtest/lib572.c    | 2 --
 tests/libtest/lib586.c    | 3 ---
 tests/libtest/test.h      | 4 ++++
 tests/libtest/testtrace.c | 6 +-----
 11 files changed, 5 insertions(+), 29 deletions(-)

diff --git a/tests/libtest/lib1515.c b/tests/libtest/lib1515.c
index 4ac9fcf..d5c8f7d 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 <curl/mprintf.h>
-
 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 4dad0d9..6dcc36d 100644
--- a/tests/libtest/lib506.c
+++ b/tests/libtest/lib506.c
@@ -20,9 +20,6 @@
  *
  ***************************************************************************/
 #include "test.h"
-
-#include <curl/mprintf.h>
-
 #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 7e5f9e9..b882852 100644
--- a/tests/libtest/lib557.c
+++ b/tests/libtest/lib557.c
@@ -26,9 +26,6 @@
  */
 
 #include "test.h"
-
-#include <curl/mprintf.h>
-
 #include "memdebug.h"
 
 
diff --git a/tests/libtest/lib568.c b/tests/libtest/lib568.c
index 4b15821..12fc5e5 100644
--- a/tests/libtest/lib568.c
+++ b/tests/libtest/lib568.c
@@ -28,8 +28,6 @@
 #include <fcntl.h>
 #endif
 
-#include <curl/mprintf.h>
-
 #include "memdebug.h"
 
 /* build request url */
diff --git a/tests/libtest/lib569.c b/tests/libtest/lib569.c
index a434d74..222f1e0 100644
--- a/tests/libtest/lib569.c
+++ b/tests/libtest/lib569.c
@@ -20,9 +20,6 @@
  *
  ***************************************************************************/
 #include "test.h"
-
-#include <curl/mprintf.h>
-
 #include "memdebug.h"
 
 /* build request url */
diff --git a/tests/libtest/lib570.c b/tests/libtest/lib570.c
index fe10de5..93ccab8 100644
--- a/tests/libtest/lib570.c
+++ b/tests/libtest/lib570.c
@@ -20,9 +20,6 @@
  *
  ***************************************************************************/
 #include "test.h"
-
-#include <curl/mprintf.h>
-
 #include "memdebug.h"
 
 /* build request url */
diff --git a/tests/libtest/lib571.c b/tests/libtest/lib571.c
index 78c1c95..3270300 100644
--- a/tests/libtest/lib571.c
+++ b/tests/libtest/lib571.c
@@ -37,8 +37,6 @@
 #  include <fcntl.h>
 #endif
 
-#include <curl/mprintf.h>
-
 #include "warnless.h"
 #include "memdebug.h"
 
diff --git a/tests/libtest/lib572.c b/tests/libtest/lib572.c
index 3df4d03..9b23c01 100644
--- a/tests/libtest/lib572.c
+++ b/tests/libtest/lib572.c
@@ -28,8 +28,6 @@
 #include <fcntl.h>
 #endif
 
-#include <curl/mprintf.h>
-
 #include "memdebug.h"
 
 /* build request url */
diff --git a/tests/libtest/lib586.c b/tests/libtest/lib586.c
index 4ee0ad3..a1412b5 100644
--- a/tests/libtest/lib586.c
+++ b/tests/libtest/lib586.c
@@ -20,9 +20,6 @@
  *
  ***************************************************************************/
 #include "test.h"
-
-#include <curl/mprintf.h>
-
 #include "memdebug.h"
 
 #define THREADS 2
diff --git a/tests/libtest/test.h b/tests/libtest/test.h
index fb95996..468eda9 100644
--- a/tests/libtest/test.h
+++ b/tests/libtest/test.h
@@ -40,6 +40,10 @@
 #  include "select.h"
 #endif
 
+#define _MPRINTF_REPLACE
+#include <curl/mprintf.h>
+
+
 #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 c977d21..8d9c6b8 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 <curl/mprintf.h>
-
 #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)
 {
-- 
1.9.5.msysgit.0

