From 937f4d948b716f80af2395b7ff98acb37acc0c4d Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 15 Jul 2012 15:40:50 +0200 Subject: [PATCH] Do not assume '#define ... defined ...' behavior. --- gnulib-local/ChangeLog | 9 +++++++++ gnulib-local/lib/gettext.h | 9 ++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/gnulib-local/ChangeLog b/gnulib-local/ChangeLog index a0240555f..cb4c736c1 100644 --- a/gnulib-local/ChangeLog +++ b/gnulib-local/ChangeLog @@ -1,3 +1,12 @@ +2012-07-11 Paul Eggert + + Do not assume '#define ... defined ...' behavior. + * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): + Do not use '#define FOO ... defined BAR ...', as the C standard says + it's not portable to expect that this works after macro expansion. + Problem reported for gzip by Steven M. Schweda in + . + 2012-06-03 Jim Meyering * lib/tparm.c: Spelling fixes. diff --git a/gnulib-local/lib/gettext.h b/gnulib-local/lib/gettext.h index fbbbce18b..9d4055d12 100644 --- a/gnulib-local/lib/gettext.h +++ b/gnulib-local/lib/gettext.h @@ -182,9 +182,12 @@ npgettext_aux (const char *domain, #include -#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ - (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ - /* || __STDC_VERSION__ >= 199901L */ ) +#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ + /* || __STDC_VERSION__ >= 199901L */ ) +# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1 +#else +# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0 +#endif #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS #include -- 2.47.2