fish: Update from 2.3.1 to 2.4.0
This commit is contained in:
parent
63be22f613
commit
2e54e151d4
@ -1,26 +0,0 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://fishshell.com/
|
||||
TERMUX_PKG_DESCRIPTION="Shell geared towards interactive use"
|
||||
TERMUX_PKG_VERSION=2.4.0
|
||||
TERMUX_PKG_SRCURL=https://github.com/fish-shell/fish-shell/releases/download/$TERMUX_PKG_VERSION/fish-${TERMUX_PKG_VERSION}.tar.gz
|
||||
# fish calls 'tput' from ncurses-utils, at least when cancelling (Ctrl+C) a command line.
|
||||
# man is needed since fish calls apropos during command completion.
|
||||
TERMUX_PKG_DEPENDS="ncurses, libandroid-support, ncurses-utils, man"
|
||||
TERMUX_PKG_BUILD_IN_SRC=yes
|
||||
TERMUX_PKG_FOLDERNAME=fish-$TERMUX_PKG_VERSION
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_file__proc_self_stat=yes"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
CXXFLAGS+=" $CPPFLAGS"
|
||||
|
||||
# The column(1) utility is used by oh-my-fish, so we bundle column.c from bsdmainutils with it:
|
||||
$CC $CFLAGS $LDFLAGS -DLINE_MAX=_POSIX2_LINE_MAX $TERMUX_PKG_BUILDER_DIR/column.c -o $TERMUX_PREFIX/bin/column
|
||||
}
|
||||
|
||||
termux_step_post_make_install () {
|
||||
cat >> $TERMUX_PREFIX/etc/fish/config.fish <<HERE
|
||||
|
||||
function __fish_command_not_found_handler --on-event fish_command_not_found
|
||||
$TERMUX_PREFIX/libexec/termux/command-not-found \$argv[1]
|
||||
end
|
||||
HERE
|
||||
}
|
@ -1,338 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1989, 1993, 1994
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static const char copyright[] =
|
||||
"@(#) Copyright (c) 1989, 1993, 1994\n\
|
||||
The Regents of the University of California. All rights reserved.\n";
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)column.c 8.4 (Berkeley) 5/4/95";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <limits.h>
|
||||
#include <locale.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <wchar.h>
|
||||
#include <wctype.h>
|
||||
|
||||
#define TAB 8
|
||||
|
||||
void c_columnate(void);
|
||||
void input(FILE *);
|
||||
void maketbl(void);
|
||||
void print(void);
|
||||
void r_columnate(void);
|
||||
void usage(void);
|
||||
int width(const wchar_t *);
|
||||
|
||||
int termwidth = 80; /* default terminal width */
|
||||
|
||||
int entries; /* number of records */
|
||||
int eval; /* exit value */
|
||||
int maxlength; /* longest record */
|
||||
wchar_t **list; /* array of pointers to records */
|
||||
const wchar_t *separator = L"\t "; /* field separator for table option */
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
struct winsize win;
|
||||
FILE *fp;
|
||||
int ch, tflag, xflag;
|
||||
char *p;
|
||||
const char *src;
|
||||
wchar_t *newsep;
|
||||
size_t seplen;
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
|
||||
if (ioctl(1, TIOCGWINSZ, &win) == -1 || !win.ws_col) {
|
||||
if ((p = getenv("COLUMNS")))
|
||||
termwidth = atoi(p);
|
||||
} else
|
||||
termwidth = win.ws_col;
|
||||
|
||||
tflag = xflag = 0;
|
||||
while ((ch = getopt(argc, argv, "c:s:tx")) != -1)
|
||||
switch(ch) {
|
||||
case 'c':
|
||||
termwidth = atoi(optarg);
|
||||
break;
|
||||
case 's':
|
||||
src = optarg;
|
||||
seplen = mbsrtowcs(NULL, &src, 0, NULL);
|
||||
if (seplen == (size_t)-1)
|
||||
err(1, "bad separator");
|
||||
newsep = malloc((seplen + 1) * sizeof(wchar_t));
|
||||
if (newsep == NULL)
|
||||
err(1, NULL);
|
||||
mbsrtowcs(newsep, &src, seplen + 1, NULL);
|
||||
separator = newsep;
|
||||
break;
|
||||
case 't':
|
||||
tflag = 1;
|
||||
break;
|
||||
case 'x':
|
||||
xflag = 1;
|
||||
break;
|
||||
case '?':
|
||||
default:
|
||||
usage();
|
||||
}
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
if (!*argv)
|
||||
input(stdin);
|
||||
else for (; *argv; ++argv)
|
||||
if ((fp = fopen(*argv, "r"))) {
|
||||
input(fp);
|
||||
(void)fclose(fp);
|
||||
} else {
|
||||
warn("%s", *argv);
|
||||
eval = 1;
|
||||
}
|
||||
|
||||
if (!entries)
|
||||
exit(eval);
|
||||
|
||||
maxlength = roundup(maxlength + 1, TAB);
|
||||
if (tflag)
|
||||
maketbl();
|
||||
else if (maxlength >= termwidth)
|
||||
print();
|
||||
else if (xflag)
|
||||
c_columnate();
|
||||
else
|
||||
r_columnate();
|
||||
exit(eval);
|
||||
}
|
||||
|
||||
void
|
||||
c_columnate(void)
|
||||
{
|
||||
int chcnt, col, cnt, endcol, numcols;
|
||||
wchar_t **lp;
|
||||
|
||||
numcols = termwidth / maxlength;
|
||||
endcol = maxlength;
|
||||
for (chcnt = col = 0, lp = list;; ++lp) {
|
||||
wprintf(L"%ls", *lp);
|
||||
chcnt += width(*lp);
|
||||
if (!--entries)
|
||||
break;
|
||||
if (++col == numcols) {
|
||||
chcnt = col = 0;
|
||||
endcol = maxlength;
|
||||
putwchar('\n');
|
||||
} else {
|
||||
while ((cnt = roundup(chcnt + 1, TAB)) <= endcol) {
|
||||
(void)putwchar('\t');
|
||||
chcnt = cnt;
|
||||
}
|
||||
endcol += maxlength;
|
||||
}
|
||||
}
|
||||
if (chcnt)
|
||||
putwchar('\n');
|
||||
}
|
||||
|
||||
void
|
||||
r_columnate(void)
|
||||
{
|
||||
int base, chcnt, cnt, col, endcol, numcols, numrows, row;
|
||||
|
||||
numcols = termwidth / maxlength;
|
||||
numrows = entries / numcols;
|
||||
if (entries % numcols)
|
||||
++numrows;
|
||||
|
||||
for (row = 0; row < numrows; ++row) {
|
||||
endcol = maxlength;
|
||||
for (base = row, chcnt = col = 0; col < numcols; ++col) {
|
||||
wprintf(L"%ls", list[base]);
|
||||
chcnt += width(list[base]);
|
||||
if ((base += numrows) >= entries)
|
||||
break;
|
||||
while ((cnt = roundup(chcnt + 1, TAB)) <= endcol) {
|
||||
(void)putwchar('\t');
|
||||
chcnt = cnt;
|
||||
}
|
||||
endcol += maxlength;
|
||||
}
|
||||
putwchar('\n');
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
print(void)
|
||||
{
|
||||
int cnt;
|
||||
wchar_t **lp;
|
||||
|
||||
for (cnt = entries, lp = list; cnt--; ++lp)
|
||||
(void)wprintf(L"%ls\n", *lp);
|
||||
}
|
||||
|
||||
typedef struct _tbl {
|
||||
wchar_t **list;
|
||||
int cols, *len;
|
||||
} TBL;
|
||||
#define DEFCOLS 25
|
||||
|
||||
void
|
||||
maketbl(void)
|
||||
{
|
||||
TBL *t;
|
||||
int coloff, cnt;
|
||||
wchar_t *p, **lp;
|
||||
int *lens, maxcols;
|
||||
TBL *tbl;
|
||||
wchar_t **cols;
|
||||
wchar_t *last;
|
||||
|
||||
if ((t = tbl = calloc(entries, sizeof(TBL))) == NULL)
|
||||
err(1, (char *)NULL);
|
||||
if ((cols = calloc((maxcols = DEFCOLS), sizeof(*cols))) == NULL)
|
||||
err(1, (char *)NULL);
|
||||
if ((lens = calloc(maxcols, sizeof(int))) == NULL)
|
||||
err(1, (char *)NULL);
|
||||
for (cnt = 0, lp = list; cnt < entries; ++cnt, ++lp, ++t) {
|
||||
for (coloff = 0, p = *lp;
|
||||
(cols[coloff] = wcstok(p, separator, &last));
|
||||
p = NULL)
|
||||
if (++coloff == maxcols) {
|
||||
if (!(cols = realloc(cols, ((u_int)maxcols +
|
||||
DEFCOLS) * sizeof(char *))) ||
|
||||
!(lens = realloc(lens,
|
||||
((u_int)maxcols + DEFCOLS) * sizeof(int))))
|
||||
err(1, NULL);
|
||||
memset((char *)lens + maxcols * sizeof(int),
|
||||
0, DEFCOLS * sizeof(int));
|
||||
maxcols += DEFCOLS;
|
||||
}
|
||||
if ((t->list = calloc(coloff, sizeof(*t->list))) == NULL)
|
||||
err(1, (char *)NULL);
|
||||
if ((t->len = calloc(coloff, sizeof(int))) == NULL)
|
||||
err(1, (char *)NULL);
|
||||
for (t->cols = coloff; --coloff >= 0;) {
|
||||
t->list[coloff] = cols[coloff];
|
||||
t->len[coloff] = width(cols[coloff]);
|
||||
if (t->len[coloff] > lens[coloff])
|
||||
lens[coloff] = t->len[coloff];
|
||||
}
|
||||
}
|
||||
for (cnt = 0, t = tbl; cnt < entries; ++cnt, ++t) {
|
||||
for (coloff = 0; coloff < t->cols - 1; ++coloff)
|
||||
(void)wprintf(L"%ls%*ls", t->list[coloff],
|
||||
lens[coloff] - t->len[coloff] + 2, L" ");
|
||||
(void)wprintf(L"%ls\n", t->list[coloff]);
|
||||
}
|
||||
}
|
||||
|
||||
#define DEFNUM 1000
|
||||
#define MAXLINELEN (LINE_MAX + 1)
|
||||
|
||||
void
|
||||
input(FILE *fp)
|
||||
{
|
||||
static int maxentry;
|
||||
int len;
|
||||
wchar_t *p, buf[MAXLINELEN];
|
||||
|
||||
if (!list)
|
||||
if ((list = calloc((maxentry = DEFNUM), sizeof(*list))) ==
|
||||
NULL)
|
||||
err(1, (char *)NULL);
|
||||
while (fgetws(buf, MAXLINELEN, fp)) {
|
||||
for (p = buf; *p && iswspace(*p); ++p);
|
||||
if (!*p)
|
||||
continue;
|
||||
if (!(p = wcschr(p, L'\n'))) {
|
||||
warnx("line too long");
|
||||
eval = 1;
|
||||
continue;
|
||||
}
|
||||
*p = L'\0';
|
||||
len = width(buf);
|
||||
if (maxlength < len)
|
||||
maxlength = len;
|
||||
if (entries == maxentry) {
|
||||
maxentry += DEFNUM;
|
||||
if (!(list = realloc(list,
|
||||
(u_int)maxentry * sizeof(*list))))
|
||||
err(1, NULL);
|
||||
}
|
||||
list[entries] = malloc((wcslen(buf) + 1) * sizeof(wchar_t));
|
||||
if (list[entries] == NULL)
|
||||
err(1, NULL);
|
||||
wcscpy(list[entries], buf);
|
||||
entries++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Like wcswidth(), but ignores non-printing characters. */
|
||||
int
|
||||
width(const wchar_t *wcs)
|
||||
{
|
||||
int w, cw;
|
||||
|
||||
for (w = 0; *wcs != L'\0'; wcs++)
|
||||
if ((cw = wcwidth(*wcs)) > 0)
|
||||
w += cw;
|
||||
return (w);
|
||||
}
|
||||
|
||||
void
|
||||
usage(void)
|
||||
{
|
||||
|
||||
(void)fprintf(stderr,
|
||||
"usage: column [-tx] [-c columns] [-s sep] [file ...]\n");
|
||||
exit(1);
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
diff -u -r ../fish-2.4b1/share/functions/__fish_print_help.fish ./share/functions/__fish_print_help.fish
|
||||
--- ../fish-2.4b1/share/functions/__fish_print_help.fish 2016-10-18 10:17:06.000000000 -0400
|
||||
+++ ./share/functions/__fish_print_help.fish 2016-10-19 17:37:08.948931562 -0400
|
||||
@@ -40,7 +40,7 @@
|
||||
set rLL -rLL=$cols[1]n
|
||||
end
|
||||
if test -e "$__fish_datadir/man/man1/$item.1"
|
||||
- set help (nroff -man -c -t $rLL "$__fish_datadir/man/man1/$item.1" ^/dev/null)
|
||||
+ set help (mandoc "$__fish_datadir/man/man1/$item.1" ^/dev/null)
|
||||
else if test -e "$__fish_datadir/man/man1/$item.1.gz"
|
||||
set help (gunzip -c "$__fish_datadir/man/man1/$item.1.gz" ^/dev/null | nroff -man -c -t $rLL ^/dev/null)
|
||||
end
|
||||
@@ -98,6 +98,6 @@
|
||||
# skip it
|
||||
end
|
||||
end
|
||||
- end | ul # post-process with `ul`, to interpret the old-style grotty escapes
|
||||
+ end # post-process with `ul`, to interpret the old-style grotty escapes
|
||||
echo # print a trailing blank line
|
||||
end
|
@ -1,50 +0,0 @@
|
||||
diff -u -r ../fish-2.4b1/src/env_universal_common.cpp ./src/env_universal_common.cpp
|
||||
--- ../fish-2.4b1/src/env_universal_common.cpp 2016-10-18 10:17:06.000000000 -0400
|
||||
+++ ./src/env_universal_common.cpp 2016-10-19 17:42:06.900520935 -0400
|
||||
@@ -137,7 +137,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,
|
||||
@@ -987,6 +987,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).
|
||||
@@ -1127,6 +1128,7 @@
|
||||
return usec_per_sec / 3; // 3 times a second
|
||||
}
|
||||
};
|
||||
+#endif
|
||||
|
||||
/// A notifyd-based notifier. Very straightforward.
|
||||
class universal_notifier_notifyd_t : public universal_notifier_t {
|
||||
@@ -1410,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;
|
||||
@@ -1463,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();
|
||||
}
|
@ -1,13 +1,13 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://fishshell.com/
|
||||
TERMUX_PKG_DESCRIPTION="Shell geared towards interactive use"
|
||||
TERMUX_PKG_VERSION=2.3.1
|
||||
TERMUX_PKG_BUILD_REVISION=2
|
||||
TERMUX_PKG_VERSION=2.4.0
|
||||
TERMUX_PKG_SRCURL=https://github.com/fish-shell/fish-shell/releases/download/$TERMUX_PKG_VERSION/fish-${TERMUX_PKG_VERSION}.tar.gz
|
||||
# fish calls 'tput' from ncurses-utils, at least when cancelling (Ctrl+C) a command line.
|
||||
# man is needed since fish calls apropos during command completion.
|
||||
TERMUX_PKG_DEPENDS="ncurses, libandroid-support, ncurses-utils, man"
|
||||
TERMUX_PKG_BUILD_IN_SRC=yes
|
||||
TERMUX_PKG_FOLDERNAME=fish-$TERMUX_PKG_VERSION
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_file__proc_self_stat=yes"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
CXXFLAGS+=" $CPPFLAGS"
|
||||
|
@ -1,21 +0,0 @@
|
||||
diff -u -r ../fish-2.1.1/complete.cpp ./src/complete.cpp
|
||||
--- ../fish-2.1.1/complete.cpp 2014-09-24 05:51:07.000000000 -0400
|
||||
+++ ./src/complete.cpp 2015-02-05 17:43:46.010415990 -0500
|
||||
@@ -1731,6 +1731,9 @@
|
||||
*/
|
||||
bool completer_t::try_complete_user(const wcstring &str)
|
||||
{
|
||||
+#ifdef __ANDROID__
|
||||
+ return 0;
|
||||
+# else
|
||||
const wchar_t *cmd = str.c_str();
|
||||
const wchar_t *first_char=cmd;
|
||||
int res=0;
|
||||
@@ -1788,6 +1791,7 @@
|
||||
}
|
||||
|
||||
return res;
|
||||
+#endif
|
||||
}
|
||||
|
||||
void complete(const wcstring &cmd, std::vector<completion_t> &comps, completion_request_flags_t flags, wcstring_list_t *commands_to_load)
|
@ -1,63 +0,0 @@
|
||||
diff -u -r ../fish-2.2.0/configure.ac ./configure.ac
|
||||
--- ../fish-2.2.0/configure.ac 2015-07-03 15:46:59.000000000 -0400
|
||||
+++ ./configure.ac 2015-07-16 08:54:32.825023137 -0400
|
||||
@@ -249,6 +249,7 @@
|
||||
)
|
||||
],
|
||||
[glibc=yes],
|
||||
+ [glibc=no],
|
||||
[glibc=no]
|
||||
)
|
||||
|
||||
@@ -319,14 +320,6 @@
|
||||
|
||||
|
||||
#
|
||||
-# See if Linux procfs is present. This is used to get extra
|
||||
-# information about running processes.
|
||||
-#
|
||||
-
|
||||
-AC_CHECK_FILES([/proc/self/stat])
|
||||
-
|
||||
-
|
||||
-#
|
||||
# This is ued to tell the wgetopt library to translate strings. This
|
||||
# way wgetopt can be dropped into any project without requiring i18n.
|
||||
#
|
||||
@@ -350,8 +343,6 @@
|
||||
|
||||
# Check for os dependant libraries for all binaries.
|
||||
AC_SEARCH_LIBS( connect, socket, , [AC_MSG_ERROR([Cannot find the socket library, needed to build this package.] )] )
|
||||
-AC_SEARCH_LIBS( nanosleep, rt, , [AC_MSG_ERROR([Cannot find the rt library, needed to build this package.] )] )
|
||||
-AC_SEARCH_LIBS( shm_open, rt, , [AC_MSG_ERROR([Cannot find the rt library, needed to build this package.] )] )
|
||||
AC_SEARCH_LIBS( pthread_create, pthread, , [AC_MSG_ERROR([Cannot find the pthread library, needed to build this package.] )] )
|
||||
AC_SEARCH_LIBS( setupterm, [ncurses tinfo curses], , [AC_MSG_ERROR([Could not find a curses implementation, needed to build fish. If this is Linux, try running 'sudo apt-get install libncurses5-dev' or 'sudo yum install ncurses-devel'])] )
|
||||
AC_SEARCH_LIBS( [nan], [m], [AC_DEFINE( [HAVE_NAN], [1], [Define to 1 if you have the nan function])] )
|
||||
@@ -503,6 +494,7 @@
|
||||
#
|
||||
# Detect nanoseconds fields in struct stat
|
||||
#
|
||||
+AC_CHECK_MEMBERS([struct stat.st_ctime_nsec])
|
||||
AC_CHECK_MEMBERS([struct stat.st_mtimespec.tv_nsec])
|
||||
AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec])
|
||||
|
||||
@@ -559,7 +551,8 @@
|
||||
)
|
||||
],
|
||||
[have_realpath_null=yes],
|
||||
- [have_realpath_null=no]
|
||||
+ [have_realpath_null=no],
|
||||
+ [have_realpath_null=yes]
|
||||
)
|
||||
|
||||
if test "$have_realpath_null" = yes; then
|
||||
@@ -636,6 +629,9 @@
|
||||
[
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([HAVE_BROKEN_FWPRINTF], [1], [Define to 1 one if the implemented fwprintf is broken])
|
||||
+ ],
|
||||
+ [
|
||||
+ AC_MSG_RESULT(no)
|
||||
]
|
||||
)
|
||||
|
@ -1,16 +1,16 @@
|
||||
diff -u -r ../fish-2.2.0/share/functions/__fish_print_help.fish ./share/functions/__fish_print_help.fish
|
||||
--- ../fish-2.2.0/share/functions/__fish_print_help.fish 2015-07-03 15:46:59.000000000 -0400
|
||||
+++ ./share/functions/__fish_print_help.fish 2015-07-16 17:50:19.876454497 -0400
|
||||
@@ -39,7 +39,7 @@
|
||||
set cols (expr $cols - 4) # leave a bit of space on the right
|
||||
diff -u -r ../fish-2.4b1/share/functions/__fish_print_help.fish ./share/functions/__fish_print_help.fish
|
||||
--- ../fish-2.4b1/share/functions/__fish_print_help.fish 2016-10-18 10:17:06.000000000 -0400
|
||||
+++ ./share/functions/__fish_print_help.fish 2016-10-19 17:37:08.948931562 -0400
|
||||
@@ -40,7 +40,7 @@
|
||||
set rLL -rLL=$cols[1]n
|
||||
end
|
||||
if test -e "$__fish_datadir/man/man1/$item.1"
|
||||
- set help (nroff -man -c -t $rLL "$__fish_datadir/man/man1/$item.1" ^/dev/null)
|
||||
+ set help (mandoc "$__fish_datadir/man/man1/$item.1" ^/dev/null)
|
||||
|
||||
# The original implementation trimmed off the top 5 lines and bottom 3 lines
|
||||
# from the nroff output. Perhaps that's reliable, but the magic numbers make
|
||||
@@ -94,6 +94,6 @@
|
||||
else if test -e "$__fish_datadir/man/man1/$item.1.gz"
|
||||
set help (gunzip -c "$__fish_datadir/man/man1/$item.1.gz" ^/dev/null | nroff -man -c -t $rLL ^/dev/null)
|
||||
end
|
||||
@@ -98,6 +98,6 @@
|
||||
# skip it
|
||||
end
|
||||
end
|
||||
|
@ -1,49 +1,50 @@
|
||||
diff -u -r ../fish-2.3.1/src/env_universal_common.cpp ./src/env_universal_common.cpp
|
||||
--- ../fish-2.3.1/src/env_universal_common.cpp 2016-07-03 08:15:45.000000000 -0400
|
||||
+++ ./src/env_universal_common.cpp 2016-08-05 09:18:38.753535780 -0400
|
||||
@@ -166,7 +166,7 @@
|
||||
diff -u -r ../fish-2.4b1/src/env_universal_common.cpp ./src/env_universal_common.cpp
|
||||
--- ../fish-2.4b1/src/env_universal_common.cpp 2016-10-18 10:17:06.000000000 -0400
|
||||
+++ ./src/env_universal_common.cpp 2016-10-19 17:42:06.900520935 -0400
|
||||
@@ -137,7 +137,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)
|
||||
{
|
||||
@@ -1141,6 +1141,7 @@
|
||||
if (check_runtime_path(tmpdir.c_str()) != 0) {
|
||||
debug(0,
|
||||
@@ -987,6 +987,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 @@
|
||||
}
|
||||
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).
|
||||
@@ -1127,6 +1128,7 @@
|
||||
return usec_per_sec / 3; // 3 times a second
|
||||
}
|
||||
};
|
||||
+#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},
|
||||
/// A notifyd-based notifier. Very straightforward.
|
||||
class universal_notifier_notifyd_t : public universal_notifier_t {
|
||||
@@ -1410,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}
|
||||
};
|
||||
@@ -1687,8 +1691,10 @@
|
||||
{"notifyd", universal_notifier_t::strategy_notifyd}};
|
||||
const size_t opt_count = sizeof options / sizeof *options;
|
||||
@@ -1463,9 +1467,11 @@
|
||||
strat = resolve_default_strategy();
|
||||
}
|
||||
switch (strat)
|
||||
{
|
||||
switch (strat) {
|
||||
+#ifndef __ANDROID__
|
||||
case strategy_shmem_polling:
|
||||
case strategy_shmem_polling: {
|
||||
return new universal_notifier_shmem_poller_t();
|
||||
}
|
||||
+#endif
|
||||
|
||||
case strategy_notifyd:
|
||||
case strategy_notifyd: {
|
||||
return new universal_notifier_notifyd_t();
|
||||
}
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -u -r ../fish-2.2.0/wutil.cpp ./wutil.cpp
|
||||
--- ../fish-2.2.0/wutil.cpp 2015-07-03 15:46:59.000000000 -0400
|
||||
+++ ./src/wutil.cpp 2015-07-16 08:55:37.131915467 -0400
|
||||
@@ -531,7 +531,7 @@
|
||||
result.size = buf->st_size;
|
||||
result.change_seconds = buf->st_ctime;
|
||||
|
||||
-#if STAT_HAVE_NSEC
|
||||
+#ifdef HAVE_STRUCT_STAT_ST_CTIME_NSEC
|
||||
result.change_nanoseconds = buf->st_ctime_nsec;
|
||||
#elif defined(__APPLE__)
|
||||
result.change_nanoseconds = buf->st_ctimespec.tv_nsec;
|
Loading…
Reference in New Issue
Block a user