summaryrefslogtreecommitdiff
path: root/gnulib-m4/flexmember.m4
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-03 20:50:11 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-03 20:50:11 +0100
commit4cf52fc0bc3b80c0ef6c58c5db4413ebdafe661c (patch)
tree676b26b024117cf656080a011e3d17b8fb6889af /gnulib-m4/flexmember.m4
parent1ecbfbb92248e67b564f5b144c4671ccaa86ee2f (diff)
parent44ff3127b1e57b703c2a73a24f7ab38e4aad8ae4 (diff)
Merge branch 'release/0.9.8-1'0.9.8-1
Diffstat (limited to 'gnulib-m4/flexmember.m4')
-rw-r--r--gnulib-m4/flexmember.m49
1 files changed, 6 insertions, 3 deletions
diff --git a/gnulib-m4/flexmember.m4 b/gnulib-m4/flexmember.m4
index 155ae9b..9d3b50d 100644
--- a/gnulib-m4/flexmember.m4
+++ b/gnulib-m4/flexmember.m4
@@ -1,7 +1,7 @@
-# serial 4
+# serial 5
# Check for flexible array member support.
-# Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -17,12 +17,15 @@ AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER],
[[#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
- struct s { int n; double d[]; };]],
+ struct m { struct m *next, **list; char name[]; };
+ struct s { struct s *p; struct m *m; int n; double d[]; };]],
[[int m = getchar ();
size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
nbytes += sizeof (struct s) - 1;
nbytes -= nbytes % sizeof (struct s);
struct s *p = malloc (nbytes);
+ p->p = p;
+ p->m = NULL;
p->d[0] = 0.0;
return p->d != (double *) NULL;]])],
[ac_cv_c_flexmember=yes],