* src/tar.c (parse_default_options): Use program_name instead of
program_invocation_short_name. On some systems the latter is NULL when
the function is called, which causes coredumps.
(tar_set_quoting_style): Likewise.
* src/names.c: Likewise.
if (wordsplit (str, &ws, WRDSF_DEFFLAGS|WRDSF_DOOFFS))
FATAL_ERROR ((0, 0, _("cannot split string '%s': %s"),
str, wordsplit_strerror (&ws)));
- ws.ws_wordv[0] = program_invocation_short_name;
+ ws.ws_wordv[0] = (char *) program_name;
loc.source = OPTS_FILE;
loc.name = ent->v.file.name;
loc.line = ent->v.file.line;
return;
}
FATAL_ERROR ((0, 0,
- _("Unknown quoting style '%s'. Try '%s --quoting-style=help' to get a list."), arg, program_invocation_short_name));
+ _("Unknown quoting style '%s'. Try '%s --quoting-style=help' to get a list."), arg, program_name));
}
\f
wordsplit_strerror (&ws)));
if (ws.ws_wordc)
{
- ws.ws_wordv[0] = program_invocation_short_name;
+ ws.ws_wordv[0] = (char*) program_name;
more_options (ws.ws_offs + ws.ws_wordc, ws.ws_wordv, &loc);
}