X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fflexmember.m4;h=8884cb17ad1f37ee715bdc9be36be3141b81f376;hb=9f60473985e5f20c3efabadf2c1756b5ff560458;hp=bedb799b9cd8881670e451a9d9656e21ee282a41;hpb=69fba4bf57154fba7363c2045338c7d124deade1;p=gnulib.git diff --git a/m4/flexmember.m4 b/m4/flexmember.m4 index bedb799b9..8884cb17a 100644 --- a/m4/flexmember.m4 +++ b/m4/flexmember.m4 @@ -1,21 +1,10 @@ +# serial 2 # Check for flexible array member support. -# Copyright (C) 2006 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. +# Copyright (C) 2006, 2009-2011 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. # Written by Paul Eggert. @@ -25,15 +14,15 @@ AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER], ac_cv_c_flexmember, [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( - [[#include - #include - #include - struct s { int n; double d[]; };]], - [[int m = getchar (); - struct s *p = malloc (offsetof (struct s, d) - + m * sizeof (double)); - p->d[0] = 0.0; - return p->d != (double *) NULL;]])], + [[#include + #include + #include + struct s { int n; double d[]; };]], + [[int m = getchar (); + struct s *p = malloc (offsetof (struct s, d) + + m * sizeof (double)); + p->d[0] = 0.0; + return p->d != (double *) NULL;]])], [ac_cv_c_flexmember=yes], [ac_cv_c_flexmember=no])]) if test $ac_cv_c_flexmember = yes; then @@ -47,6 +36,6 @@ AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER], Don't use 'offsetof (struct s, d@<:@0@:>@)', as this doesn't work with MSVC and with C++ compilers.]) else - AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], 1) + AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [1]) fi ])