X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fconfigurator%2Fconfigurator.c;h=85842cedba84301709ffc0764943c6d667ada107;hb=39dc9e4612339af669e934c47500605f826a2bb4;hp=4972e9e198bb56a4ed5bc910722a9d9b8625ce7c;hpb=590d63376591791869b58743d3eca9c452d705e6;p=ccan diff --git a/tools/configurator/configurator.c b/tools/configurator/configurator.c index 4972e9e1..85842ced 100644 --- a/tools/configurator/configurator.c +++ b/tools/configurator/configurator.c @@ -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 \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,