X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Flibxml2_error.c;h=e5b5ce068a347217d57e37a73fea53e44c362114;hb=3b792849c676d96918850e2f1e0af87a75278501;hp=00f588140000fe06eae75f6d89f6b71eed22f144;hpb=fc6d778b923000b5c6ad8e108b0b184178a9d33f;p=yaz-moved-to-github.git diff --git a/src/libxml2_error.c b/src/libxml2_error.c index 00f5881..e5b5ce0 100644 --- a/src/libxml2_error.c +++ b/src/libxml2_error.c @@ -1,8 +1,8 @@ /* - * Copyright (C) 2006, Index Data ApS + * Copyright (C) 2007, Index Data ApS * See the file LICENSE for details. * - * $Id: libxml2_error.c,v 1.2 2006-07-06 10:17:53 adam Exp $ + * $Id: libxml2_error.c,v 1.4 2007-02-23 10:15:01 adam Exp $ */ /** * \file libxml2_error.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #if YAZ_HAVE_XML2 @@ -31,11 +32,7 @@ static void proxy_xml_error_handler(void *ctx, const char *fmt, ...) va_list ap; va_start(ap, fmt); -#ifdef WIN32 - vsprintf(buf, fmt, ap); -#else - vsnprintf(buf, sizeof(buf), fmt, ap); -#endif + yaz_vsnprintf(buf, sizeof(buf)-1, fmt, ap); yaz_log(libxml2_error_level, "%s: %s", (char*) ctx, buf); va_end (ap);