aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-03-28 10:08:54 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-03-28 10:08:54 +0000
commit0ff1faf7f289134c833b91c252cc0138248c5b26 (patch)
tree406963cd1fea0b1489161360626d12ea0c928433
parentbcc62cc9e34ce7536a05f0bdccda7ada628ba220 (diff)
for the CURLDEBUG case, we redefine sprintf and vsprintf to make us notice
if any use of such a function slip through
-rw-r--r--include/curl/mprintf.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/curl/mprintf.h b/include/curl/mprintf.h
index 0067971b7..6ba9ea8bf 100644
--- a/include/curl/mprintf.h
+++ b/include/curl/mprintf.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2006, 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
@@ -42,11 +42,18 @@ CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args);
#ifdef _MPRINTF_REPLACE
# define printf curl_mprintf
# define fprintf curl_mfprintf
+#ifdef CURLDEBUG
+/* When built with CURLDEBUG we define away the sprintf() functions since we
+ don't want internal code to be using them */
+# define sprintf sprintf_was_used
+# define vsprintf vsprintf_was_used
+#else
# define sprintf curl_msprintf
+# define vsprintf curl_mvsprintf
+#endif
# define snprintf curl_msnprintf
# define vprintf curl_mvprintf
# define vfprintf curl_mvfprintf
-# define vsprintf curl_mvsprintf
# define vsnprintf curl_mvsnprintf
# define aprintf curl_maprintf
# define vaprintf curl_mvaprintf