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 24a98b1736
commit 89e1dbc3c8

View file

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