]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Some C++ compilers don't support variable-size arrays.
authorBruno Haible <bruno@clisp.org>
Wed, 25 Oct 2006 13:14:37 +0000 (13:14 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:14:14 +0000 (12:14 +0200)
gnulib-local/ChangeLog
gnulib-local/lib/gettext.h

index da11f2cb32bc2c4dfcf71e8557ec346245b64cd6..be4f35a06f7daf483f6cb9b9d603c2f7172361d5 100644 (file)
@@ -2,6 +2,12 @@
 
        * gettext-0.16 released.
 
+2006-10-25  Bruno Haible  <bruno@clisp.org>
+
+       * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
+       false for PGI C++ and Sun C++ compilers.
+       Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
+
 2006-10-24  Bruno Haible  <bruno@clisp.org>
 
        * modules/gettext-tools-misc (Makefile.am): Add also $(top_srcdir) to
index 9acae729d651b30a3cca83a8cb2857f01c9dde7a..74b08f12809e2e0231b97fc7b617e786dc92a039 100644 (file)
@@ -164,8 +164,12 @@ npgettext_aux (const char *domain,
 
 #include <string.h>
 
+/* GCC supports variable-size arrays in C and C++ mode.
+   ISO C++ supports variable-size arrays, but some older PGI and Sun compilers
+   don't.  */
 #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
-  (__GNUC__ >= 3 || defined __cplusplus)
+  (__GNUC__ >= 3 \
+   || (defined __cplusplus && !(defined __PGI || defined __SUNPRO_CC)))
 
 #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
 #include <stdlib.h>