+Sun May 19 02:31:11 CDT 2002 Adam Heath <doogie@debian.org>
+
+ * config.h.bot, configure.in, optlib/getopt.c: Define an UNUSED macro,
+ for __attribute__((unused)).
+
Sun May 19 02:31:11 CDT 2002 Adam Heath <doogie@debian.org>
* optlib/error.h, optlib/getopt.c, utils/start-stop-daemon.c: Use
#define CONSTANT FUNCATTR((ATTRCONST))
#endif
+/* GNU C unused functions, or null. */
+#ifndef ATTRUNUSED
+#ifdef HAVE_GNUC25_UNUSED
+#define ATTRUNUSED
+#else
+#define ATTRUNUSED
+#endif
+#endif
+#ifndef UNUSED
+#define UNUSED FUNCATTR((ATTRUNUSED))
+#endif
+
/* Declare strerror if we don't have it already. */
#ifndef HAVE_STRERROR
const char *strerror(int);
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GNUC25_CONST),
AC_MSG_RESULT(no))
+ DPKG_CACHED_TRY_COMPILE(__attribute__((unused)),dpkg_cv_c_attribute_unused,,
+ [extern int testfunction(int x) __attribute__((unused))],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_GNUC25_UNUSED),
+ AC_MSG_RESULT(no))
DPKG_CACHED_TRY_COMPILE(__attribute__((format...)),dpkg_cv_attribute_format,,
[extern int testfunction(char *y, ...) __attribute__((format(printf,1,2)))],
AC_MSG_RESULT(yes)
is valid for the getopt call we must make sure that the ARGV passed
to getopt is that one passed to the process. */
static void
-FUNCATTR(unused)
+UNUSED
store_args_and_env (int argc, char *const *argv)
{
/* XXX This is no good solution. We should rather copy the args so