diff --git a/lib/config-dos.h b/lib/config-dos.h index dd5b06db4178a854ad4b156068c6217844ddd62c..e094082b8c6ea54fa4ed5e67f204152680e6728f 100644 --- a/lib/config-dos.h +++ b/lib/config-dos.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, , 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 f0d99630e438e0049975f45e3df09c8957f45951..086923f1d48f551db9d8f018142e51380500e6af 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 +# 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 9dc90a004bd0871b14e83441a1beb40de8aaf3ff..979e7d7a13868a6e2c14dbc6ee42df18542d02f5 100644 --- a/lib/curlx.h +++ b/lib/curlx.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2008, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, , 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 bcfe62b4dc85d519cb2b130379edc867bd19c95f..4907d207518a2642ea6c6ae67c53e05cb3f3f604 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 +#include "curl_printf.h" #include "curl_memory.h" #include /* The last #include file should be: */ diff --git a/lib/vtls/cyassl.c b/lib/vtls/cyassl.c index 39af1c0f60634e34bd631287e2de62c599e5026b..fcacec8e6f9737213c8b96e77f93d9d507d6e62b 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 +#include "curl_printf.h" #include "curl_memory.h" #include diff --git a/lib/vtls/darwinssl.c b/lib/vtls/darwinssl.c index 6129eb01592183f2c7aeca0da14e9eb6d5ae8c43..01e308130607c269b72d9898e41c1f4b96c16642 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 +#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 74a7bc0785902ab3e56b09ec0aa80ea4fe55ee0f..d884bd4c4d1a426ffca4a6b378a931e47a8ba3b9 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 +#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 5b9188349088e1e9a538f75d7a6ba337f1f12a3d..be14dcf90dc02c9f0e9cff02cb42cbe1aba438c5 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 +#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 e201deccece74b12b1825be35b52e6437d99b228..24ffa59879b0a6cbf94f853938af92c9396831c3 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 - +#include "curl_printf.h" #include "nssg.h" #include #include diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 55ab3fee1063423e68655edd02bc515228b12177..b6e30144a0b0eb1e55665ffb981ec8f5303f0e46 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 +#include "curl_printf.h" #ifdef USE_SSLEAY diff --git a/lib/vtls/polarssl.c b/lib/vtls/polarssl.c index 5c7519735766a61bdcbbcb80f64eaa68a8e61880..2d46aae7601bf381343cd439110631a59d48b4ad 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 +#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 ad18715375943ee476727dfcc2597e6876c14f58..62abf43b21ace26cbc8ee01b11f90479ac3e2cf0 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 - +#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 00ed0f6b84d6b3924823cc1be33ea041621ebbef..7e2bd774f4c3e2ecf8476682e0d3a4cadee5fdfe 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 - +#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 cf1df24e46dddbf0502a3959e576699229661925..c411b9a73fa54af10df583401e1fe8e336a71654 100644 --- a/lib/vtls/vtls.c +++ b/lib/vtls/vtls.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, , 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 +#include "curl_printf.h" /* The last #include file should be: */ #include "memdebug.h"