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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user