X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Flibxml2_error.c;h=e5b5ce068a347217d57e37a73fea53e44c362114;hp=725b7cf3d8c2af9f30a19debddbe3f692ec9896d;hb=021f5586a328c6600460aa9f9be664ba19ba20d4;hpb=acf93c6b774c7184c35c2b994d4d7764438656d8 diff --git a/src/libxml2_error.c b/src/libxml2_error.c index 725b7cf..e5b5ce0 100644 --- a/src/libxml2_error.c +++ b/src/libxml2_error.c @@ -2,7 +2,7 @@ * Copyright (C) 2007, Index Data ApS * See the file LICENSE for details. * - * $Id: libxml2_error.c,v 1.3 2007-01-03 08:42:15 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);