X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fconfigurator%2Fconfigurator.c;h=d676b882329d55706e818eb93884393deb520e31;hp=1386fc90c8d72be6e734eb9f21a2d661b4c6f86c;hb=0bfaf906c83acf8c68984b505fce1bd9c67c2638;hpb=97026cedabce510b2e2e547120f04fe0f6a5ecab diff --git a/tools/configurator/configurator.c b/tools/configurator/configurator.c index 1386fc90..d676b882 100644 --- a/tools/configurator/configurator.c +++ b/tools/configurator/configurator.c @@ -488,6 +488,13 @@ static const struct test base_tests[] = { " return worked ? 0 : 1;\n" "}\n" }, + { "HAVE_BUILTIN_CPU_SUPPORTS", "__builtin_cpu_supports()", + "DEFINES_FUNC", NULL, NULL, + "#include \n" + "static bool func(void) {\n" + " return __builtin_cpu_supports(\"mmx\");\n" + "}" + }, }; static void c12r_err(int eval, const char *fmt, ...) @@ -888,7 +895,8 @@ static void read_tests(size_t num_tests) { while (read_test(tests + num_tests)) { num_tests++; - tests = realloc(tests, num_tests * sizeof(tests[0])); + tests = realloc(tests, (num_tests + 1) * sizeof(tests[0])); + tests[num_tests].name = NULL; } }