summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2016-05-27 17:05:42 +0000
committernicm <nicm>2016-05-27 17:05:42 +0000
commitfcb00a4161f5634189322f42a5769ca83d4be8c8 (patch)
treefe9e6d16ad9d3386c27a543000e968a5f70eae5f
parentec7f5305b1a6e5548f0769f988e76b01ec293dcc (diff)
Use getprogname() instead of __progname to make portability easier.
-rw-r--r--tmux.c4
-rw-r--r--tmux.h1
2 files changed, 2 insertions, 3 deletions
diff --git a/tmux.c b/tmux.c
index 08b26326..abe2c672 100644
--- a/tmux.c
+++ b/tmux.c
@@ -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)
diff --git a/tmux.h b/tmux.h
index 2699626d..d61a459c 100644
--- a/tmux.h
+++ b/tmux.h
@@ -36,7 +36,6 @@
#include "xmalloc.h"
-extern char *__progname;
extern char **environ;
struct client;