shithub: cstory

ref: 32a879ca58c048a3d09380d6d74d242ffe7bffd2
dir: /src/Helpers/Vasprintf.h/

View raw version
#pragma once

// If <stdio.h> defines asprintf for us, use its definition
#ifdef _GNU_SOURCE

#include <stdio.h>

#else

#include "../Attributes.h"
#include <stdarg.h>
#define vasprintf Portable_vasprintf

ATTRIBUTE_FORMAT(printf, 2, 0) ATTRIBUTE_WARN_UNUSED_RESULT int vasprintf(char **resultString, const char *formatString, va_list arguments);

#endif