]> git.ozlabs.org Git - ccan/blobdiff - tools/configurator/configurator.c
Fix HAVE_ASPRINTF detection
[ccan] / tools / configurator / configurator.c
index ff9f64904bb06a7759c7c453fbf53a3dae47f5e8..2e5b09c2b984c252c8a2bfd9a397960af057c344 100644 (file)
@@ -102,7 +102,8 @@ static struct test tests[] = {
          "#include <stdio.h>\n"
          "static char *func(int x) {"
          "     char *p;\n"
-         "     if (asprintf(&p, \"%u\", x) == -1) p = NULL;"
+         "     if (asprintf(&p, \"%u\", x) == -1) \n"
+         "             p = NULL;\n"
          "     return p;\n"
          "}" },
        { "HAVE_ATTRIBUTE_COLD", DEFINES_FUNC, NULL, NULL,
@@ -159,8 +160,12 @@ static struct test tests[] = {
          "return __builtin_ffsl(0L) == 0 ? 0 : 1;" },
        { "HAVE_BUILTIN_FFSLL", INSIDE_MAIN, NULL, NULL,
          "return __builtin_ffsll(0LL) == 0 ? 0 : 1;" },
+       { "HAVE_BUILTIN_POPCOUNT", INSIDE_MAIN, NULL, NULL,
+         "return __builtin_popcount(255) == 8 ? 0 : 1;" },
        { "HAVE_BUILTIN_POPCOUNTL", INSIDE_MAIN, NULL, NULL,
          "return __builtin_popcountl(255L) == 8 ? 0 : 1;" },
+       { "HAVE_BUILTIN_POPCOUNTLL", INSIDE_MAIN, NULL, NULL,
+         "return __builtin_popcountll(255LL) == 8 ? 0 : 1;" },
        { "HAVE_BUILTIN_TYPES_COMPATIBLE_P", INSIDE_MAIN, NULL, NULL,
          "return __builtin_types_compatible_p(char *, int) ? 1 : 0;" },
        { "HAVE_ICCARM_INTRINSICS", DEFINES_FUNC, NULL, NULL,