]> git.ipfire.org Git - thirdparty/json-c.git/commitdiff
snprintf definition is needed here, too
authorAnatol Belski <ab@php.net>
Tue, 4 Jun 2013 18:18:05 +0000 (20:18 +0200)
committerAnatol Belski <ab@php.net>
Tue, 4 Jun 2013 18:18:05 +0000 (20:18 +0200)
json_object.c

index f2b5ce04afeb4b842d9e333c77d0999156fc65bf..facb824fb84b0af3c278ba856468b47172a5ce7d 100644 (file)
   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 */