From ea4bd098db51259f1a43054c0e93380d1687f2f3 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 8 Jun 2012 17:21:04 +0930 Subject: [PATCH] configurator: add HAVE_ERR_H test. --- tools/configurator/configurator.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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" -- 2.39.2