X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fflexmember.m4;h=eb5f2b17906563d5fce0f7ff39e4e09b636c7b2d;hb=93d45a6cea3e8c0959a430e0b3f5ae24fc600399;hp=2a6ae474ec2d6b1696065d5aa827d53c318fd69c;hpb=ef3605f1b2c75155b1525057bbe1e82a38cecd77;p=gnulib.git diff --git a/m4/flexmember.m4 b/m4/flexmember.m4 index 2a6ae474e..eb5f2b179 100644 --- a/m4/flexmember.m4 +++ b/m4/flexmember.m4 @@ -1,21 +1,10 @@ +# serial 1 # 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. +# 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. @@ -41,7 +30,11 @@ AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER], [Define to nothing if C supports flexible array members, and to 1 if it does not. That way, with a declaration like `struct s { int n; double d@<:@FLEXIBLE_ARRAY_MEMBER@:>@; };', the struct hack - can be used with pre-C99 compilers.]) + can be used with pre-C99 compilers. + When computing the size of such an object, don't use 'sizeof (struct s)' + as it overestimates the size. Use 'offsetof (struct s, d)' instead. + 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) fi