Browse Source

Add #ifdef _WIN32 for vsnprintf blocking define again

bel 10 years ago
parent
commit
ad746c8365
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/civetweb.c

+ 3 - 0
src/civetweb.c

@@ -754,7 +754,10 @@ static void mg_snprintf(const struct mg_connection *conn,
 #define realloc DO_NOT_USE_THIS_FUNCTION__USE_mg_realloc
 #define free DO_NOT_USE_THIS_FUNCTION__USE_mg_free
 #define snprintf DO_NOT_USE_THIS_FUNCTION__USE_mg_snprintf
+#ifdef _WIN32 /* vsnprintf must not be used in any system, *                   \
+               * but this define only works well for Windows. */
 #define vsnprintf DO_NOT_USE_THIS_FUNCTION__USE_mg_vsnprintf
+#endif
 
 #define MD5_STATIC static
 #include "md5.inl"