Fredrik Fornwall
9 years ago
7 changed files with 88 additions and 78 deletions
@ -1,49 +0,0 @@ |
|||
diff -u -r ../fish-shell-master/src/env_universal_common.cpp ./src/env_universal_common.cpp
|
|||
--- ../fish-shell-master/src/env_universal_common.cpp 2016-03-09 07:07:04.000000000 -0500
|
|||
+++ ./src/env_universal_common.cpp 2016-03-12 15:47:14.502255105 -0500
|
|||
@@ -166,7 +166,7 @@
|
|||
} |
|||
|
|||
// /tmp/fish.user |
|||
- std::string tmpdir = "/tmp/fish.";
|
|||
+ std::string tmpdir = "@TERMUX_PREFIX@/tmp/fish.";
|
|||
tmpdir.append(uname); |
|||
if (check_runtime_path(tmpdir.c_str()) != 0) |
|||
{ |
|||
@@ -1142,6 +1142,7 @@
|
|||
return result; |
|||
} |
|||
|
|||
+#ifndef __ANDROID__
|
|||
class universal_notifier_shmem_poller_t : public universal_notifier_t |
|||
{ |
|||
/* This is what our shared memory looks like. Everything here is stored in network byte order (big-endian) */ |
|||
@@ -1304,6 +1305,7 @@
|
|||
} |
|||
} |
|||
}; |
|||
+#endif
|
|||
|
|||
/* A notifyd-based notifier. Very straightforward. */ |
|||
class universal_notifier_notifyd_t : public universal_notifier_t |
|||
@@ -1625,7 +1627,9 @@
|
|||
} options[] = |
|||
{ |
|||
{"default", universal_notifier_t::strategy_default}, |
|||
+#ifndef __ANDROID__
|
|||
{"shmem", universal_notifier_t::strategy_shmem_polling}, |
|||
+#endif
|
|||
{"pipe", universal_notifier_t::strategy_named_pipe}, |
|||
{"notifyd", universal_notifier_t::strategy_notifyd} |
|||
}; |
|||
@@ -1687,8 +1691,10 @@
|
|||
} |
|||
switch (strat) |
|||
{ |
|||
+#ifndef __ANDROID__
|
|||
case strategy_shmem_polling: |
|||
return new universal_notifier_shmem_poller_t(); |
|||
+#endif
|
|||
|
|||
case strategy_notifyd: |
|||
return new universal_notifier_notifyd_t(); |
@ -1,14 +0,0 @@ |
|||
diff -u -r ../fish-2.2.0/env_universal_common.h ./env_universal_common.h
|
|||
--- ../fish-2.2.0/env_universal_common.h 2015-07-03 15:46:59.000000000 -0400
|
|||
+++ ./src/env_universal_common.h 2015-07-25 17:52:47.555388223 -0400
|
|||
@@ -123,8 +123,10 @@
|
|||
// Default meta-strategy to use the 'best' notifier for the system |
|||
strategy_default, |
|||
|
|||
+#ifndef __ANDROID__
|
|||
// Use a value in shared memory. Simple, but requires polling and therefore semi-frequent wakeups. |
|||
strategy_shmem_polling, |
|||
+#endif
|
|||
|
|||
// Strategy that uses a named pipe. Somewhat complex, but portable and doesn't require polling most of the time. |
|||
strategy_named_pipe, |
@ -0,0 +1,19 @@ |
|||
diff -u -r ../fish-shell-c76d86631717929b3a2f259615e8603e69e13256/src/common.cpp ./src/common.cpp
|
|||
--- ../fish-shell-c76d86631717929b3a2f259615e8603e69e13256/src/common.cpp 2016-05-03 01:20:53.000000000 -0400
|
|||
+++ ./src/common.cpp 2016-05-03 07:16:32.052328928 -0400
|
|||
@@ -68,6 +68,7 @@
|
|||
void show_stackframe() { |
|||
ASSERT_IS_NOT_FORKED_CHILD(); |
|||
|
|||
+#ifndef __ANDROID__
|
|||
// Hack to avoid showing backtraces in the tester. |
|||
if (program_name && !wcscmp(program_name, L"(ignore)")) return; |
|||
|
|||
@@ -77,6 +78,7 @@
|
|||
trace_size = backtrace(trace, 32); |
|||
debug(0, L"Backtrace:"); |
|||
backtrace_symbols_fd(trace, trace_size, STDERR_FILENO); |
|||
+#endif
|
|||
} |
|||
|
|||
int fgetws2(wcstring *s, FILE *f) { |
@ -0,0 +1,50 @@ |
|||
diff -u -r ../fish-shell-c76d86631717929b3a2f259615e8603e69e13256/src/env_universal_common.cpp ./src/env_universal_common.cpp
|
|||
--- ../fish-shell-c76d86631717929b3a2f259615e8603e69e13256/src/env_universal_common.cpp 2016-05-03 01:20:53.000000000 -0400
|
|||
+++ ./src/env_universal_common.cpp 2016-05-03 06:59:06.896497467 -0400
|
|||
@@ -134,7 +134,7 @@
|
|||
} |
|||
|
|||
// /tmp/fish.user |
|||
- std::string tmpdir = "/tmp/fish.";
|
|||
+ std::string tmpdir = "@TERMUX_PREFIX@/tmp/fish.";
|
|||
tmpdir.append(uname); |
|||
if (check_runtime_path(tmpdir.c_str()) != 0) { |
|||
debug(0, |
|||
@@ -985,6 +985,7 @@
|
|||
return result; |
|||
} |
|||
|
|||
+#ifndef __ANDROID__
|
|||
class universal_notifier_shmem_poller_t : public universal_notifier_t { |
|||
// This is what our shared memory looks like. Everything here is stored in network byte order |
|||
// (big-endian). |
|||
@@ -1126,6 +1127,7 @@
|
|||
} |
|||
} |
|||
}; |
|||
+#endif
|
|||
|
|||
/// A notifyd-based notifier. Very straightforward. |
|||
class universal_notifier_notifyd_t : public universal_notifier_t { |
|||
@@ -1409,7 +1412,9 @@
|
|||
const char *name; |
|||
universal_notifier_t::notifier_strategy_t strat; |
|||
} options[] = {{"default", universal_notifier_t::strategy_default}, |
|||
+#ifndef __ANDROID__
|
|||
{"shmem", universal_notifier_t::strategy_shmem_polling}, |
|||
+#endif
|
|||
{"pipe", universal_notifier_t::strategy_named_pipe}, |
|||
{"notifyd", universal_notifier_t::strategy_notifyd}}; |
|||
const size_t opt_count = sizeof options / sizeof *options; |
|||
@@ -1462,9 +1467,11 @@
|
|||
strat = resolve_default_strategy(); |
|||
} |
|||
switch (strat) { |
|||
+#ifndef __ANDROID__
|
|||
case strategy_shmem_polling: { |
|||
return new universal_notifier_shmem_poller_t(); |
|||
} |
|||
+#endif
|
|||
case strategy_notifyd: { |
|||
return new universal_notifier_notifyd_t(); |
|||
} |
@ -0,0 +1,15 @@ |
|||
diff -u -r ../fish-shell-c76d86631717929b3a2f259615e8603e69e13256/src/env_universal_common.h ./src/env_universal_common.h
|
|||
--- ../fish-shell-c76d86631717929b3a2f259615e8603e69e13256/src/env_universal_common.h 2016-05-03 01:20:53.000000000 -0400
|
|||
+++ ./src/env_universal_common.h 2016-05-03 07:14:21.002360936 -0400
|
|||
@@ -116,9 +116,11 @@
|
|||
// Default meta-strategy to use the 'best' notifier for the system. |
|||
strategy_default, |
|||
|
|||
+#ifndef __ANDROID__
|
|||
// Use a value in shared memory. Simple, but requires polling and therefore semi-frequent |
|||
// wakeups. |
|||
strategy_shmem_polling, |
|||
+#endif
|
|||
|
|||
// Strategy that uses a named pipe. Somewhat complex, but portable and doesn't require |
|||
// polling most of the time. |
@ -1,12 +0,0 @@ |
|||
diff -u -r ../fish-shell-master/src/fallback.h ./src/fallback.h
|
|||
--- ../fish-shell-master/src/fallback.h 2015-12-16 10:35:17.000000000 -0500
|
|||
+++ ./src/fallback.h 2015-12-17 05:05:46.153316539 -0500
|
|||
@@ -31,7 +31,7 @@
|
|||
#if __STDC_VERSION__ < 199901L |
|||
# if __GNUC__ >= 2 |
|||
# define __func__ __FUNCTION__ |
|||
-# else
|
|||
+# elif !defined(__func__)
|
|||
# define __func__ "<unknown>" |
|||
# endif |
|||
#endif |
Loading…
Reference in new issue