]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Avoid using variable-size arrays if gcc doesn't provide them.
authorBruno Haible <bruno@clisp.org>
Mon, 27 Nov 2006 13:53:12 +0000 (13:53 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:14:25 +0000 (12:14 +0200)
gnulib-local/ChangeLog
gnulib-local/lib/gettext.h

index 43014c99ed4fb176a54d2d4b4eb230414f25627f..1473d392c4a169285ccca31ad43c1f2b8db1d975 100644 (file)
@@ -1,3 +1,9 @@
+2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
+            Bruno Haible  <bruno@clisp.org>
+
+       * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
+       if compiling with "gcc -ansi".
+
 2006-11-26  Bruno Haible  <bruno@clisp.org>
 
        Build the imported libraries with a C compiler, even when CC=g++.
index 3528274173492cef50e71f6863d05bcd68f89863..94c76d024960e34ff98f73319dec60a757a5e6c3 100644 (file)
@@ -170,7 +170,8 @@ npgettext_aux (const char *domain,
 #include <string.h>
 
 #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
-  (__GNUC__ >= 3 || __GNUG__ >= 2 /* || __STDC_VERSION__ >= 199901L */ )
+  (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \
+   /* || __STDC_VERSION__ >= 199901L */ )
 
 #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
 #include <stdlib.h>