From: Rusty Russell Date: Fri, 8 Jun 2012 07:51:04 +0000 (+0930) Subject: configurator: add HAVE_ERR_H test. X-Git-Url: http://git.ozlabs.org/?a=commitdiff_plain;ds=sidebyside;h=ea4bd098db51259f1a43054c0e93380d1687f2f3;p=ccan configurator: add HAVE_ERR_H test. --- diff --git a/tools/configurator/configurator.c b/tools/configurator/configurator.c index 63fa46fa..14c40934 100644 --- a/tools/configurator/configurator.c +++ b/tools/configurator/configurator.c @@ -127,6 +127,18 @@ static struct test tests[] = { { "HAVE_COMPOUND_LITERALS", INSIDE_MAIN, NULL, "int *foo = (int[]) { 1, 2, 3, 4 };\n" "return foo[0] ? 0 : 1;" }, + { "HAVE_ERR_H", DEFINES_FUNC, NULL, + "#include \n" + "static void func(int arg) {\n" + " if (arg == 0)\n" + " err(1, \"err %u\", arg);\n" + " if (arg == 1)\n" + " errx(1, \"err %u\", arg);\n" + " if (arg == 3)\n" + " warn(\"warn %u\", arg);\n" + " if (arg == 4)\n" + " warnx(\"warn %u\", arg);\n" + "}\n" }, { "HAVE_FILE_OFFSET_BITS", DEFINES_EVERYTHING|EXECUTE, "HAVE_32BIT_OFF_T", "#define _FILE_OFFSET_BITS 64\n"