From ccd9c70f1d835b0dcedf930e6abd01e7b4175b09 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wolfgang=20St=C3=B6ggl?= Date: Tue, 2 Jan 2018 11:04:40 +0100 Subject: [PATCH] Fix expansion-to-defined warnings (GCC 7) - Fixed compiler warnings: gettext.h:176:6: warning: this use of "defined" may not be portable [-Wexpansion-to-defined] #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS gettext.h:200:5: warning: this use of "defined" may not be portable [-Wexpansion-to-defined] #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS gettext.h:215:6: warning: this use of "defined" may not be portable [-Wexpansion-to-defined] #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS gettext.h:246:5: warning: this use of "defined" may not be portable [-Wexpansion-to-defined] #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS gettext.h:261:6: warning: this use of "defined" may not be portable [-Wexpansion-to-defined] #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS --- src/gettext.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gettext.h b/src/gettext.h index 4aef2ef0..0d225bbb 100644 --- a/src/gettext.h +++ b/src/gettext.h @@ -169,9 +169,11 @@ 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__) +#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