]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
intl: Define possibly undefined _GL_UNUSED in xsize.c
authorDaiki Ueno <ueno@gnu.org>
Sat, 10 May 2014 20:44:35 +0000 (05:44 +0900)
committerDaiki Ueno <ueno@gnu.org>
Sat, 10 May 2014 20:45:38 +0000 (05:45 +0900)
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/xsize.c

index 1d113b29e6921dff9745cc8ff0ee4f57691de615..4ca3e30875e0c8d0d6172a94737ee5dd6ec35363 100644 (file)
@@ -1,3 +1,7 @@
+2014-05-11  Daiki Ueno  <ueno@gnu.org>
+
+       * xsize.c (_GL_UNUSED): Define, if undefined.
+
 2014-04-30  Steve Ellcey  <sellcey@mips.com>  (tiny change)
 
        * loadmsgcat.c (PRI_MACROS_BROKEN) [_LIBC]: Define to 0, if
index 4b4914c2ca1f4d98015279b680e92294054687c2..87d8add45d92419a23ee3bee98f6acff8ecf06d4 100644 (file)
@@ -1,3 +1,17 @@
 #include <config.h>
+
+/* 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"