Bump to 0.17
[platform/upstream/json-c.git] / snprintf_compat.h
index 8ca9b31..51fcb24 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <stdarg.h>
 
-#if !defined(HAVE_SNPRINTF) && defined(_MSC_VER)
+#if !defined(HAVE_SNPRINTF) && (defined(_MSC_VER) || defined(__MINGW32__))
 static int json_c_vsnprintf(char *str, size_t size, const char *format, va_list ap)
 {
        int ret;
@@ -35,7 +35,7 @@ static int json_c_snprintf(char *str, size_t size, const char *format, ...)
 #define snprintf json_c_snprintf
 
 #elif !defined(HAVE_SNPRINTF) /* !HAVE_SNPRINTF */
-# error Need vsnprintf!
+#error snprintf is required but was not found
 #endif /* !HAVE_SNPRINTF && defined(WIN32) */
 
 #endif /* __snprintf_compat_h */