+2013-11-10 Mark Wielaard <mjw@redhat.com>
+
+ * stack.c: Use ARGP_PROGRAM_VERSION_HOOK_DEF and
+ ARGP_PROGRAM_BUG_ADDRESS_DEF.
+ (print_version): New function.
+
2013-11-09 Mark Wielaard <mjw@redhat.com>
* arlib.c (arlib_init): Call snprintf before using the result
#include <fcntl.h>
#include ELFUTILS_HEADER(dwfl)
+#include <system.h>
+
+/* Name and version of program. */
+static void print_version (FILE *stream, struct argp_state *state);
+ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
+
+/* Bug report address. */
+ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT;
+
static bool verbose = false;
static int
return DWARF_CB_OK;
}
+static void
+print_version (FILE *stream, struct argp_state *state __attribute__ ((unused)))
+{
+ fprintf (stream, "stack (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION);
+}
+
static error_t
parse_opt (int key, char *arg __attribute__ ((unused)),
struct argp_state *state)