1 diff -N -u -r ../neovim-master/src/nvim/os/forkpty-android.h ./src/nvim/os/forkpty-android.h
2 --- ../neovim-master/src/nvim/os/forkpty-android.h 1969-12-31 19:00:00.000000000 -0500
3 +++ ./src/nvim/os/forkpty-android.h 2015-03-23 18:59:01.425165645 -0400
6 +#include <sys/ioctl.h>
7 +#include <sys/param.h>
8 +#include <sys/types.h>
13 +int login_tty(int fd)
16 + if (ioctl(fd, TIOCSCTTY, NULL) == -1) return -1;
20 + if (fd > 2) close(fd);
24 +int openpty(int *amaster, int *aslave, char *name, struct termios *termp, struct winsize *winp)
29 + master = open("/dev/ptmx", O_RDWR);
30 + if (master == -1) return -1;
31 + if (grantpt(master) || unlockpt(master) || ptsname_r(master, buf, sizeof buf)) goto fail;
33 + slave = open(buf, O_RDWR | O_NOCTTY);
34 + if (slave == -1) goto fail;
36 + /* XXX Should we ignore errors here? */
37 + if (termp) tcsetattr(slave, TCSAFLUSH, termp);
38 + if (winp) ioctl(slave, TIOCSWINSZ, winp);
42 + if (name != NULL) strcpy(name, buf);
51 +int forkpty(int *amaster, char *name, struct termios *termp, struct winsize *winp)
53 + int master, slave, pid;
54 + if (openpty(&master, &slave, name, termp, winp) == -1) return -1;
55 + switch (pid = fork()) {
60 + if (login_tty (slave)) _exit (1);
68 diff -N -u -r ../neovim-master/src/nvim/os/pty_process.c ./src/nvim/os/pty_process.c
69 --- ../neovim-master/src/nvim/os/pty_process.c 2015-03-21 08:21:51.000000000 -0400
70 +++ ./src/nvim/os/pty_process.c 2015-03-23 18:58:27.561165621 -0400
73 #elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
75 +#elif defined(__ANDROID__)
76 +# include "forkpty-android.h"