#endif
#endif
+ /* FIXME: better place */
+#include "xbt/sysdep.h"
+
/* declarations */
static char credits[] = "\n\
str_l = portable_vsnprintf(NULL, (size_t) 0, fmt, ap);
va_end(ap);
assert(str_l >= 0); /* possible integer overflow if str_m > INT_MAX */
- *ptr = (char *) malloc(str_m = (size_t) str_l + 1);
+ *ptr = (char *) xbt_malloc(str_m = (size_t) str_l + 1);
if (*ptr == NULL) {
errno = ENOMEM;
str_l = -1;
va_end(ap2);
}
assert(str_l >= 0); /* possible integer overflow if str_m > INT_MAX */
- *ptr = (char *) malloc(str_m = (size_t) str_l + 1);
+ *ptr = (char *) xbt_malloc(str_m = (size_t) str_l + 1);
if (*ptr == NULL) {
errno = ENOMEM;
str_l = -1;
/* if str_m is 0, no buffer is allocated, just set *ptr to NULL */
if (str_m == 0) { /* not interested in resulting string, just return size */
} else {
- *ptr = (char *) malloc(str_m);
+ *ptr = (char *) xbt_malloc(str_m);
if (*ptr == NULL) {
errno = ENOMEM;
str_l = -1;
/* if str_m is 0, no buffer is allocated, just set *ptr to NULL */
if (str_m == 0) { /* not interested in resulting string, just return size */
} else {
- *ptr = (char *) malloc(str_m);
+ *ptr = (char *) xbt_malloc(str_m);
if (*ptr == NULL) {
errno = ENOMEM;
str_l = -1;
#endif
- /* FIXME: better place */
-#include "xbt/sysdep.h"
-
char *bvprintf(const char *fmt, va_list ap)
{
char *res;