From: Daiki Ueno Date: Sat, 10 May 2014 20:44:35 +0000 (+0900) Subject: intl: Define possibly undefined _GL_UNUSED in xsize.c X-Git-Tag: v0.19~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a68f7d230fa82ad98d53520032779e323a27b5a;p=thirdparty%2Fgettext.git intl: Define possibly undefined _GL_UNUSED in xsize.c --- diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index 1d113b29e..4ca3e3087 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,7 @@ +2014-05-11 Daiki Ueno + + * xsize.c (_GL_UNUSED): Define, if undefined. + 2014-04-30 Steve Ellcey (tiny change) * loadmsgcat.c (PRI_MACROS_BROKEN) [_LIBC]: Define to 0, if diff --git a/gettext-runtime/intl/xsize.c b/gettext-runtime/intl/xsize.c index 4b4914c2c..87d8add45 100644 --- a/gettext-runtime/intl/xsize.c +++ b/gettext-runtime/intl/xsize.c @@ -1,3 +1,17 @@ #include + +/* XSIZE_INLINE can be expanded to _GL_UNUSED, which is defined through + a gnulib-tool magic. Define it here so not to require Gnulib. */ +#if defined IN_LIBINTL && !defined GL_UNUSED +/* Define as a marker that can be attached to declarations that might not + be used. This helps to reduce warnings, such as from + GCC -Wunused-parameter. */ +# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define _GL_UNUSED __attribute__ ((__unused__)) +# else +# define _GL_UNUSED +# endif +#endif + #define XSIZE_INLINE _GL_EXTERN_INLINE #include "xsize.h"