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

2
pmap.c
View File

@ -1013,7 +1013,9 @@ int main(int argc, char **argv)
{NULL, 0, NULL, 0}
};
#ifdef HAVE_PROGRAM_INVOCATION_NAME
program_invocation_name = program_invocation_short_name;
#endif
nls_initialize();
atexit(close_stdout);