This avoids conflicts with autoconf and other config.h sources.
Based on the work by Cody P Schafer <dev@codyps.com>.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
const char *depends;
const char *link;
const char *fragment;
const char *depends;
const char *link;
const char *fragment;
+ const char *overrides; /* On success, force this to '1' */
bool done;
bool answer;
};
bool done;
bool answer;
};
" struct timespec ts;\n"
" clock_gettime(CLOCK_REALTIME, &ts);\n"
" return ts;\n"
" struct timespec ts;\n"
" clock_gettime(CLOCK_REALTIME, &ts);\n"
" return ts;\n"
+ "}\n",
+ /* This means HAVE_CLOCK_GETTIME, too */
+ "HAVE_CLOCK_GETTIME" },
{ "HAVE_COMPOUND_LITERALS", INSIDE_MAIN, NULL, NULL,
"int *foo = (int[]) { 1, 2, 3, 4 };\n"
"return foo[0] ? 0 : 1;" },
{ "HAVE_COMPOUND_LITERALS", INSIDE_MAIN, NULL, NULL,
"int *foo = (int[]) { 1, 2, 3, 4 };\n"
"return foo[0] ? 0 : 1;" },
test->answer = (status == 0);
}
test->done = true;
test->answer = (status == 0);
}
test->done = true;
+
+ if (test->answer && test->overrides) {
+ struct test *override = find_test(test->overrides);
+ override->done = true;
+ override->answer = true;
+ }