bin: do not redefine argp_bug_address

This prevented static compilation on MinGW.

* bin/common_setup.cc: Here.
This commit is contained in:
Alexandre Duret-Lutz 2017-11-28 11:23:42 +01:00
parent b23f1d5054
commit 1242ba045e

View file

@ -28,8 +28,6 @@
#include <sys/wait.h> #include <sys/wait.h>
#include <spot/misc/tmpfile.hh> #include <spot/misc/tmpfile.hh>
const char* argp_program_bug_address = "<" PACKAGE_BUGREPORT ">";
static void static void
display_version(FILE *stream, struct argp_state*) display_version(FILE *stream, struct argp_state*)
{ {
@ -90,9 +88,12 @@ static void bad_alloc_handler()
void void
setup(char** argv) setup(char** argv)
{ {
argp_program_bug_address = "<" PACKAGE_BUGREPORT ">";
// Simplify the program name, because argp() uses it to report // Simplify the program name, because argp() uses it to report
// errors and display help text. // errors and display help text.
set_program_name(argv[0]); set_program_name(argv[0]);
argv[0] = const_cast<char*>(program_name); argv[0] = const_cast<char*>(program_name);
argp_program_version_hook = display_version; argp_program_version_hook = display_version;