Fredrik Fornwall
9 years ago
9 changed files with 59 additions and 64 deletions
@ -1,24 +0,0 @@ |
|||||
diff -u -r ../tmux-1.8/session.c ./session.c
|
|
||||
--- ../tmux-1.8/session.c 2013-03-26 20:22:31.000000000 +0100
|
|
||||
+++ ./session.c 2014-02-13 18:55:45.000000000 +0100
|
|
||||
@@ -23,6 +23,7 @@
|
|
||||
#include <stdlib.h> |
|
||||
#include <unistd.h> |
|
||||
#include <time.h> |
|
||||
+#include <sys/stat.h>
|
|
||||
|
|
||||
#include "tmux.h" |
|
||||
|
|
||||
@@ -245,8 +246,10 @@
|
|
||||
server_fill_environ(s, &env); |
|
||||
|
|
||||
shell = options_get_string(&s->options, "default-shell"); |
|
||||
- if (*shell == '\0' || areshell(shell))
|
|
||||
- shell = _PATH_BSHELL;
|
|
||||
+ if (*shell == '\0' || areshell(shell)) {
|
|
||||
+ struct stat st;
|
|
||||
+ shell = (stat("@TERMUX_PREFIX@/home/.aterm/shell", &st) == 0) ? "@TERMUX_PREFIX@/home/.aterm/shell" : _PATH_BSHELL;
|
|
||||
+ }
|
|
||||
|
|
||||
hlimit = options_get_number(&s->options, "history-limit"); |
|
||||
w = window_create( |
|
@ -0,0 +1,20 @@ |
|||||
|
diff -u -r ../tmux-2.2/session.c ./session.c
|
||||
|
--- ../tmux-2.2/session.c 2016-01-20 19:00:28.000000000 -0500
|
||||
|
+++ ./session.c 2016-04-11 05:28:53.669311770 -0400
|
||||
|
@@ -22,6 +22,7 @@
|
||||
|
#include <string.h> |
||||
|
#include <stdlib.h> |
||||
|
#include <unistd.h> |
||||
|
+#include <pwd.h>
|
||||
|
#include <time.h> |
||||
|
|
||||
|
#include "tmux.h" |
||||
|
@@ -340,7 +341,7 @@
|
||||
|
|
||||
|
shell = options_get_string(s->options, "default-shell"); |
||||
|
if (*shell == '\0' || areshell(shell)) |
||||
|
- shell = _PATH_BSHELL;
|
||||
|
+ shell = getpwuid(getuid())->pw_shell;
|
||||
|
|
||||
|
hlimit = options_get_number(s->options, "history-limit"); |
||||
|
w = window_create(name, argc, argv, path, shell, cwd, env, s->tio, |
@ -0,0 +1,26 @@ |
|||||
|
diff -u -r ../tmux-2.2/tmux.c ./tmux.c
|
||||
|
--- ../tmux-2.2/tmux.c 2016-03-05 12:55:49.000000000 -0500
|
||||
|
+++ ./tmux.c 2016-04-11 04:36:26.594521819 -0400
|
||||
|
@@ -24,7 +24,9 @@
|
||||
|
#include <event.h> |
||||
|
#include <fcntl.h> |
||||
|
#include <getopt.h> |
||||
|
+#ifndef __ANDROID__
|
||||
|
#include <langinfo.h> |
||||
|
+#endif
|
||||
|
#include <locale.h> |
||||
|
#include <pwd.h> |
||||
|
#include <stdlib.h> |
||||
|
@@ -195,10 +197,12 @@
|
||||
|
if (setlocale(LC_CTYPE, "en_US.UTF-8") == NULL) { |
||||
|
if (setlocale(LC_CTYPE, "") == NULL) |
||||
|
errx(1, "invalid LC_ALL, LC_CTYPE or LANG"); |
||||
|
+#ifndef __ANDROID__
|
||||
|
s = nl_langinfo(CODESET); |
||||
|
if (strcasecmp(s, "UTF-8") != 0 && |
||||
|
strcasecmp(s, "UTF8") != 0) |
||||
|
errx(1, "need UTF-8 locale (LC_CTYPE) but have %s", s); |
||||
|
+#endif
|
||||
|
} |
||||
|
|
||||
|
setlocale(LC_TIME, ""); |
@ -0,0 +1,12 @@ |
|||||
|
diff -u -r ../tmux-2.2/tmux.h ./tmux.h
|
||||
|
--- ../tmux-2.2/tmux.h 2016-04-03 20:16:53.000000000 -0400
|
||||
|
+++ ./tmux.h 2016-04-11 04:38:13.276761966 -0400
|
||||
|
@@ -51,7 +51,7 @@
|
||||
|
struct tmuxproc; |
||||
|
|
||||
|
/* Default global configuration file. */ |
||||
|
-#define TMUX_CONF "/etc/tmux.conf"
|
||||
|
+#define TMUX_CONF "@TERMUX_PREFIX@/etc/tmux.conf"
|
||||
|
|
||||
|
/* |
||||
|
* Minimum layout cell size, NOT including separator line. The scroll region |
@ -1,12 +0,0 @@ |
|||||
diff -u -r ../tmux-1.9a/tmux.c ./tmux.c
|
|
||||
--- ../tmux-1.9a/tmux.c 2014-02-22 21:48:37.000000000 +0100
|
|
||||
+++ ./tmux.c 2014-02-24 08:56:45.000000000 +0100
|
|
||||
@@ -137,7 +137,7 @@
|
|
||||
else if ((s = getenv("TMPDIR")) != NULL && *s != '\0') |
|
||||
xsnprintf(base, sizeof base, "%s/tmux-%u", s, uid); |
|
||||
else |
|
||||
- xsnprintf(base, sizeof base, "%s/tmux-%u", _PATH_TMP, uid);
|
|
||||
+ xsnprintf(base, sizeof base, "%s/tmux-%u", "@TERMUX_PREFIX@/tmp", uid);
|
|
||||
|
|
||||
if (mkdir(base, S_IRWXU) != 0 && errno != EEXIST) |
|
||||
return (NULL); |
|
@ -1,21 +0,0 @@ |
|||||
diff -u -r ../tmux-2.1/tmux.h ./tmux.h
|
|
||||
--- ../tmux-2.1/tmux.h 2015-09-27 05:51:49.000000000 -0400
|
|
||||
+++ ./tmux.h 2015-10-19 17:33:45.737891900 -0400
|
|
||||
@@ -40,7 +40,7 @@
|
|
||||
extern char **environ; |
|
||||
|
|
||||
/* Default global configuration file. */ |
|
||||
-#define TMUX_CONF "/etc/tmux.conf"
|
|
||||
+#define TMUX_CONF "@TERMUX_PREFIX@/etc/tmux.conf"
|
|
||||
|
|
||||
/* |
|
||||
* Minimum layout cell size, NOT including separator line. The scroll region |
|
||||
@@ -72,7 +72,7 @@
|
|
||||
#define fatalx(msg) log_fatalx("%s: %s", __func__, msg); |
|
||||
|
|
||||
/* Definition to shut gcc up about unused arguments. */ |
|
||||
-#define unused __attribute__ ((unused))
|
|
||||
+#define unused
|
|
||||
|
|
||||
/* Attribute to make gcc check printf-like arguments. */ |
|
||||
#define printflike(a, b) __attribute__ ((format (printf, a, b))) |
|
Loading…
Reference in new issue