diff options
| author | Michael Forney <mforney@mforney.org> | 2020-04-04 20:53:02 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2020-04-04 22:09:03 -0700 |
| commit | 33e9115a2513430addc328937eb9d96d6f71c877 (patch) | |
| tree | ff4a90d9a3cfd6e819f127c88b4f07279b3f7be6 /pkg/oksh | |
| parent | 059130110cd02d2c264eb25544269b4f75aa90d9 (diff) | |
Use oksh instead of loksh
Diffstat (limited to 'pkg/oksh')
| -rw-r--r-- | pkg/oksh/gen.lua | 19 | ||||
| -rw-r--r-- | pkg/oksh/patch/0001-Use-typedef-for-function-pointer.patch | 55 | ||||
| m--------- | pkg/oksh/src | 0 | ||||
| -rw-r--r-- | pkg/oksh/ver | 1 |
4 files changed, 75 insertions, 0 deletions
diff --git a/pkg/oksh/gen.lua b/pkg/oksh/gen.lua new file mode 100644 index 00000000..7d8b6dd2 --- /dev/null +++ b/pkg/oksh/gen.lua @@ -0,0 +1,19 @@ +cflags{ + '-D _GNU_SOURCE', + '-D EMACS', + '-D SMALL', + '-D VI', +} + +exe('ksh', [[ + alloc.c asprintf.c c_ksh.c c_sh.c c_test.c c_ulimit.c edit.c + emacs.c eval.c exec.c expr.c history.c io.c jobs.c lex.c mail.c + main.c misc.c path.c shf.c syn.c table.c trap.c tree.c tty.c var.c + version.c vi.c confstr.c reallocarray.c siglist.c signame.c + strlcat.c strlcpy.c strtonum.c unvis.c vis.c +]]) +file('bin/ksh', '755', '$outdir/ksh') +sym('bin/sh', 'ksh') +man{'ksh.1', 'sh.1'} + +fetch 'git' diff --git a/pkg/oksh/patch/0001-Use-typedef-for-function-pointer.patch b/pkg/oksh/patch/0001-Use-typedef-for-function-pointer.patch new file mode 100644 index 00000000..76f4ec8f --- /dev/null +++ b/pkg/oksh/patch/0001-Use-typedef-for-function-pointer.patch @@ -0,0 +1,55 @@ +From 39e18e1c8b6979de2c56caa232795a645e37f6b2 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Sat, 4 Apr 2020 20:43:09 -0700 +Subject: [PATCH] Use typedef for function pointer + +--- + emacs.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/emacs.c b/emacs.c +index 5a7edc0..b4fad8e 100644 +--- a/emacs.c ++++ b/emacs.c +@@ -49,8 +49,10 @@ static Area aedit; + #define KEOL 1 /* ^M, ^J */ + #define KINTR 2 /* ^G, ^C */ + ++typedef int (*kb_func)(int); ++ + struct x_ftab { +- int (*xf_func)(int c); ++ kb_func xf_func; + const char *xf_name; + short xf_flags; + }; +@@ -869,7 +871,7 @@ x_eot_del(int c) + return (x_del_char(c)); + } + +-static void * ++static kb_func + kb_find_hist_func(char c) + { + struct kb_entry *k; +@@ -1323,7 +1325,7 @@ kb_del(struct kb_entry *k) + } + + static struct kb_entry * +-kb_add_string(void *func, void *args, char *str) ++kb_add_string(kb_func func, void *args, char *str) + { + unsigned int ele, count; + struct kb_entry *k; +@@ -1358,7 +1360,7 @@ kb_add_string(void *func, void *args, char *str) + } + + static struct kb_entry * +-kb_add(void *func, ...) ++kb_add(kb_func func, ...) + { + va_list ap; + unsigned char ch; +-- +2.26.0 + diff --git a/pkg/oksh/src b/pkg/oksh/src new file mode 160000 +Subproject ff5ca9c1eaf8b0bbe6b75504e82e7bfdc243b89 diff --git a/pkg/oksh/ver b/pkg/oksh/ver new file mode 100644 index 00000000..c48e3431 --- /dev/null +++ b/pkg/oksh/ver @@ -0,0 +1 @@ +6.6 r0 |
