getopt: merge _GL_UNUSED annotations from gnulib
authorZack Weinberg <zackw@panix.com>
Mon, 3 Apr 2017 12:45:41 +0000 (08:45 -0400)
committerZack Weinberg <zackw@panix.com>
Fri, 7 Apr 2017 11:52:29 +0000 (07:52 -0400)
commit0f3be8721a86299600eae2d266934f661bf7c990
tree51085f8f01905cd53c041869b25ed3688ad59abd
parentaeacb9f9127cff0ed099026156ca35c025f343b7
getopt: merge _GL_UNUSED annotations from gnulib

gnulib now has annotations on at least some functions to cater to
compilation with -Wunused-parameter.  In order to follow suit cleanly,
I've added to libc-symbols.h some of the _GL_* macros that
gnulib-common.m4 puts into config.h.  (I don't think they belong in
sys/cdefs.h, at least not without further thought.)

At this point all gnulib-side changes to getopt.c have been merged.

* include/libc-symbols.h: For gnulib compatibility, define
_GL_UNUSED, _GL_UNUSED_LABEL, _GL_ATTRIBUTE_PURE, and
_GL_ATTRIBUTE_CONST.
* posix/getopt.c (_getopt_initialize): Mark argc and argv
parameters with _GL_UNUSED.
ChangeLog
include/libc-symbols.h
posix/getopt.c