Commit 8aabbf5f authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

vtls: use curl_printf.h all over

No need to use _MPRINTF_REPLACE internally.
parent dcf23b0c
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -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

+17 −1
Original line number Diff line number Diff line
@@ -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
+2 −3
Original line number Diff line number Diff line
@@ -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
+1 −2
Original line number Diff line number Diff line
@@ -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: */
+1 −3
Original line number Diff line number Diff line
@@ -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>
Loading