Browse Source

config.h: HAVE_FLEXIBLE_ARRAY_MEMBER

Rusty Russell 15 years ago
parent
commit
1f4312c332
2 changed files with 3 additions and 0 deletions
  1. 1 0
      config.h
  2. 2 0
      tools/configurator/configurator.c

+ 1 - 0
config.h

@@ -24,6 +24,7 @@
 #define HAVE_BYTESWAP_H 1
 #define HAVE_BYTESWAP_H 1
 #define HAVE_COMPOUND_LITERALS 1
 #define HAVE_COMPOUND_LITERALS 1
 #define HAVE_FOR_LOOP_DECLARATION 0
 #define HAVE_FOR_LOOP_DECLARATION 0
+#define HAVE_FLEXIBLE_ARRAY_MEMBER 1
 #define HAVE_GETPAGESIZE 1
 #define HAVE_GETPAGESIZE 1
 #define HAVE_LITTLE_ENDIAN 1
 #define HAVE_LITTLE_ENDIAN 1
 #define HAVE_MMAP 1
 #define HAVE_MMAP 1

+ 2 - 0
tools/configurator/configurator.c

@@ -85,6 +85,8 @@ static struct test tests[] = {
 	{ "HAVE_FOR_LOOP_DECLARATION", INSIDE_MAIN, NULL,
 	{ "HAVE_FOR_LOOP_DECLARATION", INSIDE_MAIN, NULL,
 	  "for (int i = 0; i < argc; i++) { return 0; };\n"
 	  "for (int i = 0; i < argc; i++) { return 0; };\n"
 	  "return 1;" },
 	  "return 1;" },
+	{ "HAVE_FLEXIBLE_ARRAY_MEMBER", OUTSIDE_MAIN, NULL,
+	  "struct foo { unsigned int x; int arr[]; };" },
 	{ "HAVE_GETPAGESIZE", DEFINES_FUNC, NULL,
 	{ "HAVE_GETPAGESIZE", DEFINES_FUNC, NULL,
 	  "#include <unistd.h>\n"
 	  "#include <unistd.h>\n"
 	  "static int func(void) { return getpagesize(); }" },
 	  "static int func(void) { return getpagesize(); }" },