diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-01-28 11:28:30 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-01-28 11:28:30 +0000 |
commit | 685eb381dec7fc741a15ce11a84d8c96ed66ce42 (patch) | |
tree | a68927ec66c1a76d1aea9bef257d51b4a4869d31 | |
parent | ee3d3db364b6c2469c1acaa88bb64341090d3af1 (diff) | |
download | rtmux-685eb381dec7fc741a15ce11a84d8c96ed66ce42.tar.gz rtmux-685eb381dec7fc741a15ce11a84d8c96ed66ce42.tar.bz2 rtmux-685eb381dec7fc741a15ce11a84d8c96ed66ce42.zip |
Fix for version changes.
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | input.c | 1 | ||||
-rw-r--r-- | tmux.c | 13 |
3 files changed, 5 insertions, 14 deletions
diff --git a/Makefile.am b/Makefile.am index 6902477e..082a467c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,8 +11,9 @@ EXTRA_DIST = \ dist_EXTRA_tmux_SOURCES = compat/*.[ch] # Preprocessor flags. -AM_CPPFLAGS += @XOPEN_DEFINES@ -AM_CPPFLAGS += -DTMUX_CONF="\"$(sysconfdir)/tmux.conf:~/.tmux.conf:~/.config/tmux/tmux.conf\"" +AM_CPPFLAGS += @XOPEN_DEFINES@ \ + -DTMUX_VERSION="\"@VERSION@\"" \ + -DTMUX_CONF="\"$(sysconfdir)/tmux.conf:~/.tmux.conf:~/.config/tmux/tmux.conf\"" # Additional object files. LDADD = $(LIBOBJS) @@ -20,6 +20,7 @@ #include <netinet/in.h> +#include <ctype.h> #include <resolv.h> #include <stdlib.h> #include <string.h> @@ -213,15 +213,7 @@ find_home(void) const char * getversion(void) { - static char *version; - struct utsname u; - - if (version == NULL) { - if (uname(&u) < 0) - fatalx("uname failed"); - xasprintf(&version, "openbsd-%s", u.release); - } - return version; + return TMUX_VERSION; } int @@ -264,9 +256,6 @@ main(int argc, char **argv) else flags |= CLIENT_CONTROL; break; - case 'V': - printf("%s %s\n", getprogname(), VERSION); - exit(0); case 'f': set_cfg_file(optarg); break; |