From: Rusty Russell Date: Sat, 1 Jan 2011 06:45:41 +0000 (+1030) Subject: config.h: HAVE_FLEXIBLE_ARRAY_MEMBER X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=1f4312c3320f353a18ab4aec4b8ae725fc25c911 config.h: HAVE_FLEXIBLE_ARRAY_MEMBER --- diff --git a/config.h b/config.h index fc2b892d..7ef5d3ba 100644 --- a/config.h +++ b/config.h @@ -24,6 +24,7 @@ #define HAVE_BYTESWAP_H 1 #define HAVE_COMPOUND_LITERALS 1 #define HAVE_FOR_LOOP_DECLARATION 0 +#define HAVE_FLEXIBLE_ARRAY_MEMBER 1 #define HAVE_GETPAGESIZE 1 #define HAVE_LITTLE_ENDIAN 1 #define HAVE_MMAP 1 diff --git a/tools/configurator/configurator.c b/tools/configurator/configurator.c index ffa188d7..4445139c 100644 --- a/tools/configurator/configurator.c +++ b/tools/configurator/configurator.c @@ -85,6 +85,8 @@ static struct test tests[] = { { "HAVE_FOR_LOOP_DECLARATION", INSIDE_MAIN, NULL, "for (int i = 0; i < argc; i++) { return 0; };\n" "return 1;" }, + { "HAVE_FLEXIBLE_ARRAY_MEMBER", OUTSIDE_MAIN, NULL, + "struct foo { unsigned int x; int arr[]; };" }, { "HAVE_GETPAGESIZE", DEFINES_FUNC, NULL, "#include \n" "static int func(void) { return getpagesize(); }" },