Use getprogname() instead of __progname to make portability easier.

This commit is contained in:
nicm 2016-05-27 17:05:42 +00:00
parent ec7f5305b1
commit fcb00a4161
2 changed files with 2 additions and 3 deletions

4
tmux.c
View File

@ -53,7 +53,7 @@ usage(void)
fprintf(stderr,
"usage: %s [-2Cluv] [-c shell-command] [-f file] [-L socket-name]\n"
" [-S socket-path] [command [flags]]\n",
__progname);
getprogname());
exit(1);
}
@ -95,7 +95,7 @@ areshell(const char *shell)
ptr++;
else
ptr = shell;
progname = __progname;
progname = getprogname();
if (*progname == '-')
progname++;
if (strcmp(ptr, progname) == 0)

1
tmux.h
View File

@ -36,7 +36,6 @@
#include "xmalloc.h"
extern char *__progname;
extern char **environ;
struct client;