autoconf-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Autoconf source repository branch, master, updated. v2.69-124-


From: Paul Eggert
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.69-124-gf6156ba
Date: Fri, 08 Aug 2014 00:17:30 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=f6156ba05083625751a23fe2df1cd6694f42f356

The branch, master has been updated
       via  f6156ba05083625751a23fe2df1cd6694f42f356 (commit)
       via  8a8e0756756e0981d8b33c63ff55cd08182b3d67 (commit)
       via  c1fa7dc412a5ee12c76c064a913138dbeadd6e9b (commit)
      from  0443fa8d4320b3f42a7774c470cc40921cf74d00 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f6156ba05083625751a23fe2df1cd6694f42f356
Author: Paul Eggert <address@hidden>
Date:   Thu Aug 7 17:16:40 2014 -0700

    autoconf: modernize AC_C_VARARRAYS for C11
    
    * lib/autoconf/c.m4 (AC_C_VARARRAYS): Define __STDC_NO_VLA__ if
    VLAs are not supported, as this is what C11 does.  The old macro
    HAVE_C_VARARRAYS is still defined if they are supported, but is
    now obsolescent.  Also, check for VLA bug in GCC 3.4.3.
    * doc/autoconf.texi (C Compiler), NEWS: Document the above.

commit 8a8e0756756e0981d8b33c63ff55cd08182b3d67
Author: Paul Eggert <address@hidden>
Date:   Thu Aug 7 16:08:49 2014 -0700

    doc: Solaris 11 supports $(...)
    
    * doc/autoconf.texi (Shell Substitutions): Say that $(...) isn't
    working in Solaris 10 and earlier, not in "recent releases".

commit c1fa7dc412a5ee12c76c064a913138dbeadd6e9b
Author: Paul Eggert <address@hidden>
Date:   Thu Aug 7 15:03:38 2014 -0700

    doc: modernize character encoding
    
    * doc/autoconf.texi: Specify @documentencoding UTF-8.  Don't abuse
    '`' to mean open quote, unless Texinfo already interprets it that
    way.  Be more careful about hyphen versus minus versus endash
    versus emdash.

-----------------------------------------------------------------------

Summary of changes:
 NEWS              |    6 ++++
 doc/autoconf.texi |   69 ++++++++++++++++++++++++++++------------------------
 lib/autoconf/c.m4 |   52 +++++++++++++++++++++++++++++++++++----
 3 files changed, 89 insertions(+), 38 deletions(-)

diff --git a/NEWS b/NEWS
index 3f66825..6e2aabd 100644
--- a/NEWS
+++ b/NEWS
@@ -31,6 +31,12 @@ GNU Autoconf NEWS - User visible changes.
 
 - New macro AC_C__GENERIC.
 
+- AC_C_VARARRAYS now defines __STDC_NO_VLA__ if variable-length
+  arrays are not supported and if the compiler does not already
+  define __STDC_NO_VLA__.  This is for compatibility with C11.
+  For backward compatibility with Autoconf 2.61-2.69 AC_C_VARARRAYS
+  still defines HAVE_C_VARARRAYS, but this usage is obsolescent.
+
 - AC_CONFIG_MACRO_DIRS
   New macro, used to declare multiple directories when looking for
   local M4 macros.  This macro overcomes some of the shortfalls in the
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 4a4ee81..83e6643 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -4,6 +4,7 @@
 @setfilename autoconf.info
 @include version.texi
 @settitle Autoconf
address@hidden UTF-8
 @setchapternewpage odd
 @ifnothtml
 @setcontentsaftertitlepage
@@ -39,16 +40,16 @@
 @c Because we want to drop out the AC_ part of the macro names in the
 @c printed manual, but not in the other outputs, we need a layer above
 @c the usual @acindex{} etc.  That's why we first define indexes such as
