A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mark actors as auto_restart when recreating them on restart.
[simgrid.git]
/
src
/
xbt
/
snprintf.c
diff --git
a/src/xbt/snprintf.c
b/src/xbt/snprintf.c
index
4f75d19
..
f0fdc60
100644
(file)
--- a/
src/xbt/snprintf.c
+++ b/
src/xbt/snprintf.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2005-201
0, 2012-2016
. The SimGrid Team.
+/* Copyright (c) 2005-201
8
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-49,9
+49,15
@@
* http://www.ijs.si/software/snprintf/
*/
* http://www.ijs.si/software/snprintf/
*/
+/* find vasprintf in stdio.h */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+#include <stdio.h>
+
#include "xbt/sysdep.h" /* xbt_abort() */
#include "src/internal_config.h" /* Do we need vasprintf? */
#include "xbt/sysdep.h" /* xbt_abort() */
#include "src/internal_config.h" /* Do we need vasprintf? */
-#include <stdio.h>
+
#include <assert.h>
#if !HAVE_VASPRINTF
#include <assert.h>
#if !HAVE_VASPRINTF
@@
-85,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
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. */
+ * infrast
r
ucture and may fail to allocate memory too. */
fprintf(stderr, "bprintf: vasprintf failed. Aborting.\n");
xbt_abort();
}
fprintf(stderr, "bprintf: vasprintf failed. Aborting.\n");
xbt_abort();
}