From: Anatol Belski Date: Tue, 4 Jun 2013 18:18:05 +0000 (+0200) Subject: snprintf definition is needed here, too X-Git-Tag: json-c-0.12-20140410~42^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed819fb9268535589c2302277f4d80afa6d38d79;p=thirdparty%2Fjson-c.git snprintf definition is needed here, too --- diff --git a/json_object.c b/json_object.c index f2b5ce04..facb824f 100644 --- a/json_object.c +++ b/json_object.c @@ -37,6 +37,13 @@ char* strndup(const char* str, size_t n); #endif /* !HAVE_STRNDUP */ +#if !defined(HAVE_SNPRINTF) && defined(_MSC_VER) + /* MSC has the version as _snprintf */ +# define snprintf _snprintf +#elif !defined(HAVE_SNPRINTF) +# error You do not have snprintf on your system. +#endif /* HAVE_SNPRINTF */ + // Don't define this. It's not thread-safe. /* #define REFCOUNT_DEBUG 1 */