configure: check for program_invocation_name

For portabiliy, check for program_invocation_name during configure and
define HAVE_PROGRAM_INVOCATION_NAME accordingly. Use of this symbol is
now enclosed with the appropriate #ifdef block.

The symbol program_invocation_name is only used for error message
handling using error(), so it's safe to omit this if it is not
available.
This commit is contained in:
Rainer Müller
2013-02-20 18:31:48 +01:00
parent f7a9d5d139
commit 042776e04c
13 changed files with 35 additions and 3 deletions
+3 -1
View File
@@ -629,7 +629,9 @@ static void skillsnice_parse(int argc,
/* main body */
int main(int argc, char ** argv)
{
program_invocation_name = program_invocation_short_name;
#ifdef HAVE_PROGRAM_INVOCATION_NAME
program_invocation_name = program_invocation_short_name;
#endif
struct run_time_conf_t run_time;
memset(&run_time, 0, sizeof(struct run_time_conf_t));
my_pid = getpid();