]> granicus.if.org Git - curl/commitdiff
vtls: use curl_printf.h all over
authorDaniel Stenberg <daniel@haxx.se>
Tue, 3 Mar 2015 22:17:43 +0000 (23:17 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 3 Mar 2015 22:17:43 +0000 (23:17 +0100)
No need to use _MPRINTF_REPLACE internally.

14 files changed:
lib/config-dos.h
lib/curl_printf.h
lib/curlx.h
lib/vtls/axtls.c
lib/vtls/cyassl.c
lib/vtls/darwinssl.c
lib/vtls/gskit.c
lib/vtls/gtls.c
lib/vtls/nss.c
lib/vtls/openssl.c
lib/vtls/polarssl.c
lib/vtls/polarssl_threadlock.c
lib/vtls/schannel.c
lib/vtls/vtls.c

index dd5b06db4178a854ad4b156068c6217844ddd62c..e094082b8c6ea54fa4ed5e67f204152680e6728f 100644 (file)
@@ -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
   #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
 
index f0d99630e438e0049975f45e3df09c8957f45951..086923f1d48f551db9d8f018142e51380500e6af 100644 (file)
  * *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
index 9dc90a004bd0871b14e83441a1beb40de8aaf3ff..979e7d7a13868a6e2c14dbc6ee42df18542d02f5 100644 (file)
@@ -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
index bcfe62b4dc85d519cb2b130379edc867bd19c95f..4907d207518a2642ea6c6ae67c53e05cb3f3f604 100644 (file)
@@ -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: */
index 39af1c0f60634e34bd631287e2de62c599e5026b..fcacec8e6f9737213c8b96e77f93d9d507d6e62b 100644 (file)
@@ -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>
index 6129eb01592183f2c7aeca0da14e9eb6d5ae8c43..01e308130607c269b72d9898e41c1f4b96c16642 100644 (file)
 #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: */
index 74a7bc0785902ab3e56b09ec0aa80ea4fe55ee0f..d884bd4c4d1a426ffca4a6b378a931e47a8ba3b9 100644 (file)
@@ -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: */
index 5b9188349088e1e9a538f75d7a6ba337f1f12a3d..be14dcf90dc02c9f0e9cff02cb42cbe1aba438c5 100644 (file)
@@ -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"
index e201deccece74b12b1825be35b52e6437d99b228..24ffa59879b0a6cbf94f853938af92c9396831c3 100644 (file)
 #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>
index 55ab3fee1063423e68655edd02bc515228b12177..b6e30144a0b0eb1e55665ffb981ec8f5303f0e46 100644 (file)
@@ -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
 
index 5c7519735766a61bdcbbcb80f64eaa68a8e61880..2d46aae7601bf381343cd439110631a59d48b4ad 100644 (file)
@@ -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"
index ad18715375943ee476727dfcc2597e6876c14f58..62abf43b21ace26cbc8ee01b11f90479ac3e2cf0 100644 (file)
 #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"
index 00ed0f6b84d6b3924823cc1be33ea041621ebbef..7e2bd774f4c3e2ecf8476682e0d3a4cadee5fdfe 100644 (file)
 #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"
index cf1df24e46dddbf0502a3959e576699229661925..c411b9a73fa54af10df583401e1fe8e336a71654 100644 (file)
@@ -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"