__progname -> getprogname()

Fix fallout from recent use of getprogname(), which deprecates __progname.
This commit is contained in:
Thomas Adam 2016-05-27 20:11:32 +01:00
parent a2e0db67cc
commit c10d83b4df
2 changed files with 4 additions and 3 deletions

View File

@ -84,7 +84,8 @@ BSDgetopt(int nargc, char *const *nargv, const char *ostr)
++BSDoptind;
if (BSDopterr && *ostr != ':')
(void)fprintf(stderr,
"%s: unknown option -- %c\n", __progname, BSDoptopt);
"%s: unknown option -- %c\n", getprogname(),
BSDoptopt);
return (BADCH);
}
if (*++oli != ':') { /* don't need argument */
@ -102,7 +103,7 @@ BSDgetopt(int nargc, char *const *nargv, const char *ostr)
if (BSDopterr)
(void)fprintf(stderr,
"%s: option requires an argument -- %c\n",
__progname, BSDoptopt);
getprogname(), BSDoptopt);
return (BADCH);
}
else /* white space */

2
tmux.c
View File

@ -225,7 +225,7 @@ main(int argc, char **argv)
flags |= CLIENT_CONTROL;
break;
case 'V':
printf("%s %s\n", __progname, VERSION);
printf("%s %s\n", getprogname(), VERSION);
exit(0);
case 'f':
set_cfg_file(optarg);