From: cherierm Date: Fri, 21 Sep 2007 15:52:52 +0000 (+0000) Subject: include str.h X-Git-Tag: v3.3~1124 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/833349969034af040d8c1c0ff4fa5e8c9c43ad7c include str.h git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4667 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/xbt/snprintf.c b/src/xbt/snprintf.c index 8ce12fe163..6196c886f1 100644 --- a/src/xbt/snprintf.c +++ b/src/xbt/snprintf.c @@ -280,7 +280,6 @@ */ - /* ============================================= */ /* NO USER SERVICABLE PARTS FOLLOWING THIS POINT */ /* ============================================= */ @@ -327,6 +326,7 @@ #include #include +#include "xbt/str.h" #ifdef isdigit #undef isdigit @@ -380,12 +380,14 @@ /* prototypes */ + #if defined(NEED_ASPRINTF) int asprintf (char **ptr, const char *fmt, /*args*/ ...); #endif -#if defined(NEED_VASPRINTF) +#if defined(NEED_VASPRINTF) int vasprintf (char **ptr, const char *fmt, va_list ap); #endif + #if defined(NEED_ASNPRINTF) int asnprintf (char **ptr, size_t str_m, const char *fmt, /*args*/ ...); #endif @@ -1043,7 +1045,10 @@ char *bprintf(const char*fmt, ...) { char *res; va_start(ap, fmt); - vasprintf(&res,fmt,ap); + + + vasprintf(&res,fmt,ap); + va_end(ap); return res; }