From: Wolfgang Stöggl Date: Tue, 2 Jan 2018 10:04:40 +0000 (+0100) Subject: Fix expansion-to-defined warnings (GCC 7) X-Git-Tag: v1.7.1~75^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ccd9c70f1d835b0dcedf930e6abd01e7b4175b09;p=thirdparty%2Frrdtool-1.x.git 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 --- 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