summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2001-03-22 12:44:45 +0000
committerDaniel Veillard <veillard@src.gnome.org>2001-03-22 12:44:45 +0000
commita5f013bf900a59cfb49aa2409e147eef633603e9 (patch)
tree188e39973294e50c863385de8570d38fc4df9110 /error.c
parente020c3a797179693a1fe6e807969e6f9593bc879 (diff)
downloadlibxml2-a5f013bf900a59cfb49aa2409e147eef633603e9.tar.gz
- config.h.in configure.in error.c: fix a compilation problem
on platforms without vsnprintf (xml@thewrittenword.com) Daniel
Diffstat (limited to 'error.c')
-rw-r--r--error.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/error.c b/error.c
index 26af326a..25066ea1 100644
--- a/error.c
+++ b/error.c
@@ -163,7 +163,11 @@ xmlGetVarStr(const char * msg, va_list args) {
while (1) {
left = size - length;
/* Try to print in the allocated space. */
- chars = vsnprintf(str + length, left, msg, args);
+#ifdef HAVE_VSNPRINTF
+ chars = vsnprintf(str + length, left, msg, args);
+#else
+ chars = vsprintf(str + length, msg, args);
+#endif
/* If that worked, we're done. */
if ((chars > -1) && (chars < left ))
break;