summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-03-03 23:17:43 +0100
committerDaniel Stenberg <daniel@haxx.se>2015-03-03 23:17:43 +0100
commit8aabbf5f8cf1d6c0c2c2d978804a6965e1380e43 (patch)
tree6d4baad0c96a825e832c3295cef07732ac5f77df
parentdcf23b0cfe7797651df6e56b5e451415261676f0 (diff)
downloadcurl-8aabbf5f8cf1d6c0c2c2d978804a6965e1380e43.tar.gz
vtls: use curl_printf.h all over
No need to use _MPRINTF_REPLACE internally.
-rw-r--r--lib/config-dos.h7
-rw-r--r--lib/curl_printf.h18
-rw-r--r--lib/curlx.h5
-rw-r--r--lib/vtls/axtls.c3
-rw-r--r--lib/vtls/cyassl.c4
-rw-r--r--lib/vtls/darwinssl.c4
-rw-r--r--lib/vtls/gskit.c4
-rw-r--r--lib/vtls/gtls.c4
-rw-r--r--lib/vtls/nss.c5
-rw-r--r--lib/vtls/openssl.c4
-rw-r--r--lib/vtls/polarssl.c4
-rw-r--r--lib/vtls/polarssl_threadlock.c5
-rw-r--r--lib/vtls/schannel.c5
-rw-r--r--lib/vtls/vtls.c6
14 files changed, 32 insertions, 46 deletions
diff --git a/lib/config-dos.h b/lib/config-dos.h
index dd5b06db4..e094082b8 100644
--- a/lib/config-dos.h
+++ b/lib/config-dos.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -163,11 +163,6 @@
#define HAVE_TERMIOS_H 1
#define HAVE_VARIADIC_MACROS_GCC 1
- /* Because djgpp <= 2.03 doesn't have snprintf() etc. */
- #if (DJGPP_MINOR < 4)
- #define _MPRINTF_REPLACE
- #endif
-
#elif defined(__WATCOMC__)
#define HAVE_STRCASECMP 1
diff --git a/lib/curl_printf.h b/lib/curl_printf.h
index f0d99630e..086923f1d 100644
--- a/lib/curl_printf.h
+++ b/lib/curl_printf.h
@@ -27,9 +27,25 @@
* *rintf() functions.
*/
-#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>
+# undef printf
+# undef fprintf
+# undef snprintf
+# undef vprintf
+# undef vfprintf
+# undef vsnprintf
+# undef aprintf
+# undef vaprintf
+# define printf curl_mprintf
+# define fprintf curl_mfprintf
+# define snprintf curl_msnprintf
+# define vprintf curl_mvprintf
+# define vfprintf curl_mvfprintf
+# define vsnprintf curl_mvsnprintf
+# define aprintf curl_maprintf
+# define vaprintf curl_mvaprintf
+
/* We define away the sprintf functions unconditonally since we don't want
internal code to be using them, intentionally or by mistake!*/
# undef sprintf
diff --git a/lib/curlx.h b/lib/curlx.h
index 9dc90a004..979e7d7a1 100644
--- a/lib/curlx.h
+++ b/lib/curlx.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -90,8 +90,7 @@
#ifdef ENABLE_CURLX_PRINTF
/* If this define is set, we define all "standard" printf() functions to use
the curlx_* version instead. It makes the source code transparent and
- easier to understand/patch. Undefine them first in case _MPRINTF_REPLACE
- is set. */
+ easier to understand/patch. Undefine them first. */
# undef printf
# undef fprintf
# undef sprintf
diff --git a/lib/vtls/axtls.c b/lib/vtls/axtls.c
index bcfe62b4d..4907d2075 100644
--- a/lib/vtls/axtls.c
+++ b/lib/vtls/axtls.c
@@ -38,8 +38,7 @@
#include "parsedate.h"
#include "connect.h" /* for the connect timeout */
#include "select.h"
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
+#include "curl_printf.h"
#include "curl_memory.h"
#include <unistd.h>
/* The last #include file should be: */
diff --git a/lib/vtls/cyassl.c b/lib/vtls/cyassl.c
index 39af1c0f6..fcacec8e6 100644
--- a/lib/vtls/cyassl.c
+++ b/lib/vtls/cyassl.c
@@ -43,9 +43,7 @@
#include "connect.h" /* for the connect timeout */
#include "select.h"
#include "rawstr.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
+#include "curl_printf.h"
#include "curl_memory.h"
#include <cyassl/ssl.h>
diff --git a/lib/vtls/darwinssl.c b/lib/vtls/darwinssl.c
index 6129eb015..01e308130 100644
--- a/lib/vtls/darwinssl.c
+++ b/lib/vtls/darwinssl.c
@@ -103,9 +103,7 @@
#include "select.h"
#include "vtls.h"
#include "darwinssl.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
+#include "curl_printf.h"
#include "curl_memory.h"
/* The last #include file should be: */
diff --git a/lib/vtls/gskit.c b/lib/vtls/gskit.c
index 74a7bc078..d884bd4c4 100644
--- a/lib/vtls/gskit.c
+++ b/lib/vtls/gskit.c
@@ -74,9 +74,7 @@
#include "select.h"
#include "strequal.h"
#include "x509asn1.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
+#include "curl_printf.h"
#include "curl_memory.h"
/* The last #include file should be: */
diff --git a/lib/vtls/gtls.c b/lib/vtls/gtls.c
index 5b9188349..be14dcf90 100644
--- a/lib/vtls/gtls.c
+++ b/lib/vtls/gtls.c
@@ -53,9 +53,7 @@
#include "select.h"
#include "rawstr.h"
#include "warnless.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
+#include "curl_printf.h"
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c
index e201decce..24ffa5987 100644
--- a/lib/vtls/nss.c
+++ b/lib/vtls/nss.c
@@ -38,10 +38,7 @@
#include "select.h"
#include "vtls.h"
#include "llist.h"
-
-#define _MPRINTF_REPLACE /* use the internal *printf() functions */
-#include <curl/mprintf.h>
-
+#include "curl_printf.h"
#include "nssg.h"
#include <nspr.h>
#include <nss.h>
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index 55ab3fee1..b6e30144a 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -49,9 +49,7 @@
#include "vtls.h"
#include "rawstr.h"
#include "hostcheck.h"
-
-#define _MPRINTF_REPLACE /* use the internal *printf() functions */
-#include <curl/mprintf.h>
+#include "curl_printf.h"
#ifdef USE_SSLEAY
diff --git a/lib/vtls/polarssl.c b/lib/vtls/polarssl.c
index 5c7519735..2d46aae76 100644
--- a/lib/vtls/polarssl.c
+++ b/lib/vtls/polarssl.c
@@ -55,9 +55,7 @@
#include "select.h"
#include "rawstr.h"
#include "polarssl_threadlock.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
+#include "curl_printf.h"
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
diff --git a/lib/vtls/polarssl_threadlock.c b/lib/vtls/polarssl_threadlock.c
index ad1871537..62abf43b2 100644
--- a/lib/vtls/polarssl_threadlock.c
+++ b/lib/vtls/polarssl_threadlock.c
@@ -36,10 +36,7 @@
#endif
#include "polarssl_threadlock.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
+#include "curl_printf.h"
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c
index 00ed0f6b8..7e2bd774f 100644
--- a/lib/vtls/schannel.c
+++ b/lib/vtls/schannel.c
@@ -56,10 +56,7 @@
#include "inet_pton.h" /* for IP addr SNI check */
#include "curl_multibyte.h"
#include "warnless.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
-
+#include "curl_printf.h"
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c
index cf1df24e4..c411b9a73 100644
--- a/lib/vtls/vtls.c
+++ b/lib/vtls/vtls.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -70,9 +70,7 @@
#include "curl_md5.h"
#include "warnless.h"
#include "curl_base64.h"
-
-#define _MPRINTF_REPLACE /* use our functions only */
-#include <curl/mprintf.h>
+#include "curl_printf.h"
/* The last #include file should be: */
#include "memdebug.h"