|
@@ -1551,11 +1551,13 @@ static void mg_snprintf(const struct mg_connection *conn,
|
|
#if defined(vsnprintf)
|
|
#if defined(vsnprintf)
|
|
#undef vsnprintf
|
|
#undef vsnprintf
|
|
#endif
|
|
#endif
|
|
|
|
+#if !defined(NDEBUG)
|
|
#define malloc DO_NOT_USE_THIS_FUNCTION__USE_mg_malloc
|
|
#define malloc DO_NOT_USE_THIS_FUNCTION__USE_mg_malloc
|
|
#define calloc DO_NOT_USE_THIS_FUNCTION__USE_mg_calloc
|
|
#define calloc DO_NOT_USE_THIS_FUNCTION__USE_mg_calloc
|
|
#define realloc DO_NOT_USE_THIS_FUNCTION__USE_mg_realloc
|
|
#define realloc DO_NOT_USE_THIS_FUNCTION__USE_mg_realloc
|
|
#define free DO_NOT_USE_THIS_FUNCTION__USE_mg_free
|
|
#define free DO_NOT_USE_THIS_FUNCTION__USE_mg_free
|
|
#define snprintf DO_NOT_USE_THIS_FUNCTION__USE_mg_snprintf
|
|
#define snprintf DO_NOT_USE_THIS_FUNCTION__USE_mg_snprintf
|
|
|
|
+#endif
|
|
#if defined(_WIN32)
|
|
#if defined(_WIN32)
|
|
/* vsnprintf must not be used in any system,
|
|
/* vsnprintf must not be used in any system,
|
|
* but this define only works well for Windows. */
|
|
* but this define only works well for Windows. */
|