From 44a3eaeba04ef78835ca741592c376428ada5f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sat, 2 Dec 2017 10:30:25 +0100 Subject: New upstream version 0.9.8 --- gnulib-m4/flexmember.m4 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gnulib-m4/flexmember.m4') diff --git a/gnulib-m4/flexmember.m4 b/gnulib-m4/flexmember.m4 index 155ae9b8..9d3b50d1 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 #include #include - 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], -- cgit v1.2.3