Avoid using variable size arrays if gcc does not allow them.
authorBruno Haible <bruno@clisp.org>
Mon, 27 Nov 2006 14:17:38 +0000 (14:17 +0000)
committerBruno Haible <bruno@clisp.org>
Mon, 27 Nov 2006 14:17:38 +0000 (14:17 +0000)
ChangeLog
lib/gettext.h

index 3fa63a7162635aaf6288f03e195e87da96ac3d0e..972495fc21a9e1be2e31e1d42e1de3193d01ad2d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix some incompatibilities with gcc -ansi -pedantic.
index 18c62a4067f5caa8153847a5cbf547f58f12efe1..9d76ec9afccff2785cad1c468b05251a6eba3de2 100644 (file)
@@ -169,7 +169,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>