X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a4d071afeab4b3ff0a50eefbf48a391d4e8978aa..2b245114f143e73ccdcd8367149999b59ef2f9e2:/src/xbt/snprintf.c diff --git a/src/xbt/snprintf.c b/src/xbt/snprintf.c index 426d0bbd0f..c6e841f00d 100644 --- a/src/xbt/snprintf.c +++ b/src/xbt/snprintf.c @@ -49,9 +49,16 @@ * http://www.ijs.si/software/snprintf/ */ +/* find vasprintf in stdio.h */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif +#include + #include "xbt/sysdep.h" /* xbt_abort() */ #include "src/internal_config.h" /* Do we need vasprintf? */ -#include + +#include #if !HAVE_VASPRINTF #include /* vsnprintf */ @@ -84,7 +91,7 @@ char *bvprintf(const char *fmt, va_list ap) if (vasprintf(&res, fmt, ap) < 0) { /* Do not want to use xbt_die() here, as it uses the logging - * infrastucture and may fail to allocate memory too. */ + * infrastructure and may fail to allocate memory too. */ fprintf(stderr, "bprintf: vasprintf failed. Aborting.\n"); xbt_abort(); }