#define CCAN_CFLAGS "-g -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations"
#define HAVE_ALIGNOF 1
+#define HAVE_ASPRINTF 1
#define HAVE_ATTRIBUTE_COLD 1
#define HAVE_ATTRIBUTE_CONST 1
#define HAVE_ATTRIBUTE_MAY_ALIAS 1
static struct test tests[] = {
{ "HAVE_ALIGNOF", INSIDE_MAIN, NULL,
"return __alignof__(double) > 0 ? 0 : 1;" },
+ { "HAVE_ASPRINTF", DEFINES_FUNC, NULL,
+ "#define _GNU_SOURCE\n"
+ "#include <stdio.h>\n"
+ "static char *func(int x) {"
+ " char *p;\n"
+ " if (asprintf(&p, \"%u\", x) == -1) p = NULL;"
+ " return p;\n"
+ "}" },
{ "HAVE_ATTRIBUTE_COLD", DEFINES_FUNC, NULL,
"static int __attribute__((cold)) func(int x) { return x; }" },
{ "HAVE_ATTRIBUTE_CONST", DEFINES_FUNC, NULL,