address@hidden acx meant to become the macro @acindex.  First of all, using 
``ac_''
address@hidden does not work with makeinfo, and using ``ac1'' doesn't work with 
TeX.
address@hidden So use something more regular ``acx''.  Then you finish with a 
printed
address@hidden index saying ``index is not existent''.  Of course: you ought to 
use
address@hidden acx meant to become the macro @acindex.  First of all, using 
'ac_'
address@hidden does not work with makeinfo, and using 'ac1' doesn't work with 
TeX.
address@hidden So use something more regular 'acx'.  Then you finish with a 
printed
address@hidden index saying 'index is not existent'.  Of course: you ought to 
use
 @c two letters :(  So you use capitals.
 @c
 @c Second, when defining a macro in the TeX world, following spaces are
 @c eaten.  But then, since we embed @acxindex commands that use the end
 @c of line as an end marker, the whole things wrecks itself.  So make
address@hidden sure you do *force* an additional end of line, add a 
address@hidden''.
address@hidden sure you do *force* an additional end of line, add a '@c'.
 @c
 @c Finally, you might want to get rid of TeX expansion, using --expand
 @c with texi2dvi.  But then you wake up an old problem: we use macros
@@ -72,7 +73,7 @@
 @defcodeindex AT
 @c Define an M4sugar macro index that @defmac doesn't write to.
 @defcodeindex MS
address@hidden Define an index for *foreign* programs: `mv' etc.  Used for the
address@hidden Define an index for *foreign* programs: 'mv' etc.  Used for the
 @c portability sections and so on.
 @defindex pr
 
@@ -210,7 +211,7 @@ This manual (@value{UPDATED}) is for GNU Autoconf
 a package for creating scripts to configure source code packages using
 templates and an M4 macro package.
 
-Copyright @copyright{} 1992-1996, 1998-2014 Free Software Foundation,
+Copyright @copyright{} 1992--1996, 1998--2014 Free Software Foundation,
 Inc.
 
 @quotation
@@ -742,7 +743,7 @@ along that front are welcome, since package maintainers 
form the user
 base of Autoconf); rather, the goal is to make @file{configure}
 painless, portable, and predictable for the end user of each
 @dfn{autoconfiscated} package.  And to this degree, Autoconf is highly
-successful at its goal --- most complaints to the Autoconf list are
+successful at its goal---most complaints to the Autoconf list are
 about difficulties in writing Autoconf input, and not in the behavior of
 the resulting @file{configure}.  Even packages that don't use Autoconf
 will generally provide a @file{configure} script, and the most common
@@ -6503,7 +6504,7 @@ If no @var{includes} are specified, the default includes 
are used
 
 @example
 AC_CHECK_MEMBER([struct passwd.pw_gecos], [],
-                [AC_MSG_ERROR([we need `passwd.pw_gecos'])],
+                [AC_MSG_ERROR([we need 'passwd.pw_gecos'])],
                 [[#include <pwd.h>]])
 @end example
 
@@ -7487,11 +7488,15 @@ for (i = 0; i < n; i++)
 
 @defmac AC_C_VARARRAYS
 @acindex{C_VARARRAYS}
address@hidden __STDC_NO_VLA__
 @cvindex HAVE_C_VARARRAYS
-If the C compiler supports variable-length arrays, define
address@hidden  A variable-length array is an array of automatic
-storage duration whose length is determined at run time, when the array
-is declared.
+If the C compiler does not support variable-length arrays, define the
+macro @code{__STDC_NO_VLA__} to be 1 if it is not already defined.  A
+variable-length array is an array of automatic storage duration whose
+length is determined at run time, when the array is declared.  For
+backward compatibility this macro also defines @code{HAVE_C_VARARRAYS}
+if the C compiler supports variable-length arrays, but this usage is
+obsolescent and new programs should use @code{__STDC_NO_VLA__}.
 @end defmac
 
 @defmac AC_C_TYPEOF
@@ -9875,11 +9880,11 @@ different things.
 @example
 $ @kbd{./configure --silent --config-cache}
 $ @kbd{CC=cc ./configure --silent --config-cache}
-configure: error: `CC' was not set in the previous run
+configure: error: 'CC' was not set in the previous run
 configure: error: changes in the environment can compromise \
 the build
-configure: error: run `make distclean' and/or \
-`rm config.cache' and start over
+configure: error: run 'make distclean' and/or \
+'rm config.cache' and start over
 @end example
 
 @noindent
@@ -9990,7 +9995,7 @@ AC_DEFUN([AC_SHELL_TRUE],
                  (true) 2>/dev/null && my_cv_shell_true_works=yes
                  if test "x$my_cv_shell_true_works" = xyes; then
                    AC_DEFINE([TRUE_WORKS], [1],
-                             [Define if `true(1)' works properly.])
+                             [Define if 'true(1)' works properly.])
                  fi])
 ])
 @end group
@@ -10010,7 +10015,7 @@ AC_DEFUN([AC_SHELL_TRUE],
                  (true) 2>/dev/null && my_cv_shell_true_works=yes])
  if test "x$my_cv_shell_true_works" = xyes; then
    AC_DEFINE([TRUE_WORKS], [1],
-             [Define if `true(1)' works properly.])
+             [Define if 'true(1)' works properly.])
  fi
 ])
 @end group
@@ -10708,7 +10713,7 @@ the one they were implemented with.
 @cindex quadrigraphs
 @cindex @samp{@@S|@@}
 @cindex @samp{@@&t@@}
address@hidden Info cannot handle `:' in index entries.
address@hidden Info cannot handle ':' in index entries.
 @ifnotinfo
 @cindex @samp{@@<:@@}
 @cindex @samp{@@:>@@}
@@ -14041,7 +14046,7 @@ configure scripts.
 @ovindex tmp
 Create, as safely as possible, a temporary sub-directory within
 @var{dir} with a name starting with @var{prefix}.  @var{prefix} should
-be 2-4 characters, to make it slightly easier to identify the owner of
+be 2--4 characters, to make it slightly easier to identify the owner of
 the directory.  If @var{dir} is omitted, then the value of @env{TMPDIR}
 will be used (defaulting to @samp{/tmp}).  On success, the name of the
 newly created directory is stored in the shell variable @code{tmp}.  On
@@ -15572,7 +15577,7 @@ signal 15:
 208
 @end example
 
-This gets even worse if one is using the POSIX `wait' interface to get
+This gets even worse if one is using the POSIX ``wait'' interface to get
 details about the shell process terminations: it will result in the shell
 having exited normally, rather than by receiving a signal.
 
@@ -16028,7 +16033,7 @@ j a0
 @end example
 
 @item address@hidden@var{var}:address@hidden@}
address@hidden Info cannot handle `:' in index entries.
address@hidden Info cannot handle ':' in index entries.
 @ifnotinfo
 @cindex @address@hidden@var{var}:address@hidden@}}
 @end ifnotinfo
@@ -16378,12 +16383,12 @@ and it has most of the problems listed under 
@address@hidden
 
 This construct can be
 nested while this is impossible to do portably with back quotes.
-Unfortunately it is not yet universally supported.  Most notably, even recent
-releases of Solaris don't support it:
+Although it is almost universally supported, unfortunately Solaris 10
+and earlier releases lack it:
 
 @example
 $ @kbd{showrev -c /bin/sh | grep version}
-Command version: SunOS 5.10 Generic 121005-03 Oct 2006
+Command version: SunOS 5.10 Generic 142251-02 Sep 2010
 $ @kbd{echo $(echo blah)}
 syntax error: `(' unexpected
 @end example
@@ -18585,11 +18590,11 @@ nothing.
 The default executable, produced by @samp{cc foo.c}, can be
 
 @itemize
address@hidden @file{a.out} --- usual Posix convention.
address@hidden @file{b.out} --- i960 compilers (including @command{gcc}).
address@hidden @file{a.exe} --- DJGPP port of @command{gcc}.
address@hidden @file{a_out.exe} --- GNV @command{cc} wrapper for DEC C on 
OpenVMS.
address@hidden @file{foo.exe} --- various MS-DOS compilers.
address@hidden @file{a.out} -- usual Posix convention.
address@hidden @file{b.out} -- i960 compilers (including @command{gcc}).
address@hidden @file{a.exe} -- DJGPP port of @command{gcc}.
address@hidden @file{a_out.exe} -- GNV @command{cc} wrapper for DEC C on 
OpenVMS.
address@hidden @file{foo.exe} -- various MS-DOS compilers.
 @end itemize
 
 The C compiler's traditional name is @command{cc}, but other names like
@@ -22555,13 +22560,13 @@ if test "$cache_file" = /dev/null; then
 fi
 @end example
 
address@hidden Leave this use of ``File system'' rendered as one word, but
address@hidden Leave this use of "File system" rendered as one word, but
 @c slightly obfuscated so as not to trigger the syntax-check prohibition.
 @cindex File@/system Hierarchy Standard
 @cindex FHS
 
 Another use of @file{config.site} is for priming the directory variables
address@hidden ``File system'', but slightly obfuscated, as above.
address@hidden "File system", but slightly obfuscated, as above.
 in a manner consistent with the File@/system Hierarchy Standard
 (FHS).  Once the following file is installed at
 @file{/usr/share/config.site}, a user can execute simply
diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
index b58e42d..a944529 100644
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -1995,14 +1995,54 @@ AC_DEFUN([AC_C_VARARRAYS],
 [
   AC_CACHE_CHECK([for variable-length arrays],
     ac_cv_c_vararrays,
-    [AC_COMPILE_IFELSE(
-       [AC_LANG_PROGRAM([],
-         [[static int x; char a[++x]; a[sizeof a - 1] = 0; return a[0];]])],
-       [ac_cv_c_vararrays=yes],
-       [ac_cv_c_vararrays=no])])
-  if test $ac_cv_c_vararrays = yes; then
+    [AC_EGREP_CPP([defined],
+       [#ifdef __STDC_NO_VLA__
+       defined
+       #endif
+       ],
+       [ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'],
+       [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[/* Test for VLA support.  This test is partly inspired
+                 from examples in the C standard.  Use at least two VLA
+                 functions to detect the GCC 3.4.3 bug described in:
+                 
http://lists.gnu.org/archive/html/bug-gnulib/2014-08/msg00014.html
+                 */
+              #ifdef __STDC_NO_VLA__
+               syntax error;
+              #else
+                extern int n;
+                int B[100];
+                int fvla (int m, int C[m][m]);
+
+                int
+                simple (int count, int all[static count])
+                {
+                  return all[count - 1];
+                }
+
+                int
+                fvla (int m, int C[m][m])
+                {
+                  typedef int VLA[m][m];
+                  VLA x;
+                  int D[m];
+                  static int (*q)[m] = &B;
+                  int (*s)[n] = q;
+                  return C && &x[0][0] == &D[0] && &D[0] == s[0];
+                }
+              #endif
+              ]])],
+         [ac_cv_c_vararrays=yes],
+         [ac_cv_c_vararrays=no])])])
+  if test "$ac_cv_c_vararrays" = yes; then
+    dnl This is for compatibility with Autoconf 2.61-2.69.
     AC_DEFINE([HAVE_C_VARARRAYS], 1,
       [Define to 1 if C supports variable-length arrays.])
+  elif test "$ac_cv_c_vararrays" = no; then
+    AC_DEFINE([__STDC_NO_VLA__], 1,
+      [Define to 1 if C does not support variable-length arrays, and
+       if the compiler does not already define this.])
   fi
 ])
 


hooks/post-receive
-- 
GNU Autoconf source repository



reply via email to

[Prev in Thread] Current Thread [Next in Thread]