Commit 19b3fce2 authored by Rusty Russell's avatar Rusty Russell

config.h: HAVE_ASPRINTF

parent 590d6337
......@@ -6,6 +6,7 @@
#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
......
......@@ -38,6 +38,14 @@ struct test {
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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment